Complete rewrite of message handler

This commit is contained in:
Foereaper
2021-07-18 02:35:10 +02:00
parent 74f928d542
commit 73acd33579
6 changed files with 549 additions and 167 deletions

View File

@ -107,8 +107,8 @@ end
function OnSpendPointRequest(player, argTable)
if(StatPointUI.cache[player:GetGUIDLow()][6] > 0) then
-- Double check that the stat requested is actually a valid number
if(tonumber(argTable[2]) <= 5 and tonumber(argTable[2]) >= 0) then
StatPointUI.OnPointSpent(player:GetGUIDLow(), argTable[2])
if(tonumber(argTable[1]) <= 5 and tonumber(argTable[1]) >= 0) then
StatPointUI.OnPointSpent(player:GetGUIDLow(), argTable[1])
end
else
player:SendBroadcastMessage("You have no points left!")