mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Objects: ported changes for the collision height changes when mounting up
This commit is contained in:
@@ -1017,6 +1017,13 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 /*phaseMask*
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
// area/zone id is needed immediately for ZoneScript::GetCreatureEntry hook before it is known which creature template to load (no model/scale available yet)
|
||||
PositionFullTerrainStatus data;
|
||||
GetMap()->GetFullTerrainStatusForPosition(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), data, MAP_ALL_LIQUIDS, DEFAULT_COLLISION_HEIGHT);
|
||||
ProcessPositionDataChanged(data);
|
||||
}
|
||||
|
||||
if (!CreateFromProto(guidlow, entry, data, vehId))
|
||||
return false;
|
||||
|
||||
@@ -1047,8 +1054,6 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 /*phaseMask*
|
||||
//! Need to be called after LoadCreaturesAddon - MOVEMENTFLAG_HOVER is set there
|
||||
m_positionZ += GetHoverOffset();
|
||||
|
||||
UpdatePositionData();
|
||||
|
||||
LastUsedScriptID = GetScriptId();
|
||||
|
||||
if (IsSpiritHealer() || IsSpiritGuide() || (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GHOST_VISIBILITY))
|
||||
|
||||
@@ -2187,12 +2187,10 @@ void WorldObject::SetZoneScript()
|
||||
m_zoneScript = (ZoneScript*)((InstanceMap*)map)->GetInstanceScript();
|
||||
else if (!map->IsBattlegroundOrArena())
|
||||
{
|
||||
uint32 zoneId = GetMap()->GetZoneId(GetPhaseShift(), GetPosition());
|
||||
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(zoneId))
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
|
||||
m_zoneScript = bf;
|
||||
else
|
||||
m_zoneScript = sOutdoorPvPMgr->GetZoneScript(zoneId);
|
||||
m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,6 +533,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_GENDER, createInfo->Gender);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_POWER_TYPE, powertype);
|
||||
InitDisplayIds();
|
||||
UpdatePositionData();
|
||||
if (sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP)
|
||||
{
|
||||
SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PVP_FLAG, UNIT_BYTE2_FLAG_PVP);
|
||||
@@ -23846,7 +23847,6 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
|
||||
void Player::SendInitialPacketsAfterAddToMap()
|
||||
{
|
||||
UpdatePositionData();
|
||||
UpdateVisibilityForPlayer();
|
||||
|
||||
// update zone
|
||||
|
||||
Reference in New Issue
Block a user