mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
269 stars 211 forks source link

feat: NpcSaleData #951

Closed kokekanon closed 1 month ago

kokekanon commented 1 month ago

Description

image

v342

2 1

pdump(g_things.getThingType(3359, ThingCategoryItem):getMeanPrice())
139

pdump(g_things.getThingType(3359, ThingCategoryItem):getNpcSaleData())
{ 
    [1] = { 
        ["name"] = "H.L.",
        ["salePrice"] = 0,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Outlaw Camp",
        ["buyPrice"] = 50,
        ["currencyObjectTypeId"] = 0
    },
    [2] = { 
        ["name"] = "Raffael",
        ["salePrice"] = 450,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Isle of Destiny",
        ["buyPrice"] = 0,
        ["currencyObjectTypeId"] = 0
    },
    [3] = { 
        ["name"] = "Azil",
        ["salePrice"] = 450,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Darashia City",
        ["buyPrice"] = 150,
        ["currencyObjectTypeId"] = 0
    },
    [4] = { 
        ["name"] = "Baltim",
        ["salePrice"] = 450,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Tyrsung",
        ["buyPrice"] = 150,
        ["currencyObjectTypeId"] = 0
    },
    [5] = { 
        ["name"] = "Brengus",
        ["salePrice"] = 450,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Port Hope City",
        ["buyPrice"] = 150,
        ["currencyObjectTypeId"] = 0
    },
    [6] = { 
        ["name"] = "Cedrik",
        ["salePrice"] = 450,
        ["currencyQuestFlagDisplayName"] = "",
        ["location"] = "Liberty Bay City",
        ["buyPrice"] = 150,
        ["currencyObjectTypeId"] = 0
    },

.....

Behavior

Actual

and fix this bug anchor dsfvsdvs

Expected

tier + rarity + fix anchor image

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist

local coloredText = ItemsDatabase.setColorLootMessage(text)
label:setColoredText(coloredText)
local console = modules.game_console
local consoleBuffer = console.consoleTabBar:getTabPanel(console.getTab("Server Log")):getChildById('consoleBuffer')
consoleBuffer:getLastChild():setColoredText(coloredText)

2) I don't know if the cipsoft client uses mode, median, average or max (to take the price of the item), I chose average.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud