Пример #1
0
        void MonsterAttackPlayer_Handler(Task t)
        {
            object[] args       = (object[])t.Args;
            Monster  m          = (Monster)args[0];
            int      damage     = (int)args[1];
            ushort   attackType = (ushort)args[2];

            t.Client.Character.TakeDamage(damage);

            PlayerGetAttackedPacket pkt = new PlayerGetAttackedPacket(m, t.Client.Character, attackType);

            t.Client.SendPacket(pkt);
        }
Пример #2
0
        void MonsterAttackPlayer_Handler(Task t)
        {
            object[] args = (object[])t.Args;
            Monster m = (Monster)args[0];
            int damage = (int)args[1];
            ushort attackType = (ushort)args[2];

            t.Client.Character.TakeDamage(damage);

            PlayerGetAttackedPacket pkt = new PlayerGetAttackedPacket(m, t.Client.Character, attackType);
            t.Client.SendPacket(pkt);
        }