Esempio n. 1
0
bool ScriptMgr::OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
{
    ASSERT(player);
    ASSERT(creature);
    ASSERT(quest);

    GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->OnQuestReward(player, creature, quest, opt);
}
Esempio n. 2
0
uint32 ScriptMgr::GetDialogStatus(Player* player, Creature* creature)
{
    ASSERT(player);
    ASSERT(creature);

    // TODO: 100 is a funny magic number to have hanging around here...
    GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, 100);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->GetDialogStatus(player, creature);
}
Esempio n. 3
0
uint32 ScriptMgr::GetDialogStatus(Player* player, GameObject* go)
{
    ASSERT(player);
    ASSERT(go);

    /// @todo 100 is a funny magic number to have hanging around here...
    GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, 100);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->GetDialogStatus(player, go);
}
Esempio n. 4
0
bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest)
{
    ASSERT(player);
    ASSERT(item);
    ASSERT(quest);

    GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->OnQuestAccept(player, item, quest);
}
Esempio n. 5
0
bool ScriptMgr::OnGossipSelectCode(Player* player, GameObject* go, uint32 sender, uint32 action, const char* code)
{
    ASSERT(player);
    ASSERT(go);
    ASSERT(code);

    GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->OnGossipSelectCode(player, go, sender, action, code);
}
Esempio n. 6
0
bool ScriptMgr::OnQuestReward(Player* player, GameObject* go, Quest const* quest, uint32 opt)
{
    ASSERT(player);
    ASSERT(go);
    ASSERT(quest);

    GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->OnQuestReward(player, go, quest, opt);
}
Esempio n. 7
0
bool ScriptMgr::OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code)
{
    ASSERT(player);
    ASSERT(creature);
    ASSERT(code);

    GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
    player->PlayerTalkClass->ClearMenus();
    return tmpscript->OnGossipSelectCode(player, creature, sender, action, code);
}
Esempio n. 8
0
OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data) {
	ASSERT(data);

	GET_SCRIPT_RET(OutdoorPvPScript, data->ScriptId, tmpscript, NULL);
	return tmpscript->GetOutdoorPvP();
}
Esempio n. 9
0
CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature) {
	ASSERT(creature);

	GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, NULL);
	return tmpscript->GetAI(creature);
}
Esempio n. 10
0
Creature* ScriptMgr::GetCreatureScriptedClass(uint32 scriptID) {
	ASSERT(scriptID);

	GET_SCRIPT_RET(CreatureScript, scriptID, tmpscript, NULL);
	return tmpscript->GetCreatureScriptedClass();
}
Esempio n. 11
0
InstanceScript* ScriptMgr::CreateInstanceData(InstanceMap* map) {
	ASSERT(map);

	GET_SCRIPT_RET(InstanceMapScript, map->GetScriptId(), tmpscript, NULL);
	return tmpscript->GetInstanceScript(map);
}