From e8366993ce3f1cc0c2c6cde1d133773d1f23c474 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 6 Aug 2012 20:10:16 +0000 Subject: 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 --- source/cChestEntity.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source/cChestEntity.cpp') diff --git a/source/cChestEntity.cpp b/source/cChestEntity.cpp index d2cc168b0..4a46167c0 100644 --- a/source/cChestEntity.cpp +++ b/source/cChestEntity.cpp @@ -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 ); -- cgit v1.2.3