Skip to content

Commit

Permalink
Moved function to check support outfit to data path.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Apr 23, 2024
1 parent 15861aa commit d30710c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions data-otservbr-global/scripts/creaturescripts/others/login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ function playerLogin.onLogin(player)
player:openChannel(0x00) -- guild
end
end

local playerOutfit = player:getOutfit()
if table.contains({ 75, 266, 302 }, playerOutfit.lookType) then
playerOutfit.lookType = 136
playerOutfit.lookAddons = 0
player:setOutfit(playerOutfit)
end

return true
end

Expand Down
8 changes: 8 additions & 0 deletions data/scripts/creaturescripts/player/login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ function playerLoginGlobal.onLogin(player)
onMovementRemoveProtection(playerId, player:getPosition(), 10)
end

-- Change support outfit to a normal outfit to open customize character without crashes
local playerOutfit = player:getOutfit()
if table.contains({ 75, 266, 302 }, playerOutfit.lookType) then
playerOutfit.lookType = 136
playerOutfit.lookAddons = 0
player:setOutfit(playerOutfit)
end

player:initializeLoyaltySystem()
player:registerEvent("PlayerDeath")
player:registerEvent("DropLoot")
Expand Down

0 comments on commit d30710c

Please sign in to comment.