Few minor fixes:

* Fix to tab margins when a tab is closed
* Changed the life bar colors of UICreatureButtons
* Added onDeath to Creatures class
This commit is contained in:
BeniS
2013-01-13 00:41:27 +13:00
parent 1b6be92cad
commit 913cc801b6
4 changed files with 13 additions and 3 deletions

View File

@@ -440,6 +440,11 @@ void Creature::onDisappear()
});
}
void Creature::onDeath()
{
callLuaField("onDeath");
}
void Creature::updateWalkAnimation(int totalPixelsWalked)
{
// update outfit animation
@@ -599,6 +604,9 @@ void Creature::setHealthPercent(uint8 healthPercent)
m_healthPercent = healthPercent;
callLuaField("onHealthPercentChange", healthPercent);
if(healthPercent < 1)
onDeath();
}
void Creature::setDirection(Otc::Direction direction)

View File

@@ -123,6 +123,7 @@ public:
virtual void onPositionChange(const Position& newPos, const Position& oldPos);
virtual void onAppear();
virtual void onDisappear();
virtual void onDeath();
protected:
virtual void updateWalkAnimation(int totalPixelsWalked);