mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
Fixed error output at creature loading.
This commit is contained in:
parent
0ef8305ebb
commit
c990e2aaef
1 changed files with 61 additions and 59 deletions
|
|
@ -228,14 +228,14 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
|||
uint32 display_id = sObjectMgr.ChooseDisplayId(team, GetCreatureInfo(), data);
|
||||
if (!display_id) // Cancel load if no display id
|
||||
{
|
||||
sLog.outErrorDb("Creature (Entry: %u) has model %u not found in table `creature_model_info`, can't load. ", Entry, display_id);
|
||||
sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load.", Entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||
if (!minfo) // Cancel load if no model defined
|
||||
{
|
||||
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 info defined in table `creature_model_info`, can't load.", Entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -774,7 +774,8 @@ void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, Monst
|
|||
|
||||
Player *Creature::GetLootRecipient() const
|
||||
{
|
||||
if (!m_lootRecipient) return NULL;
|
||||
if (!m_lootRecipient)
|
||||
return NULL;
|
||||
else return ObjectAccessor::FindPlayer(m_lootRecipient);
|
||||
}
|
||||
|
||||
|
|
@ -1371,7 +1372,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
|
|||
}
|
||||
|
||||
bool bcontinue = true;
|
||||
for(uint32 j=0;j<3;j++)
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
if( (spellInfo->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE ) ||
|
||||
(spellInfo->Effect[j] == SPELL_EFFECT_INSTAKILL) ||
|
||||
|
|
@ -1423,7 +1424,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
|
|||
}
|
||||
|
||||
bool bcontinue = true;
|
||||
for(uint32 j=0;j<3;j++)
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
if( (spellInfo->Effect[j] == SPELL_EFFECT_HEAL ) )
|
||||
{
|
||||
|
|
@ -1431,7 +1432,8 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(bcontinue) continue;
|
||||
if(bcontinue)
|
||||
continue;
|
||||
|
||||
if(spellInfo->manaCost > GetPower(POWER_MANA))
|
||||
continue;
|
||||
|
|
@ -1726,7 +1728,7 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
|
|||
uint32 enemy_team = attacker->GetTeam();
|
||||
|
||||
WorldPacket data(SMSG_ZONE_UNDER_ATTACK, 4);
|
||||
data << (uint32)GetZoneId();
|
||||
data << uint32(GetZoneId());
|
||||
sWorld.SendGlobalMessage(&data, NULL, (enemy_team == ALLIANCE ? HORDE : ALLIANCE));
|
||||
}
|
||||
|
||||
|
|
@ -1824,7 +1826,7 @@ bool Creature::HasSpell(uint32 spellID) const
|
|||
for(i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
if(spellID == m_spells[i])
|
||||
break;
|
||||
return i < CREATURE_MAX_SPELLS; //broke before end of iteration of known spells
|
||||
return i < CREATURE_MAX_SPELLS; // break before end of iteration of known spells
|
||||
}
|
||||
|
||||
time_t Creature::GetRespawnTimeEx() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue