Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
This commit is contained in:
commit
39cce3344c
23 files changed
+111
-125
No files matched your search
@@ -3923,6 +3923,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
m_caster->CastSpell(unitTarget, spellId2, true);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
@@ -4372,25 +4373,11 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
uint32 go_id = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
uint8 slot = m_spellInfo->Effects[effIndex].Effect - SPELL_EFFECT_SUMMON_OBJECT_SLOT1;
|
||||
|
||||
uint8 slot = 0;
|
||||
switch (m_spellInfo->Effects[effIndex].Effect)
|
||||
if (uint64 guid = m_caster->m_ObjectSlot[slot])
|
||||
{
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT1: slot = 0; break;
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT2: slot = 1; break;
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT3: slot = 2; break;
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT4: slot = 3; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
uint64 guid = m_caster->m_ObjectSlot[slot];
|
||||
if (guid != 0)
|
||||
{
|
||||
GameObject* obj = NULL;
|
||||
if (m_caster)
|
||||
obj = m_caster->GetMap()->GetGameObject(guid);
|
||||
|
||||
if (obj)
|
||||
if (GameObject* obj = m_caster->GetMap()->GetGameObject(guid))
|
||||
{
|
||||
// Recast case - null spell id to make auras not be removed on object remove from world
|
||||
if (m_spellInfo->Id == obj->GetSpellId())
|
||||
@@ -4400,7 +4387,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
m_caster->m_ObjectSlot[slot] = 0;
|
||||
}
|
||||
|
||||
GameObject* pGameObj = new GameObject;
|
||||
GameObject* go = new GameObject();
|
||||
|
||||
float x, y, z;
|
||||
// If dest location if present
|
||||
@@ -4411,24 +4398,24 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
|
||||
Map* map = m_caster->GetMap();
|
||||
if (!pGameObj->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
|
||||
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
delete go;
|
||||
return;
|
||||
}
|
||||
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
m_caster->AddGameObject(pGameObj);
|
||||
go->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
|
||||
go->SetSpellId(m_spellInfo->Id);
|
||||
m_caster->AddGameObject(go);
|
||||
|
||||
ExecuteLogEffectSummonObject(effIndex, pGameObj);
|
||||
ExecuteLogEffectSummonObject(effIndex, go);
|
||||
|
||||
map->AddToMap(pGameObj);
|
||||
map->AddToMap(go);
|
||||
|
||||
m_caster->m_ObjectSlot[slot] = pGameObj->GetGUID();
|
||||
m_caster->m_ObjectSlot[slot] = go->GetGUID();
|
||||
}
|
||||
|
||||
void Spell::EffectResurrect(SpellEffIndex effIndex)
|
||||
|
||||
Reference in new issue
Block a user