Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/scripts/creaturescripts/player/login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ function playerLoginGlobal.onLogin(player)
player:saveLoginLog()

player:initializeLoyaltySystem()
player:registerEvent("StripBrokenMountColorThink")
player:registerEvent("Castlemania")
player:registerEvent("PartyProtection")
player:registerEvent("PlayerDeath")
Expand Down
31 changes: 31 additions & 0 deletions data/scripts/creaturescripts/player/otc_mount_color_fix.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local BROKEN_MOUNTS = { -- add future incoming color mounts in the future until otcr can handle it
[1363] = true,
[1430] = true,
[1599] = true,
[1724] = true,
[1826] = true,
[1827] = true,
[1810] = true,
[1866] = true,
}

local function sanitizeMountColor(player)
local outfit = player:getOutfit()
if outfit.lookMount and outfit.lookMount > 0 and BROKEN_MOUNTS[outfit.lookMount] then
if outfit.lookMountHead > 0 or outfit.lookMountBody > 0 or outfit.lookMountLegs > 0 or outfit.lookMountFeet > 0 then
outfit.lookMountHead = 0
outfit.lookMountBody = 0
outfit.lookMountLegs = 0
outfit.lookMountFeet = 0
player:setOutfit(outfit)
end
end
end

local think = CreatureEvent("StripBrokenMountColorThink")
function think.onThink(player, interval)
sanitizeMountColor(player)
return true
end
think:type("think")
think:register()
Loading