Core/Cleanup: remove C-style cast to (Bag*):
* add ToBag() methods for Item class; * add GetBagByPos() method for Player class.
This commit is contained in:
@@ -801,7 +801,7 @@ bool Guild::PlayerMoveItemData::InitItem()
|
||||
if (m_pItem)
|
||||
{
|
||||
// Anti-WPE protection. Do not move non-empty bags to bank.
|
||||
if (m_pItem->IsBag() && !((Bag*)m_pItem)->IsEmpty())
|
||||
if (m_pItem->IsNotEmptyBag())
|
||||
{
|
||||
m_pPlayer->SendEquipError(EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS, m_pItem);
|
||||
m_pItem = NULL;
|
||||
|
||||
Reference in New Issue
Block a user