mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-01-10 14:57:06 +00:00
Merge pull request #441 from EmosewaMC/ProxyItemFix
Addressed some proxy items granting duplicate skills
This commit is contained in:
commit
66b7c6522e
@ -1043,7 +1043,7 @@ void InventoryComponent::EquipItem(Item* item, const bool skipChecks)
|
|||||||
|
|
||||||
UpdateSlot(item->GetInfo().equipLocation, { item->GetId(), item->GetLot(), item->GetCount(), item->GetSlot() });
|
UpdateSlot(item->GetInfo().equipLocation, { item->GetId(), item->GetLot(), item->GetCount(), item->GetSlot() });
|
||||||
|
|
||||||
ApplyBuff(item->GetLot());
|
if (item->GetParent() == LWOOBJID_EMPTY) ApplyBuff(item->GetLot());
|
||||||
|
|
||||||
AddItemSkills(item->GetLot());
|
AddItemSkills(item->GetLot());
|
||||||
|
|
||||||
@ -1071,7 +1071,7 @@ void InventoryComponent::UnEquipItem(Item* item)
|
|||||||
set->OnUnEquip(lot);
|
set->OnUnEquip(lot);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveBuff(item->GetLot());
|
if (item->GetParent() == LWOOBJID_EMPTY) RemoveBuff(item->GetLot());
|
||||||
|
|
||||||
RemoveItemSkills(item->GetLot());
|
RemoveItemSkills(item->GetLot());
|
||||||
|
|
||||||
@ -1531,7 +1531,7 @@ std::vector<Item*> InventoryComponent::GenerateProxies(Item* parent)
|
|||||||
|
|
||||||
auto* inventory = GetInventory(ITEM_SETS);
|
auto* inventory = GetInventory(ITEM_SETS);
|
||||||
|
|
||||||
auto* proxy = new Item(lot, inventory, inventory->FindEmptySlot(), 1, {}, parent->GetId(), false);
|
auto* proxy = new Item(lot, inventory, inventory->FindEmptySlot(), 1, {}, parent->GetId(), false, parent->GetId());
|
||||||
|
|
||||||
EquipItem(proxy);
|
EquipItem(proxy);
|
||||||
|
|
||||||
|
@ -407,8 +407,8 @@ private:
|
|||||||
std::vector<Item*> FindProxies(LWOOBJID parent);
|
std::vector<Item*> FindProxies(LWOOBJID parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns if the provided ID is a valid proxy item (e.g. we have children for it)
|
* Returns true if the provided LWOOBJID is the parent of this Item.
|
||||||
* @param parent the parent item to check for
|
* @param parent the parent item to check for proxies
|
||||||
* @return if the provided ID is a valid proxy item
|
* @return if the provided ID is a valid proxy item
|
||||||
*/
|
*/
|
||||||
bool IsValidProxy(LWOOBJID parent);
|
bool IsValidProxy(LWOOBJID parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user