Core/Commands: Fixed .damage command to work with spell schools caused by bad strtok usage

Closes #22280

(cherry picked from commit bc3da555fea74fba6902bd0d2dfda773116c196a)
This commit is contained in:
Shauren
2021-10-21 00:18:13 +02:00
parent abaf5d8068
commit cf4ec52d39
+1 -5
View File
@@ -2358,11 +2358,7 @@ public:
if (!target->IsAlive())
return true;
char* damageStr = strtok((char*)args, " ");
if (!damageStr)
return false;
int32 damage_int = atoi((char*)damageStr);
int32 damage_int = atoi((char*)str);
if (damage_int <= 0)
return true;