aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/3910_world.sql2
-rw-r--r--src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp2
-rw-r--r--src/game/Creature.cpp4
-rw-r--r--src/game/Creature.h4
-rw-r--r--src/game/CreatureAI.cpp2
-rw-r--r--src/game/Unit.cpp3
6 files changed, 8 insertions, 9 deletions
diff --git a/sql/updates/3910_world.sql b/sql/updates/3910_world.sql
index e439fc4de25..bc73d3aef5f 100644
--- a/sql/updates/3910_world.sql
+++ b/sql/updates/3910_world.sql
@@ -1,6 +1,6 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_threshwackonator' WHERE `entry` = 6669;
-DELETE FROM `script_texts` WHERE `entry` IN (-1000411, -1000412);
+DELETE FROM `script_texts` WHERE `entry` IN (-1000413, -1000414);
INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES
(-1000413, 'Threshwackonator First Mate unit prepared to follow', 0, 2, 0, 0, 'threshwackonator EMOTE_START'),
(-1000414, 'YARRR! Swabie, what have ye done?! He\'s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi\'self!', 0, 0, 7, 0, 'threshwackonator SAY_AT_CLOSE');
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
index 66b99a98f9e..b38db40af32 100644
--- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
+++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
@@ -62,7 +62,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI
//database should have `RegenHealth`=0 to prevent regen
uint32 hp = (m_creature->GetMaxHealth()*40)/100;
if (hp) m_creature->SetHealth(hp);
- m_creature->ResetDamageByPlayers();
+ m_creature->ResetPlayerDamageReq();
}
void SonicBoomEffect()
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index f31dcbf4df7..eb7c93f2d0b 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1351,7 +1351,7 @@ void Creature::SelectLevel(const CreatureInfo *cinfo)
SetCreateHealth(health);
SetMaxHealth(health);
SetHealth(health);
- ResetDamageByPlayers();
+ ResetPlayerDamageReq();
// mana
uint32 minmana = std::min(cinfo->maxmana, cinfo->minmana);
@@ -1742,7 +1742,7 @@ void Creature::setDeathState(DeathState s)
// setActive(true);
SetHealth(GetMaxHealth());
SetLootRecipient(NULL);
- ResetDamageByPlayers();
+ ResetPlayerDamageReq();
Unit::setDeathState(ALIVE);
CreatureInfo const *cinfo = GetCreatureInfo();
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
diff --git a/src/game/Creature.h b/src/game/Creature.h
index 7ec203d8f3b..56b6088c036 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -723,12 +723,12 @@ class TRINITY_DLL_SPEC Creature : public Unit
void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; }
bool IsReputationGainDisabled() { return DisableReputationGain; }
bool IsDamageEnoughForLootingAndReward() { return m_PlayerDamageReq == 0; }
- void AddDamageByPlayers(uint32 unDamage)
+ void LowerPlayerDamageReq(uint32 unDamage)
{
if(m_PlayerDamageReq)
m_PlayerDamageReq > unDamage ? m_PlayerDamageReq -= unDamage : m_PlayerDamageReq = 0;
}
- void ResetDamageByPlayers() { m_PlayerDamageReq = GetHealth() / 2; }
+ void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; }
uint32 m_PlayerDamageReq;
void SetOriginalEntry(uint32 entry) { m_originalEntry = entry; }
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp
index 1c3179b2e23..9f06ca38b56 100644
--- a/src/game/CreatureAI.cpp
+++ b/src/game/CreatureAI.cpp
@@ -184,7 +184,7 @@ bool CreatureAI::_EnterEvadeMode()
me->CombatStop(true);
me->LoadCreaturesAddon();
me->SetLootRecipient(NULL);
- me->ResetDamageByPlayers();
+ me->ResetPlayerDamageReq();
return true;
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b8bcf656b9f..101793a507c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -588,7 +588,6 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if(pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsAIEnabled)
{
((Creature*)pVictim)->AI()->DamageTaken(this, damage);
- ((Creature*)pVictim)->AddDamageByPlayers(damage);
}
if (damagetype != NODAMAGE)
{
@@ -706,7 +705,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
((Creature*)pVictim)->SetLootRecipient(this);
if(IsControlledByPlayer())
- ((Creature*)pVictim)->AddDamageByPlayers(health < damage ? health : damage);
+ ((Creature*)pVictim)->LowerPlayerDamageReq(health < damage ? health : damage);
}
if (health <= damage)