mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 20:48:26 +00:00
[Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS to Perl/Lua (#3735)
* [Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS - Add `$client->AddEbonCrystals(amount)`. - Add `$client->AddRadiantCrystals(amount)`. - Add `$client->RemoveEbonCrystals(amount)`. - Add `$client->RemoveRadiantCrystals(amount)`. - Add `EVENT_CRYSTAL_GAIN`. - Add `EVENT_CRYSTAL_LOSS`. - Export `$ebon_amount`, `$radiant_amount`, and `$is_reclaim`. - Add `client:AddEbonCrystals(amount)`. - Add `client:AddRadiantCrystals(amount)`. - Add `client:RemoveEbonCrystals(amount)`. - Add `client:RemoveRadiantCrystals(amount)`. - Add `event_crystal_gain`. - Add `event_crystal_loss`. - Export `e.ebon_amount`, `e.radiant_amount`, and `e.is_reclaim`. - Allows operators to add or remove Ebon/Radiant Crystals directly. - Allows operators to track gain/loss of Ebon/Radiant Crystals. * Update perl_client.cpp * Update lua_client.cpp
This commit is contained in:
@@ -1518,6 +1518,26 @@ void handle_player_ldon_points_gain_loss(
|
||||
lua_setfield(L, -2, "points");
|
||||
}
|
||||
|
||||
void handle_player_crystal_gain_loss(
|
||||
QuestInterface *parse,
|
||||
lua_State* L,
|
||||
Client* client,
|
||||
std::string data,
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers
|
||||
) {
|
||||
Seperator sep(data.c_str());
|
||||
|
||||
lua_pushnumber(L, Strings::ToUnsignedInt(sep.arg[0]));
|
||||
lua_setfield(L, -2, "ebon_amount");
|
||||
|
||||
lua_pushnumber(L, Strings::ToUnsignedInt(sep.arg[1]));
|
||||
lua_setfield(L, -2, "radiant_amount");
|
||||
|
||||
lua_pushboolean(L, Strings::ToBool(sep.arg[2]));
|
||||
lua_setfield(L, -2, "is_reclaim");
|
||||
}
|
||||
|
||||
void handle_player_alt_currency_gain_loss(
|
||||
QuestInterface *parse,
|
||||
lua_State* L,
|
||||
|
||||
Reference in New Issue
Block a user