[11980] Improve support for wild summoned GOs

* Support GetGameObject for wild summoned GOs
* Proper delete WildSummoned GOs after they are used
This commit is contained in:
Schmoozerd 2011-03-22 22:14:20 +01:00 committed by Schmoozerd
parent c17fdc3093
commit d08edbd93c
5 changed files with 44 additions and 11 deletions

View file

@ -6249,6 +6249,9 @@ void Spell::EffectSummonObjectWild(SpellEffectIndex eff_idx)
// Wild object not have owner and check clickable by players
map->Add(pGameObj);
// Store the GO to the caster
m_caster->AddWildGameObject(pGameObj);
if(pGameObj->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP && m_caster->GetTypeId() == TYPEID_PLAYER)
{
Player *pl = (Player*)m_caster;