Fixes gossip scripts or points of interests of npc's with a Scriptname assigned to them.

This fixes guards in Major cities.
Thanks to Aokromes for testing.
Thanks to click for converting all the scripts to work with this change.

--HG--
branch : trunk
This commit is contained in:
Liberate
2010-08-29 00:57:51 +02:00
parent 7ad5e2ad87
commit f67441b863
84 changed files with 166 additions and 4 deletions

View File

@@ -674,7 +674,6 @@ bool ScriptMgr::OnGossipSelect(Player* player, Creature* creature, uint32 sender
ASSERT(creature);
GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
player->PlayerTalkClass->ClearMenus();
return tmpscript->OnGossipSelect(player, creature, sender, action);
}
@@ -685,7 +684,6 @@ bool ScriptMgr::OnGossipSelectCode(Player* player, Creature* creature, uint32 se
ASSERT(code);
GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
player->PlayerTalkClass->ClearMenus();
return tmpscript->OnGossipSelectCode(player, creature, sender, action, code);
}
@@ -776,7 +774,6 @@ bool ScriptMgr::OnGossipSelect(Player* player, GameObject* go, uint32 sender, ui
ASSERT(go);
GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
player->PlayerTalkClass->ClearMenus();
return tmpscript->OnGossipSelect(player, go, sender, action);
}
@@ -787,7 +784,6 @@ bool ScriptMgr::OnGossipSelectCode(Player* player, GameObject* go, uint32 sender
ASSERT(code);
GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
player->PlayerTalkClass->ClearMenus();
return tmpscript->OnGossipSelectCode(player, go, sender, action, code);
}