예제 #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);
                }
            }
        }
예제 #2
0
 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);
         }
     }
 }
예제 #3
0
 public void processEvent(EventObject eventObject)
 {
     if (eventObject.getEventType() == 11)
     {
         MonsterDeadEventObject deadEv = eventObject as MonsterDeadEventObject;
         if (deadEv.getAttacker().ClientData.CopyMapID > 0 && deadEv.getAttacker().ClientData.FuBenSeqID > 0 && deadEv.getAttacker().ClientData.MapCode == this.MapCode && deadEv.getMonster().CurrentMapCode == this.MapCode)
         {
             MoRiMonsterTag tag = deadEv.getMonster().Tag as MoRiMonsterTag;
             if (tag != null)
             {
                 MoRiJudgeCopy judgeCopy = null;
                 lock (this.copyDict)
                 {
                     if (!this.copyDict.TryGetValue(tag.CopySeqId, out judgeCopy))
                     {
                         return;
                     }
                 }
                 lock (judgeCopy)
                 {
                     if (judgeCopy.m_eStatus == GameSceneStatuses.STATUS_BEGIN)
                     {
                         if (judgeCopy.MonsterList[tag.MonsterIdx].DeathMs <= 0L)
                         {
                             judgeCopy.MonsterList[tag.MonsterIdx].DeathMs = TimeUtil.NOW();
                             GameManager.ClientMgr.BroadSpecialCopyMapMessageStr(1305, string.Format("{0}:{1}:{2}:{3}", new object[]
                             {
                                 2,
                                 this.BossConfigList[tag.MonsterIdx].Id,
                                 judgeCopy.MonsterList[tag.MonsterIdx].BirthMs,
                                 judgeCopy.MonsterList[tag.MonsterIdx].DeathMs
                             }), judgeCopy.MyCopyMap, false);
                             this.CalcAwardRate(judgeCopy);
                             if (judgeCopy.MonsterList.Count == this.BossConfigList.Count)
                             {
                                 judgeCopy.Passed    = true;
                                 judgeCopy.m_eStatus = GameSceneStatuses.STATUS_END;
                             }
                         }
                     }
                 }
             }
         }
     }
 }
예제 #4
0
        public void processEvent(EventObject eventObject)
        {
            int eventType = eventObject.getEventType();

            if (eventType == 11)
            {
                MonsterDeadEventObject e = eventObject as MonsterDeadEventObject;
                this.OnProcessMonsterDead(e.getAttacker(), e.getMonster());
            }
        }
 public void processEvent(EventObject eventObject)
 {
     if (eventObject.getEventType() == 10)
     {
         PlayerDeadEventObject playerDeadEvent = (PlayerDeadEventObject)eventObject;
         JingJiChangManager.getInstance().onChallengeEndForPlayerDead(playerDeadEvent.getPlayer(), playerDeadEvent.getAttacker());
     }
     if (eventObject.getEventType() == 11)
     {
         MonsterDeadEventObject monsterDeadEvent = (MonsterDeadEventObject)eventObject;
         JingJiChangManager.getInstance().onChallengeEndForMonsterDead(monsterDeadEvent.getAttacker(), monsterDeadEvent.getMonster());
     }
 }
예제 #6
0
        /// <summary>
        /// 处理事件
        /// </summary>
        /// <param name="eventObject"></param>
        public void processEvent(EventObject eventObject)
        {
            int eventType = eventObject.getEventType();

            if (eventType == (int)EventTypes.MonsterDead)
            {
                MonsterDeadEventObject monsterDeadEvent = eventObject as MonsterDeadEventObject;
                if (null != monsterDeadEvent)
                {
                    OnKillMonster(monsterDeadEvent.getAttacker(), monsterDeadEvent.getMonster());
                }
            }
        }
예제 #7
0
        public void processEvent(EventObject eventObject)
        {
            int eventType = eventObject.getEventType();

            if (eventType == 11)
            {
                MonsterDeadEventObject deadEv = eventObject as MonsterDeadEventObject;
                Monster    monster            = deadEv.getMonster();
                GameClient client             = deadEv.getAttacker();
                if (client != null && null != monster)
                {
                    this.OnInjureMonster(client, monster, 0L);
                }
            }
        }
예제 #8
0
        public void processEvent(EventObject eventObject)
        {
            int eventType = eventObject.getEventType();

            if (eventType == 10)
            {
                PlayerDeadEventObject playerDeadEvent = eventObject as PlayerDeadEventObject;
                if (null != playerDeadEvent)
                {
                }
            }
            if (eventType == 11)
            {
                MonsterDeadEventObject e = eventObject as MonsterDeadEventObject;
                this.OnProcessMonsterDead(e.getAttacker(), e.getMonster());
            }
        }
예제 #9
0
        public void processEvent(EventObject eventObject)
        {
            if (eventObject.getEventType() == (int)EventTypes.MonsterDead)
            {
                MonsterDeadEventObject deadEv = eventObject as MonsterDeadEventObject;
                if (deadEv.getAttacker().ClientData.CopyMapID > 0 && deadEv.getAttacker().ClientData.FuBenSeqID > 0 &&
                    deadEv.getAttacker().ClientData.MapCode == this.MapCode &&
                    deadEv.getMonster().CurrentMapCode == this.MapCode
                    )
                {
                    MoRiMonsterTag tag = deadEv.getMonster().Tag as MoRiMonsterTag;
                    if (tag == null)
                    {
                        return;
                    }

                    MoRiJudgeCopy judgeCopy = null;
                    lock (copyDict)
                    {
                        if (!copyDict.TryGetValue(tag.CopySeqId, out judgeCopy))
                        {
                            return;
                        }
                    }

                    long killMs = 0;
                    lock (judgeCopy)
                    {
                        // 只有在战斗阶段的杀怪才有效
                        if (judgeCopy.m_eStatus != GameSceneStatuses.STATUS_BEGIN)
                        {
                            return;
                        }

                        // 只有一条命
                        if (judgeCopy.MonsterList[tag.MonsterIdx].DeathMs > 0)
                        {
                            return;
                        }

                        judgeCopy.MonsterList[tag.MonsterIdx].DeathMs = TimeUtil.NOW();


                        // 通知怪物死亡事件
                        GameManager.ClientMgr.BroadSpecialCopyMapMessageStr(
                            (int)TCPGameServerCmds.CMD_NTF_MORI_MONSTER_EVENT,
                            string.Format("{0}:{1}:{2}:{3}", (int)MoRiMonsterEvent.Death, BossConfigList[tag.MonsterIdx].Id, judgeCopy.MonsterList[tag.MonsterIdx].BirthMs, judgeCopy.MonsterList[tag.MonsterIdx].DeathMs),
                            judgeCopy.MyCopyMap);

                        CalcAwardRate(judgeCopy);

                        /*
                         * FuBenInfoItem fbItem = FuBenManager.FindFuBenInfoBySeqID(judgeCopy.MyCopyMap.FuBenSeqID);
                         * if (fbItem != null)
                         * {
                         *  fbItem.AwardRate += CalcAwardRate(judgeCopy);
                         * }*/

                        if (judgeCopy.MonsterList.Count == BossConfigList.Count)
                        {
                            judgeCopy.Passed    = true;
                            judgeCopy.m_eStatus = GameSceneStatuses.STATUS_END;
                        }
                    }
                }
            }
        }