|
道具介紹:
雙擊後選擇玩家
在聊天頻道會發送目標玩家屬性
玩家名稱、玩家等級(EXP百分比)、當前HP/最大HP、當前MP/最大MP、魔攻、力、敏、智、精、體、魅、物理防禦、魔法防禦、地屬性抗性、火屬性抗性、水屬性抗性、風屬性抗性、迴避率(近)、閃避率(遠)
核心代碼增加
代碼增加位置:
1). 類位置:com/lineage/server/module/item/etcitem/event
2).新增加類名字:MIEWhoInfo
3).將編譯過的 MIEWhoInfo.class文件放入Server_Game.jar中
4).下面是核心代碼
- package com.lineage.server.module.item.etcitem.event;
- import com.lineage.server.datatables.readonly.DTExp;
- import com.lineage.server.interaction.net.packet.server.msg.SPMsgServer;
- import com.lineage.server.model.L1Object;
- import com.lineage.server.model.Instance.L1ItemInstance;
- import com.lineage.server.model.Instance.L1PcInstance;
- import com.lineage.server.module.MClsExecutorItem;
- import com.lineage.server.world.World;
- /**
- * 天堂查詢符<br>
- * 對玩家使用,查詢玩家屬性<br>
- *
- */
- public class MIEWhoInfo extends MClsExecutorItem {
- private MIEWhoInfo() {
- }
- public static MClsExecutorItem get() {
- return new MIEWhoInfo();
- }
- @Override
- public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
- final int spellsc_objid = data[0];
- final L1Object target = World.get().findObject(spellsc_objid);
- if (target != null && (target instanceof L1PcInstance)) {
- L1PcInstance find = (L1PcInstance) target;
- pc.sendPacket(new SPMsgServer("玩家名稱:" + find.getName()));
- pc.sendPacket(new SPMsgServer("等級:" + find.getLevel() + "(" + DTExp.getExpPercentage(find.getLevel(), (int) find.getExp()) + "%)"));
- pc.sendPacket(new SPMsgServer("HP:" + find.getCurrentHp() + " / " + find.getMaxHp()));
- pc.sendPacket(new SPMsgServer("MP:" + find.getCurrentMp() + " / " + find.getMaxMp()));
- pc.sendPacket(new SPMsgServer("魔攻:" + String.valueOf(find.getSp())));
- pc.sendPacket(new SPMsgServer("力量:" + String.valueOf(find.getStr())));
- pc.sendPacket(new SPMsgServer("智力:" + String.valueOf(find.getInt())));
- pc.sendPacket(new SPMsgServer("敏捷:" + String.valueOf(find.getDex())));
- pc.sendPacket(new SPMsgServer("精神:" + String.valueOf(find.getWis())));
- pc.sendPacket(new SPMsgServer("體質:" + String.valueOf(find.getCon())));
- pc.sendPacket(new SPMsgServer("魅力:" + String.valueOf(find.getCha())));
- pc.sendPacket(new SPMsgServer("物理防禦:" + String.valueOf(find.getAc())));
- pc.sendPacket(new SPMsgServer("魔法防禦:" + String.valueOf(find.getMr())));
- pc.sendPacket(new SPMsgServer("正義值:" + String.valueOf(find.getLawful())));
- pc.sendPacket(new SPMsgServer("地屬性抗性:" + String.valueOf(find.getDfEarth())));
- pc.sendPacket(new SPMsgServer("火屬性抗性:" + String.valueOf(find.getDfFire())));
- pc.sendPacket(new SPMsgServer("水屬性抗性:" + String.valueOf(find.getDfWater())));
- pc.sendPacket(new SPMsgServer("風屬性抗性:" + String.valueOf(find.getDfWind())));
- pc.sendPacket(new SPMsgServer("迴避率(近):" + String.valueOf(find.getEr())));
- pc.sendPacket(new SPMsgServer("閃避率(遠):" + String.valueOf(find.get_evasion())));
- }
- }
- }
[color=rgb(15, 167, 255) !important]複製代碼
|
|