Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2UFS
- Index: java/net/sf/l2j/gameserver/model/actor/FakePc.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/FakePc.java (nonexistent)
- +++ java/net/sf/l2j/gameserver/model/actor/FakePc.java (working copy)
- @@ -0,0 +1,49 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +
- +package net.sf.l2j.gameserver.model.actor;
- +
- +public class FakePc
- +{
- + public String name;
- + public int nameColor;
- + public String title;
- + public int titleColor;
- + public double radius;
- + public double height;
- + public int race;
- + public int sex;
- + public int classId;
- + public int hairStyle;
- + public int hairColor;
- + public int face;
- + public byte hero;
- + public int enchant;
- +
- + public int rightHand;
- + public int leftHand;
- + public int chest;
- + public int legs;
- + public int gloves;
- + public int feet;
- + public int hair;
- + public int hair2;
- +
- + public int clanId;
- + public int clanCrest;
- + public int allyId;
- + public int allyCrest;
- + public int pledge;
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/GameServer.java (revision 178)
- +++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
- @@ -46,6 +46,7 @@
- import net.sf.l2j.gameserver.datatables.ClanTable;
- import net.sf.l2j.gameserver.datatables.DoorTable;
- import net.sf.l2j.gameserver.datatables.EnchantTable;
- +import net.sf.l2j.gameserver.datatables.FakePcsTable;
- import net.sf.l2j.gameserver.datatables.FenceTable;
- import net.sf.l2j.gameserver.datatables.FishTable;
- import net.sf.l2j.gameserver.datatables.GmListTable;
- @@ -264,6 +265,7 @@
- BufferTable.getInstance();
- HerbDropTable.getInstance();
- NpcTable.getInstance();
- + FakePcsTable.getInstance();
- NpcWalkerRoutesTable.getInstance();
- DoorTable.getInstance();
- StaticObjects.load();
- Index: java/net/sf/l2j/gameserver/model/actor/status/AttackableStatus.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/status/AttackableStatus.java (revision 178)
- +++ java/net/sf/l2j/gameserver/model/actor/status/AttackableStatus.java (working copy)
- @@ -14,8 +14,11 @@
- */
- package net.sf.l2j.gameserver.model.actor.status;
- +import java.util.Collection;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo;
- public class AttackableStatus extends NpcStatus
- {
- @@ -58,6 +61,22 @@
- }
- @Override
- + public void setCurrentHp(double newHp, boolean broadcastPacket)
- + {
- + super.setCurrentHp(newHp, broadcastPacket);
- +
- + if (getActiveChar().getFakePc() != null)
- + {
- + Collection<L2PcInstance> plrs = getActiveChar().getKnownList().getKnownType(L2PcInstance.class);
- + for (L2PcInstance player : plrs)
- + {
- + if (player != null)
- + player.sendPacket(new AbstractNpcInfo.NpcInfo(getActiveChar(), player));
- + }
- + }
- + }
- +
- + @Override
- public L2Attackable getActiveChar()
- {
- return (L2Attackable) super.getActiveChar();
- Index: dist/data/xml/fake_pcs.xml
- ===================================================================
- --- dist/data/xml/fake_pcs.xml (nonexistent)
- +++ dist/data/xml/fake_pcs.xml (working copy)
- @@ -0,0 +1,8 @@
- +<?xml version="1.0" encoding="UTF-8"?>
- +<list>
- + <npc id="31688">
- + <appearance name="Zeus" name_color="FFFFFF" title="Olympiad Manager" title_color="FF9900" radius="9" height="22" race="0" sex="0" class="10" hair_style="0" hair_color="3" face="0" hero="1" enchant="21" />
- + <items right_hand="6579" left_hand="6377" chest="2407" legs="0" gloves="5767" feet="5779" hair="8563" hair2="0" />
- + <clan clan_id="0" clan_crest="0" ally_id="0" ally_crest="0" pledge="0" />
- + </npc>
- +</list>
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (revision 178)
- +++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (working copy)
- @@ -23,6 +23,7 @@
- import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
- import net.sf.l2j.gameserver.datatables.AnnouncementTable;
- import net.sf.l2j.gameserver.datatables.DoorTable;
- +import net.sf.l2j.gameserver.datatables.FakePcsTable;
- import net.sf.l2j.gameserver.datatables.GmListTable;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.MultisellData;
- @@ -216,6 +217,11 @@
- DoorTable.getInstance().reload();
- activeChar.sendMessage("Doors instance has been reloaded.");
- }
- + else if (type.startsWith("fpc"))
- + {
- + FakePcsTable.getInstance().reload();
- + activeChar.sendMessage("Fake PC templates have been reloaded.");
- + }
- else if (type.startsWith("htm"))
- {
- HtmCache.getInstance().reload();
- @@ -263,7 +269,7 @@
- }
- else
- {
- - activeChar.sendMessage("Usage : //reload <acar|announcement|config|crest|door>");
- + activeChar.sendMessage("Usage : //reload <acar|announcement|config|crest|door|fpc|>");
- activeChar.sendMessage("Usage : //reload <htm|item|multisell|npc|npcwalker>");
- activeChar.sendMessage("Usage : //reload <pvp|skill|teleport|zone>");
- }
- @@ -272,7 +278,7 @@
- }
- catch (Exception e)
- {
- - activeChar.sendMessage("Usage : //reload <acar|announcement|config|crest|door>");
- + activeChar.sendMessage("Usage : //reload <acar|announcement|config|crest|door|fpc|>");
- activeChar.sendMessage("Usage : //reload <htm|item|multisell|npc|npcwalker>");
- activeChar.sendMessage("Usage : //reload <pvp|skill|teleport|zone>");
- }
- Index: java/net/sf/l2j/gameserver/datatables/FakePcsTable.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/datatables/FakePcsTable.java (nonexistent)
- +++ java/net/sf/l2j/gameserver/datatables/FakePcsTable.java (working copy)
- @@ -0,0 +1,130 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +
- +package net.sf.l2j.gameserver.datatables;
- +
- +import java.io.File;
- +import java.util.HashMap;
- +import java.util.Map;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.gameserver.model.actor.FakePc;
- +import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory;
- +
- +import org.w3c.dom.Document;
- +import org.w3c.dom.Node;
- +
- +public class FakePcsTable
- +{
- + private static Logger _log = Logger.getLogger(FakePcsTable.class.getName());
- + private Map<Integer, FakePc> _fakePcs;
- +
- + public static FakePcsTable getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + protected FakePcsTable()
- + {
- + _fakePcs = new HashMap<>();
- + load();
- + }
- +
- + public void reload()
- + {
- + _fakePcs.clear();
- + load();
- + }
- +
- + private void load()
- + {
- + try
- + {
- + File f = new File("./data/xml/fake_pcs.xml");
- + Document doc = XMLDocumentFactory.getInstance().loadDocument(f);
- +
- + Node n = doc.getFirstChild();
- + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
- + {
- + if (d.getNodeName().equalsIgnoreCase("npc"))
- + {
- + FakePc fpc = new FakePc();
- +
- + int npcId = Integer.valueOf(d.getAttributes().getNamedItem("id").getNodeValue());
- +
- + for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling())
- + {
- + if ("appearance".equalsIgnoreCase(cd.getNodeName()))
- + {
- + fpc.name = cd.getAttributes().getNamedItem("name").getNodeValue();
- + fpc.nameColor = Integer.decode("0x" + cd.getAttributes().getNamedItem("name_color").getNodeValue());
- + fpc.title = cd.getAttributes().getNamedItem("title").getNodeValue();
- + fpc.titleColor = Integer.decode("0x" + cd.getAttributes().getNamedItem("title_color").getNodeValue());
- + fpc.radius = Integer.valueOf(cd.getAttributes().getNamedItem("radius").getNodeValue());
- + fpc.height = Integer.valueOf(cd.getAttributes().getNamedItem("height").getNodeValue());
- + fpc.race = Integer.valueOf(cd.getAttributes().getNamedItem("race").getNodeValue());
- + fpc.sex = Integer.valueOf(cd.getAttributes().getNamedItem("sex").getNodeValue());
- + fpc.classId = Integer.valueOf(cd.getAttributes().getNamedItem("class").getNodeValue());
- + fpc.hairStyle = Integer.valueOf(cd.getAttributes().getNamedItem("hair_style").getNodeValue());
- + fpc.hairColor = Integer.valueOf(cd.getAttributes().getNamedItem("hair_color").getNodeValue());
- + fpc.face = Integer.valueOf(cd.getAttributes().getNamedItem("face").getNodeValue());
- + fpc.hero = Byte.parseByte(cd.getAttributes().getNamedItem("hero").getNodeValue());
- + fpc.enchant = Integer.valueOf(cd.getAttributes().getNamedItem("enchant").getNodeValue());
- + }
- + else if ("items".equalsIgnoreCase(cd.getNodeName()))
- + {
- + fpc.rightHand = Integer.valueOf(cd.getAttributes().getNamedItem("right_hand").getNodeValue());
- + fpc.leftHand = Integer.valueOf(cd.getAttributes().getNamedItem("left_hand").getNodeValue());
- + fpc.chest = Integer.valueOf(cd.getAttributes().getNamedItem("chest").getNodeValue());
- + fpc.legs = Integer.valueOf(cd.getAttributes().getNamedItem("legs").getNodeValue());
- + fpc.gloves = Integer.valueOf(cd.getAttributes().getNamedItem("gloves").getNodeValue());
- + fpc.feet = Integer.valueOf(cd.getAttributes().getNamedItem("feet").getNodeValue());
- + fpc.hair = Integer.valueOf(cd.getAttributes().getNamedItem("hair").getNodeValue());
- + fpc.hair2 = Integer.valueOf(cd.getAttributes().getNamedItem("hair2").getNodeValue());
- + }
- + else if ("clan".equalsIgnoreCase(cd.getNodeName()))
- + {
- + fpc.clanId = Integer.valueOf(cd.getAttributes().getNamedItem("clan_id").getNodeValue());
- + fpc.clanCrest = Integer.valueOf(cd.getAttributes().getNamedItem("clan_crest").getNodeValue());
- + fpc.allyId = Integer.valueOf(cd.getAttributes().getNamedItem("ally_id").getNodeValue());
- + fpc.allyCrest = Integer.valueOf(cd.getAttributes().getNamedItem("ally_crest").getNodeValue());
- + fpc.pledge = Integer.valueOf(cd.getAttributes().getNamedItem("pledge").getNodeValue());
- + }
- +
- + }
- +
- + _fakePcs.put(npcId, fpc);
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "FakePcsTable: Error loading from database:" + e.getMessage(), e);
- + }
- +
- + _log.info("FakePcsTable: Loaded " + _fakePcs.size() + " NPC to PC templates.");
- + }
- +
- + public FakePc getFakePc(int npcId)
- + {
- + return _fakePcs.get(npcId);
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final FakePcsTable _instance = new FakePcsTable();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 178)
- +++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)
- @@ -28,6 +28,7 @@
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- +import net.sf.l2j.gameserver.datatables.FakePcsTable;
- import net.sf.l2j.gameserver.datatables.HelperBuffTable;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- @@ -120,6 +121,7 @@
- private double _currentCollisionHeight; // used for npc grow effect skills
- private double _currentCollisionRadius; // used for npc grow effect skills
- + private FakePc _fakePc = null;
- private GlobalEvent _globEvent = null;
- private int _currentSsCount = 0;
- @@ -191,6 +193,8 @@
- _currentCollisionHeight = template.getCollisionHeight();
- _currentCollisionRadius = template.getCollisionRadius();
- + _fakePc = FakePcsTable.getInstance().getFakePc(template.getNpcId());
- +
- // Set the name of the L2Character
- setName(template.getName());
- }
- @@ -1529,6 +1533,11 @@
- return _currentCollisionRadius;
- }
- + public FakePc getFakePc()
- + {
- + return _fakePc;
- + }
- +
- public void setGlobalEvent(GlobalEvent globEvent)
- {
- _globEvent = globEvent;
- @@ -1667,4 +1676,14 @@
- {
- return getTemplate().getSkills();
- }
- +
- + public double getMovementSpeedMultiplier()
- + {
- + return 0;
- + }
- +
- + public double getAttackSpeedMultiplier()
- + {
- + return 0;
- + }
- }
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java (revision 178)
- +++ java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java (working copy)
- @@ -14,10 +14,13 @@
- */
- package net.sf.l2j.gameserver.network.serverpackets;
- +import java.text.DecimalFormat;
- +
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- import net.sf.l2j.gameserver.model.L2Clan;
- import net.sf.l2j.gameserver.model.L2Object.PolyType;
- +import net.sf.l2j.gameserver.model.actor.FakePc;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.L2Summon;
- @@ -120,69 +123,197 @@
- @Override
- protected void writeImpl()
- {
- - writeC(0x16);
- -
- - writeD(_npc.getObjectId());
- - writeD(_idTemplate + 1000000);
- - writeD(_isAttackable ? 1 : 0);
- -
- - writeD(_x);
- - writeD(_y);
- - writeD(_z);
- - writeD(_heading);
- -
- - writeD(0x00);
- -
- - writeD(_mAtkSpd);
- - writeD(_pAtkSpd);
- - writeD(_runSpd);
- - writeD(_walkSpd);
- - writeD(_runSpd);
- - writeD(_walkSpd);
- - writeD(_runSpd);
- - writeD(_walkSpd);
- - writeD(_runSpd);
- - writeD(_walkSpd);
- -
- - writeF(_npc.getStat().getMovementSpeedMultiplier());
- - writeF(_npc.getStat().getAttackSpeedMultiplier());
- -
- - writeF(_collisionRadius);
- - writeF(_collisionHeight);
- -
- - writeD(_rhand);
- - writeD(_chest);
- - writeD(_lhand);
- -
- - writeC(1); // name above char
- - writeC(_npc.isRunning() ? 1 : 0);
- - writeC(_npc.isInCombat() ? 1 : 0);
- - writeC(_npc.isAlikeDead() ? 1 : 0);
- - writeC(_isSummoned ? 2 : 0);
- -
- - writeS(_name);
- - writeS(_title);
- -
- - writeD(0x00);
- - writeD(0x00);
- - writeD(0x00);
- -
- - writeD(_npc.getAbnormalEffect());
- -
- - writeD(_clanId);
- - writeD(_clanCrest);
- - writeD(_allyId);
- - writeD(_allyCrest);
- -
- - writeC(_npc.isFlying() ? 2 : 0);
- - writeC(0x00);
- -
- - writeF(_collisionRadius);
- - writeF(_collisionHeight);
- -
- - writeD(_enchantEffect);
- - writeD(_npc.isFlying() ? 1 : 0);
- + FakePc fpc = _npc.getFakePc();
- + if (fpc != null)
- + {
- + writeC(0x03);
- + writeD(_x);
- + writeD(_y);
- + writeD(_z);
- + writeD(_heading);
- + writeD(_npc.getObjectId());
- + writeS(fpc.name); // visible name
- + writeD(fpc.race);
- + writeD(fpc.sex);
- + writeD(fpc.classId);
- +
- + writeD(0x00); // PAPERDOLL_HAIR
- + writeD(0x00); //
- + writeD(fpc.rightHand); // PAPERDOLL_RHAND
- + writeD(fpc.leftHand); // PAPERDOLL_LHAND
- + writeD(fpc.gloves); // PAPERDOLL_GLOVES
- + writeD(fpc.chest); // PAPERDOLL_CHEST
- + writeD(fpc.legs); // PAPERDOLL_LEGS
- + writeD(fpc.feet); // PAPERDOLL_FEET
- + writeD(fpc.hair); // PAPERDOLL_HAIR
- + writeD(fpc.rightHand); // PAPERDOLL_RHAND
- + writeD(fpc.hair); // PAPERDOLL_HAIR
- + writeD(fpc.hair2); // PAPERDOLL_HAIR2
- +
- + write('H', 0, 24);
- +
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeD(_mAtkSpd);
- + writeD(_pAtkSpd);
- +
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeD(_runSpd);
- + writeD(_walkSpd);
- + writeD(_runSpd); // swim run speed
- + writeD(_walkSpd); // swim walk speed
- + writeD(_runSpd); // fly run speed
- + writeD(_walkSpd); // fly walk speed
- + writeD(_runSpd);
- + writeD(_walkSpd);
- + writeF(_npc.getMovementSpeedMultiplier()); // _activeChar.getProperMultiplier()
- + writeF(_npc.getAttackSpeedMultiplier()); // _activeChar.getAttackSpeedMultiplier()
- +
- + writeF(fpc.radius);
- + writeF(fpc.height);
- +
- + writeD(fpc.hairStyle);
- + writeD(fpc.hairColor);
- + writeD(fpc.face);
- +
- + if (_npc instanceof L2MonsterInstance)
- + writeS(fpc.title + " - HP " + new DecimalFormat("#.##").format(100.0 * _npc.getCurrentHp() / _npc.getMaxHp()) + "%"); // visible title
- + else
- + writeS(fpc.title);
- +
- + writeD(fpc.clanId); // clan id
- + writeD(fpc.clanCrest); // clan crest id
- + writeD(fpc.allyId); // ally id
- + writeD(fpc.allyCrest); // ally crest id
- +
- + writeD(0x00);
- + writeC(0x01); // standing = 1 sitting = 0
- +
- + writeC(_npc.isRunning() ? 1 : 0); // running = 1 walking = 0
- + writeC(_npc.isInCombat() ? 1 : 0);
- + writeC(_npc.isAlikeDead() ? 1 : 0);
- +
- + write('C', 0, 3);
- +
- + writeH(0x00); // cubic count
- +
- + writeC(0x00); // invisible = 1 visible =0
- + writeD(0x00); // abnormal effect
- + writeC(0x00); // isFlying() ? 2 : 0
- + writeH(0x00); // getRecomHave(): Blue value for name (0 = white, 255 = pure blue)
- +
- + writeD(fpc.classId);
- + writeD(0x00); // ?
- + writeD(0x00); // ?
- + writeC(fpc.enchant);
- + writeC(0x00); // team circle around feet 1= Blue, 2 = red
- +
- + writeD(0x00); // getClanCrestLargeId()
- +
- + writeC(0x00); // isNoble(): Symbol on char menu ctrl+I
- + writeC(fpc.hero); // Hero Aura
- +
- + writeC(0x00); // 0x01: Fishing Mode (Cant be undone by setting back to 0)
- + write('D', 0, 3);
- +
- + writeD(fpc.nameColor);
- + writeD(_heading);
- + writeD(0x00); // pledge class
- + writeD(0x00); // pledge type
- + writeD(fpc.titleColor);
- + writeD(0x00); // cursed weapon level
- + }
- + else
- + {
- + writeC(0x16);
- +
- + writeD(_npc.getObjectId());
- + writeD(_idTemplate + 1000000);
- + writeD(_isAttackable ? 1 : 0);
- +
- + writeD(_x);
- + writeD(_y);
- + writeD(_z);
- + writeD(_heading);
- +
- + writeD(0x00);
- +
- + writeD(_mAtkSpd);
- + writeD(_pAtkSpd);
- + writeD(_runSpd);
- + writeD(_walkSpd);
- + writeD(_runSpd);
- + writeD(_walkSpd);
- + writeD(_runSpd);
- + writeD(_walkSpd);
- + writeD(_runSpd);
- + writeD(_walkSpd);
- +
- + writeF(_npc.getStat().getMovementSpeedMultiplier());
- + writeF(_npc.getStat().getAttackSpeedMultiplier());
- +
- + writeF(_collisionRadius);
- + writeF(_collisionHeight);
- +
- + writeD(_rhand);
- + writeD(_chest);
- + writeD(_lhand);
- +
- + writeC(1); // name above char
- + writeC(_npc.isRunning() ? 1 : 0);
- + writeC(_npc.isInCombat() ? 1 : 0);
- + writeC(_npc.isAlikeDead() ? 1 : 0);
- + writeC(_isSummoned ? 2 : 0);
- +
- + writeS(_name);
- + writeS(_title);
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeD(_npc.getAbnormalEffect());
- +
- + writeD(_clanId);
- + writeD(_clanCrest);
- + writeD(_allyId);
- + writeD(_allyCrest);
- +
- + writeC(_npc.isFlying() ? 2 : 0);
- + writeC(0x00);
- +
- + writeF(_collisionRadius);
- + writeF(_collisionHeight);
- +
- + writeD(_enchantEffect);
- + writeD(_npc.isFlying() ? 1 : 0);
- + }
- }
- +
- + private void write(char type, int value, int times)
- + {
- + for (int i = 0; i < times; i++)
- + {
- + switch (type)
- + {
- + case 'C':
- + writeC(value);
- + break;
- + case 'D':
- + writeD(value);
- + break;
- + case 'F':
- + writeF(value);
- + break;
- + case 'H':
- + writeH(value);
- + break;
- + }
- + }
- + }
- }
- /**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement