[Quest API] Add cross zone and world wide dialogue windows to Perl/Lua. (#1599)

* [Quest API] Add cross zone and world wide dialogue windows to Perl/Lua.
- Add quest::crosszonedialoguewindowbycharid(character_id, message) to Perl.
- Add quest::crosszonedialoguewindowbygroupid(group_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyraidid(raid_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyguildid(guild_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyexpeditionid(expedition_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyclientname(client_name, message) to Perl.
- Add quest::worldwidedialoguewindow(message, min_status, max_status) to Perl.
- Add eq.cross_zone_dialogue_window_by_char_id(character_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_group_id(group_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_raid_id(raid_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_guild_id(guild_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_expedition_id(expedition_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_client_name(client_name, message) to Lua.
- Add eq.world_wide_dialogue_window(message, min_status, max_status) to Lua.

* Use string instead.
This commit is contained in:
Kinglykrab
2021-10-11 16:33:18 -04:00
committed by GitHub
parent 9887580f9a
commit 91adf9c0eb
7 changed files with 534 additions and 264 deletions
+21
View File
@@ -3464,6 +3464,17 @@ int QuestManager::getspellstat(uint32 spell_id, std::string stat_identifier, uin
return GetSpellStatValue(spell_id, stat_identifier.c_str(), slot);
}
void QuestManager::CrossZoneDialogueWindow(uint8 update_type, int update_identifier, const char* message, const char* client_name) {
auto pack = new ServerPacket(ServerOP_CZDialogueWindow, sizeof(CZDialogueWindow_Struct));
CZDialogueWindow_Struct* CZDW = (CZDialogueWindow_Struct*)pack->pBuffer;
CZDW->update_type = update_type;
CZDW->update_identifier = update_identifier;
strn0cpy(CZDW->message, message, 4096);
strn0cpy(CZDW->client_name, client_name, 64);
worldserver.SendPacket(pack);
safe_delete(pack);
}
void QuestManager::CrossZoneLDoNUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 theme_id, int points, const char* client_name) {
auto pack = new ServerPacket(ServerOP_CZLDoNUpdate, sizeof(CZLDoNUpdate_Struct));
CZLDoNUpdate_Struct* CZLU = (CZLDoNUpdate_Struct*)pack->pBuffer;
@@ -3568,6 +3579,16 @@ void QuestManager::CrossZoneTaskUpdate(uint8 update_type, uint8 update_subtype,
safe_delete(pack);
}
void QuestManager::WorldWideDialogueWindow(const char* message, uint8 min_status, uint8 max_status) {
auto pack = new ServerPacket(ServerOP_WWDialogueWindow, sizeof(WWDialogueWindow_Struct));
WWDialogueWindow_Struct* WWDW = (WWDialogueWindow_Struct*)pack->pBuffer;
strn0cpy(WWDW->message, message, 4096);
WWDW->min_status = min_status;
WWDW->max_status = max_status;
worldserver.SendPacket(pack);
safe_delete(pack);
}
void QuestManager::WorldWideLDoNUpdate(uint8 update_type, uint32 theme_id, int points, uint8 min_status, uint8 max_status) {
auto pack = new ServerPacket(ServerOP_WWLDoNUpdate, sizeof(WWLDoNUpdate_Struct));
WWLDoNUpdate_Struct* WWLU = (WWLDoNUpdate_Struct*)pack->pBuffer;