Core/Scripts: Rename pAI to ai

This commit is contained in:
Nay
2012-01-29 01:48:36 +00:00
parent 71ec09ab1f
commit 5ceae46302
2 changed files with 23 additions and 23 deletions
@@ -234,53 +234,53 @@ public:
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
if (!pAI) if (!ai)
return false; return false;
switch (action) switch (action)
{ {
case GOSSIP_ACTION_INFO_DEF: case GOSSIP_ACTION_INFO_DEF:
pAI->Start(true, true, player->GetGUID(), 0, false, false); ai->Start(true, true, player->GetGUID(), 0, false, false);
pAI->SetDespawnAtEnd(false); ai->SetDespawnAtEnd(false);
pAI->bStepping = false; ai->bStepping = false;
pAI->uiStep = 1; ai->uiStep = 1;
break; break;
case GOSSIP_ACTION_INFO_DEF+1: case GOSSIP_ACTION_INFO_DEF+1:
pAI->bStepping = true; ai->bStepping = true;
pAI->uiStep = 24; ai->uiStep = 24;
break; break;
case GOSSIP_ACTION_INFO_DEF+2: case GOSSIP_ACTION_INFO_DEF+2:
pAI->SetHoldState(false); ai->SetHoldState(false);
pAI->bStepping = false; ai->bStepping = false;
pAI->uiStep = 61; ai->uiStep = 61;
break; break;
case GOSSIP_ACTION_INFO_DEF+3: case GOSSIP_ACTION_INFO_DEF+3:
pAI->SetHoldState(false); ai->SetHoldState(false);
break; break;
case GOSSIP_ACTION_INFO_DEF+4: case GOSSIP_ACTION_INFO_DEF+4:
pAI->bStepping = true; ai->bStepping = true;
pAI->uiStep = 84; ai->uiStep = 84;
break; break;
case GOSSIP_ACTION_INFO_DEF+5: case GOSSIP_ACTION_INFO_DEF+5:
pAI->bStepping = true; ai->bStepping = true;
pAI->uiStep = 85; ai->uiStep = 85;
break; break;
} }
player->CLOSE_GOSSIP_MENU(); player->CLOSE_GOSSIP_MENU();
pAI->SetDespawnAtFar(true); ai->SetDespawnAtFar(true);
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
return true; return true;
} }
bool OnGossipHello(Player* player, Creature* creature) bool OnGossipHello(Player* player, Creature* creature)
{ {
npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
if (pAI && pAI->bStepping == false) if (ai && ai->bStepping == false)
{ {
switch (pAI->uiGossipStep) switch (ai->uiGossipStep)
{ {
case 0: //This one is a workaround since the very beggining of the script is wrong. case 0: //This one is a workaround since the very beggining of the script is wrong.
{ {
@@ -390,9 +390,9 @@ public:
{ {
ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY); ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY);
if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* pAI = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI())) if (ingvar->getVictim())
if (ingvar->getVictim()) if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* ai = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI()))
pAI->StartZombiePhase(); ai->StartZombiePhase();
me->GetMotionMaster()->MovePoint(2, x+1, y, z+30); me->GetMotionMaster()->MovePoint(2, x+1, y, z+30);
++uiResurectPhase; ++uiResurectPhase;