cItemGrid: Added IsSlotEmpty() functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1585 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -101,15 +101,20 @@ void cChestEntity::SendTo(cClientHandle & a_Client)
|
||||
|
||||
void cChestEntity::UsedBy(cPlayer * a_Player)
|
||||
{
|
||||
if (GetWindow() == NULL)
|
||||
// If the window is not created, open it anew:
|
||||
cWindow * Window = GetWindow();
|
||||
if (Window == NULL)
|
||||
{
|
||||
OpenNewWindow();
|
||||
Window = GetWindow();
|
||||
}
|
||||
if (GetWindow())
|
||||
|
||||
// Open the window for the player:
|
||||
if (Window != NULL)
|
||||
{
|
||||
if( a_Player->GetWindow() != GetWindow() )
|
||||
if (a_Player->GetWindow() != Window)
|
||||
{
|
||||
a_Player->OpenWindow( GetWindow() );
|
||||
a_Player->OpenWindow(Window);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user