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:
Azazel committed 2011-03-18 15:58:08 +06:00
1 parent 90a3fee232
commit e49b5b44d6
9 files changed
+156 -183

No files matched your search

+1 -1
View File
@@ -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;