Updated trigger names in the server
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#config
|
||||
INCLUDES+=. ../characters ../entities ../monsters ../server_utilities ../waypoints ../../common/gameplay ../../common/map ../../common/utilities
|
||||
INCLUDES+=. ../characters ../entities ../monsters ../server_utilities ../triggers ../../common/gameplay ../../common/map ../../common/utilities
|
||||
LIBS+=
|
||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ static int getMonsterMgr(lua_State* L) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int getWaypointMgr(lua_State* L) {
|
||||
static int getTriggerMgr(lua_State* L) {
|
||||
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetWaypointMgr()) );
|
||||
lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetTriggerMgr()) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ static const luaL_Reg roomLib[] = {
|
||||
|
||||
{"GetPager",getPager},
|
||||
{"GetMonsterMgr",getMonsterMgr},
|
||||
{"GetWaypointMgr",getWaypointMgr},
|
||||
{"GetTriggerMgr",getTriggerMgr},
|
||||
|
||||
{"SetOnTick", setOnTick},
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ MonsterManager* RoomData::GetMonsterMgr() {
|
||||
return &monsterMgr;
|
||||
}
|
||||
|
||||
WaypointManager* RoomData::GetWaypointMgr() {
|
||||
return &waypointMgr;
|
||||
TriggerManager* RoomData::GetTriggerMgr() {
|
||||
return &triggerMgr;
|
||||
}
|
||||
|
||||
std::list<CharacterData*>* RoomData::GetCharacterList() {
|
||||
@@ -73,7 +73,7 @@ lua_State* RoomData::SetLuaState(lua_State* L) {
|
||||
lua = L;
|
||||
pager.SetLuaState(lua);
|
||||
monsterMgr.SetLuaState(lua);
|
||||
waypointMgr.SetLuaState(lua);
|
||||
triggerMgr.SetLuaState(lua);
|
||||
return lua;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "character_data.hpp"
|
||||
#include "monster_manager.hpp"
|
||||
#include "region_pager_lua.hpp"
|
||||
#include "waypoint_manager.hpp"
|
||||
#include "trigger_manager.hpp"
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
RegionPagerLua* GetPager();
|
||||
MonsterManager* GetMonsterMgr();
|
||||
WaypointManager* GetWaypointMgr();
|
||||
TriggerManager* GetTriggerMgr();
|
||||
std::list<CharacterData*>* GetCharacterList();
|
||||
|
||||
//API interfaces
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
//members
|
||||
RegionPagerLua pager;
|
||||
MonsterManager monsterMgr;
|
||||
WaypointManager waypointMgr;
|
||||
TriggerManager triggerMgr;
|
||||
std::list<CharacterData*> characterList;
|
||||
|
||||
//API
|
||||
|
||||
Reference in New Issue
Block a user