diff options
-rwxr-xr-x | src/server/game/AI/EventAI/CreatureEventAI.cpp | 12 | ||||
-rwxr-xr-x | src/server/game/AI/EventAI/CreatureEventAI.h | 2 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 6 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.h | 4 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 11887611ae8..7a2b83273c9 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -95,7 +95,7 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c) m_AttackDistance = 0.0f; m_AttackAngle = 0.0f; - m_InvinceabilityHpLevel = 0; + m_InvincibilityHpLevel = 0; //Handle Spawned Events if (!m_bEmptyList) @@ -816,9 +816,9 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 case ACTION_T_SET_INVINCIBILITY_HP_LEVEL: { if (action.invincibility_hp_level.is_percent) - m_InvinceabilityHpLevel = me->CountPctFromMaxHealth(action.invincibility_hp_level.hp_level); + m_InvincibilityHpLevel = me->CountPctFromMaxHealth(action.invincibility_hp_level.hp_level); else - m_InvinceabilityHpLevel = action.invincibility_hp_level.hp_level; + m_InvincibilityHpLevel = action.invincibility_hp_level.hp_level; break; } case ACTION_T_MOUNT_TO_ENTRY_OR_MODEL: @@ -1350,12 +1350,12 @@ void CreatureEventAI::ReceiveEmote(Player* player, uint32 textEmote) void CreatureEventAI::DamageTaken(Unit* /*done_by*/, uint32& damage) { - if (m_InvinceabilityHpLevel > 0 && me->GetHealth() < m_InvinceabilityHpLevel+damage) + if (m_InvincibilityHpLevel > 0 && me->GetHealth() < m_InvincibilityHpLevel+damage) { - if (me->GetHealth() <= m_InvinceabilityHpLevel) + if (me->GetHealth() <= m_InvincibilityHpLevel) damage = 0; else - damage = me->GetHealth() - m_InvinceabilityHpLevel; + damage = me->GetHealth() - m_InvincibilityHpLevel; } } diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h index c4daf2563e0..3d2bcf888c8 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.h +++ b/src/server/game/AI/EventAI/CreatureEventAI.h @@ -641,6 +641,6 @@ class CreatureEventAI : public CreatureAI bool m_MeleeEnabled; // If we allow melee auto attack float m_AttackDistance; // Distance to attack from float m_AttackAngle; // Angle of attack - uint32 m_InvinceabilityHpLevel; // Minimal health level allowed at damage apply + uint32 m_InvincibilityHpLevel; // Minimal health level allowed at damage apply }; #endif diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index c2c864802df..d1ea30609dd 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -68,7 +68,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c) mFollowCredit = 0; mFollowArrivedEntry = 0; mFollowCreditType = 0; - mInvinceabilityHpLevel = 0; + mInvincibilityHpLevel = 0; } void SmartAI::UpdateDespawn(const uint32 diff) @@ -638,8 +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 = me->GetHealth() - mInvinceabilityHpLevel; + if ((me->GetHealth() - damage) <= mInvincibilityHpLevel) + damage = me->GetHealth() - mInvincibilityHpLevel; } void SmartAI::HealReceived(Unit* doneBy, uint32& addhealth) diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index c2501199f77..e71b82bdab2 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -174,7 +174,7 @@ class SmartAI : public CreatureAI void SetSwim(bool swim = true); - void SetInvinceabilityHpLevel(uint32 level) { mInvinceabilityHpLevel = level; } + void SetInvincibilityHpLevel(uint32 level) { mInvincibilityHpLevel = level; } void sGossipHello(Player* player); void sGossipSelect(Player* player, uint32 sender, uint32 action); @@ -223,7 +223,7 @@ class SmartAI : public CreatureAI bool mCanAutoAttack; bool mCanCombatMove; bool mForcedPaused; - uint32 mInvinceabilityHpLevel; + uint32 mInvincibilityHpLevel; bool AssistPlayerInCombat(Unit* who); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 05a2910e7a7..8eee214e420 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1043,9 +1043,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; if (e.action.invincHP.percent) - ai->SetInvinceabilityHpLevel(me->CountPctFromMaxHealth(e.action.invincHP.percent)); + ai->SetInvincibilityHpLevel(me->CountPctFromMaxHealth(e.action.invincHP.percent)); else - ai->SetInvinceabilityHpLevel(e.action.invincHP.minHP); + ai->SetInvincibilityHpLevel(e.action.invincHP.minHP); break; } case SMART_ACTION_SET_DATA: |