Core/Script: Clean-Up in Scripts.

InstanceScript* Instance -> InstanceScript* instance

Signed-off-by: Gyx <2359980687@qq.com>
This commit is contained in:
Gyx
2012-03-14 09:30:06 +08:00
parent e8f414e143
commit 117fbb9010
3 changed files with 43 additions and 43 deletions

View File

@@ -1204,7 +1204,7 @@ class npc_crok_scourgebane : public CreatureScript
struct npc_argent_captainAI : public ScriptedAI
{
public:
npc_argent_captainAI(Creature* creature) : ScriptedAI(creature), Instance(creature->GetInstanceScript()), _firstDeath(true)
npc_argent_captainAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()), _firstDeath(true)
{
FollowAngle = PET_FOLLOW_ANGLE;
FollowDist = PET_FOLLOW_DIST;
@@ -1232,7 +1232,7 @@ struct npc_argent_captainAI : public ScriptedAI
{
if (action == ACTION_START_GAUNTLET)
{
if (Creature* crok = ObjectAccessor::GetCreature(*me, Instance->GetData64(DATA_CROK_SCOURGEBANE)))
if (Creature* crok = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_CROK_SCOURGEBANE)))
{
me->SetReactState(REACT_DEFENSIVE);
FollowAngle = me->GetAngle(crok) + me->GetOrientation();
@@ -1276,7 +1276,7 @@ struct npc_argent_captainAI : public ScriptedAI
if (!me->GetVehicle())
{
me->GetMotionMaster()->Clear(false);
if (Creature* crok = ObjectAccessor::GetCreature(*me, Instance->GetData64(DATA_CROK_SCOURGEBANE)))
if (Creature* crok = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_CROK_SCOURGEBANE)))
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, MOTION_SLOT_IDLE);
}
@@ -1309,14 +1309,14 @@ struct npc_argent_captainAI : public ScriptedAI
}
Talk(SAY_CAPTAIN_RESURRECTED);
me->UpdateEntry(newEntry, Instance->GetData(DATA_TEAM_IN_INSTANCE), me->GetCreatureData());
me->UpdateEntry(newEntry, instance->GetData(DATA_TEAM_IN_INSTANCE), me->GetCreatureData());
DoCast(me, SPELL_UNDEATH, true);
}
}
protected:
EventMap Events;
InstanceScript* Instance;
InstanceScript* instance;
float FollowAngle;
float FollowDist;
bool IsUndead;