Scripts/Quests: Add a double check in summoning for two of my previous scripts, as well as revert changing WDB data.

This commit is contained in:
Discover-
2011-12-25 17:17:28 +01:00
parent dbcccbbb44
commit 9b8d18e7cd
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -188,7 +188,7 @@ class go_iruxos : public GameObjectScript
bool OnGossipHello(Player* player, GameObject* go)
{
if (player->GetQuestStatus(QUEST_HAND_IRUXOS) == QUEST_STATUS_INCOMPLETE)
if (player->GetQuestStatus(QUEST_HAND_IRUXOS) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_DEMON_SPIRIT, 25.0f, true))
player->SummonCreature(NPC_DEMON_SPIRIT, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
return true;
@@ -283,7 +283,7 @@ class go_demon_portal : public GameObjectScript
bool OnGossipHello(Player* player, GameObject* go)
{
if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE)
if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_DEMON_GUARDIAN, 5.0f, true))
{
if (Creature* guardian = player->SummonCreature(NPC_DEMON_GUARDIAN, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0))
guardian->AI()->AttackStart(player);