| 78 | } |
| 79 | |
| 80 | void CreatureOverlayStatus::updateHealth() |
| 81 | { |
| 82 | // We adapt the material |
| 83 | if((mHealthValue != mCreature->getOverlayHealthValue()) || |
| 84 | (mSeat != mCreature->getSeat())) |
| 85 | { |
| 86 | mHealthValue = mCreature->getOverlayHealthValue(); |
| 87 | mSeat = mCreature->getSeat(); |
| 88 | std::string material = RenderManager::getSingleton().rrBuildSkullFlagMaterial( |
| 89 | "CreatureOverlay" + Helper::toString(mHealthValue), |
| 90 | mSeat->getColorValue()); |
| 91 | uint32_t healthId = mOverlayIds[static_cast<uint32_t>(CreatureOverlays::health)]; |
| 92 | mMovableTextOverlay->setMaterialName(healthId, material); |
| 93 | } |
| 94 | |
| 95 | if(mLevel != mCreature->getLevel()) |
| 96 | { |
| 97 | mLevel = mCreature->getLevel(); |
| 98 | uint32_t healthId = mOverlayIds[static_cast<uint32_t>(CreatureOverlays::health)]; |
| 99 | mMovableTextOverlay->setCaption(healthId, Helper::toString(mLevel)); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | void CreatureOverlayStatus::updateStatus(Ogre::Real timeSincelastFrame) |
| 104 | { |
nothing calls this directly
no test coverage detected