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
This commit is contained in:
Anubisss
2010-04-01 19:09:56 +02:00
parent 9f544d2f93
commit f78b766705
10 changed files with 16 additions and 15 deletions
@@ -333,7 +333,7 @@ struct mob_collapsing_starAI : public ScriptedAI
{
mob_collapsing_starAI(Creature *pCreature) : ScriptedAI(pCreature)
{
pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
pInstance = pCreature->GetInstanceData();
}
ScriptedInstance* pInstance;
@@ -23,7 +23,7 @@ The teleporter appears to be active and stable.
bool GoHello_ulduar_teleporter( Player *pPlayer, GameObject *pGO )
{
ScriptedInstance *pInstance = (ScriptedInstance *) pGO->GetInstanceData();
ScriptedInstance *pInstance = pGO->GetInstanceData();
if(!pInstance) return true;
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP);