*Display correct building damage state/team on map in wintergrasp.
*Rebuild buidlings after fortress is taken over. --HG-- branch : trunk
This commit is contained in:
1 parent
9ff8f1ab5e
commit
b5a098643f
11 files changed
+155
-23
No files matched your search
@@ -1442,6 +1442,7 @@ void GameObject::TakenDamage(uint32 damage)
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->destructibleBuilding.destroyedDisplayId);
|
||||
m_goValue->destructibleBuilding.health = 0;
|
||||
EventInform(m_goInfo->destructibleBuilding.destroyedEventId);
|
||||
}
|
||||
else // from undamaged to damaged
|
||||
{
|
||||
@@ -1455,6 +1456,7 @@ void GameObject::TakenDamage(uint32 damage)
|
||||
}
|
||||
else
|
||||
m_goValue->destructibleBuilding.health = 0;
|
||||
EventInform(m_goInfo->destructibleBuilding.damagedEventId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1465,6 +1467,12 @@ void GameObject::Rebuild()
|
||||
m_goValue->destructibleBuilding.health = m_goInfo->destructibleBuilding.damagedHealth;
|
||||
}
|
||||
|
||||
void GameObject::EventInform(uint32 eventId)
|
||||
{
|
||||
if(eventId && m_zoneScript)
|
||||
m_zoneScript->ProcessEvent(this, eventId);
|
||||
}
|
||||
|
||||
// overwrite WorldObject function for proper name localization
|
||||
const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user