Skip to content

Commit

Permalink
fix: final conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Aug 9, 2024
1 parent dc817ac commit a55a2b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 49 deletions.
44 changes: 0 additions & 44 deletions data/scripts/talkactions/god/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,47 +36,3 @@ end
testLog:separator(" ")
testLog:groupType("god")
testLog:register()

local testIcons = TalkAction("/testicons")

local function convertIconsToBitValue(iconList)
local bitObj = NewBit(0)
for icon in string.gmatch(iconList, "%d+") do
icon = tonumber(icon)
if icon then
local flag = bit.lshift(1, icon - 1)
bitObj:updateFlag(flag)
end
end
return bitObj:getNumber()
end

--[[Usage:
/testicons 1
/testicons 2
/testicons 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
]]
function testIcons.onSay(player, words, param)
if param == "" then
player:sendCancelMessage("Icon required.")
logger.error("[testIcons.onSay] - Icon required")
return true
end

function Player:sendIconsTest()
local msg = NetworkMessage()
msg:addByte(0xA2)
local icons = convertIconsToBitValue(param)
msg:addU32(icons)
msg:addByte(tonumber(param))
msg:sendToPlayer(self)
end

player:sendIconsTest()
return true
end

testIcons:separator(" ")
testIcons:setDescription("[Usage]: /seticons {icon1}, {icon2}, {icon3}, ...")
testIcons:groupType("god")
testIcons:register()
10 changes: 5 additions & 5 deletions src/enums/player_icons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ enum class PlayerIcon : uint8_t {
GreaterHex = 18,
Rooted = 19,
Feared = 20,
Goshnar1 = 21,
Goshnar2 = 22,
Goshnar3 = 23,
Goshnar4 = 24,
Goshnar5 = 25,
GoshnarTaint1 = 21,
GoshnarTaint2 = 22,
GoshnarTaint3 = 23,
GoshnarTaint4 = 24,
GoshnarTaint5 = 25,
NewManaShield = 26,
Agony = 27,

Expand Down

0 comments on commit a55a2b5

Please sign in to comment.