Exemple #1
0
        public void serialize(ByteBuffer bu)
        {
            bu.writeUnsignedInt32(qwThisID);
            bu.writeUnsignedInt32(dwObjectID);
            pos = new stObjectLocation();
            pos.serialize(bu);

            bu.writeUnsignedInt32(mpcost);
            bu.writeUnsignedInt32(damage);
            bu.writeUnsignedInt32(hp);
            bu.writeUnsignedInt32(maxhp);
            bu.writeUnsignedInt32(dur);

            bu.writeUnsignedInt8(magicDamAdd);
            bu.writeUnsignedInt8(overload);
            bu.writeUnsignedInt32(armor);
            bu.writeUnsignedInt8(attackTimes);
            bu.writeUnsignedInt8(equipOpen);

            bu.writeUnsignedInt8(side);
            bu.writeUnsignedInt32(popHpValue);
            bu.writeUnsignedInt32(popDamValue);

            uint len = ((int)StateID.CARD_STATE_MAX + 7) / 8;

            state = new byte[len];
            bu.writeBytes(state, 0, len);
        }
Exemple #2
0
        public void copyFrom(t_Card rhv)
        {
            qwThisID   = rhv.qwThisID;
            dwObjectID = rhv.dwObjectID;
            if (pos == null)
            {
                pos = new stObjectLocation();
            }
            pos.copyFrom(rhv.pos);

            mpcost = rhv.mpcost;
            damage = rhv.damage;
            hp     = rhv.hp;
            maxhp  = rhv.maxhp;
            dur    = rhv.dur;

            magicDamAdd = rhv.magicDamAdd;
            overload    = rhv.overload;
            armor       = rhv.armor;
            attackTimes = rhv.attackTimes;
            equipOpen   = rhv.equipOpen;

            if (state == null || rhv.state.Length != state.Length)
            {
                state = new byte[((int)StateID.CARD_STATE_MAX + 7) / 8];
            }
            Array.Copy(rhv.state, 0, state, 0, rhv.state.Length);

            side = rhv.side;

            popHpValue  = rhv.popHpValue;
            popDamValue = rhv.popDamValue;
        }
Exemple #3
0
        public void serialize(ByteBuffer bu)
        {
            bu.writeUnsignedInt32(qwThisID);
            bu.writeUnsignedInt32(dwObjectID);
            pos = new stObjectLocation();
            pos.serialize(bu);

            bu.writeUnsignedInt32(mpcost);
            bu.writeUnsignedInt32(damage);
            bu.writeUnsignedInt32(hp);
            bu.writeUnsignedInt32(maxhp);
            bu.writeUnsignedInt32(dur);

            bu.writeUnsignedInt8(magicDamAdd);
            bu.writeUnsignedInt8(overload);
            bu.writeUnsignedInt32(armor);
            bu.writeUnsignedInt8(attackTimes);
            bu.writeUnsignedInt8(equipOpen);

            bu.writeUnsignedInt8(side);
            bu.writeUnsignedInt32(popHpValue);
            bu.writeUnsignedInt32(popDamValue);

            uint len = ((int)StateID.CARD_STATE_MAX + 7) / 8;
            state = new byte[len];
            bu.writeBytes(state, 0, len);
        }
Exemple #4
0
        public void derialize(ByteBuffer bu)
        {
            bu.readUnsignedInt32(ref qwThisID);
            bu.readUnsignedInt32(ref dwObjectID);
            pos = new stObjectLocation();
            pos.derialize(bu);

            bu.readUnsignedInt32(ref mpcost);
            bu.readUnsignedInt32(ref damage);
            bu.readUnsignedInt32(ref hp);
            bu.readUnsignedInt32(ref maxhp);
            bu.readUnsignedInt32(ref dur);

            bu.readUnsignedInt8(ref magicDamAdd);
            bu.readUnsignedInt8(ref overload);
            bu.readUnsignedInt32(ref armor);
            bu.readUnsignedInt8(ref attackTimes);
            bu.readUnsignedInt8(ref equipOpen);

            bu.readUnsignedInt8(ref side);
            bu.readUnsignedInt32(ref popHpValue);
            bu.readUnsignedInt32(ref popDamValue);

            uint len = ((int)StateID.CARD_STATE_MAX + 7) / 8;

            state = new byte[len];
            bu.readBytes(ref state, len);
        }
Exemple #5
0
        public void derialize(ByteBuffer bu)
        {
            bu.readUnsignedInt32(ref qwThisID);
            bu.readUnsignedInt32(ref dwObjectID);
	        pos = new stObjectLocation();
            pos.derialize(bu);

            bu.readUnsignedInt32(ref mpcost);
            bu.readUnsignedInt32(ref damage);
            bu.readUnsignedInt32(ref hp);
            bu.readUnsignedInt32(ref maxhp);
            bu.readUnsignedInt32(ref dur);

            bu.readUnsignedInt8(ref magicDamAdd);
            bu.readUnsignedInt8(ref overload);
            bu.readUnsignedInt32(ref armor);
            bu.readUnsignedInt8(ref attackTimes);
            bu.readUnsignedInt8(ref equipOpen);

            bu.readUnsignedInt8(ref side);
            bu.readUnsignedInt32(ref popHpValue);
            bu.readUnsignedInt32(ref popDamValue);

            uint len = ((int)StateID.CARD_STATE_MAX + 7) / 8;
            state = new byte[len];
            bu.readBytes(ref state, len);
        }
Exemple #6
0
        public override void derialize(ByteBuffer bu)
        {
            base.derialize(bu);

            bu.readUnsignedInt32(ref qwThisID);
            dst = new stObjectLocation();
            dst.derialize(bu);
            bu.readUnsignedInt8(ref success);
        }
Exemple #7
0
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);

            bu.writeUnsignedInt32(dwAttThisID);
            bu.writeUnsignedInt32(dwDefThisID);
            bu.writeUnsignedInt32(dwMagicType);

            if (dst == null)
            {
                dst = new stObjectLocation();
            }
            dst.serialize(bu);
        }
Exemple #8
0
        public override void derialize(ByteBuffer bu)
        {
            base.derialize(bu);

            bu.readUnsignedInt32(ref dwAttThisID);
            bu.readUnsignedInt32(ref dwDefThisID);
            bu.readUnsignedInt32(ref dwMagicType);

            dst = new stObjectLocation();
            dst.derialize(bu);
        }
Exemple #9
0
        public void copyFrom(t_Card rhv)
        {
            qwThisID = rhv.qwThisID;
	        dwObjectID = rhv.dwObjectID;
            if (pos == null)
            {
                pos = new stObjectLocation();
            }
	        pos.copyFrom(rhv.pos);

            mpcost = rhv.mpcost;
            damage = rhv.damage;
            hp = rhv.hp;
            maxhp = rhv.maxhp;
            dur = rhv.dur;

            magicDamAdd = rhv.magicDamAdd;
            overload = rhv.overload;
            armor = rhv.armor;
            attackTimes = rhv.attackTimes;
            equipOpen = rhv.equipOpen;

            if(state == null || rhv.state.Length != state.Length)
            {
                state = new byte[((int)StateID.CARD_STATE_MAX + 7) / 8];
            }
            Array.Copy(rhv.state, 0, state, 0, rhv.state.Length);

            side = rhv.side;

            popHpValue = rhv.popHpValue;
            popDamValue = rhv.popDamValue;
        }