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 3a319b2 commit a15c132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions data-otservbr-global/scripts/creaturescripts/others/login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ function playerLogin.onLogin(player)
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 a15c132

Please sign in to comment.