Beispiel #1
0
        public void processEvent(EventObject eventObject)
        {
            if (eventObject.getEventType() == (int)EventTypes.MonsterDead)
            {
                MonsterDeadEventObject obj = eventObject as MonsterDeadEventObject;
                Monster    monster         = obj.getMonster();
                GameClient client          = obj.getAttacker();
                MonsterDead(client, monster);
            }

            if (eventObject.getEventType() == (int)EventTypes.MonsterToMonsterDead)
            {
                MonsterToMonsterDeadEventObject obj = eventObject as MonsterToMonsterDeadEventObject;
                Monster attack  = obj.getMonsterAttack();
                Monster monster = obj.getMonster();

                CreateMonsterTagInfo tagInfo = monster.Tag as CreateMonsterTagInfo;
                if (monster != null && attack != null && monster.UniqueID != attack.UniqueID &&
                    tagInfo.ManagerType == (int)SceneUIClasses.CopyWolf)
                {
                    FortDead(monster);
                }
                else if (monster != null && attack != null && monster.UniqueID == attack.UniqueID)
                {
                    MonsterDead(monster);
                }
            }
        }
 public void processEvent(EventObject eventObject)
 {
     if (eventObject.getEventType() == 11)
     {
         MonsterDeadEventObject obj = eventObject as MonsterDeadEventObject;
         Monster    monster         = obj.getMonster();
         GameClient client          = obj.getAttacker();
         this.MonsterDead(client, monster);
     }
     if (eventObject.getEventType() == 35)
     {
         MonsterToMonsterDeadEventObject obj2 = eventObject as MonsterToMonsterDeadEventObject;
         Monster attack  = obj2.getMonsterAttack();
         Monster monster = obj2.getMonster();
         CreateMonsterTagInfo tagInfo = monster.Tag as CreateMonsterTagInfo;
         if (monster != null && attack != null && tagInfo != null && monster.UniqueID != attack.UniqueID && tagInfo.ManagerType == 34)
         {
             this.FortDead(monster);
         }
         else if (monster != null && attack != null && monster.UniqueID == attack.UniqueID)
         {
             this.MonsterDead(monster);
         }
     }
 }