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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user