Skip to content

Commit

Permalink
Replaced some function for set GObject ArtKit, use uint8 for ArtKit
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie2025 committed Dec 26, 2008
1 parent 56b76b4 commit b2812bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/game/GameObject.cpp
Expand Up @@ -90,7 +90,7 @@ void GameObject::RemoveFromWorld()
Object::RemoveFromWorld();
}

bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint32 ArtKit)
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint8 ArtKit)
{
Relocate(x,y,z,ang);
SetMapId(map->GetId());
Expand Down Expand Up @@ -159,7 +159,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float

SetGoAnimProgress(animprogress);

SetUInt32Value (GAMEOBJECT_BYTES_1, ArtKit);
SetGoArtKit(ArtKit);

// Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
if (goinfo->type == GAMEOBJECT_TYPE_SPELLCASTER)
Expand Down Expand Up @@ -537,7 +537,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask)
data.animprogress = GetGoAnimProgress();
data.go_state = GetGoState();
data.spawnMask = spawnMask;
data.ArtKit = GetUInt32Value (GAMEOBJECT_BYTES_1);
data.ArtKit = GetGoArtKit();

// updated in DB
std::ostringstream ss;
Expand Down Expand Up @@ -588,7 +588,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)

uint32 animprogress = data->animprogress;
uint32 go_state = data->go_state;
uint32 ArtKit = data->ArtKit;
uint8 ArtKit = data->ArtKit;

m_DBTableGuid = guid;
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
Expand Down
4 changes: 2 additions & 2 deletions src/game/GameObject.h
Expand Up @@ -388,7 +388,7 @@ struct GameObjectData
uint32 animprogress;
uint32 go_state;
uint8 spawnMask;
uint32 ArtKit;
uint8 ArtKit;
};

// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
Expand Down Expand Up @@ -424,7 +424,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
void AddToWorld();
void RemoveFromWorld();

bool Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint32 ArtKit = 0);
bool Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint8 ArtKit = 0);
void Update(uint32 p_time);
static GameObject* GetGameObject(WorldObject& object, uint64 guid);
GameObjectInfo const* GetGOInfo() const;
Expand Down
8 changes: 4 additions & 4 deletions src/game/OutdoorPvPEP.cpp
Expand Up @@ -34,7 +34,7 @@ bool OutdoorPvPObjectiveEP_EWT::Update(uint32 diff)
((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_EWT] = 0;
}

uint32 artkit = 21;
uint8 artkit = 21;

switch(m_State)
{
Expand Down Expand Up @@ -208,7 +208,7 @@ bool OutdoorPvPObjectiveEP_NPT::Update(uint32 diff)
((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_NPT] = 0;
}

uint32 artkit = 21;
uint8 artkit = 21;

switch(m_State)
{
Expand Down Expand Up @@ -378,7 +378,7 @@ bool OutdoorPvPObjectiveEP_CGT::Update(uint32 diff)
((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_CGT] = 0;
}

uint32 artkit = 21;
uint8 artkit = 21;

switch(m_State)
{
Expand Down Expand Up @@ -547,7 +547,7 @@ bool OutdoorPvPObjectiveEP_PWT::Update(uint32 diff)
((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_PWT] = 0;
}

uint32 artkit = 21;
uint8 artkit = 21;

switch(m_State)
{
Expand Down

0 comments on commit b2812bb

Please sign in to comment.