Пример #1
0
        public static void GameActionFightPointsVariationMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightPointsVariationMessage msg = (GameActionFightPointsVariationMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight != null)
            {
                BFighter fighter = (BFighter)account.Fight.GetFighter(msg.targetId);
                if (fighter != null)
                {
                    switch (msg.actionId)
                    {
                    case 101:
                    case 102:
                    case 120:
                        fighter.ActionPoints = (fighter.ActionPoints + msg.delta);
                        break;

                    case 78:
                    case 127:
                    case 129:
                        fighter.MovementPoints = (fighter.MovementPoints + msg.delta);
                        break;
                    }
                }
            }
        }
Пример #2
0
        public static void GameActionFightPointsVariationMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightPointsVariationMessage msg = (GameActionFightPointsVariationMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.FightData.SetPointsVariation(msg.targetId, msg.actionId, msg.delta);
        }