Fix Dwarf can't see workshop action.

Contributed by yksdtc.
This commit is contained in:
MobiusDev 2017-01-10 20:11:30 +00:00
parent 0b3c7e3d1d
commit 37e8cae36d
2 changed files with 11 additions and 1 deletions

View File

@ -396,6 +396,15 @@ public enum ClassId implements IIdentifiable
return _parent;
}
public final ClassId getRootClassId()
{
if (_parent != null)
{
return _parent.getRootClassId();
}
return this;
}
/**
* @return list of possible class transfer for this class
*/

View File

@ -25,6 +25,7 @@ import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.OutgoingPackets;
@ -146,7 +147,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
packet.writeC(_activeChar.getRace().ordinal());
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
packet.writeD(_activeChar.getBaseClass());
packet.writeD(ClassId.getClassId(_activeChar.getBaseClass()).getRootClassId().getId());
packet.writeD(_activeChar.getClassId().getId());
packet.writeC(_activeChar.getLevel());
}