Pruned the usage of the incomplete monster system
This commit is contained in:
+4
-4
@@ -41,8 +41,8 @@
|
||||
#include "character_manager_api.hpp"
|
||||
#include "region_api.hpp"
|
||||
#include "region_pager_api.hpp"
|
||||
#include "monster_api.hpp"
|
||||
#include "monster_manager_api.hpp"
|
||||
//#include "monster_api.hpp"
|
||||
//#include "monster_manager_api.hpp"
|
||||
#include "network_api.hpp"
|
||||
#include "room_api.hpp"
|
||||
#include "room_manager_api.hpp"
|
||||
@@ -70,8 +70,8 @@ static const luaL_Reg preloadedlibs[] = {
|
||||
{TORTUGA_ENTITY_API, openEntityAPI}, //required by derived classes
|
||||
{TORTUGA_CHARACTER_API, openCharacterAPI},
|
||||
{TORTUGA_CHARACTER_MANAGER_API, openCharacterManagerAPI},
|
||||
{TORTUGA_MONSTER_API, openMonsterAPI},
|
||||
{TORTUGA_MONSTER_MANAGER_API, openMonsterManagerAPI},
|
||||
// {TORTUGA_MONSTER_API, openMonsterAPI},
|
||||
// {TORTUGA_MONSTER_MANAGER_API, openMonsterManagerAPI},
|
||||
{TORTUGA_NETWORK_API, openNetworkAPI},
|
||||
{TORTUGA_REGION_API, openRegionAPI},
|
||||
{TORTUGA_REGION_PAGER_API, openRegionPagerAPI},
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#include directories
|
||||
INCLUDES+=SDL . accounts characters clients entities monsters rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
||||
INCLUDES+=SDL . accounts characters clients entities rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
||||
|
||||
#libraries
|
||||
#the order of the $(LIBS) is important, at least for MinGW
|
||||
@@ -33,7 +33,7 @@ all: $(OBJ) $(OUT)
|
||||
$(MAKE) -C characters
|
||||
$(MAKE) -C clients
|
||||
$(MAKE) -C entities
|
||||
$(MAKE) -C monsters
|
||||
# $(MAKE) -C monsters
|
||||
$(MAKE) -C rooms
|
||||
$(MAKE) -C server_utilities
|
||||
$(MAKE) -C triggers
|
||||
|
||||
@@ -56,11 +56,13 @@ static int getPager(lua_State* L) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
static int getMonsterMgr(lua_State* L) {
|
||||
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetMonsterMgr()) );
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
|
||||
static int getTriggerMgr(lua_State* L) {
|
||||
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
@@ -85,6 +87,7 @@ static int forEachCharacter(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
static int forEachMonster(lua_State* L) {
|
||||
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
MonsterManager* monsterMgr = room->GetMonsterMgr();
|
||||
@@ -102,6 +105,7 @@ static int forEachMonster(lua_State* L) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
static int setOnTick(lua_State* L) {
|
||||
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
@@ -136,11 +140,11 @@ static const luaL_Reg roomLib[] = {
|
||||
{"GetTileset", getTilesetName},
|
||||
|
||||
{"GetPager",getPager},
|
||||
{"GetMonsterMgr",getMonsterMgr},
|
||||
// {"GetMonsterMgr",getMonsterMgr},
|
||||
{"GetTriggerMgr",getTriggerMgr},
|
||||
|
||||
{"ForEachCharacter", forEachCharacter},
|
||||
{"ForEachMonster", forEachMonster},
|
||||
// {"ForEachMonster", forEachMonster},
|
||||
|
||||
{"SetOnTick", setOnTick},
|
||||
{"GetOnTick", getOnTick},
|
||||
|
||||
@@ -122,10 +122,6 @@ RegionPagerLua* RoomData::GetPager() {
|
||||
return &pager;
|
||||
}
|
||||
|
||||
MonsterManager* RoomData::GetMonsterMgr() {
|
||||
return &monsterMgr;
|
||||
}
|
||||
|
||||
TriggerManager* RoomData::GetTriggerMgr() {
|
||||
return &triggerMgr;
|
||||
}
|
||||
@@ -137,7 +133,6 @@ std::list<CharacterData*>* RoomData::GetCharacterList() {
|
||||
lua_State* RoomData::SetLuaState(lua_State* L) {
|
||||
lua = L;
|
||||
pager.SetLuaState(lua);
|
||||
monsterMgr.SetLuaState(lua);
|
||||
triggerMgr.SetLuaState(lua);
|
||||
return lua;
|
||||
}
|
||||
@@ -148,7 +143,6 @@ lua_State* RoomData::GetLuaState() {
|
||||
|
||||
sqlite3* RoomData::SetDatabase(sqlite3* db) {
|
||||
database = db;
|
||||
monsterMgr.SetDatabase(database);
|
||||
return database;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
#define ROOMDATA_HPP_
|
||||
|
||||
#include "character_data.hpp"
|
||||
#include "monster_manager.hpp"
|
||||
#include "region_pager_lua.hpp"
|
||||
#include "trigger_manager.hpp"
|
||||
|
||||
#include "lua.hpp"
|
||||
#include "sqlite3.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
std::string GetTileset();
|
||||
|
||||
RegionPagerLua* GetPager();
|
||||
MonsterManager* GetMonsterMgr();
|
||||
TriggerManager* GetTriggerMgr();
|
||||
std::list<CharacterData*>* GetCharacterList();
|
||||
|
||||
@@ -69,7 +68,6 @@ private:
|
||||
|
||||
//members
|
||||
RegionPagerLua pager;
|
||||
MonsterManager monsterMgr;
|
||||
TriggerManager triggerMgr;
|
||||
std::list<CharacterData*> characterList;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "account_manager.hpp"
|
||||
#include "character_manager.hpp"
|
||||
#include "client_manager.hpp"
|
||||
#include "monster_manager.hpp"
|
||||
#include "room_manager.hpp"
|
||||
|
||||
//utilities
|
||||
@@ -105,9 +104,6 @@ private:
|
||||
void hCharacterAttack(CharacterPacket* const);
|
||||
void hCharacterDamage(CharacterPacket* const);
|
||||
|
||||
//character management
|
||||
void hMonsterDamage(MonsterPacket* const);
|
||||
|
||||
//chat
|
||||
void hTextBroadcast(TextPacket* const);
|
||||
void hTextSpeech(TextPacket* const);
|
||||
|
||||
@@ -327,11 +327,6 @@ void ServerApplication::HandlePacket(SerialPacket* const argPacket) {
|
||||
hCharacterDamage(static_cast<CharacterPacket*>(argPacket));
|
||||
break;
|
||||
|
||||
//monster management
|
||||
case SerialPacketType::MONSTER_DAMAGE:
|
||||
hMonsterDamage(static_cast<MonsterPacket*>(argPacket));
|
||||
break;
|
||||
|
||||
//chat
|
||||
case SerialPacketType::TEXT_BROADCAST:
|
||||
hTextBroadcast(static_cast<TextPacket*>(argPacket));
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/* Copyright: (c) Kayne Ruse 2013-2015
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#include "server_application.hpp"
|
||||
|
||||
void ServerApplication::hMonsterDamage(MonsterPacket* const argPacket) {
|
||||
//TODO: (9) ServerApplication::hMonsterDamage()
|
||||
}
|
||||
Reference in New Issue
Block a user