⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inventoryslotcontainer.cpp

📁 奇迹世界 部分源代码奇迹世界 部分源代码奇迹世界 部分源代码
💻 CPP
字号:
// InventorySlotContainer.cpp: implementation of the CInventorySlotContainer class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "InventorySlotContainer.h"
#include "Player.h"
#include "QuickManager.h"
#include "QuickSlotContainer.h"
#include <SCQuickSlot.h>
#include "ItemManager.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CInventorySlotContainer::CInventorySlotContainer()
{
	Init( MAX_INVENTORY_SLOT_NUM, SI_INVENTORY );
}

CInventorySlotContainer::~CInventorySlotContainer()
{

}

BOOL CInventorySlotContainer::InsertSlot( POSTYPE AtPos, SCSlot & IN rSlot )
{
	if( SCSlotContainer::InsertSlot( AtPos, rSlot ) )
	{
		m_pPlayer->GetQuickManager()->GetQuickSlotContainer()->UpdateQuickSlot( rSlot.GetSlotIdx(), rSlot.GetPos(), rSlot.GetCode(), 
			SI_INVENTORY, AtPos, rSlot.GetCode() );

		m_pPlayer->GetItemManager()->AddSerialCode( GetSlotIdx(), rSlot.GetSerial() );

		return TRUE;
	}
	else 
		return FALSE;
}

VOID CInventorySlotContainer::DeleteSlot( POSTYPE AtPos, SCSlot * pSlotOut )
{
	//m_pPlayer->GetItemManager()->RemoveSerialCode( GetSlot(AtPos).GetSerial() );
	SCSlotContainer::DeleteSlot( AtPos, pSlotOut );
}


VOID CInventorySlotContainer::UpdateSlot( POSTYPE AtPos, eSlotType type, DBSERIAL serial, SLOTCODE code, POSTYPE quickPos, DURATYPE dura, BYTE level, eUPDATE_BIT upbits )
{
	SCSlotContainer::UpdateSlot( AtPos, type, serial, code, quickPos, dura, level, upbits );

	if( (upbits & UB_DURA ) != UB_DURA )
	{
		ASSERT( !"牢亥配府俊辑 肋给等 备泅捞促.");
	}
}

VOID CInventorySlotContainer::UpdateSlot( POSTYPE AtPos, SCSlot & IN rSlot )
{
	SCItemSlotContainer::UpdateSlot( AtPos, rSlot );

	ASSERT( !"牢亥配府俊辑 肋给等 备泅捞促.");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -