Loading...   


 zone/lua_general.cpp       |  1 +
 zone/lua_parser.cpp        |  1 +
 zone/lua_parser_events.cpp | 13 +++++++++++++
 zone/lua_parser_events.h   |  2 ++
 4 files changed, 17 insertions(+)

diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp
index 053a928..cdf4200 100644
--- a/zone/lua_general.cpp
+++ b/zone/lua_general.cpp
@@ -1612,6 +1612,7 @@ luabind::scope lua_register_events() {
 			luabind::value("cast_on", static_cast<int>(EVENT_CAST_ON)),
 			luabind::value("task_accepted", static_cast<int>(EVENT_TASK_ACCEPTED)),
 			luabind::value("task_stage_complete", static_cast<int>(EVENT_TASK_STAGE_COMPLETE)),
+			luabind::value("environmental_damage", static_cast<int>(EVENT_ENVIRONMENTAL_DAMAGE)),
 			luabind::value("task_update", static_cast<int>(EVENT_TASK_UPDATE)),
 			luabind::value("task_complete", static_cast<int>(EVENT_TASK_COMPLETE)),
 			luabind::value("task_fail", static_cast<int>(EVENT_TASK_FAIL)),
diff --git a/zone/lua_parser.cpp b/zone/lua_parser.cpp
index 2051b31..230c447 100644
--- a/zone/lua_parser.cpp
+++ b/zone/lua_parser.cpp
@@ -164,6 +164,7 @@ LuaParser::LuaParser() {
 	NPCArgumentDispatch[EVENT_LEAVE_AREA] = handle_npc_area;
 
 	PlayerArgumentDispatch[EVENT_SAY] = handle_player_say;
+	PlayerArgumentDispatch[EVENT_ENVIRONMENTAL_DAMAGE] = handle_player_environmental_damage;
 	PlayerArgumentDispatch[EVENT_DEATH] = handle_player_death;
 	PlayerArgumentDispatch[EVENT_DEATH_COMPLETE] = handle_player_death;
 	PlayerArgumentDispatch[EVENT_TIMER] = handle_player_timer;
diff --git a/zone/lua_parser_events.cpp b/zone/lua_parser_events.cpp
index dbcf86d..2780d02 100644
--- a/zone/lua_parser_events.cpp
+++ b/zone/lua_parser_events.cpp
@@ -246,6 +246,19 @@ void handle_player_say(QuestInterface *parse, lua_State* L, Client* client, std:
 	lua_setfield(L, -2, "language");
 }
 
+void handle_player_environmental_damage(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
+	std::vector<EQEmu::Any> *extra_pointers){
+	Seperator sep(data.c_str());
+	lua_pushinteger(L, std::stoi(sep.arg[0]));
+	lua_setfield(L, -2, "env_damage");
+
+	lua_pushinteger(L, std::stoi(sep.arg[1]));
+	lua_setfield(L, -2, "env_damage_type");
+
+	lua_pushinteger(L, std::stoi(sep.arg[2]));
+	lua_setfield(L, -2, "env_final_damage");
+}
+
 void handle_player_death(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
 						 std::vector<EQEmu::Any> *extra_pointers) {
 	Seperator sep(data.c_str());
diff --git a/zone/lua_parser_events.h b/zone/lua_parser_events.h
index 32a59e0..2d4ac52 100644
--- a/zone/lua_parser_events.h
+++ b/zone/lua_parser_events.h
@@ -44,6 +44,8 @@ void handle_npc_null(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, s
 //Player
 void handle_player_say(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
 		std::vector<EQEmu::Any> *extra_pointers);
+void handle_player_environmental_damage(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
+	std::vector<EQEmu::Any> *extra_pointers)
 void handle_player_death(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
 		std::vector<EQEmu::Any> *extra_pointers);
 void handle_player_timer(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,

Raw Paste Data