Rogue 248 Опубликовано 12 марта, 2020 На месте появления любого стороннего персонажа появляется вот такой питух(это не ошибка): Спойлер Но при этом зашедший персонаж показывается нормально, что вводит меня в ступор. Если с CharInfo все нормально, то откуда берется питух? Структура пакета вроде верна, несколько раз чекал. Спойлер package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.manager.CursedWeaponManager; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.model.location.Location; import net.sf.l2j.gameserver.skills.AbnormalEffect; public class CharInfo extends L2GameServerPacket { private final Player _activeChar; private final Inventory _inv; public CharInfo(Player cha) { _activeChar = cha; _inv = _activeChar.getInventory(); } @Override protected final void writeImpl() { boolean gmSeeInvis = false; if (_activeChar.getAppearance().getInvisible()) { Player tmp = getClient().getActiveChar(); if (tmp != null && tmp.isGM()) gmSeeInvis = true; } writeC(0x31); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); //writeD(_activeChar.getHeading()); writeD(0x00); writeD(_activeChar.getObjectId()); writeS(_activeChar.getName()); writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); if (_activeChar.getClassIndex() == 0) writeD(_activeChar.getClassId().getId()); else writeD(_activeChar.getBaseClass()); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); // c6 new h's writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND)); writeD(0x00); writeD(0x00); //123 writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); writeD(_activeChar.getMAtkSpd()); writeD(_activeChar.getPAtkSpd()); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); int _runSpd = _activeChar.getStat().getBaseRunSpeed(); int _walkSpd = _activeChar.getStat().getBaseWalkSpeed(); int _swimSpd = _activeChar.getStat().getBaseSwimSpeed(); writeD(_runSpd); // base run speed writeD(_walkSpd); // base walk speed writeD(_swimSpd); // swim run speed writeD(_swimSpd); // swim walk speed writeD(_runSpd); writeD(_walkSpd); writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier if (_activeChar.getMountType() != 0) { writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius()); writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight()); } else { writeF(_activeChar.getCollisionRadius()); writeF(_activeChar.getCollisionHeight()); } writeD(_activeChar.getAppearance().getHairStyle()); writeD(_activeChar.getAppearance().getHairColor()); writeD(_activeChar.getAppearance().getFace()); if (gmSeeInvis) writeS("Invisible"); else writeS(_activeChar.getTitle()); //cursed writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); writeD(0); writeC(_activeChar.isSitting() ? 0 : 1); // standing = 1 sitting = 0 writeC(_activeChar.isRunning() ? 1 : 0); // running = 1 walking = 0 writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); if (gmSeeInvis) writeC(0); else writeC(_activeChar.getAppearance().getInvisible() ? 1 : 0); // invisible = 1 visible =0 writeC(_activeChar.getMountType()); // 1 on strider 2 on wyvern 0 no mount writeC(_activeChar.getStoreType().getId()); // 1 - sellshop writeH(_activeChar.getCubics().size()); for (int id : _activeChar.getCubics().keySet()) writeH(id); writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0); if (gmSeeInvis) writeD((_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask())); else writeD(_activeChar.getAbnormalEffect()); writeC(0x00); //writeC(_activeChar.getRecomLeft()); writeH(_activeChar.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue) writeD(0x00); writeD(_activeChar.getClassId().getId()); writeD(0x00); writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect()); if (_activeChar.getTeam() == 1 || (Config.PLAYER_SPAWN_PROTECTION > 0 && _activeChar.isSpawnProtected())) writeC(0x01); // team circle around feet 1= Blue, 2 = red else if (_activeChar.getTeam() == 2) writeC(0x02); // team circle around feet 1= Blue, 2 = red else writeC(0x00); // team circle around feet 1= Blue, 2 = red writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0) Location loc = _activeChar.getFishingLoc(); if (loc != null) { writeD(loc.getX()); writeD(loc.getY()); writeD(loc.getZ()); } else { writeD(0); writeD(0); writeD(0); } writeD(_activeChar.getAppearance().getNameColor()); writeD(_activeChar.getHeading()); //writeD(0x00); // isRunning() as in UserInfo? writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); writeD(_activeChar.getAppearance().getTitleColor()); if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x01); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); } } Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
gvb 666 Опубликовано 12 марта, 2020 (изменено) 1 hour ago, Rogue said: На месте появления любого стороннего персонажа появляется вот такой питух(это не ошибка): Reveal hidden contents Но при этом зашедший персонаж показывается нормально, что вводит меня в ступор. Если с CharInfo все нормально, то откуда берется питух? Структура пакета вроде верна, несколько раз чекал. сам пакет (Reveal hidden contents) package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.manager.CursedWeaponManager; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.model.location.Location; import net.sf.l2j.gameserver.skills.AbnormalEffect; public class CharInfo extends L2GameServerPacket { private final Player _activeChar; private final Inventory _inv; public CharInfo(Player cha) { _activeChar = cha; _inv = _activeChar.getInventory(); } @Override protected final void writeImpl() { boolean gmSeeInvis = false; if (_activeChar.getAppearance().getInvisible()) { Player tmp = getClient().getActiveChar(); if (tmp != null && tmp.isGM()) gmSeeInvis = true; } writeC(0x31); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); //writeD(_activeChar.getHeading()); writeD(0x00); writeD(_activeChar.getObjectId()); writeS(_activeChar.getName()); writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); if (_activeChar.getClassIndex() == 0) writeD(_activeChar.getClassId().getId()); else writeD(_activeChar.getBaseClass()); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); // c6 new h's writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND)); writeD(0x00); writeD(0x00); //123 writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); writeD(_activeChar.getMAtkSpd()); writeD(_activeChar.getPAtkSpd()); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); int _runSpd = _activeChar.getStat().getBaseRunSpeed(); int _walkSpd = _activeChar.getStat().getBaseWalkSpeed(); int _swimSpd = _activeChar.getStat().getBaseSwimSpeed(); writeD(_runSpd); // base run speed writeD(_walkSpd); // base walk speed writeD(_swimSpd); // swim run speed writeD(_swimSpd); // swim walk speed writeD(_runSpd); writeD(_walkSpd); writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier if (_activeChar.getMountType() != 0) { writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius()); writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight()); } else { writeF(_activeChar.getCollisionRadius()); writeF(_activeChar.getCollisionHeight()); } writeD(_activeChar.getAppearance().getHairStyle()); writeD(_activeChar.getAppearance().getHairColor()); writeD(_activeChar.getAppearance().getFace()); if (gmSeeInvis) writeS("Invisible"); else writeS(_activeChar.getTitle()); //cursed writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); writeD(0); writeC(_activeChar.isSitting() ? 0 : 1); // standing = 1 sitting = 0 writeC(_activeChar.isRunning() ? 1 : 0); // running = 1 walking = 0 writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); if (gmSeeInvis) writeC(0); else writeC(_activeChar.getAppearance().getInvisible() ? 1 : 0); // invisible = 1 visible =0 writeC(_activeChar.getMountType()); // 1 on strider 2 on wyvern 0 no mount writeC(_activeChar.getStoreType().getId()); // 1 - sellshop writeH(_activeChar.getCubics().size()); for (int id : _activeChar.getCubics().keySet()) writeH(id); writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0); if (gmSeeInvis) writeD((_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask())); else writeD(_activeChar.getAbnormalEffect()); writeC(0x00); //writeC(_activeChar.getRecomLeft()); writeH(_activeChar.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue) writeD(0x00); writeD(_activeChar.getClassId().getId()); writeD(0x00); writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect()); if (_activeChar.getTeam() == 1 || (Config.PLAYER_SPAWN_PROTECTION > 0 && _activeChar.isSpawnProtected())) writeC(0x01); // team circle around feet 1= Blue, 2 = red else if (_activeChar.getTeam() == 2) writeC(0x02); // team circle around feet 1= Blue, 2 = red else writeC(0x00); // team circle around feet 1= Blue, 2 = red writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0) Location loc = _activeChar.getFishingLoc(); if (loc != null) { writeD(loc.getX()); writeD(loc.getY()); writeD(loc.getZ()); } else { writeD(0); writeD(0); writeD(0); } writeD(_activeChar.getAppearance().getNameColor()); writeD(_activeChar.getHeading()); //writeD(0x00); // isRunning() as in UserInfo? writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); writeD(_activeChar.getAppearance().getTitleColor()); if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x01); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); } } Не верная структура, отпиши мне в скайпе, решим) Попробуй вот так. Quote writeD(CursedWeaponManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x01); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); Изменено 12 марта, 2020 пользователем gvb Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Rogue 248 Опубликовано 12 марта, 2020 А все понял, глянул пакет с птса, выяснилось, что сервер мне слал некого агатиона с айди 1, которого не существует. Теперь нету питуха)) Спойлер package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.manager.CursedWeaponManager; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.model.location.Location; import net.sf.l2j.gameserver.skills.AbnormalEffect; public class CharInfo extends L2GameServerPacket { private final Player _activeChar; private final Inventory _inv; public CharInfo(Player cha) { _activeChar = cha; _inv = _activeChar.getInventory(); } @Override protected final void writeImpl() { boolean gmSeeInvis = false; if (_activeChar.getAppearance().getInvisible()) { Player tmp = getClient().getActiveChar(); if (tmp != null && tmp.isGM()) gmSeeInvis = true; } writeC(0x31); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); //writeD(_activeChar.getHeading()); writeD(0x00); writeD(_activeChar.getObjectId()); writeS(_activeChar.getName()); writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); if (_activeChar.getClassIndex() == 0) writeD(_activeChar.getClassId().getId()); else writeD(_activeChar.getBaseClass()); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); // c6 new h's writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND)); writeD(0x00); writeD(0x00); //123 writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); writeD(_activeChar.getMAtkSpd()); writeD(_activeChar.getPAtkSpd()); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); int _runSpd = _activeChar.getStat().getBaseRunSpeed(); int _walkSpd = _activeChar.getStat().getBaseWalkSpeed(); int _swimSpd = _activeChar.getStat().getBaseSwimSpeed(); writeD(_runSpd); // base run speed writeD(_walkSpd); // base walk speed writeD(_swimSpd); // swim run speed writeD(_swimSpd); // swim walk speed writeD(_runSpd); writeD(_walkSpd); writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier if (_activeChar.getMountType() != 0) { writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius()); writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight()); } else { writeF(_activeChar.getCollisionRadius()); writeF(_activeChar.getCollisionHeight()); } writeD(_activeChar.getAppearance().getHairStyle()); writeD(_activeChar.getAppearance().getHairColor()); writeD(_activeChar.getAppearance().getFace()); if (gmSeeInvis) writeS("Invisible"); else writeS(_activeChar.getTitle()); //cursed writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); writeD(0); writeC(_activeChar.isSitting() ? 0 : 1); // standing = 1 sitting = 0 writeC(_activeChar.isRunning() ? 1 : 0); // running = 1 walking = 0 writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); if (gmSeeInvis) writeC(0); else writeC(_activeChar.getAppearance().getInvisible() ? 1 : 0); // invisible = 1 visible =0 writeC(_activeChar.getMountType()); // 1 on strider 2 on wyvern 0 no mount writeC(_activeChar.getStoreType().getId()); // 1 - sellshop writeH(_activeChar.getCubics().size()); for (int id : _activeChar.getCubics().keySet()) writeH(id); writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0); if (gmSeeInvis) writeD((_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask())); else writeD(_activeChar.getAbnormalEffect()); writeC(0x00); //writeC(_activeChar.getRecomLeft()); writeH(_activeChar.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue) writeD(0x00); writeD(_activeChar.getClassId().getId()); writeD(0x00); writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect()); if (_activeChar.getTeam() == 1 || (Config.PLAYER_SPAWN_PROTECTION > 0 && _activeChar.isSpawnProtected())) writeC(0x01); // team circle around feet 1= Blue, 2 = red else if (_activeChar.getTeam() == 2) writeC(0x02); // team circle around feet 1= Blue, 2 = red else writeC(0x00); // team circle around feet 1= Blue, 2 = red writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0) Location loc = _activeChar.getFishingLoc(); if (loc != null) { writeD(loc.getX()); writeD(loc.getY()); writeD(loc.getZ()); } else { writeD(0); writeD(0); writeD(0); } writeD(_activeChar.getAppearance().getNameColor()); writeD(_activeChar.getHeading()); //writeD(0x00); // isRunning() as in UserInfo? writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); writeD(_activeChar.getAppearance().getTitleColor()); if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x01); writeD(0x00); writeD(0x00); // writeD(0x00); } } Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
gvb 666 Опубликовано 12 марта, 2020 Just now, Rogue said: А все понял, глянул пакет с птса, выяснилось, что сервер мне слал некого агатиона с айди 1, которого не существует. Теперь нету питуха)) Reveal hidden contents package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.manager.CursedWeaponManager; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.model.location.Location; import net.sf.l2j.gameserver.skills.AbnormalEffect; public class CharInfo extends L2GameServerPacket { private final Player _activeChar; private final Inventory _inv; public CharInfo(Player cha) { _activeChar = cha; _inv = _activeChar.getInventory(); } @Override protected final void writeImpl() { boolean gmSeeInvis = false; if (_activeChar.getAppearance().getInvisible()) { Player tmp = getClient().getActiveChar(); if (tmp != null && tmp.isGM()) gmSeeInvis = true; } writeC(0x31); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); //writeD(_activeChar.getHeading()); writeD(0x00); writeD(_activeChar.getObjectId()); writeS(_activeChar.getName()); writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); if (_activeChar.getClassIndex() == 0) writeD(_activeChar.getClassId().getId()); else writeD(_activeChar.getBaseClass()); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(0x00); //writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); // c6 new h's writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND)); writeD(0x00); writeD(0x00); //123 writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); writeD(_activeChar.getMAtkSpd()); writeD(_activeChar.getPAtkSpd()); writeD(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); int _runSpd = _activeChar.getStat().getBaseRunSpeed(); int _walkSpd = _activeChar.getStat().getBaseWalkSpeed(); int _swimSpd = _activeChar.getStat().getBaseSwimSpeed(); writeD(_runSpd); // base run speed writeD(_walkSpd); // base walk speed writeD(_swimSpd); // swim run speed writeD(_swimSpd); // swim walk speed writeD(_runSpd); writeD(_walkSpd); writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier if (_activeChar.getMountType() != 0) { writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius()); writeF(NpcData.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight()); } else { writeF(_activeChar.getCollisionRadius()); writeF(_activeChar.getCollisionHeight()); } writeD(_activeChar.getAppearance().getHairStyle()); writeD(_activeChar.getAppearance().getHairColor()); writeD(_activeChar.getAppearance().getFace()); if (gmSeeInvis) writeS("Invisible"); else writeS(_activeChar.getTitle()); //cursed writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); writeD(0); writeC(_activeChar.isSitting() ? 0 : 1); // standing = 1 sitting = 0 writeC(_activeChar.isRunning() ? 1 : 0); // running = 1 walking = 0 writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); if (gmSeeInvis) writeC(0); else writeC(_activeChar.getAppearance().getInvisible() ? 1 : 0); // invisible = 1 visible =0 writeC(_activeChar.getMountType()); // 1 on strider 2 on wyvern 0 no mount writeC(_activeChar.getStoreType().getId()); // 1 - sellshop writeH(_activeChar.getCubics().size()); for (int id : _activeChar.getCubics().keySet()) writeH(id); writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0); if (gmSeeInvis) writeD((_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask())); else writeD(_activeChar.getAbnormalEffect()); writeC(0x00); //writeC(_activeChar.getRecomLeft()); writeH(_activeChar.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue) writeD(0x00); writeD(_activeChar.getClassId().getId()); writeD(0x00); writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect()); if (_activeChar.getTeam() == 1 || (Config.PLAYER_SPAWN_PROTECTION > 0 && _activeChar.isSpawnProtected())) writeC(0x01); // team circle around feet 1= Blue, 2 = red else if (_activeChar.getTeam() == 2) writeC(0x02); // team circle around feet 1= Blue, 2 = red else writeC(0x00); // team circle around feet 1= Blue, 2 = red writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0) Location loc = _activeChar.getFishingLoc(); if (loc != null) { writeD(loc.getX()); writeD(loc.getY()); writeD(loc.getZ()); } else { writeD(0); writeD(0); writeD(0); } writeD(_activeChar.getAppearance().getNameColor()); writeD(_activeChar.getHeading()); //writeD(0x00); // isRunning() as in UserInfo? writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); writeD(_activeChar.getAppearance().getTitleColor()); if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x00); writeD(0x01); writeD(0x00); writeD(0x00); // writeD(0x00); } } Я это и заметил, выше чекни что написал. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты