Skip to content

Commit

Permalink
ArcScripts: remove pointless nullcheck I recently made and fix a poss…
Browse files Browse the repository at this point in the history
…ible crash when sEAS.SpawnCreature fails.
  • Loading branch information
Artox committed Oct 4, 2012
1 parent d53faf1 commit b3d0ac2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/scripts/src/SpellHandlers/QIspells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ bool NaturalRemedies(uint32 i, Spell* pSpell)
return true;

Creature* colos = sEAS.SpawnCreature(pPlayer, 19305, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0);
colos->Despawn(5 * 60 * 1000, 0);
if(colos != NULL)
colos->Despawn(5 * 60 * 1000, 0);

return true;
}
Expand All @@ -661,8 +662,6 @@ bool FloraoftheEcoDomes(uint32 i, Spell* pSpell)
return true;

Player* pPlayer = pSpell->p_caster;
if(pPlayer == NULL)
return;

Creature* normal = TO_CREATURE(pSpell->GetUnitTarget());
Creature* mutant = sEAS.SpawnCreature(pPlayer, 20983, normal->GetPositionX(), normal->GetPositionY(), normal->GetPositionZ(), 0);
Expand Down

0 comments on commit b3d0ac2

Please sign in to comment.