Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Spells/Spell.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/Spells/spell_paladin.cpp src/server/scripts/Spells/spell_priest.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
commit
7cc4828554
38 files changed
+651
-272
No files matched your search
@@ -7901,9 +7901,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
}
|
||||
|
||||
if (minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET)
|
||||
{
|
||||
SetCritterGUID(minion->GetGUID());
|
||||
}
|
||||
|
||||
// PvP, FFAPvP
|
||||
minion->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
|
||||
@@ -11506,12 +11504,14 @@ void Unit::SetLevel(uint8 lvl)
|
||||
{
|
||||
SetUInt32Value(UNIT_FIELD_LEVEL, lvl);
|
||||
|
||||
// group update
|
||||
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetGroup())
|
||||
ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_LEVEL);
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
// group update
|
||||
if (player->GetGroup())
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_LEVEL);
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
sWorld->UpdateCharacterNameDataLevel(ToPlayer()->GetGUIDLow(), lvl);
|
||||
sWorld->UpdateCharacterNameDataLevel(GetGUIDLow(), lvl);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::SetHealth(uint32 val)
|
||||
@@ -16152,19 +16152,21 @@ bool Unit::SetHover(bool enable, bool packetOnly /*= false*/)
|
||||
if (enable == HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
|
||||
return false;
|
||||
|
||||
float hoverHeight = GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
//! No need to check height on ascent
|
||||
AddUnitMovementFlag(MOVEMENTFLAG_HOVER);
|
||||
if (float hh = GetFloatValue(UNIT_FIELD_HOVERHEIGHT))
|
||||
UpdateHeight(GetPositionZ() + hh);
|
||||
if (hoverHeight)
|
||||
UpdateHeight(GetPositionZ() + hoverHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveUnitMovementFlag(MOVEMENTFLAG_HOVER);
|
||||
if (float hh = GetFloatValue(UNIT_FIELD_HOVERHEIGHT))
|
||||
if (hoverHeight)
|
||||
{
|
||||
float newZ = GetPositionZ() - hh;
|
||||
float newZ = GetPositionZ() - hoverHeight;
|
||||
UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), newZ);
|
||||
UpdateHeight(newZ);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user