[Bug Fix] Personal tributes for bard items were not applying correctly (#4416)

* Fixes Personal Tributes for bard items not being applied.

* Fix for bots
This commit is contained in:
Mitch Freeman
2024-07-16 12:18:42 -03:00
committed by GitHub
parent 51eb95ed31
commit 17f66c5d60
3 changed files with 37 additions and 8 deletions
+21 -1
View File
@@ -48,7 +48,7 @@ but I dont see a point to that right now, so I dont do it.
*/
extern WorldServer worldserver;
std::map<uint32, TributeData> tribute_list;
std::map<uint32, TributeData> tribute_list{};
void Client::ToggleTribute(bool enabled) {
if(enabled) {
@@ -622,6 +622,26 @@ void Client::SendGuildTributeDonatePlatReply(GuildTributeDonatePlatRequest_Struc
}
std::map<uint32, TributeData> Client::GetTributeList() {
return tribute_list;
}
uint32 Client::LookupTributeItemID(uint32 tribute_id, uint32 tier)
{
if (!tribute_id && !tier) {
return 0;
}
if (tribute_list.contains(tribute_id)) {
auto tribute = tribute_list.find(tribute_id);
auto item_id = tribute->second.tiers[tier].tribute_item_id;
if (!item_id) {
return 0;
}
return item_id;
}
}
/*
64.37.149.6:1353 == server
66.90.221.245:3173 == client