mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
*Cleanup, fix many cases of unoptimized loops, potential crashes, excessively large data types, unnecessary or wrong casts, non-standardized function calls, and so on..
*Proper Maexxna Web Spray locations (old locations sent players flying into the air) --HG-- branch : trunk
This commit is contained in:
@@ -12026,12 +12026,12 @@ float Unit::GetWeaponDamageRange(WeaponAttackType attType ,WeaponDamageRange typ
|
||||
return m_weaponDamage[attType][type];
|
||||
}
|
||||
|
||||
void Unit::SetLevel(uint32 lvl)
|
||||
void Unit::SetLevel(uint8 lvl)
|
||||
{
|
||||
SetUInt32Value(UNIT_FIELD_LEVEL, lvl);
|
||||
|
||||
// group update
|
||||
if ((GetTypeId() == TYPEID_PLAYER) && ((Player*)this)->GetGroup())
|
||||
if (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->GetGroup())
|
||||
((Player*)this)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_LEVEL);
|
||||
}
|
||||
|
||||
@@ -13513,7 +13513,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
uint32 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel();
|
||||
uint8 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel();
|
||||
|
||||
if(!pet->InitStatsForLevel(level))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user