• Страница 1 из 1
  • 1
Модератор форума: Dimitro  
[patch] Сумон игроков в инсте
DeimosLand
Сержант
Если у игрока есть ваше кд, вы не сможете его присумонить локом.

Попытался исправить :

Code
# HG changeset patch  
# User Lost Illusion <>  
# Date 1300494827 -10800  
# Node ID 8e1d85fde096105c73b3d25369f14bb86278e706  
# Parent  b798176b24cedc7509e51cb31335640742030f20  
Fix player summon if player have bind.  

diff -r b798176b24ce -r 8e1d85fde096 src/server/game/Spells/Spell.cpp  
--- a/src/server/game/Spells/Spell.cpp    Tue Mar 15 13:23:52 2011 +0100  
+++ b/src/server/game/Spells/Spell.cpp    Sat Mar 19 03:33:47 2011 +0300  
@@ -52,6 +52,7 @@  
  #include "DisableMgr.h"  
  #include "SpellScript.h"  
  #include "InstanceScript.h"  
+#include "InstanceSaveMgr.h"  
    
  #define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS)  
    
@@ -5337,9 +5338,12 @@  
                      uint32 mapId = m_caster->GetMap()->GetId();  
                      Difficulty difficulty = m_caster->GetMap()->GetDifficulty();  
                      if (map->IsRaid())  
-                        if (InstancePlayerBind* targetBind = target->GetBoundInstance(mapId, difficulty))  
-                            if (targetBind->perm && targetBind != m_caster->ToPlayer()->GetBoundInstance(mapId, difficulty))  
+                        if (InstanceSave* targetsave = target->ToPlayer()->GetInstanceSave(mapId, true))  
+                        {  
+                            InstanceSave* m_castersave = m_caster->ToPlayer()->GetInstanceSave(mapId, true);  
+                            if (targetsave->GetInstanceId() != m_castersave->GetInstanceId())  
                    return SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE;  
+                        }  
    
                      InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(mapId);  
                      if (!instance)


Источник
Сообщение # 1 написано 30.04.2012 в 14:48
  • Страница 1 из 1
  • 1
Поиск: