Exemplo n.º 1
0
        public static void GameActionFightDeathMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightDeathMessage msg = (GameActionFightDeathMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight != null)
            {
                BFighter fighter = account.Fight.GetFighter(msg.targetId);
                if (fighter != null)
                {
                    fighter.IsAlive    = false;
                    fighter.LifePoints = 0;
                    if (fighter.Id == account.Fight.Fighter.Id)
                    {
                        account.Log(new ErrorTextInformation("Personnage mort :'("), 0);
                    }
                    account.Fight.Fighters.RemoveAt(account.Fight.Fighters.IndexOf(account.Fight.GetFighter(msg.targetId)));
                }
                if (fighter.CreatureGenericId != 0)
                {
                    account.Log(new ActionTextInformation(BlueSheep.Common.Data.I18N.GetText((int)GameData.GetDataObject(D2oFileEnum.Monsters, fighter.CreatureGenericId).Fields["nameId"]) + "est mort ! "), 5);
                }
                account.Fight.DeadEnnemiInTurn += 1;
            }
        }
Exemplo n.º 2
0
        public static void GameActionFightDeathMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightDeathMessage msg = (GameActionFightDeathMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.FightData.SetFighterDeath(msg.targetId);
        }