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
2011-03-18 15:58:08 +06:00
parent 90a3fee232
commit e49b5b44d6
9 changed files with 156 additions and 183 deletions
+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;