diff options
author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2021-01-30 19:13:10 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-06 18:59:38 +0100 |
commit | a4a3e2e75999230d0d2e38886eef4ce0271f4a1d (patch) | |
tree | f073e81130bc6785025f269b75d2ce9b01651bf0 /src/server/game/AI/SmartScripts | |
parent | 1ec33095e606824e6d4f9da96cf8eab46f1e4a12 (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).
(cherry picked from commit d5fc86af8b22fed5b054e51349eb3ab47b06b784)
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 1 |
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 faaacb46d84..c557febba10 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2241,7 +2241,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 2cdc6d41bb3..969b87b77e8 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1143,6 +1143,7 @@ struct SmartAction struct { uint32 timer; + uint32 includeDecayRatio; } corpseDelay; struct |