![]() |
SmallHandler.hGo to the documentation of this file.00001 //SmallHandler.h 00002 /* 00003 Copyright (C) 2004 Anders Hedstrom 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef _CHATHANDLER_H 00021 #define _CHATHANDLER_H 00022 00023 #include <SocketHandler.h> 00024 #include "World.h" 00025 #include "MobFactory.h" 00026 #include "IPersist.h" 00027 #include "PlayerFactory.h" 00028 #include "ItemFactory.h" 00029 00030 00031 class SmallSocket; 00032 00034 class SmallHandler : public SocketHandler 00035 { 00036 public: 00037 SmallHandler(); 00038 ~SmallHandler(); 00039 00040 void Who(SmallSocket *); 00041 void ShowCell(SmallSocket *); 00042 00043 void SecTick(time_t); 00044 World& GetWorld() { return m_world; } 00045 PlayerFactory& GetPlayerF() { return m_pf; } 00046 item_v& GetItems(int x,int y) { return m_itemf.GetItems(x,y); } 00047 void ShowStatus(SmallSocket *); 00048 void MergeItem(item_v& x,ITEM *y) { m_itemf.Merge(x,y); } 00049 00050 void Event(int x,int y,const std::string& ,SmallSocket * = NULL,bool = false); 00051 00052 void Load(); 00053 00054 private: 00055 World m_world; 00056 MobFactory m_mob; 00057 PlayerFactory m_pf; 00058 ipersist_v m_persist; 00059 ItemFactory m_itemf; 00060 }; 00061 00062 00063 00064 00065 #endif // _CHATHANDLER_H |