Esempio n. 1
0
 void addCharacter(Character character)
 {
     uint slot=character.getCharacterSlot();
     mCharacters[slot]=character;
 }
Esempio n. 2
0
        void sendCharacterData(AccountClient client, Character ch)
        {
            MessageOut charInfo=new MessageOut(Protocol.APMSG_CHAR_INFO);

            charInfo.writeInt8((int)ch.getCharacterSlot());
            charInfo.writeString(ch.getName());
            charInfo.writeInt8(ch.getGender());
            charInfo.writeInt8(ch.getHairStyle());
            charInfo.writeInt8(ch.getHairColor());
            charInfo.writeInt16(ch.getLevel());
            charInfo.writeInt16(ch.getCharacterPoints());
            charInfo.writeInt16(ch.getCorrectionPoints());

            foreach(KeyValuePair<uint, AttributeValue> at in ch.mAttributes)
            {
                charInfo.writeInt32((int)at.Key);
                charInfo.writeInt32((int)(at.Value.@base*256));
                charInfo.writeInt32((int)(at.Value.modified*256));
            }

            client.send(charInfo);
        }