Skip to content

Commit

Permalink
Summoning stone summon spell should not have original caster as GO
Browse files Browse the repository at this point in the history
GO spellcasting is still subject to research. This was verified against
sniff.
  • Loading branch information
killerwife committed Oct 16, 2017
1 parent 67d6e69 commit 1e530e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game/Entities/GameObject.cpp
Expand Up @@ -1101,6 +1101,7 @@ void GameObject::Use(Unit* user)
Unit* spellCaster = user;
uint32 spellId = 0;
uint32 triggeredFlags = 0;
bool originalCaster = true;

// test only for exist cooldown data (cooldown timer used for door/buttons reset that not have use cooldown)
if (uint32 cooldown = GetGOInfo()->GetCooldown())
Expand Down Expand Up @@ -1629,6 +1630,8 @@ void GameObject::Use(Unit* user)
else
spellId = 59782; // Summoning Stone Effect

originalCaster = false; // the spell is cast by player even in sniff

break;
}
case GAMEOBJECT_TYPE_FLAGSTAND: // 24
Expand Down Expand Up @@ -1748,7 +1751,7 @@ void GameObject::Use(Unit* user)
return;
}

Spell* spell = new Spell(spellCaster, spellInfo, triggeredFlags, GetObjectGuid());
Spell* spell = new Spell(spellCaster, spellInfo, triggeredFlags, originalCaster ? GetObjectGuid() : ObjectGuid());

// spell target is user of GO
SpellCastTargets targets;
Expand Down

0 comments on commit 1e530e8

Please sign in to comment.