[10961] Avoid use scripting support wrappers for internal server code.

This commit is contained in:
VladimirMangos 2011-01-04 22:46:25 +03:00
parent 3a99027a80
commit fda171d6bd
4 changed files with 7 additions and 7 deletions

View file

@ -460,7 +460,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
m_creature->setFaction(action.set_faction.factionId); m_creature->setFaction(action.set_faction.factionId);
else else
{ {
if (CreatureInfo const* ci = GetCreatureTemplateStore(m_creature->GetEntry())) if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(m_creature->GetEntry()))
{ {
//if no id provided, assume reset and then use default //if no id provided, assume reset and then use default
if (m_creature->getFaction() != ci->faction_A) if (m_creature->getFaction() != ci->faction_A)
@ -476,7 +476,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
//set model based on entry from creature_template //set model based on entry from creature_template
if (action.morph.creatureId) if (action.morph.creatureId)
{ {
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId)) if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(action.morph.creatureId))
{ {
uint32 display_id = Creature::ChooseDisplayId(ci); uint32 display_id = Creature::ChooseDisplayId(ci);
m_creature->SetDisplayId(display_id); m_creature->SetDisplayId(display_id);
@ -836,7 +836,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
// set model based on entry from creature_template // set model based on entry from creature_template
if (action.mount.creatureId) if (action.mount.creatureId)
{ {
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(action.mount.creatureId)) if (CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(action.mount.creatureId))
{ {
uint32 display_id = Creature::ChooseDisplayId(cInfo); uint32 display_id = Creature::ChooseDisplayId(cInfo);
m_creature->Mount(display_id); m_creature->Mount(display_id);

View file

@ -2714,7 +2714,7 @@ void Map::ScriptsProcess()
pOwner->SetDisplayId(step.script->morph.creatureOrModelEntry); pOwner->SetDisplayId(step.script->morph.creatureOrModelEntry);
else else
{ {
CreatureInfo const* ci = GetCreatureTemplateStore(step.script->morph.creatureOrModelEntry); CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(step.script->morph.creatureOrModelEntry);
uint32 display_id = Creature::ChooseDisplayId(ci); uint32 display_id = Creature::ChooseDisplayId(ci);
pOwner->SetDisplayId(display_id); pOwner->SetDisplayId(display_id);
@ -2771,7 +2771,7 @@ void Map::ScriptsProcess()
pOwner->Mount(step.script->mount.creatureOrModelEntry); pOwner->Mount(step.script->mount.creatureOrModelEntry);
else else
{ {
CreatureInfo const* ci = GetCreatureTemplateStore(step.script->mount.creatureOrModelEntry); CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(step.script->mount.creatureOrModelEntry);
uint32 display_id = Creature::ChooseDisplayId(ci); uint32 display_id = Creature::ChooseDisplayId(ci);
pOwner->Mount(display_id); pOwner->Mount(display_id);

View file

@ -8084,7 +8084,7 @@ void ObjectMgr::LoadMailLevelRewards()
continue; continue;
} }
if(!GetCreatureTemplateStore(senderEntry)) if(!GetCreatureTemplate(senderEntry))
{ {
sLog.outErrorDb("Table `mail_level_reward` have nonexistent sender creature entry (%u) for level %u that invalid not include any player races, ignoring.",senderEntry,level); sLog.outErrorDb("Table `mail_level_reward` have nonexistent sender creature entry (%u) for level %u that invalid not include any player races, ignoring.",senderEntry,level);
continue; continue;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10960" #define REVISION_NR "10961"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__