Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(PlayerMethods): Expose the player settings methods #125

Merged
merged 6 commits into from
Apr 13, 2023

Conversation

Nyeriah
Copy link
Member

@Nyeriah Nyeriah commented Apr 13, 2023

No description provided.

@r-o-b-o-t-o
Copy link
Member

Thanks for the PR 💜

Tested with:

local PLAYER_EVENT_ON_COMMAND = 42
local SETTING_WEEKEND_XP_RATE = 0

RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, function(ev, player, command, chatHandler)
	if command == "test" then
		player:UpdatePlayerSetting("mod-double-xp-weekend", SETTING_WEEKEND_XP_RATE, 2)
		chatHandler:SendSysMessage("XP rate set to " .. player:GetPlayerSettingValue("mod-double-xp-weekend", SETTING_WEEKEND_XP_RATE))
		return false
	end
end)

@r-o-b-o-t-o r-o-b-o-t-o merged commit cea79af into azerothcore:master Apr 13, 2023
@Nyeriah Nyeriah deleted the playermethods branch April 13, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants