Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and

added lots of improvements
Please re-extract vmaps
This commit is contained in:
Subv2112
2012-02-09 13:58:22 -05:00
committed by Subv
parent 229d4119e8
commit 93d199f043
60 changed files with 1857 additions and 438 deletions
@@ -609,6 +609,7 @@ enum LootState
};
class Unit;
class GameObjectModel;
// 5 sec for bobber catch
#define FISHING_BOBBER_READY_TIME 5
@@ -703,12 +704,15 @@ class GameObject : public WorldObject, public GridObject<GameObject>
GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); }
void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); }
GOState GetGoState() const { return GOState(GetByteValue(GAMEOBJECT_BYTES_1, 0)); }
void SetGoState(GOState state) { SetByteValue(GAMEOBJECT_BYTES_1, 0, state); }
void SetGoState(GOState state);
uint8 GetGoArtKit() const { return GetByteValue(GAMEOBJECT_BYTES_1, 2); }
void SetGoArtKit(uint8 artkit);
uint8 GetGoAnimProgress() const { return GetByteValue(GAMEOBJECT_BYTES_1, 3); }
void SetGoAnimProgress(uint8 animprogress) { SetByteValue(GAMEOBJECT_BYTES_1, 3, animprogress); }
static void SetGoArtKit(uint8 artkit, GameObject* go, uint32 lowguid = 0);
void SetPhaseMask(uint32 newPhaseMask, bool update);
void EnableCollision(bool enable);
void Use(Unit* user);
@@ -790,6 +794,9 @@ class GameObject : public WorldObject, public GridObject<GameObject>
GameObjectAI* AI() const { return m_AI; }
std::string GetAIName() const;
void SetDisplayId(uint32 displayid);
GameObjectModel * m_model;
protected:
bool AIM_Initialize();
uint32 m_spellId;
@@ -819,6 +826,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
private:
void RemoveFromOwner();
void SwitchDoorOrButton(bool activate, bool alternative = false);
void UpdateModel(); // updates model in case displayId were changed
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const