mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
Don't use singleton to access static functions.
* This affects especially ObjectMgr functions: - GetCreatureInfo - GetGameObjectInfo - GetInstanceTemplate These are in fact static functions.
This commit is contained in:
parent
34dab079c4
commit
1f23884757
40 changed files with 104 additions and 104 deletions
|
|
@ -2723,7 +2723,7 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
|
|||
|
||||
if(apply)
|
||||
{
|
||||
CreatureInfo const* ci = objmgr.GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
if(!ci)
|
||||
{
|
||||
sLog.outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need it modelid)", m_modifier.m_miscvalue);
|
||||
|
|
@ -3131,7 +3131,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
|||
{
|
||||
uint32 model_id;
|
||||
|
||||
CreatureInfo const * ci = objmgr.GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
CreatureInfo const * ci = ObjectMgr::GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
if (!ci)
|
||||
{
|
||||
model_id = 16358; // pig pink ^_^
|
||||
|
|
@ -3200,7 +3200,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
|||
if (!m_target->GetAurasByType(SPELL_AURA_MOUNTED).empty())
|
||||
{
|
||||
uint32 cr_id = m_target->GetAurasByType(SPELL_AURA_MOUNTED).front()->GetModifier()->m_miscvalue;
|
||||
if (CreatureInfo const* ci = objmgr.GetCreatureTemplate(cr_id))
|
||||
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(cr_id))
|
||||
{
|
||||
uint32 team = 0;
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
@ -5905,7 +5905,7 @@ void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
|
|||
if(m_target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
CreatureInfo const * ci = objmgr.GetCreatureTemplate(m_target->GetEntry());
|
||||
CreatureInfo const * ci = ObjectMgr::GetCreatureTemplate(m_target->GetEntry());
|
||||
if(ci && ci->type == CREATURE_TYPE_BEAST)
|
||||
m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue