aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2021-01-30 19:13:10 +0100
committerGitHub <noreply@github.com>2021-01-30 19:13:10 +0100
commitd5fc86af8b22fed5b054e51349eb3ab47b06b784 (patch)
tree208716534603437035f0839122cea44da3d3d659 /src/server/game/AI
parent3e6b3f88b0169600e9e09281723d82476e08fae7 (diff)
Core/Creature: Allow to skip Rate.Corpse.Decay.Looted when calling SetCorpseDelay() (#25989)
Add a second parameter to SetCorpseDelay() that specifies if Rate.Corpse.Decay.Looted setting should be ignored, false by default (aka don't ignore by default). Add a second parameter to SMART_ACTION_SET_CORPSE_DELAY to specify if Rate.Corpse.Decay.Looted should be included, false by default (aka ignore by default).
Diffstat (limited to 'src/server/game/AI')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index c1420c09968..8c876614735 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -2170,7 +2170,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (WorldObject* const target : targets)
{
if (IsCreature(target))
- target->ToCreature()->SetCorpseDelay(e.action.corpseDelay.timer);
+ target->ToCreature()->SetCorpseDelay(e.action.corpseDelay.timer, !e.action.corpseDelay.includeDecayRatio);
}
break;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index c12e20db8b6..06e53efbcbb 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1105,6 +1105,7 @@ struct SmartAction
struct
{
uint32 timer;
+ uint32 includeDecayRatio;
} corpseDelay;
struct