You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dont know how to do lua function, but some mod can use this way to add ExtraBonusTalentPoints, so will not lost the add TalentPoints when player relogin or server reboot. this will increase or replace SetFreeTalentPoints.
This is very useful in some Lua scripts for custom rewards of permanent talent points, as the original function could only retain temporary reward talent points.
And who can do this? I dont know how to do.
lua function can use this way: Player:AddExtraTalentPoints(+or- point) or Player:RewardExtraTalentPoints(+or- point)
and eluna will do this way:
player->RewardExtraBonusTalentPoints(point); or change palyer m_extraBonusTalentCount = m_extraBonusTalentCount +point
player->InitTalentForLevel();
Also can add some function just like these
GetExtraBonusTalentPoints() get absolute for ExtraTalentPoints, just read m_extraBonusTalentCount
SetExtraBonusTalentPoints(point) set absolute for ExtraTalentPoints, it seems just need change m_extraBonusTalentCount and InitTalentForLevel, not very sure
Alternatively, the function SetFreeTalentPoints also can be modified to SetFreeTalentPoints(point, true). When the parameter is true, use ExtraTalentPoints as a substitute, and default is false so will compatible with the original function.
The text was updated successfully, but these errors were encountered:
and now can use CharDBExecute("UPDATE characters SET extraBonusTalentCount = extraBonusTalentCount + 1 WHERE guid = "..PGUID..";") to change the database extraBonusTalentCount , but when player logout, will be rewrite by m_extraBonusTalentCount, just back to before. So now need kick player first , than later write extraBonusTalentCount. It seem not so smart.
local function UseItemAddTalent(event, player, item, target)
player:RemoveItem(item, 1)
local PGUID = player:GetGUIDLow()
Kick(player)
local function LaterAddExtTalent()
CharDBExecute("UPDATE characters SET extraBonusTalentCount = extraBonusTalentCount + 1 WHERE guid = "..PGUID..";")
end
CreateLuaEvent(LaterAddExtTalent, 2000, 1)
end
I dont know how to do lua function, but some mod can use this way to add ExtraBonusTalentPoints, so will not lost the add TalentPoints when player relogin or server reboot. this will increase or replace SetFreeTalentPoints.
This is very useful in some Lua scripts for custom rewards of permanent talent points, as the original function could only retain temporary reward talent points.
And who can do this? I dont know how to do.
lua function can use this way: Player:AddExtraTalentPoints(+or- point) or Player:RewardExtraTalentPoints(+or- point)
and eluna will do this way:
player->RewardExtraBonusTalentPoints(point); or change palyer m_extraBonusTalentCount = m_extraBonusTalentCount +point
player->InitTalentForLevel();
Also can add some function just like these
GetExtraBonusTalentPoints() get absolute for ExtraTalentPoints, just read m_extraBonusTalentCount
SetExtraBonusTalentPoints(point) set absolute for ExtraTalentPoints, it seems just need change m_extraBonusTalentCount and InitTalentForLevel, not very sure
Alternatively, the function SetFreeTalentPoints also can be modified to SetFreeTalentPoints(point, true). When the parameter is true, use ExtraTalentPoints as a substitute, and default is false so will compatible with the original function.
The text was updated successfully, but these errors were encountered: