aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp10
-rw-r--r--src/game/GameObject.h16
2 files changed, 13 insertions, 13 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index cf6f6d96e75..7065a4d3513 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -175,7 +175,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
m_charges = goinfo->spellcaster.charges;
break;
case GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING:
- m_goValue->building.health = goinfo->building.damagedHealth + goinfo->building.destroyedHealth;
+ m_goValue->building.health = goinfo->building.intactNumHits + goinfo->building.damagedNumHits;
break;
}
@@ -1451,12 +1451,12 @@ void GameObject::TakenDamage(uint32 damage)
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.destroyedDisplayId);
- EventInform(m_goInfo->building.destroyedEventId);
+ EventInform(m_goInfo->building.damagedEvent);
}
}
else // from intact to damaged
{
- if(m_goValue->building.health <= m_goInfo->building.destroyedHealth)
+ if(m_goValue->building.health <= m_goInfo->building.damagedNumHits)
{
if(!m_goInfo->building.destroyedDisplayId)
m_goValue->building.health = 0;
@@ -1465,7 +1465,7 @@ void GameObject::TakenDamage(uint32 damage)
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.damagedDisplayId);
- EventInform(m_goInfo->building.damagedEventId);
+ EventInform(m_goInfo->building.intactEvent);
}
}
}
@@ -1474,7 +1474,7 @@ void GameObject::Rebuild()
{
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED + GO_FLAG_DESTROYED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->displayId);
- m_goValue->building.health = m_goInfo->building.damagedHealth + m_goInfo->building.destroyedHealth;
+ m_goValue->building.health = m_goInfo->building.intactNumHits + m_goInfo->building.damagedNumHits;
}
void GameObject::EventInform(uint32 eventId)
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 33c9fa63f9e..bcfdd93c99d 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -350,16 +350,16 @@ struct GameObjectInfo
//33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
struct
{
- uint32 damagedHealth; //0
- uint32 dmgPctState2; //1
+ uint32 intactNumHits; //0
+ uint32 creditProxyCreature; //1
uint32 state1Name; //2
- uint32 damagedEventId; //3
+ uint32 intactEvent; //3
uint32 damagedDisplayId; //4
- uint32 destroyedHealth; //5
- uint32 unk6;
- uint32 unk7;
- uint32 unk8;
- uint32 destroyedEventId; //9
+ uint32 damagedNumHits; //5
+ uint32 empty3; //6
+ uint32 empty4; //7
+ uint32 empty5; //8
+ uint32 damagedEvent; //9
uint32 destroyedDisplayId; //10
} building;
//34 GAMEOBJECT_TYPE_GUILDBANK - empty