summaryrefslogtreecommitdiffstats
path: root/source/cChestEntity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cChestEntity.cpp')
-rw-r--r--source/cChestEntity.cpp14
1 files changed, 6 insertions, 8 deletions
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 );