Exemple #1
0
        public void S_C_NPC_Kill(CMD_SC_GF_NPC_KILL _npcKill)
        {
            int _serverID = (int)_npcKill.gsNpcId;
            int _chair    = (int)_npcKill.gsChairId;
            int _value    = (int)_npcKill.gsRate * (int)_npcKill.gsPower;

            // 普通击杀.
            if (_npcKill.gsFlag == 0)
            {
                if (CanonCtrl.Instance.singleCanonList[_chair] != null)
                {
                    NPC_Kill_Class.NPC_Kill(_chair, (int)_npcKill.gsRate, (int)_npcKill.gsPower, _serverID, (int)_npcKill.gsNPCType);
                }
            }
            // 缓存击杀.
            else
            {
                if (_chair == CanonCtrl.Instance.realCanonID)
                {
                    if (CanonCtrl.Instance.singleCanonList[_chair] != null)
                    {
                        NPC_Kill_Class.NPC_Kill_AddCacheInList(_chair, (int)_npcKill.gsRate, (int)_npcKill.gsPower, _serverID, (int)_npcKill.gsNPCType);
                    }
                    C_S_WinFromCache(_npcKill.gsNpcId, _npcKill.gsPower, _npcKill.gsRate);
                }
            }
        }
Exemple #2
0
        // 缓存击杀.
        public void S_C_WinFromCache(CMD_SC_GF_WIN_FROM_CACHE _winFromCache)
        {
            // send to all real player.
            int _chair = (int)_winFromCache.gsChair;
            int _value = (int)_winFromCache.gsRate * (int)_winFromCache.gsPower;

            if (CanonCtrl.Instance.singleCanonList[_chair] != null)
            {
                NPC_Kill_Class.NPC_Kill_GiveCacheFromList(_chair, (int)_winFromCache.gsRate, _value);
            }
        }