Core/SAI: Fixed SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
1 parent
953587abdb
commit
229d4119e8
4 files changed
+13
-4
No files matched your search
@@ -68,6 +68,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
mFollowCredit = 0;
|
||||
mFollowArrivedEntry = 0;
|
||||
mFollowCreditType = 0;
|
||||
mInvinceabilityHpLevel = 0;
|
||||
}
|
||||
|
||||
void SmartAI::UpdateDespawn(const uint32 diff)
|
||||
@@ -637,6 +638,8 @@ void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
void SmartAI::DamageTaken(Unit* doneBy, uint32& damage)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage);
|
||||
if ((me->GetHealth() - damage) <= mInvinceabilityHpLevel)
|
||||
damage -= mInvinceabilityHpLevel;
|
||||
}
|
||||
|
||||
void SmartAI::HealReceived(Unit* doneBy, uint32& addhealth)
|
||||
|
||||
Reference in new issue
Block a user