09-22-2017, 09:54 PM
Код:
/*
* Copyright (c) 2010-2016 fork2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
* is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package fork2.gs.model.actor.movement;
/**
* Unreal Engine 2.5 Lineage 2 Interlude deasm
*
* @author PointerRage, deasm izen
*/
public enum EEnvType {
ET_NONE(-1),
/** на земле */
ET_GROUND(0x00),
/** под водой */
ET_UNDERWATER(0x01),
/** воздух */
ET_AIR(0x02),
/** маунт */
ET_HOVER(0x03);
private final int type;
EEnvType(int type) {
this.type = type;
}
public int getType() {
return type;
}
}
Вырезка из UserInfo
Код:
@Override
public void write() {
writeC(0x04);
writeD(_activeChar.getX());
writeD(_activeChar.getY());
writeD(_activeChar.getZ());
writeD(/*vehicle*/0x00);
writeD(_activeChar.getObjectId());
writeS(_activeChar.getName());
writeD(_activeChar.getRace().ordinal());
writeD(_activeChar.getAppearance().isFemale() ? 1 : 0);
if(_activeChar.getClassIndex() == 0)
writeD(_activeChar.getClassId().getId());
else
writeD(_activeChar.getBaseClass());
writeD(_activeChar.getLevel());
writeQ(_activeChar.getExp());
writeD(_activeChar.getStat().getSTR());
writeD(_activeChar.getStat().getDEX());
writeD(_activeChar.getStat().getCON());
writeD(_activeChar.getStat().getINT());
writeD(_activeChar.getStat().getWIT());
writeD(_activeChar.getStat().getMEN());
writeD(_activeChar.getMaxHp());
writeD((int) _activeChar.getCurrentHp());
writeD(_activeChar.getMaxMp());
writeD((int) _activeChar.getCurrentMp());
writeD(_activeChar.getSp());
writeD(_activeChar.getCurrentLoad());
writeD(_activeChar.getMaxLoad());
writeD(_activeChar.getActiveWeaponInstance() != null ? 0x28 : 0x14);
for(int slot : Inventory.PAPERDOLL_ORDER)
writeD(_activeChar.getInventory().getPaperdollObjectId(slot));
for(int slot : Inventory.PAPERDOLL_ORDER)
writeD(_activeChar.getInventory().getPaperdollItemId(slot));
for(int slot : Inventory.PAPERDOLL_ORDER)
writeD(_activeChar.getInventory().getPaperdollAugmentationId(slot));
writeD(_activeChar.getPAtk(null));
writeD(_activeChar.getPAtkSpd());
writeD(_activeChar.getPDef(null));
writeD(_activeChar.getEvasionRate(null));
writeD(_activeChar.getAccuracy());
writeD(_activeChar.getCriticalHit(null, null));
writeD(_activeChar.getMAtk(null, null));
writeD(_activeChar.getMAtkSpd());
writeD(_activeChar.getPAtkSpd());
writeD(_activeChar.getMDef(null, null));
writeD(_activeChar.getPvpFlag()); // 0-non-pvp, 1-pvp = violett name, 2 - blink
writeD(_activeChar.getKarma());
int runSpd = (int) Math.round(_activeChar.getRunSpeed() / _activeChar.getStat().getMovementSpeedMultiplier());
int walkSpd = (int) Math.round(_activeChar.getStat().getWalkSpeed() / _activeChar.getStat().getMovementSpeedMultiplier());
writeD(runSpd);
writeD(walkSpd);
int swimRunSpd = (int) Math.round((_activeChar.getRunSpeed() / 2) / _activeChar.getStat().getMovementSpeedMultiplier());
int swimWalkSpd = (int) Math.round((_activeChar.getStat().getWalkSpeed() / 2) / _activeChar.getStat().getMovementSpeedMultiplier());
writeD(swimRunSpd); //swim
writeD(swimWalkSpd);
writeD(0x00); //fall run
writeD(0x00); //fall walk
writeD(runSpd); //fly
writeD(walkSpd);
writeF(_activeChar.getStat().getMovementSpeedMultiplier());
writeF(_activeChar.getStat().getAttackSpeedMultiplier());
L2Summon pet = _activeChar.getPet();
if(_activeChar.getMountType() != 0 && pet != null) {
writeF(pet.getCollisionRadius());
writeF(pet.getCollisionHeight());
} else {
writeF(_activeChar.getCollisionRadius());
writeF(_activeChar.getCollisionHeight());
}
writeD(_activeChar.getAppearance().getHairStyle());
writeD(_activeChar.getAppearance().getHairColor());
writeD(_activeChar.getAppearance().getFace());
writeD(GameMasterManager.getInstance().isGameMaster(_activeChar) ? 1 : 0); // builder level
writeS(_activeChar.getTitle());
if(_activeChar.getClan() != null) {
writeD(_activeChar.getClanId());
writeD(_activeChar.getClan().getClanCrestId());
writeD(_activeChar.getAllyId());
writeD(_activeChar.getClan().getAllyCrestId());
// 0x40 leader rights
// siege flags: attacker - 0x180 sword over name, defender - 0x80 shield, 0xC0 crown (|leader), 0x1C0 flag (|leader)
writeD((_activeChar.isClanLeader() ? 0x40 : 0) |
(_activeChar.getSiegeState() > 0 ? 0x80 :
_activeChar.getSiegeState() == 1 ? 0x100 : 0));
} else {
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
}
writeC(_activeChar.getMountType());
writeC(_activeChar.getPrivateStoreType());
writeC(_activeChar.hasDwarvenCraft() ? 1 : 0);
writeD(_activeChar.getPkKills());
writeD(_activeChar.getPvpKills());
Collection<Integer> cubics = _activeChar.getCubicsIds();
writeH(cubics.size());
for(int id : cubics)
writeH(id);
writeC(0x00); //party match room
writeD(_activeChar.getAbnormalEffect());
writeC(_activeChar.getEnvironment().getType());
writeD(_activeChar.getClanPrivileges());
writeH(_activeChar.getRecomLeft());
writeH(_activeChar.getRecomHave());
writeD(_activeChar.isMounted() ? _activeChar.getMountNpcId() : 0x00); // FIXME: MOUNT NPC ID +1000000?
writeH(_activeChar.getInventoryLimit());
writeD(_activeChar.getClassId().getId());
writeD(0x00); // FIXME: special effects? circles around player...
writeD(_activeChar.getMaxCp());
writeD((int) _activeChar.getCurrentCp());
writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect(false));
writeC(_activeChar.getTeam());
writeD(_activeChar.getClanId());
writeC(_activeChar.isNoble() ? 1 : 0);
writeC(_activeChar.isHero()? 1 : 0);
writeC(_activeChar.isFishing() ? 1 : 0);
writeD(_activeChar.getFishx());
writeD(_activeChar.getFishy());
writeD(_activeChar.getFishz());
if(_activeChar.isInFunEvent())
writeD(_activeChar.getGameEvent().getCharNameColor(_activeChar));
else
writeD(_activeChar.getNameColor());
writeC(_activeChar.getStatus().getMoveType().ordinal()); //changes the Speed display on Status Window
writeD(_activeChar.getPledgeClass()); //changes the text above CP on Status Window
writeD(_activeChar.getSubPledgeType()); // TODO: PLEDGE TYPE
if(_activeChar.isInFunEvent())
writeD(_activeChar.getGameEvent().getCharTitleColor(_activeChar));
else
writeD(_activeChar.getTitleColor());
writeD(CursedWeaponsManager.getInstance().getLevel(_activeChar.getCursedWeaponEquippedId()));
}
Аналогично данный флаг должен быть и в CharInfo. Также, он присутствует в ChangeMoveType.
m0nster.art - clear client patches, linkz to utils & code.
Гадаю по капче.
Гадаю по капче.