mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Commands: Fixed .damage command to work with spell schools caused by bad strtok usage
Closes #22280
This commit is contained in:
@@ -2286,11 +2286,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user