Merge branch '3.3.5' into 4.3.4
Conflicts: sql/base/dev/world_database.sql sql/updates/world/2015_07_14_00_world.sql sql/updates/world/2015_07_14_01_world_335.sql sql/updates/world/2015_07_19_00_world_2015_07_18_04.sql sql/updates/world/2015_07_19_05_world.sql sql/updates/world/2015_07_21_00_world.sql sql/updates/world/2015_07_24_00_world.sql sql/updates/world/2015_07_24_01_world.sql sql/updates/world/2015_07_24_02_world.sql sql/updates/world/2015_07_24_03_world.sql sql/updates/world/2015_07_24_04_world.sql sql/updates/world/2015_07_24_05_world.sql sql/updates/world/2015_07_25_03_world.sql sql/updates/world/2015_07_25_04_world.sql src/server/collision/Management/MMapManager.cpp src/server/collision/Management/MMapManager.h src/server/game/Battlefield/Battlefield.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Guilds/Guild.h src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/SpellMgr.cpp src/server/game/Weather/WeatherMgr.cpp src/server/scripts/Spells/spell_hunter.cpp src/server/shared/Utilities/Util.cpp
This commit is contained in:
commit
86eb651757
156 files changed
+1402
-967
No files matched your search
@@ -226,7 +226,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 /*phase
|
||||
|
||||
SetDisplayId(goinfo->displayId);
|
||||
|
||||
m_model = GameObjectModel::Create(*this);
|
||||
m_model = CreateModel();
|
||||
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
|
||||
SetGoType(GameobjectTypes(goinfo->type));
|
||||
SetGoState(go_state);
|
||||
@@ -2195,7 +2195,7 @@ void GameObject::UpdateModel()
|
||||
if (GetMap()->ContainsGameObjectModel(*m_model))
|
||||
GetMap()->RemoveGameObjectModel(*m_model);
|
||||
delete m_model;
|
||||
m_model = GameObjectModel::Create(*this);
|
||||
m_model = CreateModel();
|
||||
if (m_model)
|
||||
GetMap()->InsertGameObjectModel(*m_model);
|
||||
}
|
||||
@@ -2326,12 +2326,12 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t
|
||||
}
|
||||
else if (index == GAMEOBJECT_FLAGS)
|
||||
{
|
||||
uint32 flags = m_uint32Values[GAMEOBJECT_FLAGS];
|
||||
uint32 goFlags = m_uint32Values[GAMEOBJECT_FLAGS];
|
||||
if (GetGoType() == GAMEOBJECT_TYPE_CHEST)
|
||||
if (GetGOInfo()->chest.groupLootRules && !IsLootAllowedFor(target))
|
||||
flags |= GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE;
|
||||
goFlags |= GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE;
|
||||
|
||||
fieldBuffer << flags;
|
||||
fieldBuffer << goFlags;
|
||||
}
|
||||
else if (index == GAMEOBJECT_LEVEL)
|
||||
{
|
||||
@@ -2415,3 +2415,25 @@ void GameObject::UpdateModelPosition()
|
||||
GetMap()->InsertGameObjectModel(*m_model);
|
||||
}
|
||||
}
|
||||
|
||||
class GameObjectModelOwnerImpl : public GameObjectModelOwnerBase
|
||||
{
|
||||
public:
|
||||
explicit GameObjectModelOwnerImpl(GameObject const* owner) : _owner(owner) { }
|
||||
|
||||
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
||||
virtual uint32 GetDisplayId() const override { return _owner->GetDisplayId(); }
|
||||
virtual uint32 GetPhaseMask() const override { return _owner->GetPhaseMask(); }
|
||||
virtual G3D::Vector3 GetPosition() const override { return G3D::Vector3(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ()); }
|
||||
virtual float GetOrientation() const override { return _owner->GetOrientation(); }
|
||||
virtual float GetScale() const override { return _owner->GetObjectScale(); }
|
||||
virtual void DebugVisualizeCorner(G3D::Vector3 const& corner) const override { _owner->SummonCreature(1, corner.x, corner.y, corner.z, 0, TEMPSUMMON_MANUAL_DESPAWN); }
|
||||
|
||||
private:
|
||||
GameObject const* _owner;
|
||||
};
|
||||
|
||||
GameObjectModel* GameObject::CreateModel()
|
||||
{
|
||||
return GameObjectModel::Create(Trinity::make_unique<GameObjectModelOwnerImpl>(this), sWorld->GetDataPath());
|
||||
}
|
||||
Reference in new issue
Block a user