From c5e9adc069015fdddc4bb1147c0f0e36979b473e Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 17 Aug 2025 08:46:42 -0400 Subject: [PATCH] Support SLOW item stat (percentage, ideally 1.0 - 100.0%). If enough slow stacks then it will immobilize the entity completely (could not find any classic limit). --- source/WorldServer/Entity.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/WorldServer/Entity.cpp b/source/WorldServer/Entity.cpp index ccf1ba5..91df26a 100644 --- a/source/WorldServer/Entity.cpp +++ b/source/WorldServer/Entity.cpp @@ -2539,7 +2539,18 @@ float Entity::GetSpeed() { ret += stats[ITEM_STAT_OFFENSIVESPEED]; } } - + + if (stats.count(ITEM_STAT_SLOW)) { + float slowPct = stats[ITEM_STAT_SLOW]; + if(slowPct > 99.9f) { + ret = 0.0f; + } + else { + float slow_multiplier = 1.0f - (slowPct / 100.0f); + ret = ret * slow_multiplier; + } + } + MStats.unlock(); ret *= speed_multiplier; return ret;