1
0

A bit of cleanup and documentation around the UI window handling

git-svn-id: http://mc-server.googlecode.com/svn/trunk@716 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-08-06 20:10:16 +00:00
parent 0b4a84969c
commit e8366993ce
13 changed files with 143 additions and 86 deletions

View File

@@ -157,8 +157,8 @@ void cChestEntity::SaveToJson( Json::Value& a_Value )
void cChestEntity::SendTo( cClientHandle* a_Client, cServer* a_Server )
{
(void)a_Client;
(void)a_Server;
UNUSED(a_Client);
UNUSED(a_Server);
return;
}
@@ -166,14 +166,12 @@ void cChestEntity::SendTo( cClientHandle* a_Client, cServer* a_Server )
void cChestEntity::UsedBy( cPlayer * a_Player )
void cChestEntity::UsedBy(cPlayer * a_Player)
{
if( !GetWindow() )
if (!GetWindow())
{
cWindow* Window = new cWindow( this, true );
Window->SetSlots( GetContents(), GetChestHeight()*c_ChestWidth );
Window->SetWindowID( 1 );
Window->SetWindowType( cWindow::Chest );
cWindow * Window = new cWindow(this, true, cWindow::Chest, 1);
Window->SetSlots(GetContents(), GetChestHeight() * c_ChestWidth);
Window->SetWindowTitle("UberChest");
Window->GetOwner()->SetEntity(this);
OpenWindow( Window );