*Some renames for GO type 33 for easier merging.

--HG--
branch : trunk
This commit is contained in:
panaut0lordv
2009-06-04 18:32:24 +02:00
parent b818884851
commit cc4a380722
2 changed files with 13 additions and 13 deletions

View File

@@ -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)

View File

@@ -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