diff options
| author | Anubisss <none@none> | 2010-04-01 19:09:56 +0200 |
|---|---|---|
| committer | Anubisss <none@none> | 2010-04-01 19:09:56 +0200 |
| commit | f78b766705104444f695a265bce712d59a22cbb3 (patch) | |
| tree | 445d2eaeaa60d4f578fde6b7cbbfd148ea1c6fd8 /src/scripts/eastern_kingdoms | |
| parent | 9f544d2f934420be5c6ce0bbe3db5d84153c9d61 (diff) | |
Use ToTempSummon() in a case instead of a C style cast.
Use correct Unit::GetCreature() instead of Unit::GetUnit() with casting the object to Creature pointer.
Remove some usless casts.
Fix a possible crash in pyrewood_ambushAI.
TODO: Remove ugly cast macros(like CAST_PLR(), CAST_CRE()) from scripts and use the correct ToX() functions(like ToPlayer(), ToCreature()).
--HG--
branch : trunk
Diffstat (limited to 'src/scripts/eastern_kingdoms')
| -rw-r--r-- | src/scripts/eastern_kingdoms/silverpine_forest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scripts/eastern_kingdoms/silverpine_forest.cpp b/src/scripts/eastern_kingdoms/silverpine_forest.cpp index 21667d1fc91..d7319a6e290 100644 --- a/src/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/src/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -254,7 +254,8 @@ struct pyrewood_ambushAI : public ScriptedAI if (PlayerGUID) { pPlayer = Unit::GetPlayer(PlayerGUID); - pTarget = RAND((Unit*)m_creature, (Unit*)pPlayer); + if (pPlayer) + pTarget = RAND((Unit*)m_creature, (Unit*)pPlayer); } else pTarget = m_creature; |
