签到天数: 6 天
[LV.2]偶尔看看I
74
9
355
中级会员
// 是否為飛天椅子 public static int isFlyChair(int ItemId) { switch (ItemId) { case 3015564: // 太陽椅子 return 1933256; case 3015570: // 土星椅子 return 1933262; } return 0; // 不調用 }
public static final void UseChair(final int itemId, final MapleClient c, final MapleCharacter chr) { // ... chr.setChair(itemId); // 若使用的椅子 id 包含在飛天椅中就使用坐騎方式;如果不包含在裡面就會回傳 0,跑 else 語句,普通坐椅子的方式 if (GameConstants.isFlyChair(itemId) > 0) { // 坐騎方式 final List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.MONSTER_RIDING, 0)); chr.getClient().sendPacket(MaplePacketCreator.giveMount(GameConstants.isFlyChair(itemId), 0, stat)); chr.getMap().broadcastMessage(chr, MaplePacketCreator.showMonsterRiding(chr.getId(), stat, GameConstants.isFlyChair(itemId), 0), false); } else { // 普通坐椅子 chr.getMap().broadcastMessage(chr, MaplePacketCreator.showChair(chr.getId(), itemId), false); } c.getSession().write(MaplePacketCreator.enableActions()); }
使用道具 举报
签到天数: 412 天
[LV.9]以坛为家II
292
149
8417
论坛元老
该用户从未签到
0
5
19
新手上路
签到天数: 9 天
[LV.3]偶尔看看II
2
35
337
签到天数: 1 天
[LV.1]初来乍到
36
签到天数: 10 天
66
71
注册会员
55
168
本版积分规则 发表回复 回帖后跳转到最后一页