*hopefuly fix Thrall reset bug

--HG--
branch : trunk
This commit is contained in:
Rat
2009-04-03 22:20:19 +02:00
parent b449693f17
commit 893eb77a07
@@ -211,6 +211,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
npc_thrall_old_hillsbradAI(Creature *c) : npc_escortAI(c)
{
pInstance = ((ScriptedInstance*)c->GetInstanceData());
m_creature->setActive(true);
}
ScriptedInstance *pInstance;
@@ -357,7 +358,9 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
//trigger epoch Yell("Thrall! Come outside and face your fate! ....")
//from here, thrall should not never be allowed to move to point 106 which he currently does.
break;
case 106:
{
if (!PlayerGUID)
break;
@@ -382,6 +385,11 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
//alot will happen here, thrall and taretha talk, erozion appear at spot to explain
m_creature->SummonCreature(EROZION_ENTRY,2646.47,680.416,55.38,4.16,TEMPSUMMON_TIMED_DESPAWN,120000);
}
break;
case 108:
//last waypoint, just set Thrall invisible, respawn is turned off
m_creature->SetVisibility(VISIBILITY_OFF);
break;
}
}
@@ -711,6 +719,9 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
DoScriptText(SAY_TH_START_EVENT_PART1, _Creature);
((npc_escortAI*)(_Creature->AI()))->Start(true, true, true, player->GetGUID());
((npc_escortAI*)(_Creature->AI()))->SetMaxPlayerDistance(100.0f);//not really needed, because it will not despawn if player is too far
((npc_escortAI*)(_Creature->AI()))->SetDespawnAtEnd(false);
((npc_escortAI*)(_Creature->AI()))->SetDespawnAtFar(false);
break;
case GOSSIP_ACTION_INFO_DEF+2: