mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10373] Drop unused team-argument in ChooseDisplayId -function
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
a17450047b
commit
a15b0916b6
7 changed files with 12 additions and 20 deletions
|
|
@ -229,7 +229,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
||||||
// known valid are: CLASS_WARRIOR,CLASS_PALADIN,CLASS_ROGUE,CLASS_MAGE
|
// known valid are: CLASS_WARRIOR,CLASS_PALADIN,CLASS_ROGUE,CLASS_MAGE
|
||||||
SetByteValue(UNIT_FIELD_BYTES_0, 1, uint8(cinfo->unit_class));
|
SetByteValue(UNIT_FIELD_BYTES_0, 1, uint8(cinfo->unit_class));
|
||||||
|
|
||||||
uint32 display_id = ChooseDisplayId(team, GetCreatureInfo(), data);
|
uint32 display_id = ChooseDisplayId(GetCreatureInfo(), data);
|
||||||
if (!display_id) // Cancel load if no display id
|
if (!display_id) // Cancel load if no display id
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load.", Entry);
|
sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load.", Entry);
|
||||||
|
|
@ -346,7 +346,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Creature::ChooseDisplayId(uint32 team, const CreatureInfo *cinfo, const CreatureData *data /*= NULL*/)
|
uint32 Creature::ChooseDisplayId(const CreatureInfo *cinfo, const CreatureData *data /*= NULL*/)
|
||||||
{
|
{
|
||||||
// Use creature model explicit, override template (creature.modelid)
|
// Use creature model explicit, override template (creature.modelid)
|
||||||
if (data && data->modelid_override)
|
if (data && data->modelid_override)
|
||||||
|
|
|
||||||
|
|
@ -507,7 +507,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
||||||
CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; }
|
CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; }
|
||||||
CreatureDataAddon const* GetCreatureAddon() const;
|
CreatureDataAddon const* GetCreatureAddon() const;
|
||||||
|
|
||||||
static uint32 ChooseDisplayId(uint32 team, const CreatureInfo *cinfo, const CreatureData *data = NULL);
|
static uint32 ChooseDisplayId(const CreatureInfo *cinfo, const CreatureData *data = NULL);
|
||||||
|
|
||||||
std::string GetAIName() const;
|
std::string GetAIName() const;
|
||||||
std::string GetScriptName() const;
|
std::string GetScriptName() const;
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||||
{
|
{
|
||||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId))
|
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId))
|
||||||
{
|
{
|
||||||
uint32 display_id = Creature::ChooseDisplayId(0,ci);
|
uint32 display_id = Creature::ChooseDisplayId(ci);
|
||||||
m_creature->SetDisplayId(display_id);
|
m_creature->SetDisplayId(display_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -811,7 +811,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||||
{
|
{
|
||||||
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(action.mount.creatureId))
|
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(action.mount.creatureId))
|
||||||
{
|
{
|
||||||
uint32 display_id = Creature::ChooseDisplayId(0, cInfo);
|
uint32 display_id = Creature::ChooseDisplayId(cInfo);
|
||||||
m_creature->Mount(display_id);
|
m_creature->Mount(display_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -762,7 +762,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
|
||||||
if (data2 && activate)
|
if (data2 && activate)
|
||||||
{
|
{
|
||||||
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(data2->id);
|
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(data2->id);
|
||||||
uint32 display_id = Creature::ChooseDisplayId(0,cinfo,data2);
|
uint32 display_id = Creature::ChooseDisplayId(cinfo,data2);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||||
if (minfo)
|
if (minfo)
|
||||||
display_id = minfo->modelid;
|
display_id = minfo->modelid;
|
||||||
|
|
|
||||||
|
|
@ -5421,7 +5421,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId( uint32 id, uint32 team, bool allowed_al
|
||||||
if (!mount_info)
|
if (!mount_info)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
uint16 mount_id = Creature::ChooseDisplayId(team,mount_info);
|
uint16 mount_id = Creature::ChooseDisplayId(mount_info);
|
||||||
if (!mount_id)
|
if (!mount_id)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1971,7 +1971,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
|
|
||||||
// we must assume db or script set display id to native at ending flight (if not, target is stuck with this model)
|
// we must assume db or script set display id to native at ending flight (if not, target is stuck with this model)
|
||||||
if (cInfo)
|
if (cInfo)
|
||||||
target->SetDisplayId(Creature::ChooseDisplayId(0, cInfo));
|
target->SetDisplayId(Creature::ChooseDisplayId(cInfo));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2680,11 +2680,7 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 team = 0;
|
uint32 display_id = Creature::ChooseDisplayId(ci);
|
||||||
if (target->GetTypeId()==TYPEID_PLAYER)
|
|
||||||
team = ((Player*)target)->GetTeam();
|
|
||||||
|
|
||||||
uint32 display_id = Creature::ChooseDisplayId(team,ci);
|
|
||||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||||
if (minfo)
|
if (minfo)
|
||||||
display_id = minfo->modelid;
|
display_id = minfo->modelid;
|
||||||
|
|
@ -3114,7 +3110,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||||
sLog.outError("Auras: unknown creature id = %d (only need its modelid) Form Spell Aura Transform in Spell ID = %d", m_modifier.m_miscvalue, GetId());
|
sLog.outError("Auras: unknown creature id = %d (only need its modelid) Form Spell Aura Transform in Spell ID = %d", m_modifier.m_miscvalue, GetId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
model_id = Creature::ChooseDisplayId(0,ci); // Will use the default model here
|
model_id = Creature::ChooseDisplayId(ci); // Will use the default model here
|
||||||
|
|
||||||
// Polymorph (sheep/penguin case)
|
// Polymorph (sheep/penguin case)
|
||||||
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_MAGE && GetSpellProto()->SpellIconID == 82)
|
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_MAGE && GetSpellProto()->SpellIconID == 82)
|
||||||
|
|
@ -3186,11 +3182,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||||
uint32 cr_id = target->GetAurasByType(SPELL_AURA_MOUNTED).front()->GetModifier()->m_miscvalue;
|
uint32 cr_id = target->GetAurasByType(SPELL_AURA_MOUNTED).front()->GetModifier()->m_miscvalue;
|
||||||
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(cr_id))
|
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(cr_id))
|
||||||
{
|
{
|
||||||
uint32 team = 0;
|
uint32 display_id = Creature::ChooseDisplayId(ci);
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
|
||||||
team = ((Player*)target)->GetTeam();
|
|
||||||
|
|
||||||
uint32 display_id = Creature::ChooseDisplayId(team, ci);
|
|
||||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||||
if (minfo)
|
if (minfo)
|
||||||
display_id = minfo->modelid;
|
display_id = minfo->modelid;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10372"
|
#define REVISION_NR "10373"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue