mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 00:32:25 +00:00
Add EVENT_ENTER_ZONE
This commit is contained in:
parent
1dbd494f4f
commit
42eee010c8
@ -795,6 +795,11 @@ void Client::CompleteConnect()
|
|||||||
parse->EventPlayer(EVENT_ENTER_ZONE, this, "", 0);
|
parse->EventPlayer(EVENT_ENTER_ZONE, this, "", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parse->ZoneHasQuestSub(EVENT_ENTER_ZONE)) {
|
||||||
|
std::vector<std::any> args = { this };
|
||||||
|
parse->EventZone(EVENT_ENTER_ZONE, zone, "", 0, &args);
|
||||||
|
}
|
||||||
|
|
||||||
DeleteEntityVariable(SEE_BUFFS_FLAG);
|
DeleteEntityVariable(SEE_BUFFS_FLAG);
|
||||||
|
|
||||||
// the way that the client deals with positions during the initial spawn struct
|
// the way that the client deals with positions during the initial spawn struct
|
||||||
|
|||||||
@ -2512,6 +2512,14 @@ void PerlembParser::ExportEventVariables(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case EVENT_ENTER_ZONE: {
|
||||||
|
if (extra_pointers && extra_pointers->size() == 1) {
|
||||||
|
ExportVar(package_name.c_str(), "client", "Client", std::any_cast<Client*>(extra_pointers->at(0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -415,6 +415,7 @@ LuaParser::LuaParser() {
|
|||||||
ZoneArgumentDispatch[EVENT_CLICK_OBJECT] = handle_zone_click_object;
|
ZoneArgumentDispatch[EVENT_CLICK_OBJECT] = handle_zone_click_object;
|
||||||
ZoneArgumentDispatch[EVENT_DEATH_ZONE] = handle_zone_death;
|
ZoneArgumentDispatch[EVENT_DEATH_ZONE] = handle_zone_death;
|
||||||
ZoneArgumentDispatch[EVENT_DESPAWN_ZONE] = handle_zone_despawn;
|
ZoneArgumentDispatch[EVENT_DESPAWN_ZONE] = handle_zone_despawn;
|
||||||
|
ZoneArgumentDispatch[EVENT_ENTER_ZONE] = handle_zone_enter;
|
||||||
ZoneArgumentDispatch[EVENT_LOOT_ZONE] = handle_zone_loot;
|
ZoneArgumentDispatch[EVENT_LOOT_ZONE] = handle_zone_loot;
|
||||||
ZoneArgumentDispatch[EVENT_PAYLOAD] = handle_zone_payload;
|
ZoneArgumentDispatch[EVENT_PAYLOAD] = handle_zone_payload;
|
||||||
ZoneArgumentDispatch[EVENT_PLAYER_PICKUP] = handle_zone_pickup;
|
ZoneArgumentDispatch[EVENT_PLAYER_PICKUP] = handle_zone_pickup;
|
||||||
|
|||||||
@ -3004,6 +3004,20 @@ void handle_zone_despawn(
|
|||||||
lua_setfield(L, -2, "other");
|
lua_setfield(L, -2, "other");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handle_zone_enter(
|
||||||
|
QuestInterface *parse,
|
||||||
|
lua_State* L,
|
||||||
|
Zone* zone,
|
||||||
|
std::string data,
|
||||||
|
uint32 extra_data,
|
||||||
|
std::vector<std::any> *extra_pointers
|
||||||
|
) {
|
||||||
|
Lua_Client l_client(std::any_cast<Client*>(extra_pointers->at(0)));
|
||||||
|
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||||
|
l_client_o.push(L);
|
||||||
|
lua_setfield(L, -2, "other");
|
||||||
|
}
|
||||||
|
|
||||||
void handle_zone_loot(
|
void handle_zone_loot(
|
||||||
QuestInterface *parse,
|
QuestInterface *parse,
|
||||||
lua_State* L,
|
lua_State* L,
|
||||||
|
|||||||
@ -1325,6 +1325,15 @@ void handle_zone_despawn(
|
|||||||
std::vector<std::any> *extra_pointers
|
std::vector<std::any> *extra_pointers
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void handle_zone_enter(
|
||||||
|
QuestInterface *parse,
|
||||||
|
lua_State* L,
|
||||||
|
Zone* zone,
|
||||||
|
std::string data,
|
||||||
|
uint32 extra_data,
|
||||||
|
std::vector<std::any> *extra_pointers
|
||||||
|
);
|
||||||
|
|
||||||
void handle_zone_loot(
|
void handle_zone_loot(
|
||||||
QuestInterface *parse,
|
QuestInterface *parse,
|
||||||
lua_State* L,
|
lua_State* L,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user