mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 00:58:26 +00:00
[Quest API] Add several methods to Perl/Lua API for LDoN stuff. (#1356)
- Swapped parameters in mostly unused functions to be theme_id first and points second. (No examples in PEQ quests.) - Add $client->AddLDoNLoss(theme_id) to Perl. - Add $client->AddLDoNWin(theme_id) to Perl. - Add quest::crosszoneaddldonlossbycharid(character_id, theme_id) to Perl. - Add quest::crosszoneaddldonlossbygroupid(group_id, theme_id) to Perl. - Add quest::crosszoneaddldonlossbyraidid(raid_id, theme_id) to Perl. - Add quest::crosszoneaddldonlossbyguildid(guild_id, theme_id) to Perl. - Add quest::crosszoneaddldonlossbyexpeditionid(expedition_id, theme_id) to Perl. - Add quest::crosszoneaddldonpointsbycharid(character_id, theme_id, points) to Perl. - Add quest::crosszoneaddldonpointsbygroupid(group_id, theme_id, points) to Perl. - Add quest::crosszoneaddldonpointsbyraidid(raid_id, theme_id, points) to Perl. - Add quest::crosszoneaddldonpointsbyguildid(guild_id, theme_id, points) to Perl. - Add quest::crosszoneaddldonpointsbyexpeditionid(expedition_id, theme_id, points) to Perl. - Add quest::crosszoneaddldonwinbycharid(character_id, theme_id) to Perl. - Add quest::crosszoneaddldonwinbygroupid(group_id, theme_id) to Perl. - Add quest::crosszoneaddldonwinbyraidid(raid_id, theme_id) to Perl. - Add quest::crosszoneaddldonwinbyguildid(guild_id, theme_id) to Perl. - Add quest::crosszoneaddldonwinbyexpeditionid(expedition_id, theme_id) to Perl. - Fix quest::addldonloss(theme_id) in Perl. - Fix quest::addldonwin(theme_id) in Perl. - Add client:AddLDoNLoss(theme_id) to Lua. - Add client:AddLDoNWin(theme_id) to Lua. - Add eq.add_ldon_loss(theme_id) to Lua. - Add eq.add_ldon_points(theme_id, points) to Lua. - Add eq.add_ldon_win(theme_id) to Lua. - Add eq.cross_zone_add_ldon_loss_by_char_id(character_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_loss_by_group_id(group_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_loss_by_raid_id(raid_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_loss_by_guild_id(guild_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_points_by_char_id(character_id, theme_id, points) to Lua. - Add eq.cross_zone_add_ldon_points_by_group_id(group_id, theme_id, points) to Lua. - Add eq.cross_zone_add_ldon_points_by_raid_id(raid_id, theme_id, points) to Lua. - Add eq.cross_zone_add_ldon_points_by_guild_id(guild_id, theme_id, points) to Lua. - Add eq.cross_zone_add_ldon_points_by_expedition_id(expedition_id, theme_id, points) to Lua. - Add eq.cross_zone_add_ldon_win_by_char_id(character_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_win_by_group_id(group_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_win_by_raid_id(raid_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_win_by_guild_id(guild_id, theme_id) to Lua. - Add eq.cross_zone_add_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
This commit is contained in:
+120
-1
@@ -2353,6 +2353,108 @@ void lua_set_exp_modifier_by_char_id(uint32 character_id, uint32 zone_id, double
|
||||
database.SetEXPModifier(character_id, zone_id, exp_modifier);
|
||||
}
|
||||
|
||||
void lua_add_ldon_loss(uint32 theme_id) {
|
||||
quest_manager.addldonloss(theme_id);
|
||||
}
|
||||
|
||||
void lua_add_ldon_points(uint32 theme_id, int points) {
|
||||
quest_manager.addldonpoints(theme_id, points);
|
||||
}
|
||||
|
||||
void lua_add_ldon_win(uint32 theme_id) {
|
||||
quest_manager.addldonwin(theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_loss_by_char_id(int character_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Character;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Loss;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_points_by_char_id(int character_id, uint32 theme_id, int points) {
|
||||
uint8 update_type = CZLDoNUpdateType_Character;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Points;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id, points);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_win_by_char_id(int character_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Character;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Win;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_loss_by_group_id(int group_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Group;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Loss;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_points_by_group_id(int group_id, uint32 theme_id, int points) {
|
||||
uint8 update_type = CZLDoNUpdateType_Group;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Points;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id, points);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_win_by_group_id(int group_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Group;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Win;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_loss_by_raid_id(int raid_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Raid;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Loss;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_points_by_raid_id(int raid_id, uint32 theme_id, int points) {
|
||||
uint8 update_type = CZLDoNUpdateType_Raid;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Points;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id, points);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_win_by_raid_id(int raid_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Raid;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Win;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_loss_by_guild_id(int guild_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Guild;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Loss;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_points_by_guild_id(int guild_id, uint32 theme_id, int points) {
|
||||
uint8 update_type = CZLDoNUpdateType_Guild;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Points;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id, points);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_win_by_guild_id(int guild_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Guild;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Win;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_loss_by_expedition_id(uint32 expedition_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Expedition;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Loss;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_points_by_expedition_id(uint32 expedition_id, uint32 theme_id, int points) {
|
||||
uint8 update_type = CZLDoNUpdateType_Expedition;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Points;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id, points);
|
||||
}
|
||||
|
||||
void lua_cross_zone_add_ldon_win_by_expedition_id(uint32 expedition_id, uint32 theme_id) {
|
||||
uint8 update_type = CZLDoNUpdateType_Expedition;
|
||||
uint8 update_subtype = CZLDoNUpdateSubtype_Win;
|
||||
quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -2899,7 +3001,24 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("get_exp_modifier_by_char_id", &lua_get_exp_modifier_by_char_id),
|
||||
luabind::def("set_aa_exp_modifier_by_char_id", &lua_set_aa_exp_modifier_by_char_id),
|
||||
luabind::def("set_exp_modifier_by_char_id", &lua_set_exp_modifier_by_char_id),
|
||||
|
||||
luabind::def("add_ldon_loss", &lua_add_ldon_loss),
|
||||
luabind::def("add_ldon_points", &lua_add_ldon_points),
|
||||
luabind::def("add_ldon_win", &lua_add_ldon_win),
|
||||
luabind::def("cross_zone_add_ldon_loss_by_char_id", &lua_cross_zone_add_ldon_loss_by_char_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_char_id", &lua_cross_zone_add_ldon_points_by_char_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_char_id", &lua_cross_zone_add_ldon_win_by_char_id),
|
||||
luabind::def("cross_zone_add_ldon_loss_by_group_id", &lua_cross_zone_add_ldon_loss_by_group_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_group_id", &lua_cross_zone_add_ldon_points_by_group_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_group_id", &lua_cross_zone_add_ldon_win_by_group_id),
|
||||
luabind::def("cross_zone_add_ldon_loss_by_raid_id", &lua_cross_zone_add_ldon_loss_by_raid_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_raid_id", &lua_cross_zone_add_ldon_points_by_raid_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_raid_id", &lua_cross_zone_add_ldon_win_by_raid_id),
|
||||
luabind::def("cross_zone_add_ldon_loss_by_guild_id", &lua_cross_zone_add_ldon_loss_by_guild_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_guild_id", &lua_cross_zone_add_ldon_points_by_guild_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_guild_id", &lua_cross_zone_add_ldon_win_by_guild_id),
|
||||
luabind::def("cross_zone_add_ldon_loss_by_expedition_id", &lua_cross_zone_add_ldon_loss_by_expedition_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_expedition_id", &lua_cross_zone_add_ldon_points_by_expedition_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_expedition_id", &lua_cross_zone_add_ldon_win_by_expedition_id),
|
||||
/**
|
||||
* Expansions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user