diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 47f14bb4e..6f1a437a8 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -384,7 +384,9 @@ struct NewZone_Struct { /*0716*/ uint32 FastRegenEndurance; /*0720*/ uint32 NPCAggroMaxDist; /*0724*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, if this value is 0, it prevents you from running off edges that would end up underworld -/*0728*/ +/*0728*/ uint32 LavaDamage; // Seen 50 +/*0732*/ uint32 MinLavaDamage; // Seen 10 +/*0736*/ }; /* diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 38b109677..8e40e43ce 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -1863,8 +1863,8 @@ namespace RoF /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown800 = -1; eq->unknown844 = 600; - eq->unknown880 = 50; - eq->unknown884 = 10; + OUT(LavaDamage); + OUT(MinLavaDamage); eq->unknown888 = 1; eq->unknown889 = 0; eq->unknown890 = 1; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 55fbfe2c8..03f636560 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -1919,8 +1919,8 @@ namespace RoF2 eq->SkyRelated2 = -1; eq->NPCAggroMaxDist = 600; eq->FilterID = 2008; // Guild Lobby observed value - eq->LavaDamage = 50; - eq->MinLavaDamage = 10; + OUT(LavaDamage); + OUT(MinLavaDamage); eq->bDisallowManaStone = 1; eq->bNoBind = 0; eq->bNoAttack = 0; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index a8297b2ea..d98827ce9 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -581,8 +581,8 @@ struct NewZone_Struct { /*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions /*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; -/*0880*/ uint32 unknown880; // Seen 50 -/*0884*/ uint32 unknown884; // Seen 10 +/*0880*/ uint32 LavaDamage; // Seen 50 +/*0884*/ uint32 MinLavaDamage; // Seen 10 /*0888*/ uint8 unknown888; // Seen 1 /*0889*/ uint8 unknown889; // Seen 0 (POK) or 1 (rujj) /*0890*/ uint8 unknown890; // Seen 1 diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 404190d09..8470b7296 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1388,8 +1388,8 @@ namespace SoD /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown800 = -1; eq->unknown844 = 600; - eq->unknown880 = 50; - eq->unknown884 = 10; + OUT(LavaDamage); + OUT(MinLavaDamage); eq->unknown888 = 1; eq->unknown889 = 0; eq->unknown890 = 1; diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 70866db8f..12bfacac7 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -450,8 +450,8 @@ struct NewZone_Struct { /*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions /*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; -/*0880*/ uint32 unknown880; //seen 50 -/*0884*/ uint32 unknown884; //seen 10 +/*0880*/ uint32 LavaDamage; //seen 50 +/*0884*/ uint32 MinLavaDamage; //seen 10 /*0888*/ uint8 unknown888; //seen 1 /*0889*/ uint8 unknown889; //seen 0 (POK) or 1 (rujj) /*0890*/ uint8 unknown890; //seen 1 diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 07758bba6..760a9008b 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1066,8 +1066,8 @@ namespace SoF /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown796 = -1; eq->unknown840 = 600; - eq->unknown876 = 50; - eq->unknown880 = 10; + OUT(LavaDamage); + OUT(MinLavaDamage); eq->unknown884 = 1; eq->unknown885 = 0; eq->unknown886 = 1; diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 97b200a91..60542db38 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -454,8 +454,8 @@ struct NewZone_Struct { /*0864*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions /*0868*/ uint32 scriptIDSomething3; /*0872*/ uint32 SuspendBuffs; -/*0876*/ uint32 unknown876; //seen 50 -/*0880*/ uint32 unknown880; //seen 10 +/*0876*/ uint32 LavaDamage; //seen 50 +/*0880*/ uint32 MinLavaDamage; //seen 10 /*0884*/ uint8 unknown884; //seen 1 /*0885*/ uint8 unknown885; //seen 0 (POK) or 1 (rujj) /*0886*/ uint8 unknown886; //seen 1 diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index c23415737..f1bf60e6a 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1614,8 +1614,8 @@ namespace UF /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown800 = -1; eq->unknown844 = 600; - eq->unknown880 = 50; - eq->unknown884 = 10; + OUT(LavaDamage); + OUT(MinLavaDamage); eq->unknown888 = 1; eq->unknown889 = 0; eq->unknown890 = 1; diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 6c1b4a4ed..f3d7f0e2c 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -450,8 +450,8 @@ struct NewZone_Struct { /*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions /*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; -/*0880*/ uint32 unknown880; //seen 50 -/*0884*/ uint32 unknown884; //seen 10 +/*0880*/ uint32 LavaDamage; //seen 50 +/*0884*/ uint32 MinLavaDamage; //seen 10 /*0888*/ uint8 unknown888; //seen 1 /*0889*/ uint8 unknown889; //seen 0 (POK) or 1 (rujj) /*0890*/ uint8 unknown890; //seen 1 diff --git a/common/races.cpp b/common/races.cpp index 68f4717b6..bb7cce9c0 100644 --- a/common/races.cpp +++ b/common/races.cpp @@ -2232,3 +2232,15 @@ bool PlayerAppearance::IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_v } return false; } + +const char* GetGenderName(uint32 gender_id) { + const char* gender_name = "Unknown"; + if (gender_id == MALE) { + gender_name = "Male"; + } else if (gender_id == FEMALE) { + gender_name = "Female"; + } else if (gender_id == NEUTER) { + gender_name = "Neuter"; + } + return gender_name; +} \ No newline at end of file diff --git a/common/races.h b/common/races.h index b492fb03a..73c6ba634 100644 --- a/common/races.h +++ b/common/races.h @@ -851,6 +851,7 @@ const char* GetRaceIDName(uint16 race_id); const char* GetPlayerRaceName(uint32 player_race_value); +const char* GetGenderName(uint32 gender_id); uint32 GetPlayerRaceValue(uint16 race_id); uint32 GetPlayerRaceBit(uint16 race_id); diff --git a/common/repositories/base/base_zone_repository.h b/common/repositories/base/base_zone_repository.h index 04188ac93..3478c9fa1 100644 --- a/common/repositories/base/base_zone_repository.h +++ b/common/repositories/base/base_zone_repository.h @@ -110,6 +110,8 @@ public: std::string content_flags; std::string content_flags_disabled; int underworld_teleport_index; + int lava_damage; + int min_lava_damage; }; static std::string PrimaryKey() @@ -212,6 +214,8 @@ public: "content_flags", "content_flags_disabled", "underworld_teleport_index", + "lava_damage", + "min_lava_damage", }; } @@ -339,6 +343,8 @@ public: entry.content_flags = ""; entry.content_flags_disabled = ""; entry.underworld_teleport_index = 0; + entry.lava_damage = 50; + entry.min_lava_damage = 10; return entry; } @@ -466,6 +472,8 @@ public: entry.content_flags = row[89] ? row[89] : ""; entry.content_flags_disabled = row[90] ? row[90] : ""; entry.underworld_teleport_index = atoi(row[91]); + entry.lava_damage = atoi(row[92]); + entry.min_lava_damage = atoi(row[93]); return entry; } @@ -590,6 +598,8 @@ public: update_values.push_back(columns[89] + " = '" + EscapeString(zone_entry.content_flags) + "'"); update_values.push_back(columns[90] + " = '" + EscapeString(zone_entry.content_flags_disabled) + "'"); update_values.push_back(columns[91] + " = " + std::to_string(zone_entry.underworld_teleport_index)); + update_values.push_back(columns[92] + " = " + std::to_string(zone_entry.lava_damage)); + update_values.push_back(columns[93] + " = " + std::to_string(zone_entry.min_lava_damage)); auto results = db.QueryDatabase( fmt::format( @@ -703,6 +713,8 @@ public: insert_values.push_back("'" + EscapeString(zone_entry.content_flags) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.content_flags_disabled) + "'"); insert_values.push_back(std::to_string(zone_entry.underworld_teleport_index)); + insert_values.push_back(std::to_string(zone_entry.lava_damage)); + insert_values.push_back(std::to_string(zone_entry.min_lava_damage)); auto results = db.QueryDatabase( fmt::format( @@ -824,6 +836,8 @@ public: insert_values.push_back("'" + EscapeString(zone_entry.content_flags) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.content_flags_disabled) + "'"); insert_values.push_back(std::to_string(zone_entry.underworld_teleport_index)); + insert_values.push_back(std::to_string(zone_entry.lava_damage)); + insert_values.push_back(std::to_string(zone_entry.min_lava_damage)); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); } @@ -949,6 +963,8 @@ public: entry.content_flags = row[89] ? row[89] : ""; entry.content_flags_disabled = row[90] ? row[90] : ""; entry.underworld_teleport_index = atoi(row[91]); + entry.lava_damage = atoi(row[92]); + entry.min_lava_damage = atoi(row[93]); all_entries.push_back(entry); } @@ -1065,6 +1081,8 @@ public: entry.content_flags = row[89] ? row[89] : ""; entry.content_flags_disabled = row[90] ? row[90] : ""; entry.underworld_teleport_index = atoi(row[91]); + entry.lava_damage = atoi(row[92]); + entry.min_lava_damage = atoi(row[93]); all_entries.push_back(entry); } diff --git a/common/servertalk.h b/common/servertalk.h index 3774a07cc..00510d60b 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -227,90 +227,24 @@ #define ServerOP_HotReloadQuests 0x4011 #define ServerOP_UpdateSchedulerEvents 0x4012 -#define ServerOP_CZCastSpellPlayer 0x4500 -#define ServerOP_CZCastSpellGroup 0x4501 -#define ServerOP_CZCastSpellRaid 0x4502 -#define ServerOP_CZCastSpellGuild 0x4503 -#define ServerOP_CZMarqueePlayer 0x4504 -#define ServerOP_CZMarqueeGroup 0x4505 -#define ServerOP_CZMarqueeRaid 0x4506 -#define ServerOP_CZMarqueeGuild 0x4507 -#define ServerOP_CZMessagePlayer 0x4508 -#define ServerOP_CZMessageGroup 0x4509 -#define ServerOP_CZMessageRaid 0x4510 -#define ServerOP_CZMessageGuild 0x4511 -#define ServerOP_CZMovePlayer 0x4512 -#define ServerOP_CZMoveGroup 0x4513 -#define ServerOP_CZMoveRaid 0x4514 -#define ServerOP_CZMoveGuild 0x4515 -#define ServerOP_CZMoveInstancePlayer 0x4516 -#define ServerOP_CZMoveInstanceGroup 0x4517 -#define ServerOP_CZMoveInstanceRaid 0x4518 -#define ServerOP_CZMoveInstanceGuild 0x4519 -#define ServerOP_CZRemoveSpellPlayer 0x4520 -#define ServerOP_CZRemoveSpellGroup 0x4521 -#define ServerOP_CZRemoveSpellRaid 0x4522 -#define ServerOP_CZRemoveSpellGuild 0x4523 -#define ServerOP_CZSetEntityVariableByClientName 0x4524 -#define ServerOP_CZSetEntityVariableByNPCTypeID 0x4525 -#define ServerOP_CZSetEntityVariableByGroupID 0x4526 -#define ServerOP_CZSetEntityVariableByRaidID 0x4527 -#define ServerOP_CZSetEntityVariableByGuildID 0x4528 -#define ServerOP_CZSignalClient 0x4529 -#define ServerOP_CZSignalClientByName 0x4530 -#define ServerOP_CZSignalNPC 0x4531 -#define ServerOP_CZSignalGroup 0x4532 -#define ServerOP_CZSignalRaid 0x4533 -#define ServerOP_CZSignalGuild 0x4534 -#define ServerOP_CZTaskActivityResetPlayer 0x4535 -#define ServerOP_CZTaskActivityResetGroup 0x4536 -#define ServerOP_CZTaskActivityResetRaid 0x4537 -#define ServerOP_CZTaskActivityResetGuild 0x4538 -#define ServerOP_CZTaskActivityUpdatePlayer 0x4539 -#define ServerOP_CZTaskActivityUpdateGroup 0x4540 -#define ServerOP_CZTaskActivityUpdateRaid 0x4541 -#define ServerOP_CZTaskActivityUpdateGuild 0x4542 -#define ServerOP_CZTaskAssignPlayer 0x4543 -#define ServerOP_CZTaskAssignGroup 0x4544 -#define ServerOP_CZTaskAssignRaid 0x4545 -#define ServerOP_CZTaskAssignGuild 0x4546 -#define ServerOP_CZTaskDisablePlayer 0x4547 -#define ServerOP_CZTaskDisableGroup 0x4548 -#define ServerOP_CZTaskDisableRaid 0x4549 -#define ServerOP_CZTaskDisableGuild 0x4550 -#define ServerOP_CZTaskEnablePlayer 0x4551 -#define ServerOP_CZTaskEnableGroup 0x4552 -#define ServerOP_CZTaskEnableRaid 0x4553 -#define ServerOP_CZTaskEnableGuild 0x4554 -#define ServerOP_CZTaskFailPlayer 0x4555 -#define ServerOP_CZTaskFailGroup 0x4556 -#define ServerOP_CZTaskFailRaid 0x4557 -#define ServerOP_CZTaskFailGuild 0x4558 -#define ServerOP_CZTaskRemovePlayer 0x4559 -#define ServerOP_CZTaskRemoveGroup 0x4560 -#define ServerOP_CZTaskRemoveRaid 0x4561 -#define ServerOP_CZTaskRemoveGuild 0x4562 -#define ServerOP_CZClientMessageString 0x4563 -#define ServerOP_CZLDoNUpdate 0x4564 +#define ServerOP_CZLDoNUpdate 0x4500 +#define ServerOP_CZMarquee 0x4501 +#define ServerOP_CZMessage 0x4502 +#define ServerOP_CZMove 0x4503 +#define ServerOP_CZSetEntityVariable 0x4504 +#define ServerOP_CZSignal 0x4505 +#define ServerOP_CZSpell 0x4506 +#define ServerOP_CZTaskUpdate 0x4507 +#define ServerOP_CZClientMessageString 0x4508 -#define ServerOP_WWAssignTask 0x4750 -#define ServerOP_WWCastSpell 0x4751 -#define ServerOP_WWCompleteActivity 0x4752 -#define ServerOP_WWDisableTask 0x4753 -#define ServerOP_WWEnableTask 0x4754 -#define ServerOP_WWFailTask 0x4755 -#define ServerOP_WWMarquee 0x4756 -#define ServerOP_WWMessage 0x4757 -#define ServerOP_WWMove 0x4758 -#define ServerOP_WWMoveInstance 0x4759 -#define ServerOP_WWRemoveSpell 0x4760 -#define ServerOP_WWRemoveTask 0x4761 -#define ServerOP_WWResetActivity 0x4762 -#define ServerOP_WWSetEntityVariableClient 0x4763 -#define ServerOP_WWSetEntityVariableNPC 0x4764 -#define ServerOP_WWSignalClient 0x4765 -#define ServerOP_WWSignalNPC 0x4766 -#define ServerOP_WWUpdateActivity 0x4767 +#define ServerOP_WWLDoNUpdate 0x4750 +#define ServerOP_WWMarquee 0x4751 +#define ServerOP_WWMessage 0x4752 +#define ServerOP_WWMove 0x4753 +#define ServerOP_WWSetEntityVariable 0x4754 +#define ServerOP_WWSignal 0x4755 +#define ServerOP_WWSpell 0x4756 +#define ServerOP_WWTaskUpdate 0x4757 /** * QueryServer @@ -325,17 +259,75 @@ #define ServerOP_QSPlayerDropItem 0x5007 enum { - CZLDoNUpdateType_Character = 0, - CZLDoNUpdateType_Group, - CZLDoNUpdateType_Raid, - CZLDoNUpdateType_Guild, - CZLDoNUpdateType_Expedition + CZUpdateType_Character, + CZUpdateType_Group, + CZUpdateType_Raid, + CZUpdateType_Guild, + CZUpdateType_Expedition, + CZUpdateType_ClientName, + CZUpdateType_NPC }; enum { - CZLDoNUpdateSubtype_Win = 0, CZLDoNUpdateSubtype_Loss, - CZLDoNUpdateSubtype_Points + CZLDoNUpdateSubtype_Points, + CZLDoNUpdateSubtype_Win +}; + +enum { + CZMoveUpdateSubtype_MoveZone, + CZMoveUpdateSubtype_MoveZoneInstance +}; + +enum { + CZSpellUpdateSubtype_Cast, + CZSpellUpdateSubtype_Remove +}; + +enum { + CZTaskUpdateSubtype_ActivityReset, + CZTaskUpdateSubtype_ActivityUpdate, + CZTaskUpdateSubtype_AssignTask, + CZTaskUpdateSubtype_DisableTask, + CZTaskUpdateSubtype_EnableTask, + CZTaskUpdateSubtype_FailTask, + CZTaskUpdateSubtype_RemoveTask +}; + +enum { + WWLDoNUpdateType_Loss, + WWLDoNUpdateType_Points, + WWLDoNUpdateType_Win +}; + +enum { + WWMoveUpdateType_MoveZone, + WWMoveUpdateType_MoveZoneInstance +}; + +enum { + WWSetEntityVariableUpdateType_Character, + WWSetEntityVariableUpdateType_NPC +}; + +enum { + WWSignalUpdateType_Character, + WWSignalUpdateType_NPC +}; + +enum { + WWSpellUpdateType_Cast, + WWSpellUpdateType_Remove +}; + +enum { + WWTaskUpdateType_ActivityReset, + WWTaskUpdateType_ActivityUpdate, + WWTaskUpdateType_AssignTask, + WWTaskUpdateType_DisableTask, + WWTaskUpdateType_EnableTask, + WWTaskUpdateType_FailTask, + WWTaskUpdateType_RemoveTask }; /* Query Serv Generic Packet Flag/Type Enumeration */ @@ -1440,489 +1432,94 @@ struct QSGeneralQuery_Struct { char QueryString[0]; }; -struct CZCastSpellPlayer_Struct { - int character_id; - uint32 spell_id; -}; - -struct CZCastSpellGroup_Struct { - int group_id; - uint32 spell_id; -}; - -struct CZCastSpellRaid_Struct { - int raid_id; - uint32 spell_id; -}; - -struct CZCastSpellGuild_Struct { - int guild_id; - uint32 spell_id; -}; - -struct CZClientSignal_Struct { - int character_id; - uint32 signal; -}; - -struct CZGroupSignal_Struct { - int group_id; - uint32 signal; -}; - -struct CZRaidSignal_Struct { - int raid_id; - uint32 signal; -}; - -struct CZGuildSignal_Struct { - int guild_id; - uint32 signal; -}; - -struct CZNPCSignal_Struct { - uint32 npctype_id; - uint32 signal; -}; - struct CZClientMessageString_Struct { uint32 string_id; uint16 chat_type; - char character_name[64]; + char client_name[64]; uint32 args_size; char args[1]; // null delimited }; -struct CZClientSignalByName_Struct { - char character_name[64]; - uint32 signal; -}; - -struct CZCompleteActivityPlayer_Struct { - int character_id; - uint32 task_id; - int activity_id; -}; - -struct CZCompleteActivityGroup_Struct { - int group_id; - uint32 task_id; - int activity_id; -}; - -struct CZCompleteActivityRaid_Struct { - int raid_id; - uint32 task_id; - int activity_id; -}; - -struct CZCompleteActivityGuild_Struct { - int guild_id; - uint32 task_id; - int activity_id; -}; - -struct CZMovePlayer_Struct { - int character_id; - char zone_short_name[32]; -}; - -struct CZMarqueePlayer_Struct { - int character_id; - uint32 type; - uint32 priority; - uint32 fade_in; - uint32 fade_out; - uint32 duration; - char message[512]; -}; - -struct CZMarqueeGroup_Struct { - int group_id; - uint32 type; - uint32 priority; - uint32 fade_in; - uint32 fade_out; - uint32 duration; - char message[512]; -}; - -struct CZMarqueeRaid_Struct { - int raid_id; - uint32 type; - uint32 priority; - uint32 fade_in; - uint32 fade_out; - uint32 duration; - char message[512]; -}; - -struct CZMarqueeGuild_Struct { - int guild_id; - uint32 type; - uint32 priority; - uint32 fade_in; - uint32 fade_out; - uint32 duration; - char message[512]; -}; - -struct CZMessagePlayer_Struct { - uint32 type; - char character_name[64]; - char message[512]; -}; - -struct CZMessageGroup_Struct { - uint32 type; - int group_id; - char message[512]; -}; - -struct CZMessageRaid_Struct { - uint32 type; - int raid_id; - char message[512]; -}; - -struct CZMessageGuild_Struct { - uint32 type; - int guild_id; - char message[512]; -}; - -struct CZMoveGroup_Struct { - int group_id; - char zone_short_name[32]; -}; - -struct CZMoveRaid_Struct { - int raid_id; - char zone_short_name[32]; -}; - -struct CZMoveGuild_Struct { - int guild_id; - char zone_short_name[32]; -}; - -struct CZMoveInstancePlayer_Struct { - int character_id; - uint16 instance_id; -}; - -struct CZMoveInstanceGroup_Struct { - int group_id; - uint16 instance_id; -}; - -struct CZMoveInstanceRaid_Struct { - int raid_id; - uint16 instance_id; -}; - -struct CZMoveInstanceGuild_Struct { - int guild_id; - uint16 instance_id; -}; - -struct CZRemoveSpellPlayer_Struct { - int character_id; - uint32 spell_id; -}; - -struct CZRemoveSpellGroup_Struct { - int group_id; - uint32 spell_id; -}; - -struct CZRemoveSpellRaid_Struct { - int raid_id; - uint32 spell_id; -}; - -struct CZRemoveSpellGuild_Struct { - int guild_id; - uint32 spell_id; -}; - -struct CZRemoveTaskPlayer_Struct { - int character_id; - uint32 task_id; -}; - -struct CZRemoveTaskGroup_Struct { - int group_id; - uint32 task_id; -}; - -struct CZRemoveTaskRaid_Struct { - int raid_id; - uint32 task_id; -}; - -struct CZRemoveTaskGuild_Struct { - int guild_id; - uint32 task_id; -}; - -struct CZResetActivityPlayer_Struct { - int character_id; - uint32 task_id; - int activity_id; -}; - -struct CZResetActivityGroup_Struct { - int group_id; - uint32 task_id; - int activity_id; -}; - -struct CZResetActivityRaid_Struct { - int raid_id; - uint32 task_id; - int activity_id; -}; - -struct CZResetActivityGuild_Struct { - int guild_id; - uint32 task_id; - int activity_id; -}; - -struct CZSetEntVarByNPCTypeID_Struct { - uint32 npctype_id; - char variable_name[256]; - char variable_value[256]; -}; - -struct CZSetEntVarByClientName_Struct { - char character_name[64]; - char variable_name[256]; - char variable_value[256]; -}; - -struct CZSetEntVarByGroupID_Struct { - int group_id; - char variable_name[256]; - char variable_value[256]; -}; - -struct CZSetEntVarByRaidID_Struct { - int raid_id; - char variable_name[256]; - char variable_value[256]; -}; - -struct CZSetEntVarByGuildID_Struct { - int guild_id; - char variable_name[256]; - char variable_value[256]; -}; - -struct CZTaskActivityResetPlayer_Struct { - int character_id; - uint32 task_id; - int activity_id; -}; - -struct CZTaskActivityResetGroup_Struct { - int group_id; - uint32 task_id; - int activity_id; -}; - -struct CZTaskActivityResetRaid_Struct { - int raid_id; - uint32 task_id; - int activity_id; -}; - -struct CZTaskActivityResetGuild_Struct { - int guild_id; - uint32 task_id; - int activity_id; -}; - -struct CZTaskActivityUpdatePlayer_Struct { - int character_id; - uint32 task_id; - int activity_id; - int activity_count; -}; - -struct CZTaskActivityUpdateGroup_Struct { - int group_id; - uint32 task_id; - int activity_id; - int activity_count; -}; - -struct CZTaskActivityUpdateRaid_Struct { - int raid_id; - uint32 task_id; - int activity_id; - int activity_count; -}; - -struct CZTaskActivityUpdateGuild_Struct { - int guild_id; - uint32 task_id; - int activity_id; - int activity_count; -}; - -struct CZTaskAssignPlayer_Struct { - uint16 npc_entity_id; - int character_id; - uint32 task_id; - bool enforce_level_requirement; -}; - -struct CZTaskAssignGroup_Struct { - uint16 npc_entity_id; - int group_id; - uint32 task_id; - bool enforce_level_requirement; -}; - -struct CZTaskAssignRaid_Struct { - uint16 npc_entity_id; - int raid_id; - uint32 task_id; - bool enforce_level_requirement; -}; - -struct CZTaskAssignGuild_Struct { - uint16 npc_entity_id; - int guild_id; - uint32 task_id; - bool enforce_level_requirement; -}; - -struct CZTaskDisablePlayer_Struct { - int character_id; - uint32 task_id; -}; - -struct CZTaskDisableGroup_Struct { - int group_id; - uint32 task_id; -}; - -struct CZTaskDisableRaid_Struct { - int raid_id; - uint32 task_id; -}; - -struct CZTaskDisableGuild_Struct { - int guild_id; - uint32 task_id; -}; - -struct CZTaskEnablePlayer_Struct { - int character_id; - uint32 task_id; -}; - -struct CZTaskEnableGroup_Struct { - int group_id; - uint32 task_id; -}; - -struct CZTaskEnableRaid_Struct { - int raid_id; - uint32 task_id; -}; - -struct CZTaskEnableGuild_Struct { - int guild_id; - uint32 task_id; -}; - -struct CZTaskFailPlayer_Struct { - int character_id; - uint32 task_id; -}; - -struct CZTaskFailGroup_Struct { - int group_id; - uint32 task_id; -}; - -struct CZTaskFailRaid_Struct { - int raid_id; - uint32 task_id; -}; - -struct CZTaskFailGuild_Struct { - int guild_id; - uint32 task_id; -}; - -struct CZTaskRemovePlayer_Struct { - uint16 npc_entity_id; - int character_id; - uint32 task_id; -}; - -struct CZTaskRemoveGroup_Struct { - uint16 npc_entity_id; - int group_id; - uint32 task_id; -}; - -struct CZTaskRemoveRaid_Struct { - uint16 npc_entity_id; - int raid_id; - uint32 task_id; -}; - -struct CZTaskRemoveGuild_Struct { - uint16 npc_entity_id; - int guild_id; - uint32 task_id; -}; - struct CZLDoNUpdate_Struct { - uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition - uint8 update_subtype; // 0 - Win, 1 - Loss, 2 - Points - int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + uint8 update_subtype; // 0 - Loss, 1 - Points, 2 - Win + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name uint32 theme_id; - int points; // Always 1, except for when Points are used + int points; // Only used in Points Subtype, else 1 + char client_name[64]; // Only used by Character Name Type, else empty }; -struct WWAssignTask_Struct { - uint16 npc_entity_id; - uint32 task_id; - bool enforce_level_requirement; - uint8 min_status; - uint8 max_status; +struct CZMarquee_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name + uint32 type; + uint32 priority; + uint32 fade_in; + uint32 fade_out; + uint32 duration; + char message[512]; + char client_name[64]; // Only used by Character Name Type, else empty }; -struct WWCastSpell_Struct { +struct CZMessage_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + int update_identifier; // Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name + uint32 type; + char message[512]; + char client_name[64]; // Only used by Character Name Type, else empty +}; + +struct CZMove_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + uint8 update_subtype; // 0 - Move Zone, 1 - Move Zone Instance + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name + uint16 instance_id; // Only used by Move Zone Instance, else 0 + char zone_short_name[32]; // Only by with Move Zone, else empty + char client_name[64]; // Only used by Character Name Type, else empty +}; + +struct CZSetEntityVariable_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name, 6 - NPC + int update_identifier; // Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name + char variable_name[256]; + char variable_value[256]; + char client_name[64]; // Only used by Character Type, else empty +}; + +struct CZSignal_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name, 6 - NPC + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name + uint32 signal; + char client_name[64]; // Only used by Character Name Type, else empty +}; + +struct CZSpell_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + uint8 update_subtype; // 0 - Cast Spell, 1 - Remove Spell + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name uint32 spell_id; + char client_name[64]; // Only used by Character Name Type, else empty +}; + +struct CZTaskUpdate_Struct { + uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name + uint8 update_subtype; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task + int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name + uint32 task_identifier; + int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1 + int update_count; // Only used by Activity Update, else 1 + bool enforce_level_requirement; // Only used by Assign Task + char client_name[64]; // Only used by Character Name Type, else empty +}; + +struct WWLDoNUpdate_Struct { + uint8 update_type; // 0 - Loss, 1 - Points, 2 - Win + uint32 theme_id; + int points; // Only used in Points Subtype, else 1 uint8 min_status; uint8 max_status; }; -struct WWDisableTask_Struct { - uint32 task_id; - uint8 min_status; - uint8 max_status; -}; - -struct WWEnableTask_Struct { - uint32 task_id; - uint8 min_status; - uint8 max_status; -}; - -struct WWFailTask_Struct { - uint32 task_id; - uint8 min_status; - uint8 max_status; -}; struct WWMarquee_Struct { uint32 type; uint32 priority; @@ -1942,63 +1539,41 @@ struct WWMessage_Struct { }; struct WWMove_Struct { - char zone_short_name[32]; + uint8 update_type; // 0 - Move Zone, 1 - Move Zone Instance + char zone_short_name[32]; // Used with Move Zone + uint16 instance_id; // Used with Move Zone Instance uint8 min_status; uint8 max_status; }; -struct WWMoveInstance_Struct { - uint16 instance_id; +struct WWSetEntityVariable_Struct { + uint8 update_type; // 0 - Character, 1 - NPC + char variable_name[256]; + char variable_value[256]; uint8 min_status; uint8 max_status; }; -struct WWRemoveSpell_Struct { +struct WWSignal_Struct { + uint8 update_type; // 0 - Character, 1 - NPC + uint32 signal; + uint8 min_status; + uint8 max_status; +}; + +struct WWSpell_Struct { + uint8 update_type; // 0 - Cast Spell, 1 - Remove Spell uint32 spell_id; uint8 min_status; uint8 max_status; }; -struct WWRemoveTask_Struct { - uint32 task_id; - uint8 min_status; - uint8 max_status; - -}; - -struct WWResetActivity_Struct { - uint32 task_id; - int activity_id; - uint8 min_status; - uint8 max_status; -}; - -struct WWSetEntVarClient_Struct { - char variable_name[256]; - char variable_value[256]; - uint8 min_status; - uint8 max_status; -}; - -struct WWSetEntVarNPC_Struct { - char variable_name[256]; - char variable_value[256]; -}; - -struct WWSignalClient_Struct { - uint32 signal; - uint8 min_status; - uint8 max_status; -}; - -struct WWSignalNPC_Struct { - uint32 signal; -}; - -struct WWUpdateActivity_Struct { - uint32 task_id; - int activity_id; - int activity_count; +struct WWTaskUpdate_Struct { + uint8 update_type; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task + uint32 task_identifier; + int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1 + int update_count; // Update Count for Activity Update, else 1 + bool enforce_level_requirement; // Only used by Assign Task, else false uint8 min_status; uint8 max_status; }; diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 7c86067bc..2a52ebe0e 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -2287,4 +2287,4 @@ void SharedDatabase::LoadCharacterInspectMessage(uint32 character_id, InspectMes void SharedDatabase::SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message) { std::string query = StringFormat("REPLACE INTO `character_inspect_messages` (id, inspect_message) VALUES (%u, '%s')", character_id, EscapeString(message->text).c_str()); auto results = QueryDatabase(query); -} +} \ No newline at end of file diff --git a/common/spdat.cpp b/common/spdat.cpp index a95088a71..581575aa4 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1390,7 +1390,7 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) if (slot < 4) { if (id == "components") { return spells[spell_id].components[slot]; } else if (id == "component_counts") { return spells[spell_id].component_counts[slot]; } - else if (id == "NoexpendReagent") { return spells[spell_id].NoexpendReagent[slot]; } + else if (id == "noexpendreagent") { return spells[spell_id].NoexpendReagent[slot]; } } if (id == "range") { return static_cast(spells[spell_id].range); } @@ -1402,26 +1402,26 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) else if (id == "recast_time") { return spells[spell_id].recast_time; } else if (id == "buffdurationformula") { return spells[spell_id].buffdurationformula; } else if (id == "buffduration") { return spells[spell_id].buffduration; } - else if (id == "AEDuration") { return spells[spell_id].AEDuration; } + else if (id == "aeduration") { return spells[spell_id].AEDuration; } else if (id == "mana") { return spells[spell_id].mana; } //else if (id == "LightType") {stat = spells[spell_id].LightType; } - Not implemented - else if (id == "goodEffect") { return spells[spell_id].goodEffect; } - else if (id == "Activated") { return spells[spell_id].Activated; } + else if (id == "goodeffect") { return spells[spell_id].goodEffect; } + else if (id == "activated") { return spells[spell_id].Activated; } else if (id == "resisttype") { return spells[spell_id].resisttype; } else if (id == "targettype") { return spells[spell_id].targettype; } else if (id == "basediff") { return spells[spell_id].basediff; } else if (id == "skill") { return spells[spell_id].skill; } else if (id == "zonetype") { return spells[spell_id].zonetype; } - else if (id == "EnvironmentType") { return spells[spell_id].EnvironmentType; } - else if (id == "TimeOfDay") { return spells[spell_id].TimeOfDay; } - else if (id == "CastingAnim") { return spells[spell_id].CastingAnim; } - else if (id == "SpellAffectIndex") { return spells[spell_id].SpellAffectIndex; } + else if (id == "environmenttype") { return spells[spell_id].EnvironmentType; } + else if (id == "timeofday") { return spells[spell_id].TimeOfDay; } + else if (id == "castinganim") { return spells[spell_id].CastingAnim; } + else if (id == "spellaffectindex") { return spells[spell_id].SpellAffectIndex; } else if (id == "disallow_sit") { return spells[spell_id].disallow_sit; } //else if (id == "spellanim") {stat = spells[spell_id].spellanim; } - Not implemented else if (id == "uninterruptable") { return spells[spell_id].uninterruptable; } - else if (id == "ResistDiff") { return spells[spell_id].ResistDiff; } + else if (id == "resistdiff") { return spells[spell_id].ResistDiff; } else if (id == "dot_stacking_exempt") { return spells[spell_id].dot_stacking_exempt; } - else if (id == "RecourseLink") { return spells[spell_id].RecourseLink; } + else if (id == "recourselink") { return spells[spell_id].RecourseLink; } else if (id == "no_partial_resist") { return spells[spell_id].no_partial_resist; } else if (id == "short_buff_box") { return spells[spell_id].short_buff_box; } else if (id == "descnum") { return spells[spell_id].descnum; } @@ -1429,11 +1429,11 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) else if (id == "npc_no_los") { return spells[spell_id].npc_no_los; } else if (id == "reflectable") { return spells[spell_id].reflectable; } else if (id == "bonushate") { return spells[spell_id].bonushate; } - else if (id == "EndurCost") { return spells[spell_id].EndurCost; } - else if (id == "EndurTimerIndex") { return spells[spell_id].EndurTimerIndex; } - else if (id == "IsDisciplineBuff") { return spells[spell_id].IsDisciplineBuff; } - else if (id == "HateAdded") { return spells[spell_id].HateAdded; } - else if (id == "EndurUpkeep") { return spells[spell_id].EndurUpkeep; } + else if (id == "endurcost") { return spells[spell_id].EndurCost; } + else if (id == "endurtimerindex") { return spells[spell_id].EndurTimerIndex; } + else if (id == "isdisciplinebuff") { return spells[spell_id].IsDisciplineBuff; } + else if (id == "hateadded") { return spells[spell_id].HateAdded; } + else if (id == "endurupkeep") { return spells[spell_id].EndurUpkeep; } else if (id == "numhitstype") { return spells[spell_id].numhitstype; } else if (id == "numhits") { return spells[spell_id].numhits; } else if (id == "pvpresistbase") { return spells[spell_id].pvpresistbase; } @@ -1442,11 +1442,11 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) else if (id == "spell_category") { return spells[spell_id].spell_category; } else if (id == "can_mgb") { return spells[spell_id].can_mgb; } else if (id == "dispel_flag") { return spells[spell_id].dispel_flag; } - else if (id == "MinResist") { return spells[spell_id].MinResist; } - else if (id == "MaxResist") { return spells[spell_id].MaxResist; } + else if (id == "minresist") { return spells[spell_id].MinResist; } + else if (id == "maxresist") { return spells[spell_id].MaxResist; } else if (id == "viral_targets") { return spells[spell_id].viral_targets; } else if (id == "viral_timer") { return spells[spell_id].viral_timer; } - else if (id == "NimbusEffect") { return spells[spell_id].NimbusEffect; } + else if (id == "nimbuseffect") { return spells[spell_id].NimbusEffect; } else if (id == "directional_start") { return static_cast(spells[spell_id].directional_start); } else if (id == "directional_end") { return static_cast(spells[spell_id].directional_end); } else if (id == "not_focusable") { return spells[spell_id].not_focusable; } @@ -1455,10 +1455,10 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) else if (id == "spellgroup") { return spells[spell_id].spellgroup; } else if (id == "rank") { return spells[spell_id].rank; } else if (id == "no_resist") { return spells[spell_id].no_resist; } - else if (id == "CastRestriction") { return spells[spell_id].CastRestriction; } - else if (id == "AllowRest") { return spells[spell_id].AllowRest; } - else if (id == "InCombat") { return spells[spell_id].InCombat; } - else if (id == "OutofCombat") { return spells[spell_id].OutofCombat; } + else if (id == "castrestriction") { return spells[spell_id].CastRestriction; } + else if (id == "allowrest") { return spells[spell_id].AllowRest; } + else if (id == "incombat") { return spells[spell_id].InCombat; } + else if (id == "outofcombat") { return spells[spell_id].OutofCombat; } else if (id == "aemaxtargets") { return spells[spell_id].aemaxtargets; } else if (id == "no_heal_damage_item_mod") { return spells[spell_id].no_heal_damage_item_mod; } else if (id == "persistdeath") { return spells[spell_id].persistdeath; } @@ -1466,7 +1466,7 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot) else if (id == "min_dist_mod") { return static_cast(spells[spell_id].min_dist_mod); } else if (id == "max_dist") { return static_cast(spells[spell_id].max_dist); } else if (id == "min_range") { return static_cast(spells[spell_id].min_range); } - else if (id == "DamageShieldType") { return spells[spell_id].DamageShieldType; } + else if (id == "damageshieldtype") { return spells[spell_id].DamageShieldType; } return 0; } \ No newline at end of file diff --git a/common/spdat.h b/common/spdat.h index d626219d5..ff7293496 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -153,8 +153,10 @@ #define SPELL_ACTING_SPIRIT_I 1921 #define SPELL_ACTING_SPIRIT_II 1922 #define SPELL_RESURRECTION_SICKNESS 756 +#define SPELL_RESURRECTION_SICKNESS4 757 #define SPELL_RESURRECTION_SICKNESS2 5249 #define SPELL_REVIVAL_SICKNESS 13087 +#define SPELL_RESURRECTION_SICKNESS3 37624 #define SPELL_PACT_OF_HATE_RECOURSE 40375 #define SPELL_INCENDIARY_OOZE_BUFF 32513 @@ -746,7 +748,7 @@ typedef enum { //#define SE_TransferItem 60 // not used #define SE_Identify 61 // implemented //#define SE_ItemID 62 // not used -#define SE_WipeHateList 63 // implemented +#define SE_WipeHateList 63 // implemented, @Memblur, chance to wipe hate list of target, base: pct chance, limit: none, max: ? (not implemented), Note: caster level and CHA add to pct chance #define SE_SpinTarget 64 // implemented - TO DO: Not sure stun portion is working correctly #define SE_InfraVision 65 // implemented #define SE_UltraVision 66 // implemented @@ -925,7 +927,7 @@ typedef enum { #define SE_FeignedCastOnChance 239 // implemented - ability gives you an increasing chance for your feigned deaths to not be revealed by spells cast upon you. //#define SE_StringUnbreakable 240 // not used [Likely related to above - you become immune to feign breaking on a resisted spell and have a good chance of feigning through a spell that successfully lands upon you.] #define SE_ImprovedReclaimEnergy 241 // implemented - increase the amount of mana returned to you when reclaiming your pet. -#define SE_IncreaseChanceMemwipe 242 // implemented - increases the chance to wipe hate with memory blurr +#define SE_IncreaseChanceMemwipe 242 // implemented - @Memblur, increases the chance to wipe hate with memory blurr, base: chance pct, limit: none, max: none, Note: Mods final blur chance after other bonuses added. #define SE_CharmBreakChance 243 // implemented - Total Domination #define SE_RootBreakChance 244 // implemented[AA] reduce the chance that your root will break. #define SE_TrapCircumvention 245 // *not implemented[AA] - decreases the chance that you will set off a trap when opening a chest @@ -974,7 +976,7 @@ typedef enum { #define SE_SkillAttackProc 288 // implemented[AA] - Chance to proc spell on skill attack usage (ex. Dragon Punch) #define SE_CastOnFadeEffect 289 // implemented - Triggers only if fades after natural duration. #define SE_IncreaseRunSpeedCap 290 // implemented[AA] - increases run speed over the hard cap -#define SE_Purify 291 // implemented - Removes determental effects +#define SE_Purify 291 // implemented, @Dispel, remove up specified amount of detiremental spells, base: amt removed, limit: none, max: none, Note: excluding charm, fear, resurrection, and revival sickness #define SE_StrikeThrough2 292 // implemented[AA] - increasing chance of bypassing an opponent's special defenses, such as dodge, block, parry, and riposte. #define SE_FrontalStunResist 293 // implemented[AA] - Reduce chance to be stunned from front. -- live descriptions sounds like this isn't limited to frontal anymore #define SE_CriticalSpellChance 294 // implemented - increase chance to critical hit and critical damage modifier. @@ -1125,8 +1127,8 @@ typedef enum { #define SE_Assassinate 439 // implemented[AA] - Assassinate damage #define SE_FinishingBlowLvl 440 // implemented[AA] - Sets the level Finishing blow can be triggered on an NPC #define SE_DistanceRemoval 441 // implemented - Buff is removed from target when target moves X amount of distance away from where initially hit. -#define SE_TriggerOnReqTarget 442 // implemented - triggers a spell which a certain criteria are met (below X amount of hp,mana,end, number of pets on hatelist) -#define SE_TriggerOnReqCaster 443 // implemented - triggers a spell which a certain criteria are met (below X amount of hp,mana,end, number of pets on hatelist) +#define SE_TriggerOnReqTarget 442 // implemented, @SpellTrigger, triggers a spell when Target Requirement conditions are met (see enum SpellRestriction for IDs), base: spellid, limit: SpellRestriction ID, max: none, Note: Usually cast on a target +#define SE_TriggerOnReqCaster 443 // implemented, @SpellTrigger, triggers a spell when Caster Requirement conditions are met (see enum SpellRestriction for IDs), base: spellid, limit: SpellRestriction ID, max: none, Note: Usually self only #define SE_ImprovedTaunt 444 // implemented - Locks Aggro On Caster and Decrease other Players Aggro by X% on NPC targets below level Y //#define SE_AddMercSlot 445 // *not implemented[AA] - [Hero's Barracks] Allows you to conscript additional mercs. #define SE_AStacker 446 // implementet - bufff stacking blocker (26219 | Qirik's Watch) diff --git a/common/version.h b/common/version.h index bd84935ae..1d5eec0f8 100644 --- a/common/version.h +++ b/common/version.h @@ -34,7 +34,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9172 +#define CURRENT_BINARY_DATABASE_VERSION 9173 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9028 diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index cddfb7717..076e6fdf4 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -426,6 +426,7 @@ 9170|2021_03_03_instance_safereturns.sql|SHOW TABLES LIKE 'character_instance_safereturns'|empty| 9171|2021_03_30_remove_dz_is_current_member.sql|SHOW COLUMNS FROM `dynamic_zone_members` LIKE 'is_current_member'|not_empty| 9172|2021_05_21_shared_tasks.sql|SHOW TABLES LIKE 'shared_tasks'|empty| +9173|2021_09_14_zone_lava_damage.sql|SHOW COLUMNS FROM `zone` LIKE 'lava_damage'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2021_09_14_zone_lava_damage.sql b/utils/sql/git/required/2021_09_14_zone_lava_damage.sql new file mode 100644 index 000000000..f6a5d00d1 --- /dev/null +++ b/utils/sql/git/required/2021_09_14_zone_lava_damage.sql @@ -0,0 +1 @@ +ALTER TABLE zone ADD lava_damage INT(11) NULL DEFAULT '50' AFTER underworld_teleport_index, ADD min_lava_damage INT(11) NOT NULL DEFAULT '10' AFTER lava_damage; diff --git a/world/clientlist.cpp b/world/clientlist.cpp index ac3c2c82f..7a7dfe408 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -1589,12 +1589,14 @@ void ClientList::SendCharacterMessage(ClientListEntry* character, int chat_type, return; } - uint32_t pack_size = sizeof(CZMessagePlayer_Struct); - auto pack = std::make_unique(ServerOP_CZMessagePlayer, pack_size); - auto buf = reinterpret_cast(pack->pBuffer); + uint32_t pack_size = sizeof(CZMessage_Struct); + auto pack = std::make_unique(ServerOP_CZMessage, pack_size); + auto buf = reinterpret_cast(pack->pBuffer); + buf->update_type = CZUpdateType_ClientName; + buf->update_identifier = 0; buf->type = chat_type; - strn0cpy(buf->character_name, character->name(), sizeof(buf->character_name)); strn0cpy(buf->message, message.c_str(), sizeof(buf->message)); + strn0cpy(buf->client_name, character->name(), sizeof(buf->client_name)); character->Server()->SendPacket(pack.get()); } @@ -1633,7 +1635,7 @@ void ClientList::SendCharacterMessageID(ClientListEntry* character, auto buf = reinterpret_cast(pack->pBuffer); buf->string_id = eqstr_id; buf->chat_type = chat_type; - strn0cpy(buf->character_name, character->name(), sizeof(buf->character_name)); + strn0cpy(buf->client_name, character->name(), sizeof(buf->client_name)); buf->args_size = args_size; memcpy(buf->args, serialized_args.buffer(), serialized_args.size()); diff --git a/world/console.cpp b/world/console.cpp index 6a4ffeff4..e25be5050 100644 --- a/world/console.cpp +++ b/world/console.cpp @@ -825,14 +825,15 @@ void ConsoleSignalCharByName( } connection->SendLine(StringFormat("Signal Sent to %s with ID %i", (char *) args[0].c_str(), atoi(args[1].c_str()))); - uint32 message_len = strlen((char *) args[0].c_str()) + 1; - auto pack = new ServerPacket( - ServerOP_CZSignalClientByName, - sizeof(CZClientSignalByName_Struct) + message_len - ); - CZClientSignalByName_Struct *CZSC = (CZClientSignalByName_Struct *) pack->pBuffer; - strn0cpy(CZSC->character_name, (char *) args[0].c_str(), 64); - CZSC->signal = atoi(args[1].c_str()); + uint32 message_len = strlen((char *) args[0].c_str()) + 1; + auto pack = new ServerPacket(ServerOP_CZSignal, sizeof(CZSignal_Struct) + message_len); + CZSignal_Struct* CZS = (CZSignal_Struct*) pack->pBuffer; + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + CZS->update_type = update_type; + CZS->update_identifier = update_identifier; + CZS->signal = atoi(args[1].c_str()); + strn0cpy(CZS->client_name, (char *) args[0].c_str(), 64); zoneserver_list.SendPacket(pack); safe_delete(pack); } diff --git a/world/shared_task_manager.cpp b/world/shared_task_manager.cpp index d28559f90..541f35712 100644 --- a/world/shared_task_manager.cpp +++ b/world/shared_task_manager.cpp @@ -1311,7 +1311,7 @@ void SharedTaskManager::SendMembersMessageID( for (const auto &member : shared_task->GetMembers()) { auto character = client_list.FindCLEByCharacterID(member.character_id); if (character && character->Server()) { - strn0cpy(buf->character_name, character->name(), sizeof(buf->character_name)); + strn0cpy(buf->client_name, character->name(), sizeof(buf->client_name)); character->Server()->SendPacket(pack.get()); } } diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index d6f4c1888..ee0c9e8da 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -1239,88 +1239,23 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { { QSLink.SendPacket(pack); break; - } - case ServerOP_CZCastSpellPlayer: - case ServerOP_CZCastSpellGroup: - case ServerOP_CZCastSpellRaid: - case ServerOP_CZCastSpellGuild: - case ServerOP_CZMarqueePlayer: - case ServerOP_CZMarqueeGroup: - case ServerOP_CZMarqueeRaid: - case ServerOP_CZMarqueeGuild: - case ServerOP_CZMessagePlayer: - case ServerOP_CZMessageGroup: - case ServerOP_CZMessageRaid: - case ServerOP_CZMessageGuild: - case ServerOP_CZMovePlayer: - case ServerOP_CZMoveGroup: - case ServerOP_CZMoveRaid: - case ServerOP_CZMoveGuild: - case ServerOP_CZMoveInstancePlayer: - case ServerOP_CZMoveInstanceGroup: - case ServerOP_CZMoveInstanceRaid: - case ServerOP_CZMoveInstanceGuild: - case ServerOP_CZRemoveSpellPlayer: - case ServerOP_CZRemoveSpellGroup: - case ServerOP_CZRemoveSpellRaid: - case ServerOP_CZRemoveSpellGuild: - case ServerOP_CZSetEntityVariableByClientName: - case ServerOP_CZSetEntityVariableByNPCTypeID: - case ServerOP_CZSetEntityVariableByGroupID: - case ServerOP_CZSetEntityVariableByRaidID: - case ServerOP_CZSetEntityVariableByGuildID: - case ServerOP_CZSignalNPC: - case ServerOP_CZSignalClient: - case ServerOP_CZSignalClientByName: - case ServerOP_CZSignalGroup: - case ServerOP_CZSignalRaid: - case ServerOP_CZSignalGuild: - case ServerOP_CZTaskActivityResetPlayer: - case ServerOP_CZTaskActivityResetGroup: - case ServerOP_CZTaskActivityResetRaid: - case ServerOP_CZTaskActivityResetGuild: - case ServerOP_CZTaskActivityUpdatePlayer: - case ServerOP_CZTaskActivityUpdateGroup: - case ServerOP_CZTaskActivityUpdateRaid: - case ServerOP_CZTaskActivityUpdateGuild: - case ServerOP_CZTaskAssignPlayer: - case ServerOP_CZTaskAssignGroup: - case ServerOP_CZTaskAssignRaid: - case ServerOP_CZTaskAssignGuild: - case ServerOP_CZTaskDisablePlayer: - case ServerOP_CZTaskDisableGroup: - case ServerOP_CZTaskDisableRaid: - case ServerOP_CZTaskDisableGuild: - case ServerOP_CZTaskEnablePlayer: - case ServerOP_CZTaskEnableGroup: - case ServerOP_CZTaskEnableRaid: - case ServerOP_CZTaskEnableGuild: - case ServerOP_CZTaskFailPlayer: - case ServerOP_CZTaskFailGroup: - case ServerOP_CZTaskFailRaid: - case ServerOP_CZTaskFailGuild: - case ServerOP_CZTaskRemovePlayer: - case ServerOP_CZTaskRemoveGroup: - case ServerOP_CZTaskRemoveRaid: - case ServerOP_CZTaskRemoveGuild: + } case ServerOP_CZLDoNUpdate: - case ServerOP_WWAssignTask: - case ServerOP_WWCastSpell: - case ServerOP_WWDisableTask: - case ServerOP_WWEnableTask: - case ServerOP_WWFailTask: + case ServerOP_CZMarquee: + case ServerOP_CZMessage: + case ServerOP_CZMove: + case ServerOP_CZSetEntityVariable: + case ServerOP_CZSignal: + case ServerOP_CZSpell: + case ServerOP_CZTaskUpdate: + case ServerOP_WWLDoNUpdate: case ServerOP_WWMarquee: case ServerOP_WWMessage: case ServerOP_WWMove: - case ServerOP_WWMoveInstance: - case ServerOP_WWRemoveSpell: - case ServerOP_WWRemoveTask: - case ServerOP_WWResetActivity: - case ServerOP_WWSetEntityVariableClient: - case ServerOP_WWSetEntityVariableNPC: - case ServerOP_WWSignalClient: - case ServerOP_WWSignalNPC: - case ServerOP_WWUpdateActivity: + case ServerOP_WWSetEntityVariable: + case ServerOP_WWSignal: + case ServerOP_WWSpell: + case ServerOP_WWTaskUpdate: case ServerOP_DepopAllPlayersCorpses: case ServerOP_DepopPlayerCorpse: case ServerOP_ReloadTitles: @@ -1362,7 +1297,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { case ServerOP_CZClientMessageString: { auto buf = reinterpret_cast(pack->pBuffer); - client_list.SendPacket(buf->character_name, pack); + client_list.SendPacket(buf->client_name, pack); break; } case ServerOP_ExpeditionLockout: diff --git a/zone/attack.cpp b/zone/attack.cpp index 16ee8e69e..a41f0911a 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2701,8 +2701,9 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b } } - if (other->IsNPC() && (other->IsPet() || other->CastToNPC()->GetSwarmOwner() > 0)) - TryTriggerOnValueAmount(false, false, false, true); + if (other->IsNPC() && (other->IsPet() || other->CastToNPC()->GetSwarmOwner() > 0)) { + TryTriggerOnCastRequirement(); + } if (IsClient() && !IsAIControlled()) return; @@ -3343,7 +3344,7 @@ int32 Mob::ReduceAllDamage(int32 damage) if (GetMana() >= mana_reduced) { damage -= mana_reduced; SetMana(GetMana() - mana_reduced); - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); } } @@ -3356,7 +3357,7 @@ int32 Mob::ReduceAllDamage(int32 damage) if (IsClient() && CastToClient()->GetEndurance() >= endurance_drain) { damage -= damage_reduced; CastToClient()->SetEndurance(CastToClient()->GetEndurance() - endurance_drain); - TryTriggerOnValueAmount(false, false, true); + TryTriggerOnCastRequirement(); } } @@ -3646,7 +3647,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const TryDeathSave(); } - TryTriggerOnValueAmount(true); + TryTriggerOnCastRequirement(); //fade mez if we are mezzed if (IsMezzed() && attacker) { diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 19ae9aac1..390917ff7 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1256,8 +1256,11 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) } case SE_MitigateDamageShield: { - if (base1 < 0) + + //AA that increase mitigation are set to negative. + if (base1 < 0) { base1 = base1 * (-1); + } newbon->DSMitigationOffHand += base1; break; @@ -2663,8 +2666,15 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne case SE_MitigateDamageShield: { - if (effect_value < 0) - effect_value = effect_value*-1; + /* + Bard songs have identical negative base value and positive max + The effect for the songs should increase mitigation. There are + spells that do decrease the mitigation with just negative base values. + To be consistent all values that increase mitigation will be set to positives + */ + if (max > 0 && effect_value < 0) { + effect_value = max; + } new_bonus->DSMitigationOffHand += effect_value; break; @@ -3198,7 +3208,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne case SE_TriggerOnReqTarget: case SE_TriggerOnReqCaster: - new_bonus->TriggerOnValueAmount = true; + new_bonus->TriggerOnCastRequirement = true; break; case SE_DivineAura: @@ -3661,6 +3671,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne new_bonus->ZoneSuspendMinion = effect_value; break; + case SE_CompleteHeal: + new_bonus->CompleteHealBuffBlocker = true; + break; + //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/client.cpp b/zone/client.cpp index 2ad737405..8d64cd019 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -9191,7 +9191,7 @@ void Client::SetDisplayMobInfoWindow(bool display_mob_info_window) bool Client::IsDevToolsEnabled() const { - return dev_tools_enabled && RuleB(World, EnableDevTools); + return dev_tools_enabled && GetGM() && RuleB(World, EnableDevTools); } void Client::SetDevToolsEnabled(bool in_dev_tools_enabled) @@ -9481,12 +9481,16 @@ void Client::SendCrossZoneMessage( } else if (!character_name.empty() && !message.empty()) { - uint32_t pack_size = sizeof(CZMessagePlayer_Struct); - auto pack = std::make_unique(ServerOP_CZMessagePlayer, pack_size); - auto buf = reinterpret_cast(pack->pBuffer); + uint32_t pack_size = sizeof(CZMessage_Struct); + auto pack = std::make_unique(ServerOP_CZMessage, pack_size); + auto buf = reinterpret_cast(pack->pBuffer); + uint8 update_type = CZUpdateType_Character; + int update_identifier = 0; + buf->update_type = update_type; + buf->update_identifier = update_identifier; buf->type = chat_type; - strn0cpy(buf->character_name, character_name.c_str(), sizeof(buf->character_name)); strn0cpy(buf->message, message.c_str(), sizeof(buf->message)); + strn0cpy(buf->client_name, character_name.c_str(), sizeof(buf->client_name)); worldserver.SendPacket(pack.get()); } @@ -9519,7 +9523,7 @@ void Client::SendCrossZoneMessageString( auto buf = reinterpret_cast(pack->pBuffer); buf->string_id = string_id; buf->chat_type = chat_type; - strn0cpy(buf->character_name, character_name.c_str(), sizeof(buf->character_name)); + strn0cpy(buf->client_name, character_name.c_str(), sizeof(buf->client_name)); buf->args_size = args_size; memcpy(buf->args, argument_buffer.buffer(), argument_buffer.size()); diff --git a/zone/client.h b/zone/client.h index 966d7976c..c53fbb21b 100644 --- a/zone/client.h +++ b/zone/client.h @@ -203,8 +203,10 @@ enum eInnateSkill { InnateDisabled = 255 }; -const std::string DIAWIND_RESPONSE_KEY = "diawind_npcresponse"; -const uint32 POPUPID_DIAWIND = 999; +const std::string DIAWIND_RESPONSE_ONE_KEY = "diawind_npc_response_one"; +const std::string DIAWIND_RESPONSE_TWO_KEY = "diawind_npc_response_two"; +const uint32 POPUPID_DIAWIND_ONE = 99999; +const uint32 POPUPID_DIAWIND_TWO = 100000; const uint32 POPUPID_UPDATE_SHOWSTATSWINDOW = 1000000; struct ClientReward diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 418544abc..a74f65180 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11155,9 +11155,18 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app) return; break; - case POPUPID_DIAWIND: - if (EntityVariableExists(DIAWIND_RESPONSE_KEY.c_str())) { - response = GetEntityVariable(DIAWIND_RESPONSE_KEY.c_str()); + case POPUPID_DIAWIND_ONE: + if (EntityVariableExists(DIAWIND_RESPONSE_ONE_KEY.c_str())) { + response = GetEntityVariable(DIAWIND_RESPONSE_ONE_KEY.c_str()); + if (!response.empty()) { + ChannelMessageReceived(8, 0, 100, response.c_str()); + } + } + break; + + case POPUPID_DIAWIND_TWO: + if (EntityVariableExists(DIAWIND_RESPONSE_TWO_KEY.c_str())) { + response = GetEntityVariable(DIAWIND_RESPONSE_TWO_KEY.c_str()); if (!response.empty()) { ChannelMessageReceived(8, 0, 100, response.c_str()); } @@ -12189,7 +12198,8 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) tr.name, tr.trivial, SUM(tre.componentcount), - tr.tradeskill + tr.tradeskill, + tr.must_learn FROM tradeskill_recipe AS tr LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id = tre.recipe_id @@ -12289,7 +12299,8 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) tr.name, tr.trivial, SUM(tre.componentcount), - tr.tradeskill + tr.tradeskill, + tr.must_learn FROM tradeskill_recipe AS tr LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id = tre.recipe_id diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 0fd418131..a2c34a007 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -183,6 +183,8 @@ bool Client::Process() { SetDynamicZoneMemberStatus(DynamicZoneMemberStatus::Offline); + parse->EventPlayer(EVENT_DISCONNECT, this, "", 0); + return false; //delete client } @@ -1864,7 +1866,7 @@ void Client::DoEnduranceUpkeep() { if(upkeep_sum != 0){ SetEndurance(GetEndurance() - upkeep_sum); - TryTriggerOnValueAmount(false, false, true); + TryTriggerOnCastRequirement(); } if (!has_effect) diff --git a/zone/command.cpp b/zone/command.cpp index 7fc61208b..ab18d63ac 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -758,8 +758,9 @@ void command_worldwide(Client *c, const Seperator *sep) if (sub_command == "cast") { if (sep->arg[2][0] && Seperator::IsNumber(sep->arg[2])) { + uint8 update_type = WWSpellUpdateType_Cast; int spell_id = atoi(sep->arg[2]); - quest_manager.WorldWideCastSpell(spell_id, 0, 0); + quest_manager.WorldWideSpell(update_type, spell_id); worldserver.SendEmoteMessage(0, 0, 15, fmt::format(" A GM has cast [{}] world-wide!", GetSpellName(spell_id)).c_str()); } else { @@ -1086,7 +1087,7 @@ void command_npcloot(Client *c, const Seperator *sep) if ((atoi(sep->arg[2]) < 34465 && atoi(sep->arg[2]) >= 0) && (atoi(sep->arg[3]) < 34465 && atoi(sep->arg[3]) >= 0) && (atoi(sep->arg[4]) < 34465 && atoi(sep->arg[4]) >= 0) && (atoi(sep->arg[5]) < 34465 && atoi(sep->arg[5]) >= 0)) { c->GetTarget()->CastToNPC()->AddCash(atoi(sep->arg[5]), atoi(sep->arg[4]), atoi(sep->arg[3]), atoi(sep->arg[2])); - c->Message(Chat::White, "Set %i Platinum, %i Gold, %i Silver, and %i Copper as %s's money.", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), c->GetTarget()->GetName()); + c->Message(Chat::White, "Set %i Platinum, %i Gold, %i Silver, and %i Copper as %s's money.", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), c->GetTarget()->GetName()); } else c->Message(Chat::White, "Error: #npcloot money: Values must be between 0-34465."); @@ -1544,7 +1545,7 @@ void command_delpetition(Client *c, const Seperator *sep) } c->Message(Chat::Red,"Attempting to delete petition number: %i", atoi(sep->argplus[1])); - std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", atoi(sep->argplus[1])); + std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", atoi(sep->argplus[1])); auto results = database.QueryDatabase(query); if (!results.Success()) return; @@ -2005,7 +2006,7 @@ void command_npccast(Client *c, const Seperator *sep) if (spelltar) c->GetTarget()->CastSpell(atoi(sep->arg[2]), spelltar->GetID()); else - c->Message(Chat::White, "Error: target ID %i not found", atoi(sep->arg[1])); + c->Message(Chat::White, "Error: target ID %i not found", atoi(sep->arg[1])); } else c->Message(Chat::White, "Usage: (needs NPC targeted) #npccast targetname/entityid spellid"); @@ -3591,7 +3592,7 @@ void command_npctypespawn(Client *c, const Seperator *sep) entity_list.AddNPC(npc); } else - c->Message(Chat::White, "NPC Type %i not found", atoi(sep->arg[1])); + c->Message(Chat::White, "NPC Type %i not found", atoi(sep->arg[1])); } else c->Message(Chat::White, "Usage: #npctypespawn npctypeid factionid"); @@ -5958,7 +5959,7 @@ void command_repop(Client *c, const Seperator *sep) return; } - c->Message(Chat::White, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg])); + c->Message(Chat::White, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg])); zone->Repop(atoi(sep->arg[timearg]) * 1000); zone->spawn2_timer.Trigger(); @@ -7561,7 +7562,7 @@ void command_face(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Face = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Face = %i", atoi(sep->arg[1])); } } @@ -7624,7 +7625,7 @@ void command_details(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Details = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Details = %i", atoi(sep->arg[1])); } } @@ -7655,7 +7656,7 @@ void command_heritage(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Heritage = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Heritage = %i", atoi(sep->arg[1])); } } @@ -7686,7 +7687,7 @@ void command_tattoo(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Tattoo = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Tattoo = %i", atoi(sep->arg[1])); } } @@ -7717,7 +7718,7 @@ void command_helm(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Helm = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Helm = %i", atoi(sep->arg[1])); } } @@ -7748,7 +7749,7 @@ void command_hair(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Hair = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Hair = %i", atoi(sep->arg[1])); } } @@ -7779,7 +7780,7 @@ void command_haircolor(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Hair Color = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Hair Color = %i", atoi(sep->arg[1])); } } @@ -7810,7 +7811,7 @@ void command_beard(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Beard = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Beard = %i", atoi(sep->arg[1])); } } @@ -7841,7 +7842,7 @@ void command_beardcolor(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(Chat::White,"Beard Color = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Beard Color = %i", atoi(sep->arg[1])); } } @@ -8323,7 +8324,7 @@ void command_givemoney(Client *c, const Seperator *sep) else { //TODO: update this to the client, otherwise the client doesn't show any weight change until you zone, move an item, etc c->GetTarget()->CastToClient()->AddMoneyToPP(atoi(sep->arg[4]), atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[1]), true); - c->Message(Chat::White, "Added %i Platinum, %i Gold, %i Silver, and %i Copper to %s's inventory.", atoi(sep->arg[1]), atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), c->GetTarget()->GetName()); + c->Message(Chat::White, "Added %i Platinum, %i Gold, %i Silver, and %i Copper to %s's inventory.", atoi(sep->arg[1]), atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), c->GetTarget()->GetName()); } } @@ -9080,709 +9081,865 @@ void command_npcedit(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "help") == 0) { c->Message(Chat::White, "Help File for #npcedit. Syntax for commands are:"); - c->Message(Chat::White, "#npcedit Name - Sets an NPC's name"); - c->Message(Chat::White, "#npcedit Lastname - Sets an NPC's lastname"); - c->Message(Chat::White, "#npcedit Level - Sets an NPC's level"); - c->Message(Chat::White, "#npcedit Maxlevel - Sets an NPC's maximum level"); - c->Message(Chat::White, "#npcedit Race - Sets an NPC's race"); - c->Message(Chat::White, "#npcedit Class - Sets an NPC's class"); - c->Message(Chat::White, "#npcedit Bodytype - Sets an NPC's bodytype"); - c->Message(Chat::White, "#npcedit HP - Sets an NPC's hitpoints"); - c->Message(Chat::White, "#npcedit Gender - Sets an NPC's gender"); - c->Message(Chat::White, "#npcedit Texture - Sets an NPC's texture"); - c->Message(Chat::White, "#npcedit Helmtexture - Sets an NPC's helmet texture"); - c->Message(Chat::White, "#npcedit Armtexture - Sets an NPC's arm texture"); - c->Message(Chat::White, "#npcedit Bracertexture - Sets an NPC's bracer texture"); - c->Message(Chat::White, "#npcedit Handtexture - Sets an NPC's hand texture"); - c->Message(Chat::White, "#npcedit Legtexture - Sets an NPC's leg texture"); - c->Message(Chat::White, "#npcedit Feettexture - Sets an NPC's feettexture"); - c->Message(Chat::White, "#npcedit Herosforgemodel - Sets an NPC's Hero's Forge Model"); - c->Message(Chat::White, "#npcedit Size - Sets an NPC's size"); - c->Message(Chat::White, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick"); - c->Message(Chat::White, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick"); - c->Message(Chat::White, "#npcedit Loottable - Sets the loottable ID for an NPC "); - c->Message(Chat::White, "#npcedit Merchantid - Sets the merchant ID for an NPC"); - c->Message(Chat::White, "#npcedit alt_currency_id - Sets the Alternate Currency ID for an alterative currency Merchant"); - c->Message(Chat::White, "#npcedit npc_spells_effects_id - Sets the NPC Spell Effects ID"); - c->Message(Chat::White, "#npcedit adventure_template_id - Sets the NPC's Adventure Template ID"); - c->Message(Chat::White, "#npcedit trap_template - Sets the NPC's Trap Template ID"); - c->Message(Chat::White, "#npcedit special_abilities - Sets the NPC's Special Abilities"); - c->Message(Chat::White, "#npcedit Spell - Sets the npc spells list ID for an NPC"); - c->Message(Chat::White, "#npcedit Faction - Sets the NPC's faction id"); - c->Message(Chat::White, "#npcedit Damage - Sets an NPC's damage"); - c->Message(Chat::White, "#npcedit Meleetype - Sets an NPC's melee types"); - c->Message(Chat::White, "#npcedit Rangedtype - Sets an NPC's ranged type"); - c->Message(Chat::White, "#npcedit Ammoidfile - Sets an NPC's ammo id file"); - c->Message(Chat::White, "#npcedit Aggroradius - Sets an NPC's aggro radius"); - c->Message(Chat::White, "#npcedit Assistradius - Sets an NPC's assist radius"); - c->Message(Chat::White, "#npcedit Social - Set to 1 if an NPC should assist others on its faction"); - c->Message(Chat::White, "#npcedit Runspeed - Sets an NPC's run speed"); - c->Message(Chat::White, "#npcedit Walkspeed - Sets an NPC's walk speed"); - c->Message(Chat::White, "#npcedit AGI - Sets an NPC's Agility"); - c->Message(Chat::White, "#npcedit CHA - Sets an NPC's Charisma"); - c->Message(Chat::White, "#npcedit DEX - Sets an NPC's Dexterity"); - c->Message(Chat::White, "#npcedit INT - Sets an NPC's Intelligence"); - c->Message(Chat::White, "#npcedit STA - Sets an NPC's Stamina"); - c->Message(Chat::White, "#npcedit STR - Sets an NPC's Strength"); - c->Message(Chat::White, "#npcedit WIS - Sets an NPC's Wisdom"); - c->Message(Chat::White, "#npcedit MR - Sets an NPC's Magic Resistance"); - c->Message(Chat::White, "#npcedit PR - Sets an NPC's Poison Resistance"); - c->Message(Chat::White, "#npcedit DR - Sets an NPC's Disease Resistance"); - c->Message(Chat::White, "#npcedit FR - Sets an NPC's Fire Resistance"); - c->Message(Chat::White, "#npcedit CR - Sets an NPC's Cold Resistance"); - c->Message(Chat::White, "#npcedit Corrup - Sets an NPC's Corruption Resistance"); - c->Message(Chat::White, "#npcedit PhR - Sets and NPC's Physical Resistance"); - c->Message(Chat::White, "#npcedit Seeinvis - Sets an NPC's ability to see invis"); - c->Message(Chat::White, "#npcedit Seeinvisundead - Sets an NPC's ability to see through invis vs. undead"); - c->Message(Chat::White, "#npcedit Seehide - Sets an NPC's ability to see through hide"); - c->Message(Chat::White, "#npcedit Seeimprovedhide - Sets an NPC's ability to see through improved hide"); - c->Message(Chat::White, "#npcedit AC - Sets an NPC's Armor Class"); - c->Message(Chat::White, "#npcedit ATK - Sets an NPC's Attack"); - c->Message(Chat::White, "#npcedit Accuracy - Sets an NPC's Accuracy"); - c->Message(Chat::White, "#npcedit Avoidance - Sets an NPC's Avoidance"); - c->Message(Chat::White, "#npcedit npcaggro - Sets an NPC's npc_aggro flag"); - c->Message(Chat::White, "#npcedit qglobal - Sets an NPC's quest global flag"); - c->Message(Chat::White, "#npcedit spawn_limit - Sets an NPC's spawn limit counter"); - c->Message(Chat::White, "#npcedit Attackspeed - Sets an NPC's attack speed modifier"); - c->Message(Chat::White, "#npcedit Attackdelay - Sets an NPC's attack delay"); - c->Message(Chat::White, "#npcedit Attackcount - Sets an NPC's attack count"); - c->Message(Chat::White, "#npcedit findable - Sets an NPC's findable flag"); - c->Message(Chat::White, "#npcedit trackable - Sets an NPC's trackable flag"); - c->Message(Chat::White, "#npcedit weapon - Sets an NPC's primary and secondary weapon model"); - c->Message(Chat::White, "#npcedit featuresave - Saves all current facial features to the database"); - c->Message(Chat::White, "#npcedit color - Sets an NPC's red, green, and blue armor tint"); - c->Message(Chat::White, "#npcedit armortint_id - Set an NPC's Armor tint ID"); - c->Message(Chat::White, "#npcedit setanimation - Set an NPC's animation on spawn (Stored in spawn2 table)"); - c->Message(Chat::White, "#npcedit scalerate - Set an NPC's scaling rate"); - c->Message(Chat::White, "#npcedit healscale - Set an NPC's heal scaling rate"); - c->Message(Chat::White, "#npcedit spellscale - Set an NPC's spell scaling rate"); - c->Message(Chat::White, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey"); - c->Message(Chat::White, "#npcedit version - Set an NPC's version"); - c->Message(Chat::White, "#npcedit slow_mitigation - Set an NPC's slow mitigation"); - c->Message(Chat::White, "#npcedit flymode - Set an NPC's flymode [0 = ground, 1 = flying, 2 = levitate, 3 = water, 4 = floating]"); - c->Message(Chat::White, "#npcedit raidtarget - Set an NPCs raid_target field"); - c->Message(Chat::White, "#npcedit rarespawn - Set an NPCs rare flag"); - c->Message(Chat::White, "#npcedit respawntime - Set an NPCs respawn timer in seconds"); - + c->Message(Chat::White, "#npcedit name - Sets an NPC's Name"); + c->Message(Chat::White, "#npcedit lastname - Sets an NPC's Lastname"); + c->Message(Chat::White, "#npcedit level - Sets an NPC's Level"); + c->Message(Chat::White, "#npcedit race - Sets an NPC's Race"); + c->Message(Chat::White, "#npcedit class - Sets an NPC's Class"); + c->Message(Chat::White, "#npcedit bodytype - Sets an NPC's Bodytype"); + c->Message(Chat::White, "#npcedit hp - Sets an NPC's Hitpoints"); + c->Message(Chat::White, "#npcedit mana - Sets an NPC's Mana"); + c->Message(Chat::White, "#npcedit gender - Sets an NPC's Gender"); + c->Message(Chat::White, "#npcedit texture - Sets an NPC's Texture"); + c->Message(Chat::White, "#npcedit helmtexture - Sets an NPC's Helmet Texture"); + c->Message(Chat::White, "#npcedit herosforgemodel - Sets an NPC's Hero's Forge Model"); + c->Message(Chat::White, "#npcedit size - Sets an NPC's Size"); + c->Message(Chat::White, "#npcedit hpregen - Sets an NPC's Hitpoints Regeneration Rate Per Tick"); + c->Message(Chat::White, "#npcedit manaregen - Sets an NPC's Mana Regeneration Rate Per Tick"); + c->Message(Chat::White, "#npcedit loottable - Sets an NPC's Loottable ID"); + c->Message(Chat::White, "#npcedit merchantid - Sets an NPC's Merchant ID"); + c->Message(Chat::White, "#npcedit alt_currency_id - Sets an NPC's Alternate Currency ID"); + c->Message(Chat::White, "#npcedit spell - Sets an NPC's Spells List ID"); + c->Message(Chat::White, "#npcedit npc_spells_effects_id - Sets an NPC's Spell Effects ID"); + c->Message(Chat::White, "#npcedit faction - Sets an NPC's Faction ID"); + c->Message(Chat::White, "#npcedit adventure_template_id - Sets an NPC's Adventure Template ID"); + c->Message(Chat::White, "#npcedit trap_template - Sets an NPC's Trap Template ID"); + c->Message(Chat::White, "#npcedit damage [minimum] [maximum] - Sets an NPC's Damage"); + c->Message(Chat::White, "#npcedit attackcount - Sets an NPC's Attack Count"); + c->Message(Chat::White, "#npcedit special_attacks - Sets an NPC's Special Attacks"); + c->Message(Chat::White, "#npcedit special_abilities - Sets an NPC's Special Abilities"); + c->Message(Chat::White, "#npcedit aggroradius - Sets an NPC's Aggro Radius"); + c->Message(Chat::White, "#npcedit assistradius - Sets an NPC's Assist Radius"); + c->Message(Chat::White, "#npcedit featuresave - Saves an NPC's current facial features to the database"); + c->Message(Chat::White, "#npcedit armortint_id - Sets an NPC's Armor Tint ID"); + c->Message(Chat::White, "#npcedit color [red] [green] [blue] - Sets an NPC's Red, Green, and Blue armor tint"); + c->Message(Chat::White, "#npcedit ammoidfile - Sets an NPC's Ammo ID File"); + c->Message(Chat::White, "#npcedit weapon [primary_model] [secondary_model] - Sets an NPC's Primary and Secondary Weapon Model"); + c->Message(Chat::White, "#npcedit meleetype [primary_type] [secondary_type] - Sets an NPC's Melee Types"); + c->Message(Chat::White, "#npcedit rangedtype - Sets an NPC's Ranged Type"); + c->Message(Chat::White, "#npcedit runspeed - Sets an NPC's Run Speed"); + c->Message(Chat::White, "#npcedit mr - Sets an NPC's Magic Resistance"); + c->Message(Chat::White, "#npcedit pr - Sets an NPC's Poison Resistance"); + c->Message(Chat::White, "#npcedit dr - Sets an NPC's Disease Resistance"); + c->Message(Chat::White, "#npcedit fr - Sets an NPC's Fire Resistance"); + c->Message(Chat::White, "#npcedit cr - Sets an NPC's Cold Resistance"); + c->Message(Chat::White, "#npcedit corrup - Sets an NPC's Corruption Resistance"); + c->Message(Chat::White, "#npcedit phr - Sets and NPC's Physical Resistance"); + c->Message(Chat::White, "#npcedit seeinvis - Sets an NPC's See Invisible Flag [0 = Cannot See Invisible, 1 = Can See Invisible]"); + c->Message(Chat::White, "#npcedit seeinvisundead - Sets an NPC's See Invisible vs. Undead Flag [0 = Cannot See Invisible vs. Undead, 1 = Can See Invisible vs. Undead]"); + c->Message(Chat::White, "#npcedit qglobal - Sets an NPC's Quest Global Flag [0 = Quest Globals Off, 1 = Quest Globals On]"); + c->Message(Chat::White, "#npcedit ac - Sets an NPC's Armor Class"); + c->Message(Chat::White, "#npcedit npcaggro - Sets an NPC's NPC Aggro Flag [0 = Aggro NPCs Off, 1 = Aggro NPCs On]"); + c->Message(Chat::White, "#npcedit spawn_limit - Sets an NPC's Spawn Limit Counter"); + c->Message(Chat::White, "#npcedit attackspeed - Sets an NPC's Attack Speed Modifier"); + c->Message(Chat::White, "#npcedit attackdelay - Sets an NPC's Attack Delay"); + c->Message(Chat::White, "#npcedit findable - Sets an NPC's Findable Flag [0 = Not Findable, 1 = Findable]"); + c->Message(Chat::White, "#npcedit str - Sets an NPC's Strength"); + c->Message(Chat::White, "#npcedit sta - Sets an NPC's Stamina"); + c->Message(Chat::White, "#npcedit dex - Sets an NPC's Dexterity"); + c->Message(Chat::White, "#npcedit agi - Sets an NPC's Agility"); + c->Message(Chat::White, "#npcedit int - Sets an NPC's Intelligence"); + c->Message(Chat::White, "#npcedit wis - Sets an NPC's Wisdom"); + c->Message(Chat::White, "#npcedit cha - Sets an NPC's Charisma"); + c->Message(Chat::White, "#npcedit seehide - Sets an NPC's See Hide Flag [0 = Cannot See Hide, 1 = Can See Hide]"); + c->Message(Chat::White, "#npcedit seeimprovedhide - Sets an NPC's See Improved Hide Flag [0 = Cannot See Improved Hide, 1 = Can See Improved Hide]"); + c->Message(Chat::White, "#npcedit trackable - Sets an NPC's Trackable Flag [0 = Not Trackable, 1 = Trackable]"); + c->Message(Chat::White, "#npcedit atk - Sets an NPC's Attack"); + c->Message(Chat::White, "#npcedit accuracy - Sets an NPC's Accuracy"); + c->Message(Chat::White, "#npcedit avoidance - Sets an NPC's Avoidance"); + c->Message(Chat::White, "#npcedit slow_mitigation - Sets an NPC's Slow Mitigation"); + c->Message(Chat::White, "#npcedit version - Sets an NPC's Version"); + c->Message(Chat::White, "#npcedit maxlevel - Sets an NPC's Maximum Level"); + c->Message(Chat::White, "#npcedit scalerate - Sets an NPC's Scaling Rate [50 = 50%, 100 = 100%, 200 = 200%]"); + c->Message(Chat::White, "#npcedit spellscale - Sets an NPC's Spell Scaling Rate [50 = 50%, 100 = 100%, 200 = 200%]"); + c->Message(Chat::White, "#npcedit healscale - Sets an NPC's Heal Scaling Rate [50 = 50%, 100 = 100%, 200 = 200%]"); + c->Message(Chat::White, "#npcedit no_target - Sets an NPC's No Target Hotkey Flag [0 = Not Targetable with Target Hotkey, 1 = Targetable with Target Hotkey]"); + c->Message(Chat::White, "#npcedit raidtarget - Sets an NPC's Raid Target Flag [0 = Not a Raid Target, 1 = Raid Target]"); + c->Message(Chat::White, "#npcedit armtexture - Sets an NPC's Arm Texture"); + c->Message(Chat::White, "#npcedit bracertexture - Sets an NPC's Bracer Texture"); + c->Message(Chat::White, "#npcedit handtexture - Sets an NPC's Hand Texture"); + c->Message(Chat::White, "#npcedit legtexture - Sets an NPC's Leg Texture"); + c->Message(Chat::White, "#npcedit feettexture - Sets an NPC's Feet Texture"); + c->Message(Chat::White, "#npcedit walkspeed - Sets an NPC's Walk Speed"); + c->Message(Chat::White, "#npcedit show_name - Sets an NPC's Show Name Flag [0 = Hidden, 1 = Shown]"); + c->Message(Chat::White, "#npcedit untargetable - Sets an NPC's Untargetable Flag [0 = Targetable, 1 = Untargetable]"); + c->Message(Chat::White, "#npcedit charm_ac - Sets an NPC's Armor Class while Charmed"); + c->Message(Chat::White, "#npcedit charm_min_dmg - Sets an NPC's Minimum Damage while Charmed"); + c->Message(Chat::White, "#npcedit charm_max_dmg - Sets an NPC's Max Damage while Charmed"); + c->Message(Chat::White, "#npcedit charm_attack_delay - Sets an NPC's Attack Delay while Charmed"); + c->Message(Chat::White, "#npcedit charm_accuracy_rating - Sets an NPC's Accuracy Rating while Charmed"); + c->Message(Chat::White, "#npcedit charm_avoidance_rating - Sets an NPC's Avoidance Rating while Charmed"); + c->Message(Chat::White, "#npcedit charm_atk - Sets an NPC's Attack while Charmed"); + c->Message(Chat::White, "#npcedit skip_global_loot - Sets an NPC's Skip Global Loot Flag [0 = Don't Skip, 1 = Skip"); + c->Message(Chat::White, "#npcedit rarespawn - Sets an NPC's Rare Spawn Flag [0 = Not a Rare Spawn, 1 = Rare Spawn]"); + c->Message(Chat::White, "#npcedit stuck_behavior - Sets an NPC's Stuck Behavior [0 = Run to Target, 1 = Warp to Target, 2 = Take No Action, 3 = Evade Combat]"); + c->Message(Chat::White, "#npcedit flymode - Sets an NPC's flymode [0 = Ground, 1 = Flying, 2 = Levitating, 3 = Water, 4 = Floating, 5 = Levitating While Running]"); + c->Message(Chat::White, "#npcedit always_aggro - Sets an NPC's Always Aggro Flag [0 = Does not Always Aggro, 1 = Always Aggro]"); + c->Message(Chat::White, "#npcedit exp_mod - Sets an NPC's Experience Modifier [50 = 50%, 100 = 100%, 200 = 200%]"); + c->Message(Chat::White, "#npcedit setanimation - Sets an NPC's Animation on Spawn (Stored in spawn2 table)"); + c->Message(Chat::White, "#npcedit respawntime - Sets an NPC's Respawn Timer in Seconds (Stored in spawn2 table)"); } - uint32 npcTypeID = c->GetTarget()->CastToNPC()->GetNPCTypeID(); + uint32 npc_id = c->GetTarget()->CastToNPC()->GetNPCTypeID(); if (strcasecmp(sep->arg[1], "name") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has the name %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET name = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has the name '{}'.", npc_id, sep->arg[2]).c_str()); + std::string query = fmt::format("UPDATE npc_types SET name = '{}' WHERE id = {}", sep->arg[2], npc_id); content_db.QueryDatabase(query); return; } if (strcasecmp(sep->arg[1], "lastname") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has the lastname %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET lastname = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "flymode") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has flymode [%s]", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET flymode = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "race") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has the race %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET race = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "class") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now class %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET class = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "bodytype") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has type %i bodytype.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET bodytype = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "hp") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Hitpoints.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET hp = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "gender") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now gender %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET gender = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "texture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses texture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET texture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "helmtexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses helmtexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET helmtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "armtexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses armtexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET armtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "bracertexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses bracertexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET bracertexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "handtexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses handtexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET handtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "legtexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses legtexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET legtexture = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "feettexture") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses feettexture %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET feettexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "herosforgemodel") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses herosforgemodel %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET herosforgemodel = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "size") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now size %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET size = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "hpregen") == 0) { - c->Message(Chat::Yellow,"NPCID %u now regens %i hitpoints per tick.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET hp_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "manaregen") == 0) { - c->Message(Chat::Yellow,"NPCID %u now regens %i mana per tick.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET mana_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "loottable") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now on loottable_id %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET loottable_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "merchantid") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now merchant_id %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET merchant_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'alt_currency_id' set to %s.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET alt_currency_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'npc_spells_effects_id' set to %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET npc_spells_effects_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "adventure_template_id") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'adventure_template_id' set to %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET adventure_template_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "trap_template") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'trap_template' set to %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET trap_template = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "special_abilities") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'special_abilities' set to %s.", npcTypeID, sep->argplus[2]); - std::string query = StringFormat("UPDATE npc_types SET special_abilities = '%s' WHERE id = %i", sep->argplus[2],npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "spell") == 0) { - c->Message(Chat::Yellow,"NPCID %u now uses spell list %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET npc_spells_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "faction") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now faction %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "damage") == 0) { - c->Message(Chat::Yellow,"NPCID %u now hits from %i to %i", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3])); - std::string query = StringFormat("UPDATE npc_types SET mindmg = %i, maxdmg = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "meleetype") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a primary melee type of %i and a secondary melee type of %i.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3])); - std::string query = StringFormat("UPDATE npc_types SET prim_melee_type = %i, sec_melee_type = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "rangedtype") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a ranged type of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET ranged_type = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "ammoidfile") == 0) { - c->Message(Chat::Yellow,"NPCID %u's ammo id file is now %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET ammoidfile = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "aggroradius") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has an aggro radius of %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET aggroradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "assistradius") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has an assist radius of %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET assistradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "social") == 0) { - c->Message(Chat::Yellow,"NPCID %u social status is now %i", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET social = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "runspeed") == 0) { - c->Message(Chat::Yellow,"NPCID %u now runs at %f", npcTypeID, atof(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET runspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "walkspeed") == 0) { - c->Message(Chat::Yellow,"NPCID %u now walks at %f", npcTypeID, atof(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET walkspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "AGI") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Agility.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET AGI = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "CHA") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Charisma.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET CHA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "DEX") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Dexterity.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET DEX = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "INT") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Intelligence.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET _INT = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "STA") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Stamina.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET STA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "STR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Strength.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET STR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "WIS") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET WIS = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "MR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET MR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "DR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Disease Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET DR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "CR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Cold Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET CR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "FR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Fire Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET FR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "PR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Poison Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET PR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "Corrup") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Corruption Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET corrup = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "PhR") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a Physical Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET PhR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "seeinvis") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has seeinvis set to %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET see_invis = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has seeinvisundead set to %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET see_invis_undead = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "seehide") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has seehide set to %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET see_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has seeimprovedhide set to %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET see_improved_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "AC") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Armor Class.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET ac = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "ATK") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Attack.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET atk = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "Accuracy") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Accuracy.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET accuracy = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "Avoidance") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i Avoidance.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET avoidance = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has the lastname '{}'.", npc_id, sep->arg[2]).c_str()); + std::string query = fmt::format("UPDATE npc_types SET lastname = '{}' WHERE id = {}", sep->arg[2], npc_id); content_db.QueryDatabase(query); return; } if (strcasecmp(sep->arg[1], "level") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now level %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET level = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now level {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET level = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "maxlevel") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a maximum level of %i.", npcTypeID, atoi(sep->argplus[2])); - std::string query = StringFormat("UPDATE npc_types SET maxlevel = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); + if (strcasecmp(sep->arg[1], "race") == 0) { + auto race_id = atoi(sep->arg[2]); + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now a {} ({}).", npc_id, GetRaceIDName(race_id), race_id).c_str()); + std::string query = fmt::format("UPDATE npc_types SET race = {} WHERE id = {}", race_id, npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "qglobal") == 0) { - c->Message(Chat::Yellow,"Quest globals have been %s for NPCID %u", atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", npcTypeID); - std::string query = StringFormat("UPDATE npc_types SET qglobal = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); + if (strcasecmp(sep->arg[1], "class") == 0) { + auto class_id = atoi(sep->arg[2]); + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now a {} ({}).", npc_id, GetClassIDName(class_id), class_id).c_str()); + std::string query = fmt::format("UPDATE npc_types SET class = {} WHERE id = {}", class_id, npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "npcaggro") == 0) { - c->Message(Chat::Yellow,"NPCID %u will now %s other NPCs with negative faction npc_value", npcTypeID, atoi(sep->arg[2]) == 0? "not aggro": "aggro"); - std::string query = StringFormat("UPDATE npc_types SET npc_aggro = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID); + if (strcasecmp(sep->arg[1], "bodytype") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Bodytype {} .", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET bodytype = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "spawn_limit") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a spawn limit of %i", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET spawn_limit = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); + if (strcasecmp(sep->arg[1], "hp") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Health.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET hp = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "Attackspeed") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has attack_speed set to %f", npcTypeID, atof(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET attack_speed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID); + if (strcasecmp(sep->arg[1], "mana") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Mana.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET mana = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "Attackdelay") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has attack_delay set to %i", npcTypeID,atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET attack_delay = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); + if (strcasecmp(sep->arg[1], "gender") == 0) { + auto gender_id = atoi(sep->arg[2]); + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now a {} ({}).", npc_id, gender_id, GetGenderName(gender_id)).c_str()); + std::string query = fmt::format("UPDATE npc_types SET gender = {} WHERE id = {}", gender_id, npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "Attackcount") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has attack_count set to %i", npcTypeID,atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET attack_count = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID); + if (strcasecmp(sep->arg[1], "texture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET texture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "findable") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not findable": "findable"); - std::string query = StringFormat("UPDATE npc_types SET findable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID); + if (strcasecmp(sep->arg[1], "helmtexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Helmet Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET helmtexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "trackable") == 0) { - c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not trackable": "trackable"); - std::string query = StringFormat("UPDATE npc_types SET trackable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID); + if (strcasecmp(sep->arg[1], "herosforgemodel") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Hero's Forge Model {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET herosforgemodel = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } - if (strcasecmp(sep->arg[1], "weapon") == 0) { - c->Message(Chat::Yellow,"NPCID %u will have item graphic %i set to his primary and item graphic %i set to his secondary on repop.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3])); - std::string query = StringFormat("UPDATE npc_types SET d_melee_texture1 = %i, d_melee_texture2 = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID); + if (strcasecmp(sep->arg[1], "size") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now Size {:.2f}.", npc_id, atof(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET size = {:.2f} WHERE id = {}", atof(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "hpregen") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now regenerates {} Health per Tick.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET hp_regen_rate = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "manaregen") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now regenerates {} Mana per Tick.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET mana_regen_rate = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "loottable") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using loottable ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET loottable_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "merchantid") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using merchant ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET merchant_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Alternate Currency ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET alt_currency_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "spell") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Spell List ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET npc_spells_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using NPC Spells Effects ID {}.", npc_id, sep->arg[2]).c_str()); + std::string query = fmt::format("UPDATE npc_types SET npc_spells_effects_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "faction") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Faction ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET npc_faction_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "adventure_template_id") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Adventure Template ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET adventure_template_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "trap_template") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Trap Template ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET trap_template = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "damage") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now hits from {} to {} damage.", npc_id, atoi(sep->arg[2]), atoi(sep->arg[3])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET mindmg = {}, maxdmg = {} WHERE id = {}", atoi(sep->arg[2]), atoi(sep->arg[3]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "attackcount") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Attack Count of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET attack_count = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "special_attacks") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using the following Special Attacks '{}'.", npc_id, sep->arg[2]).c_str()); + std::string query = fmt::format("UPDATE npc_types SET npcspecialattks = '{}' WHERE id = {}", sep->arg[2], npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "special_abilities") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using the following Special Abilities '{}'.", npc_id, sep->arg[2]).c_str()); + std::string query = fmt::format("UPDATE npc_types SET special_abilities = '{}' WHERE id = {}", sep->arg[2], npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "aggroradius") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Aggro Radius of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET aggroradius = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "assistradius") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Assist Radius of {}", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET assistradius = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } if (strcasecmp(sep->arg[1], "featuresave") == 0) { - c->Message(Chat::Yellow,"NPCID %u saved with all current facial feature settings", npcTypeID); - Mob* target = c->GetTarget(); - std::string query = StringFormat("UPDATE npc_types " - "SET luclin_haircolor = %i, luclin_beardcolor = %i, " - "luclin_hairstyle = %i, luclin_beard = %i, " - "face = %i, drakkin_heritage = %i, " - "drakkin_tattoo = %i, drakkin_details = %i " - "WHERE id = %i", - target->GetHairColor(), target->GetBeardColor(), - target->GetHairStyle(), target->GetBeard(), - target->GetLuclinFace(), target->GetDrakkinHeritage(), - target->GetDrakkinTattoo(), target->GetDrakkinDetails(), - npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "color") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - std::string query = StringFormat("UPDATE npc_types SET armortint_red = %i, armortint_green = %i, armortint_blue = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npcTypeID); + c->Message(Chat::Yellow, fmt::format("NPC ID {} saved with all current facial feature settings.", npc_id).c_str()); + Mob* target = c->GetTarget(); + std::string query = fmt::format( + "UPDATE npc_types " + "SET luclin_haircolor = {}, luclin_beardcolor = {}, " + "luclin_hairstyle = {}, luclin_beard = {}, " + "face = {}, drakkin_heritage = {}, " + "drakkin_tattoo = {}, drakkin_details = {} " + "WHERE id = {}", + target->GetHairColor(), target->GetBeardColor(), + target->GetHairStyle(), target->GetBeard(), + target->GetLuclinFace(), target->GetDrakkinHeritage(), + target->GetDrakkinTattoo(), target->GetDrakkinDetails(), + npc_id + ); content_db.QueryDatabase(query); return; } if (strcasecmp(sep->arg[1], "armortint_id") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has field 'armortint_id' set to %s", npcTypeID, sep->arg[2]); - std::string query = StringFormat("UPDATE npc_types SET armortint_id = '%s' WHERE id = %i", sep->argplus[2], npcTypeID); + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Armor Tint ID {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET armortint_id = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "color") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Red, {} Green, and {} Blue tinting on their armor.", npc_id, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET armortint_red = {}, armortint_green = {}, armortint_blue = {} WHERE id = {}", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "ammoidfile") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Ammo ID File {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET ammo_idfile = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "weapon") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will have Model {} set to their Primary and Model {} set to their Secondary on repop.", npc_id, atoi(sep->arg[2]), atoi(sep->arg[3])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET d_melee_texture1 = {}, d_melee_texture2 = {} WHERE id = {}", atoi(sep->arg[2]), atoi(sep->arg[3]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "meleetype") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Primary Melee Type of {} and a Secondary Melee Type of {}.", npc_id, atoi(sep->arg[2]), atoi(sep->arg[3])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET prim_melee_type = {}, sec_melee_type = {} WHERE id = {}", atoi(sep->arg[2]), atoi(sep->arg[3]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "rangedtype") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Ranged Type of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET ranged_type = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "runspeed") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now runs at {:.2f}.", npc_id, atof(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET runspeed = {:.2f} WHERE id = {}", atof(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "mr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Magic Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET MR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "pr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Poison Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET PR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "dr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Disease Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET DR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "fr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Fire Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET FR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "cr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Cold Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET CR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "corrup") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Corruption Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET corrup = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "phr") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Physical Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET PhR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "seeinvis") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} can {} See Invisible.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET see_invis = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} can {} See Invisible vs. Undead.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET see_invis_undead = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "qglobal") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} can {} use Quest Globals.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET qglobal = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "ac") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Armor Class.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET ac = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "npcaggro") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will {} aggro other NPCs that have a hostile faction.", npc_id, (atoi(sep->arg[2]) == 1 ? "now": "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET npc_aggro = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "spawn_limit") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Spawn Limit of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET spawn_limit = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "attackspeed") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Attack Speed of {:.2f}.", npc_id, atof(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET attack_speed = {:.2f} WHERE id = {}", atof(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "attackdelay") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Attack Delay of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET attack_delay = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "findable") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is {} Findable.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET findable = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "str") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Strength.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET STR = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "sta") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Stamina.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET STA = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "agi") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Agility.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET AGI = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "dex") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Dexterity.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET DEX = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "int") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Intelligence.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET _INT = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "wis") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Magic Resistance of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET WIS = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "cha") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Charisma.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET CHA = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "seehide") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} can {} See Hide.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET see_hide = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} can {} See Improved Hide.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET see_improved_hide = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "trackable") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is {} Trackable.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET trackable = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "atk") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Attack.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET atk = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "accuracy") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Accuracy.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET accuracy = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "avoidance") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Avoidance.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET avoidance = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "slow_mitigation") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Slow Mitigation.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET slow_mitigation = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "version") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Version {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET version = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "maxlevel") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Maximum Level of {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET maxlevel = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "scalerate") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Scaling Rate of {}%%.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET scalerate = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "spellscale") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Spell Scaling Rate of {}%%.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET spellscale = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "healscale") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Heal Scaling Rate of {}%%.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET healscale = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "no_target") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is {} Targetable with Target Hotkey.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET no_target_hotkey = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "raidtarget") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is {} designated as a Raid Target.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET raid_target = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "armtexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Arm Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET armtexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "bracertexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Bracer Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET bracertexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "handtexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Hand Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET handtexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "legtexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Leg Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET legtexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "feettexture") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Feet Texture {}.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET feettexture = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "walkspeed") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now walks at {:.2f}.", npc_id, atof(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET walkspeed = {:.2f} WHERE id = {}", atof(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "show_name") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will {} show their name.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET show_name = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "untargetable") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will {} be untargetable.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET untargetable = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_ac") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Armor Class while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_ac = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_min_dmg") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now does {} Minimum Damage while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_min_dmg = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_max_dmg") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now does {} Maximum Damage while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_max_dmg = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_attack_delay") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Attack Delay while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_attack_delay = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_accuracy_rating") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Accuracy Rating while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_accuracy_rating = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_avoidance_rating") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Avoidance Rating while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_avoidance_rating = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "charm_atk") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has {} Attack while Charmed.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET charm_atk = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "skip_global_loot") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will {} skip Global Loot.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET skip_global_loot = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "rarespawn") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} is {} designated as a Rare Spawn.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET rare_spawn = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "stuck_behavior") == 0) { + auto behavior_id = atoi(sep->arg[2]); + std::string behavior_name = "Unknown"; + if (behavior_id == MobStuckBehavior::RunToTarget) { + behavior_name = "Run To Target"; + } else if (behavior_id == MobStuckBehavior::WarpToTarget) { + behavior_name = "Warp To Target"; + } else if (behavior_id == MobStuckBehavior::TakeNoAction) { + behavior_name = "Take No Action"; + } else if (behavior_id == MobStuckBehavior::EvadeCombat) { + behavior_name = "Evade Combat"; + } + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Stuck Behavior {} ({}).", npc_id, behavior_name, behavior_id).c_str()); + std::string query = fmt::format("UPDATE npc_types SET stuck_behavior = {} WHERE id = {}", behavior_id, npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "flymode") == 0) { + auto flymode_id = atoi(sep->arg[2]); + std::string flymode_name = "Unknown"; + if (flymode_id == GravityBehavior::Ground) { + flymode_name = "Ground"; + } else if (flymode_id == GravityBehavior::Flying) { + flymode_name = "Flying"; + } else if (flymode_id == GravityBehavior::Levitating) { + flymode_name = "Levitating"; + } else if (flymode_id == GravityBehavior::Water) { + flymode_name = "Water"; + } else if (flymode_id == GravityBehavior::Floating) { + flymode_name = "Floating"; + } else if (flymode_id == GravityBehavior::LevitateWhileRunning) { + flymode_name = "Levitating While Running"; + } + c->Message(Chat::Yellow, fmt::format("NPC ID {} is now using Fly Mode {} ({}).", npc_id, flymode_name, flymode_id).c_str()); + std::string query = fmt::format("UPDATE npc_types SET flymode = {} WHERE id = {}", flymode_id, npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "always_aggro") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} will {} Always Aggro.", npc_id, (atoi(sep->arg[2]) == 1 ? "now" : "no longer")).c_str()); + std::string query = fmt::format("UPDATE npc_types SET always_aggro = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); + content_db.QueryDatabase(query); + return; + } + + if (strcasecmp(sep->arg[1], "exp_mod") == 0) { + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has an Experience Modifier of {}%%.", npc_id, atoi(sep->arg[2])).c_str()); + std::string query = fmt::format("UPDATE npc_types SET exp_mod = {} WHERE id = {}", atoi(sep->arg[2]), npc_id); content_db.QueryDatabase(query); return; } if (strcasecmp(sep->arg[1], "setanimation") == 0) { int animation = 0; + std::string animation_name = "Unknown"; if(sep->arg[2] && atoi(sep->arg[2]) <= 4) { - if((strcasecmp(sep->arg[2], "stand" ) == 0) || atoi(sep->arg[2]) == 0) - animation = 0; //Stand - if((strcasecmp(sep->arg[2], "sit" ) == 0) || atoi(sep->arg[2]) == 1) - animation = 1; //Sit - if((strcasecmp(sep->arg[2], "crouch" ) == 0) || atoi(sep->arg[2]) == 2) - animation = 2; //Crouch - if((strcasecmp(sep->arg[2], "dead" ) == 0) || atoi(sep->arg[2]) == 3) - animation = 3; //Dead - if((strcasecmp(sep->arg[2], "loot" ) == 0) || atoi(sep->arg[2]) == 4) - animation = 4; //Looting Animation + if(strcasecmp(sep->arg[2], "stand") == 0 || atoi(sep->arg[2]) == 0) { // Stand + animation = 0; + animation_name = "Standing"; + } else if(strcasecmp(sep->arg[2], "sit") == 0 || atoi(sep->arg[2]) == 1) { // Sit + animation = 1; + animation_name = "Sitting"; + } else if(strcasecmp(sep->arg[2], "crouch") == 0 || atoi(sep->arg[2]) == 2) { // Crouch + animation = 2; + animation_name = "Crouching"; + } else if(strcasecmp(sep->arg[2], "dead") == 0 || atoi(sep->arg[2]) == 3) { // Dead + animation = 3; + animation_name = "Dead"; + } else if(strcasecmp(sep->arg[2], "loot") == 0 || atoi(sep->arg[2]) == 4) { // Looting Animation + animation = 4; + animation_name = "Looting"; + } } else { - c->Message(Chat::White, "You must specifiy an animation stand, sit, crouch, dead, loot (0-4)"); + c->Message(Chat::White, "You must specify an Animation (0 = Stand, 1 = Sit, 2 = Crouch, 3 = Dead, 4 = Loot)"); c->Message(Chat::White, "Example: #npcedit setanimation sit"); c->Message(Chat::White, "Example: #npcedit setanimation 0"); return; } - c->Message(Chat::Yellow,"NPCID %u now has the animation set to %i on spawn with spawngroup %i", npcTypeID, animation, - c->GetTarget()->CastToNPC()->GetSpawnGroupId() ); - std::string query = StringFormat("UPDATE spawn2 SET animation = %i " "WHERE spawngroupID = %i", animation, - c->GetTarget()->CastToNPC()->GetSpawnGroupId()); + c->Message( + Chat::Yellow, + fmt::format( + "NPC ID {} now has their Spawn Animation set to {} ({}) on Spawn Group ID {}.", + npc_id, + animation_name, + animation, + c->GetTarget()->CastToNPC()->GetSpawnGroupId() + ).c_str() + ); + std::string query = fmt::format( + "UPDATE spawn2 SET animation = {} WHERE spawngroupID = {}", + animation, + c->GetTarget()->CastToNPC()->GetSpawnGroupId() + ); content_db.QueryDatabase(query); c->GetTarget()->SetAppearance(EmuAppearance(animation)); return; } - if (strcasecmp(sep->arg[1], "scalerate") == 0) { - c->Message(Chat::Yellow,"NPCID %u now has a scaling rate of %i.", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET scalerate = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "healscale") == 0) { - c->Message(Chat::Yellow, "NPCID %u now has a heal scaling rate of %i.", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET healscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "spellscale") == 0) { - c->Message(Chat::Yellow, "NPCID %u now has a spell scaling rate of %i.", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET spellscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "no_target") == 0) { - c->Message(Chat::Yellow, "NPCID %u is now %s.", npcTypeID, atoi(sep->arg[2]) == 0? "targetable": "untargetable"); - std::string query = StringFormat("UPDATE npc_types SET no_target_hotkey = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "version") == 0) { - c->Message(Chat::Yellow, "NPCID %u is now version %i.", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET version = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "slow_mitigation") == 0) { - c->Message(Chat::Yellow, "NPCID %u's slow mitigation limit is now %i.", npcTypeID, atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE npc_types SET slow_mitigation = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - - if (strcasecmp(sep->arg[1], "raidtarget") == 0) { - if (sep->arg[2][0] && sep->IsNumber(sep->arg[2]) && atoi(sep->arg[2]) >= 0) { - c->Message(Chat::Yellow, "NPCID %u is %s as a raid target.", npcTypeID, atoi(sep->arg[2]) == 0 ? "no longer designated" : "now designated"); - std::string query = StringFormat("UPDATE npc_types SET raid_target = %i WHERE id = %i", atoi(sep->arg[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - } - - if (strcasecmp(sep->arg[1], "rarespawn") == 0) { - if (sep->arg[2][0] && sep->IsNumber(sep->arg[2]) && atoi(sep->arg[2]) >= 0) { - c->Message(Chat::Yellow, "NPCID %u is %s as a rare spawn.", npcTypeID, atoi(sep->arg[2]) == 0 ? "no longer designated" : "now designated"); - std::string query = StringFormat("UPDATE npc_types SET rare_spawn = %i WHERE id = %i", atoi(sep->arg[2]), npcTypeID); - content_db.QueryDatabase(query); - return; - } - } - if (strcasecmp(sep->arg[1], "respawntime") == 0) { if (sep->arg[2][0] && sep->IsNumber(sep->arg[2]) && atoi(sep->arg[2]) > 0) { - c->Message(Chat::Yellow, "NPCID %u (spawngroup %i) respawn time set to %i.", npcTypeID, c->GetTarget()->CastToNPC()->GetSpawnGroupId(), atoi(sep->arg[2])); - std::string query = StringFormat("UPDATE spawn2 SET respawntime = %i WHERE spawngroupID = %i AND version = %i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetSpawnGroupId(), zone->GetInstanceVersion()); + c->Message(Chat::Yellow, fmt::format("NPC ID {} now has a Respawn Timer of {} Seconds on Spawn Group ID {}.", npc_id, atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetSpawnGroupId()).c_str()); + std::string query = fmt::format("UPDATE spawn2 SET respawntime = {} WHERE spawngroupID = {} AND version = {}", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetSpawnGroupId(), zone->GetInstanceVersion()); content_db.QueryDatabase(query); return; } @@ -11014,7 +11171,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) return; } - c->Message(Chat::White, "NPC %i added to group %i with %i chance!", atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[4]) ); + c->Message(Chat::White, "NPC %i added to group %i with %i chance!", atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[4]) ); return; } @@ -11051,7 +11208,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) std::string query = StringFormat("UPDATE spawngroup " "SET dist = '0', max_x = '0', min_x = '0', " "max_y = '0', min_y = '0', delay = '0' " - "WHERE id = '%i' ", atoi(sep->arg[2])); + "WHERE id = '%i' ", atoi(sep->arg[2])); auto results = content_db.QueryDatabase(query); if (!results.Success()) { c->Message(Chat::White, "Invalid Arguments -- MySQL gave the following error:"); @@ -11066,7 +11223,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "addgroupspawn") == 0 && atoi(sep->arg[2])!=0) { content_db.NPCSpawnDB(5, zone->GetShortName(), zone->GetInstanceVersion(), c, 0, atoi(sep->arg[2])); - c->Message(Chat::White, "Mob of group %i added successfully!", atoi(sep->arg[2])); + c->Message(Chat::White, "Mob of group %i added successfully!", atoi(sep->arg[2])); return; } @@ -11198,7 +11355,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "testload") == 0 && atoi(sep->arg[2])!=0) { content_db.LoadSpawnGroupsByID(atoi(sep->arg[2]),&zone->spawn_group_list); - c->Message(Chat::White, "Group %i loaded successfully!", atoi(sep->arg[2])); + c->Message(Chat::White, "Group %i loaded successfully!", atoi(sep->arg[2])); return; } diff --git a/zone/common.h b/zone/common.h index 1f478c750..4c5bfa4df 100644 --- a/zone/common.h +++ b/zone/common.h @@ -554,6 +554,7 @@ struct StatBonuses { int32 ItemEnduranceRegenCap; // modify endurance regen cap int32 WeaponStance[WEAPON_STANCE_TYPE_MAX +1];// base = trigger spell id, base2 = 0 is 2h, 1 is shield, 2 is dual wield, [0]spid 2h, [1]spid shield, [2]spid DW bool ZoneSuspendMinion; // base 1 allows suspended minions to zone + bool CompleteHealBuffBlocker; // Use in SPA 101 to prevent recast of complete heal from this effect till blocker buff is removed. // AAs uint16 SecondaryForte; // allow a second skill to be specialized with a cap of this value. @@ -602,7 +603,7 @@ struct StatBonuses { int32 FinishingBlow[2]; // Chance to do a finishing blow for specified damage amount. uint32 FinishingBlowLvl[2]; // Sets max level an NPC can be affected by FB. (base1 = lv, base2= ???) int32 ShieldEquipDmgMod; // Increases weapon's base damage by base1 % when shield is equipped (indirectly increasing hate) - bool TriggerOnValueAmount; // Triggers off various different conditions, bool to check if client has effect. + bool TriggerOnCastRequirement; // Triggers off various different conditions defined as emum SpellRestrictions int8 StunBashChance; // chance to stun with bash. int8 IncreaseChanceMemwipe; // increases chance to memory wipe int8 CriticalMend; // chance critical monk mend diff --git a/zone/dialogue_window.cpp b/zone/dialogue_window.cpp index 99c8944da..941bcbc82 100644 --- a/zone/dialogue_window.cpp +++ b/zone/dialogue_window.cpp @@ -11,7 +11,8 @@ void DialogueWindow::Render(Client *c, std::string markdown) } // zero this out - c->SetEntityVariable(DIAWIND_RESPONSE_KEY.c_str(), ""); + c->SetEntityVariable(DIAWIND_RESPONSE_ONE_KEY.c_str(), ""); + c->SetEntityVariable(DIAWIND_RESPONSE_TWO_KEY.c_str(), ""); // simple find and replace for the markdown find_replace(output, "~", ""); @@ -32,10 +33,10 @@ void DialogueWindow::Render(Client *c, std::string markdown) // mysterious voice bool render_mysterious_voice = false; - if (markdown.find("mysterious") != std::string::npos) { + if (markdown.find("{mysterious}") != std::string::npos) { render_mysterious_voice = true; LogDiaWind("Client [{}] Rendering mysterious voice", c->GetCleanName()); - find_replace(output, "mysterious", ""); + find_replace(output, "{mysterious}", ""); } // noquotes @@ -98,10 +99,10 @@ void DialogueWindow::Render(Client *c, std::string markdown) } } - uint32 popup_id = POPUPID_DIAWIND; - uint32 negative_id = 0; - char *button_name_0 = nullptr; - char *button_name_1 = nullptr; + uint32 popup_id = POPUPID_DIAWIND_ONE; + uint32 negative_id = POPUPID_DIAWIND_TWO; + std::string button_one_name; + std::string button_two_name; uint32 sound_controls = 0; // window type @@ -171,6 +172,96 @@ void DialogueWindow::Render(Client *c, std::string markdown) } } + // secondresponseid + std::string secondresponseid; + if (markdown.find("secondresponseid") != std::string::npos) { + LogDiaWind("Client [{}] Rendering secondresponseid option", c->GetCleanName()); + + auto first_split = split_string(output, "secondresponseid:"); + if (!first_split.empty()) { + auto second_split = split_string(first_split[1], " "); + if (!second_split.empty()) { + secondresponseid = second_split[0]; + LogDiaWindDetail("Client [{}] Rendering secondresponseid option secondresponseid [{}]", c->GetCleanName(), secondresponseid); + } + + if (first_split[1].length() == 1) { + secondresponseid = first_split[1]; + LogDiaWindDetail( + "Client [{}] Rendering secondresponseid (end) option secondresponseid [{}]", + c->GetCleanName(), + secondresponseid + ); + } + + find_replace(output, fmt::format("secondresponseid:{}", secondresponseid), ""); + + if (!secondresponseid.empty()) { + negative_id = (StringIsNumber(secondresponseid) ? std::atoi(secondresponseid.c_str()) : 0); + } + } + } + + // Buttons Text + std::string button_one; + std::string button_two; + if ( + markdown.find("button_one") != std::string::npos && + markdown.find("button_two") != std::string::npos + ) { + LogDiaWind("Client [{}] Rendering button_one option.", c->GetCleanName()); + + auto one_first_split = split_string(output, "button_one:"); + if (!one_first_split.empty()) { + auto one_second_split = split_string(one_first_split[1], " "); + if (!one_second_split.empty()) { + button_one = one_second_split[0]; + LogDiaWindDetail("Client [{}] Rendering button_one option button_one [{}]", c->GetCleanName(), button_one); + } + + if (one_first_split[1].length() == 1) { + button_one = one_first_split[1]; + LogDiaWindDetail( + "Client [{}] Rendering button_one (end) option button_one [{}]", + c->GetCleanName(), + button_one + ); + } + + find_replace(output, fmt::format("button_one:{}", button_one), ""); + + if (!button_one.empty()) { + button_one_name = button_one.c_str(); + } + } + + LogDiaWind("Client [{}] Rendering button_two option.", c->GetCleanName()); + + auto two_first_split = split_string(output, "button_two:"); + if (!two_first_split.empty()) { + auto two_second_split = split_string(two_first_split[1], " "); + if (!two_second_split.empty()) { + button_two = two_second_split[0]; + LogDiaWindDetail("Client [{}] Rendering button_two option button_two [{}]", c->GetCleanName(), button_two); + } + + if (two_first_split[1].length() == 1) { + button_two = two_first_split[1]; + LogDiaWindDetail( + "Client [{}] Rendering button_two (end) option button_two [{}]", + c->GetCleanName(), + button_two + ); + } + + find_replace(output, fmt::format("button_two:{}", button_two), ""); + + if (!button_two.empty()) { + button_two_name = button_two.c_str(); + } + } + } + // bracket responses std::vector responses; std::vector bracket_responses; @@ -209,13 +300,25 @@ void DialogueWindow::Render(Client *c, std::string markdown) } } + // Placed here to allow silent message or other message to override default for custom values. + if (!button_one_name.empty() && !button_two_name.empty()) { + c->SetEntityVariable( + DIAWIND_RESPONSE_ONE_KEY.c_str(), + button_one_name.c_str() + ); + c->SetEntityVariable( + DIAWIND_RESPONSE_TWO_KEY.c_str(), + button_two_name.c_str() + ); + } + // handle silent prompts from the [> silent syntax std::string silent_message; if (responses.empty() && markdown.find('[') != std::string::npos && markdown.find('>') != std::string::npos) { silent_message = get_between(output, "[", ">"); // temporary and used during the response - c->SetEntityVariable(DIAWIND_RESPONSE_KEY.c_str(), silent_message.c_str()); + c->SetEntityVariable(DIAWIND_RESPONSE_ONE_KEY.c_str(), silent_message.c_str()); // pop the silent message off find_replace(output, fmt::format("[{}>", silent_message), ""); @@ -225,7 +328,7 @@ void DialogueWindow::Render(Client *c, std::string markdown) silent_message = responses[0]; // temporary and used during the response - c->SetEntityVariable(DIAWIND_RESPONSE_KEY.c_str(), silent_message.c_str()); + c->SetEntityVariable(DIAWIND_RESPONSE_ONE_KEY.c_str(), silent_message.c_str()); // pop the silent message off find_replace(output, fmt::format("[{}]", silent_message), ""); @@ -282,6 +385,17 @@ void DialogueWindow::Render(Client *c, std::string markdown) ); } + if (!button_one_name.empty() && !button_two_name.empty()) { + click_response = fmt::format( + "Click [{}] to respond with [{}]...
" + "Click [{}] to respond with [{}]...
", + button_one_name, + button_one_name, + button_two_name, + button_two_name + ); + } + // post processing of color markdowns // {spring_green_1} = if (markdown.find('{') != std::string::npos && markdown.find('}') != std::string::npos) { @@ -325,8 +439,8 @@ void DialogueWindow::Render(Client *c, std::string markdown) negative_id, window_type, window_expire_seconds, - button_name_0, - button_name_1, + button_one_name.c_str(), + button_two_name.c_str(), sound_controls ); diff --git a/zone/embparser.cpp b/zone/embparser.cpp index 535e3c356..f4ea70356 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -122,6 +122,7 @@ const char *QuestEventSubroutines[_LargestEventID] = { "EVENT_BOT_COMMAND", "EVENT_WARP", "EVENT_TEST_BUFF", + "EVENT_COMBINE", "EVENT_CONSIDER", "EVENT_CONSIDER_CORPSE" }; @@ -1657,6 +1658,11 @@ void PerlembParser::ExportEventVariables( break; } + case EVENT_COMBINE: { + ExportVar(package_name.c_str(), "container_slot", std::stoi(data)); + break; + } + default: { break; } diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index a8c14d669..6796fc0a6 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3861,1363 +3861,6 @@ XS(XS__GetTimeSeconds) { XSRETURN_UV(seconds); } -XS(XS__crosszoneassigntaskbycharid); -XS(XS__crosszoneassigntaskbycharid) { - dXSARGS; - if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbycharid(int character_id, uint32 task_id, [bool enforce_level_requirement = false])"); - { - int character_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvIV(ST(1)); - bool enforce_level_requirement = false; - - if (items == 3) { - enforce_level_requirement = (bool) SvTRUE(ST(2)); - } - quest_manager.CrossZoneAssignTaskByCharID(character_id, task_id, enforce_level_requirement); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneassigntaskbygroupid); -XS(XS__crosszoneassigntaskbygroupid) { - dXSARGS; - if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbygroupid(int group_id, uint32 task_id, [bool enforce_level_requirement = false])"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvIV(ST(1)); - bool enforce_level_requirement = false; - - if (items == 3) { - enforce_level_requirement = (bool) SvTRUE(ST(2)); - } - quest_manager.CrossZoneAssignTaskByGroupID(group_id, task_id, enforce_level_requirement); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneassigntaskbyraidid); -XS(XS__crosszoneassigntaskbyraidid) { - dXSARGS; - if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyraidid(int raid_id, uint32 task_id, [bool enforce_level_requirement = false])");\ - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvIV(ST(1)); - bool enforce_level_requirement = false; - - if (items == 3) { - enforce_level_requirement = (bool) SvTRUE(ST(2)); - } - quest_manager.CrossZoneAssignTaskByRaidID(raid_id, task_id, enforce_level_requirement); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneassigntaskbyguildid); -XS(XS__crosszoneassigntaskbyguildid) { - dXSARGS; - if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyguildid(int guild_id, uint32 task_id, [bool enforce_level_requirement = false])"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvIV(ST(1)); - bool enforce_level_requirement = false; - - if (items == 3) { - enforce_level_requirement = (bool) SvTRUE(ST(2)); - } - quest_manager.CrossZoneAssignTaskByGuildID(guild_id, task_id, enforce_level_requirement); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonecastspellbycharid); -XS(XS__crosszonecastspellbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbycharid(int character_id, uint32 spell_id)"); - { - int character_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvIV(ST(1)); - quest_manager.CrossZoneCastSpellByCharID(character_id, spell_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonecastspellbygroupid); -XS(XS__crosszonecastspellbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbygroupid(int group_id, uint32 spell_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvIV(ST(1)); - quest_manager.CrossZoneCastSpellByGroupID(group_id, spell_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonecastspellbyraidid); -XS(XS__crosszonecastspellbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyraidid(int raid_id, uint32 spell_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvIV(ST(1)); - quest_manager.CrossZoneCastSpellByRaidID(raid_id, spell_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonecastspellbyguildid); -XS(XS__crosszonecastspellbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyguildid(int guild_id, uint32 spell_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneCastSpellByGuildID(guild_id, spell_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonedisabletaskbycharid); -XS(XS__crosszonedisabletaskbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbycharid(int character_id, uint32 task_id)"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneDisableTaskByCharID(char_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonedisabletaskbygroupid); -XS(XS__crosszonedisabletaskbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbygroupid(int group_id, uint32 task_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneDisableTaskByGroupID(group_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonedisabletaskbyraidid); -XS(XS__crosszonedisabletaskbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyraidid(int raid_id, uint32 task_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneDisableTaskByRaidID(raid_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonedisabletaskbyguildid); -XS(XS__crosszonedisabletaskbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyguildid(int guild_id, uint32 task_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneDisableTaskByGuildID(guild_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneenabletaskbycharid); -XS(XS__crosszoneenabletaskbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbycharid(int character_id, uint32 task_id)"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneEnableTaskByCharID(char_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneenabletaskbygroupid); -XS(XS__crosszoneenabletaskbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbygroupid(int group_id, uint32 task_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneEnableTaskByGroupID(group_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneenabletaskbyraidid); -XS(XS__crosszoneenabletaskbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyraidid(int raid_id, uint32 task_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneEnableTaskByRaidID(raid_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneenabletaskbyguildid); -XS(XS__crosszoneenabletaskbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyguildid(int guild_id, uint32 task_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneEnableTaskByGuildID(guild_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonefailtaskbycharid); -XS(XS__crosszonefailtaskbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbycharid(int character_id, uint32 task_id)"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneFailTaskByCharID(char_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonefailtaskbygroupid); -XS(XS__crosszonefailtaskbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbygroupid(int group_id, uint32 task_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneFailTaskByGroupID(group_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonefailtaskbyraidid); -XS(XS__crosszonefailtaskbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyraidid(int raid_id, uint32 task_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneFailTaskByRaidID(raid_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonefailtaskbyguildid); -XS(XS__crosszonefailtaskbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyguildid(int guild_id, uint32 task_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneFailTaskByGuildID(guild_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonemarqueebycharid); -XS(XS__crosszonemarqueebycharid) { - dXSARGS; - - if (items != 7) - Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebycharid(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); - - if (items == 7) { - int character_id = (int) SvIV(ST(0)); - int type = (int) SvIV(ST(1)); - int priority = (int) SvIV(ST(2)); - int fade_in = (int) SvIV(ST(3)); - int fade_out = (int) SvIV(ST(4)); - int duration = (int) SvIV(ST(5)); - char *message = (char *) SvPV_nolen(ST(6)); - quest_manager.CrossZoneMarqueeByCharID(character_id, type, priority, fade_in, fade_out, duration, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemarqueebygroupid); -XS(XS__crosszonemarqueebygroupid) { - dXSARGS; - - if (items != 7) - Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebygroupid(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); - - if (items == 7) { - int group_id = (int) SvIV(ST(0)); - int type = (int) SvIV(ST(1)); - int priority = (int) SvIV(ST(2)); - int fade_in = (int) SvIV(ST(3)); - int fade_out = (int) SvIV(ST(4)); - int duration = (int) SvIV(ST(5)); - char *message = (char *) SvPV_nolen(ST(6)); - quest_manager.CrossZoneMarqueeByGroupID(group_id, type, priority, fade_in, fade_out, duration, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemarqueebyraidid); -XS(XS__crosszonemarqueebyraidid) { - dXSARGS; - - if (items != 7) - Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyraidid(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); - - if (items == 7) { - int raid_id = (int) SvIV(ST(0)); - int type = (int) SvIV(ST(1)); - int priority = (int) SvIV(ST(2)); - int fade_in = (int) SvIV(ST(3)); - int fade_out = (int) SvIV(ST(4)); - int duration = (int) SvIV(ST(5)); - char *message = (char *) SvPV_nolen(ST(6)); - quest_manager.CrossZoneMarqueeByRaidID(raid_id, type, priority, fade_in, fade_out, duration, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemarqueebyguildid); -XS(XS__crosszonemarqueebyguildid) { - dXSARGS; - - if (items != 7) - Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyguildid(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); - - if (items == 7) { - int guild_id = (int) SvIV(ST(0)); - int type = (int) SvIV(ST(1)); - int priority = (int) SvIV(ST(2)); - int fade_in = (int) SvIV(ST(3)); - int fade_out = (int) SvIV(ST(4)); - int duration = (int) SvIV(ST(5)); - char *message = (char *) SvPV_nolen(ST(6)); - quest_manager.CrossZoneMarqueeByGuildID(guild_id, type, priority, fade_in, fade_out, duration, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemessageplayerbyname); -XS(XS__crosszonemessageplayerbyname) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyname(uint32 type, string name, string message)"); - - if (items == 3) { - uint32 type = (uint32) SvUV(ST(0)); - char *name = (char *) SvPV_nolen(ST(1)); - char *message = (char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneMessagePlayerByName(type, name, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemessageplayerbygroupid); -XS(XS__crosszonemessageplayerbygroupid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbygroupid(uint32 type, int group_id, string message)"); - - if (items == 3) { - uint32 type = (uint32) SvUV(ST(0)); - int group_id = (int) SvIV(ST(1)); - char *message = (char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneMessagePlayerByGroupID(type, group_id, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemessageplayerbyraidid); -XS(XS__crosszonemessageplayerbyraidid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyraidid(uint32 type, int raid_id, string message)"); - - if (items == 3) { - uint32 type = (uint32) SvUV(ST(0)); - int raid_id = (int) SvIV(ST(1)); - char *message = (char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneMessagePlayerByRaidID(type, raid_id, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemessageplayerbyguildid); -XS(XS__crosszonemessageplayerbyguildid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyguildid(uint32 type, int guild_id, string message)"); - - if (items == 3) { - uint32 type = (uint32) SvUV(ST(0)); - int guild_id = (int) SvIV(ST(1)); - char *message = (char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneMessagePlayerByGuildID(type, guild_id, message); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveplayerbycharid); -XS(XS__crosszonemoveplayerbycharid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbycharid(int character_id, string zone_short_name)"); - - if (items == 2) { - int character_id = (int) SvIV(ST(0)); - char *zone_short_name = (char *) SvPV_nolen(ST(1)); - quest_manager.CrossZoneMovePlayerByCharID(character_id, zone_short_name); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveplayerbygroupid); -XS(XS__crosszonemoveplayerbygroupid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbygroupid(int group_id, string zone_short_name)"); - - if (items == 2) { - int group_id = (int) SvIV(ST(0)); - char *zone_short_name = (char *) SvPV_nolen(ST(1)); - quest_manager.CrossZoneMovePlayerByGroupID(group_id, zone_short_name); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveplayerbyraidid); -XS(XS__crosszonemoveplayerbyraidid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyraidid(int raid_id, string zone_short_name)"); - - if (items == 2) { - int raid_id = (int) SvIV(ST(0)); - char *zone_short_name = (char *) SvPV_nolen(ST(1)); - quest_manager.CrossZoneMovePlayerByRaidID(raid_id, zone_short_name); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveplayerbyguildid); -XS(XS__crosszonemoveplayerbyguildid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyguildid(int guild_id, string zone_short_name)"); - - if (items == 2) { - int guild_id = (int) SvIV(ST(0)); - char *zone_short_name = (char *) SvPV_nolen(ST(1)); - quest_manager.CrossZoneMovePlayerByGuildID(guild_id, zone_short_name); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveinstancebycharid); -XS(XS__crosszonemoveinstancebycharid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebycharid(int character_id, uint16 instance_id)"); - - if (items == 2) { - int character_id = (int) SvIV(ST(0)); - uint16 instance_id = (uint16) SvUV(ST(1)); - quest_manager.CrossZoneMoveInstanceByCharID(character_id, instance_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveinstancebygroupid); -XS(XS__crosszonemoveinstancebygroupid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebygroupid(int group_id, uint16 instance_id)"); - - if (items == 2) { - int group_id = (int) SvIV(ST(0)); - uint16 instance_id = (uint16) SvUV(ST(1)); - quest_manager.CrossZoneMoveInstanceByGroupID(group_id, instance_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveinstancebyraidid); -XS(XS__crosszonemoveinstancebyraidid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyraidid(int raid_id, uint16 instance_id)"); - - if (items == 2) { - int raid_id = (int) SvIV(ST(0)); - uint16 instance_id = (uint16) SvUV(ST(1)); - quest_manager.CrossZoneMoveInstanceByRaidID(raid_id, instance_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonemoveinstancebyguildid); -XS(XS__crosszonemoveinstancebyguildid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyguildid(int guild_id, uint16 instance_id)"); - - if (items == 2) { - int guild_id = (int) SvIV(ST(0)); - uint16 instance_id = (uint16) SvUV(ST(1)); - quest_manager.CrossZoneMoveInstanceByGuildID(guild_id, instance_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovespellbycharid); -XS(XS__crosszoneremovespellbycharid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbycharid(int character_id, uint32 spell_id)"); - - if (items == 2) { - int character_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveSpellByCharID(character_id, spell_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovespellbygroupid); -XS(XS__crosszoneremovespellbygroupid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbygroupid(int group_id, uint32 spell_id)"); - - if (items == 2) { - int group_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveSpellByGroupID(group_id, spell_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovespellbyraidid); -XS(XS__crosszoneremovespellbyraidid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyraidid(int raid_id, uint32 spell_id)"); - - if (items == 2) { - int raid_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveSpellByRaidID(raid_id, spell_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovespellbyguildid); -XS(XS__crosszoneremovespellbyguildid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyguildid(int guild_id, uint32 spell_id)"); - - if (items == 2) { - int guild_id = (int) SvIV(ST(0)); - uint32 spell_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveSpellByGuildID(guild_id, spell_id); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovetaskbycharid); -XS(XS__crosszoneremovetaskbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbycharid(int character_id, uint32 task_id)"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveTaskByCharID(char_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovetaskbygroupid); -XS(XS__crosszoneremovetaskbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbygroupid(int group_id, uint32 task_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveTaskByGroupID(group_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovetaskbyraidid); -XS(XS__crosszoneremovetaskbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyraidid(int raid_id, uint32 task_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveTaskByRaidID(raid_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneremovetaskbyguildid); -XS(XS__crosszoneremovetaskbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyguildid(int guild_id, uint32 task_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneRemoveTaskByGuildID(guild_id, task_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneresetactivitybycharid); -XS(XS__crosszoneresetactivitybycharid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybycharid(int char_id, uint32 task_id, int activity_id)"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - quest_manager.CrossZoneResetActivityByCharID(char_id, task_id, activity_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneresetactivitybygroupid); -XS(XS__crosszoneresetactivitybygroupid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybygroupid(int group_id, uint32 task_id, int activity_id)"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - quest_manager.CrossZoneResetActivityByGroupID(group_id, task_id, activity_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneresetactivitybyraidid); -XS(XS__crosszoneresetactivitybyraidid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyraidid(int raid_id, uint32 task_id, int activity_id)"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - quest_manager.CrossZoneResetActivityByRaidID(raid_id, task_id, activity_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneresetactivitybyguildid); -XS(XS__crosszoneresetactivitybyguildid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyguildid(int guild_id, uint32 task_id, int activity_id)"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - quest_manager.CrossZoneResetActivityByGuildID(guild_id, task_id, activity_id); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszonesetentityvariablebynpctypeid); -XS(XS__crosszonesetentityvariablebynpctypeid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)"); - - if (items == 3) { - uint32 npc_type_id = (uint32) SvUV(ST(0)); - const char *key = (const char *) SvPV_nolen(ST(1)); - const char *str_value = (const char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneSetEntityVariableByNPCTypeID(npc_type_id, key, str_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesetentityvariablebyclientname); -XS(XS__crosszonesetentityvariablebyclientname) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyclientname(string client_name, string key, string value)"); - - if (items == 3) { - const char *client_name = (const char *) SvPV_nolen(ST(0)); - const char *key = (const char *) SvPV_nolen(ST(1)); - const char *str_value = (const char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneSetEntityVariableByClientName(client_name, key, str_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesetentityvariablebygroupid); -XS(XS__crosszonesetentityvariablebygroupid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebygroupid(int group_id, string key, string value)"); - - if (items == 3) { - int group_id = SvIV(ST(0)); - const char *key = (const char *) SvPV_nolen(ST(1)); - const char *str_value = (const char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneSetEntityVariableByGroupID(group_id, key, str_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesetentityvariablebyraidid); -XS(XS__crosszonesetentityvariablebyraidid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyraidid(int raid_id, string key, string value)"); - - if (items == 3) { - int raid_id = SvIV(ST(0)); - const char *key = (const char *) SvPV_nolen(ST(1)); - const char *str_value = (const char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneSetEntityVariableByRaidID(raid_id, key, str_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesetentityvariablebyguildid); -XS(XS__crosszonesetentityvariablebyguildid) { - dXSARGS; - - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyguildid(int guild_id, string key, string value)"); - - if (items == 3) { - int guild_id = SvIV(ST(0)); - const char *key = (const char *) SvPV_nolen(ST(1)); - const char *str_value = (const char *) SvPV_nolen(ST(2)); - quest_manager.CrossZoneSetEntityVariableByGuildID(guild_id, key, str_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalclientbycharid); -XS(XS__crosszonesignalclientbycharid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, uint32 signal)"); - - if (items == 2) { - int char_id = (int) SvIV(ST(0)); - uint32 signal = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalPlayerByCharID(char_id, signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalclientbygroupid); -XS(XS__crosszonesignalclientbygroupid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbygroupid(int group_id, uint32 signal)"); - - if (items == 2) { - int group_id = (int) SvIV(ST(0)); - uint32 signal = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalPlayerByGroupID(group_id, signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalclientbyraidid); -XS(XS__crosszonesignalclientbyraidid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyraidid(int raid_id, uint32 signal)"); - - if (items == 2) { - int raid_id = (int) SvIV(ST(0)); - uint32 signal = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalPlayerByRaidID(raid_id, signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalclientbyguildid); -XS(XS__crosszonesignalclientbyguildid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyguildid(int guild_id, uint32 signal)"); - - if (items == 2) { - int guild_id = (int) SvIV(ST(0)); - uint32 signal = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalPlayerByGuildID(guild_id, signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalclientbyname); -XS(XS__crosszonesignalclientbyname) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyname(string name, uint32 signal)"); - - if (items == 2) { - char *name = (char *) SvPV_nolen(ST(0)); - uint32 signal = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalPlayerByName(name, signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszonesignalnpcbynpctypeid); -XS(XS__crosszonesignalnpcbynpctypeid) { - dXSARGS; - - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszonesignalnpcbynpctypeid(uint32 npc_type_id, uint32 value)"); - - if (items == 2) { - uint32 npc_type_id = (uint32) SvUV(ST(0)); - uint32 int_value = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneSignalNPCByNPCTypeID(npc_type_id, int_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__crosszoneupdateactivitybycharid); -XS(XS__crosszoneupdateactivitybycharid) { - dXSARGS; - if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybycharid(int char_id, uint32 task_id, int activity_id, [int activity_count = 1])"); - { - int char_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - int activity_count = 1; - if (items == 4) { - activity_count = (int) SvIV(ST(3)); - } - quest_manager.CrossZoneUpdateActivityByCharID(char_id, task_id, activity_id, activity_count); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneupdateactivitybygroupid); -XS(XS__crosszoneupdateactivitybygroupid) { - dXSARGS; - if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybygroupid(int group_id, uint32 task_id, int activity_id, [int activity_count = 1])"); - { - int group_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - int activity_count = 1; - if (items == 4) { - activity_count = (int) SvIV(ST(3)); - } - quest_manager.CrossZoneUpdateActivityByGroupID(group_id, task_id, activity_id, activity_count); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneupdateactivitybyraidid); -XS(XS__crosszoneupdateactivitybyraidid) { - dXSARGS; - if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyraidid(int raid_id, uint32 task_id, int activity_id, [int activity_count = 1])"); - { - int raid_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - int activity_count = 1; - if (items == 4) { - activity_count = (int) SvIV(ST(3)); - } - quest_manager.CrossZoneUpdateActivityByRaidID(raid_id, task_id, activity_id, activity_count); - } - XSRETURN_EMPTY; -} - -XS(XS__crosszoneupdateactivitybyguildid); -XS(XS__crosszoneupdateactivitybyguildid) { - dXSARGS; - if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyguildid(int guild_id, uint32 task_id, int activity_id, [int activity_count = 1])"); - { - int guild_id = (int) SvIV(ST(0)); - uint32 task_id = (uint32) SvUV(ST(1)); - int activity_id = (int) SvIV(ST(2)); - int activity_count = 1; - if (items == 4) { - activity_count = (int) SvIV(ST(3)); - } - quest_manager.CrossZoneUpdateActivityByGuildID(guild_id, task_id, activity_id, activity_count); - } - XSRETURN_EMPTY; -} - -XS(XS__worldwideassigntask); -XS(XS__worldwideassigntask) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwideassigntask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideAssignTask(task_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidecastspell); -XS(XS__worldwidecastspell) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidecastspell(uint32 spell_id, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 spell_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideCastSpell(spell_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidedisabletask); -XS(XS__worldwidedisabletask) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidedisabletask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideDisableTask(task_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwideenabletask); -XS(XS__worldwideenabletask) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwideenabletask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideEnableTask(task_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidefailtask); -XS(XS__worldwidefailtask) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidefailtask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideFailTask(task_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidemarquee); -XS(XS__worldwidemarquee) { - dXSARGS; - if (items < 6 || items > 8) - Perl_croak(aTHX_ "Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 color_id = (uint32) SvUV(ST(0)); - uint32 priority = (uint32) SvUV(ST(1)); - uint32 fade_in = (uint32) SvUV(ST(2)); - uint32 fade_out = (uint32) SvUV(ST(3)); - uint32 duration = (uint32) SvUV(ST(4)); - char *message = (char *) SvPV_nolen(ST(5)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 7) { - min_status = (uint8) SvUV(ST(6)); - } - - if (items == 8) { - max_status = (uint8) SvUV(ST(7)); - } - quest_manager.WorldWideMarquee(color_id, priority, fade_in, fade_out, duration, message, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidemessage); -XS(XS__worldwidemessage) { - dXSARGS; - if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: quest::worldwidemessage(uint32 type, string message, [uint8 min_status = 0, uint8 max_status = 0])"); - { - uint32 type = (uint32)SvUV(ST(0)); - const char *message = (const char*) SvPV_nolen(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 3) { - min_status = (uint8) SvUV(ST(2)); - } - - if (items == 4) { - max_status = (uint8) SvUV(ST(3)); - } - quest_manager.WorldWideMessage(type, message, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidemove); -XS(XS__worldwidemove) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidemove(string zone_short_name, [uint8 min_status = 0, uint8 max_status = 0])"); - - if (items == 1) { - const char *zone_short_name = (const char*) SvPV_nolen(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideMove(zone_short_name, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidemoveinstance); -XS(XS__worldwidemoveinstance) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidemoveinstance(uint16 instance_id, [uint8 min_status = 0, uint max_status = 0])"); - { - uint16 instance_id = (uint16) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideMoveInstance(instance_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwideremovespell); -XS(XS__worldwideremovespell) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwideremovespell(uint32 spell_id, [uint8 min_status = 0, uint max_status = 0])"); - { - uint32 spell_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideRemoveSpell(spell_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwideremovetask); -XS(XS__worldwideremovetask) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwideremovetask(uint32 task_id, [uint8 min_status = 0, uint max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(2)); - } - quest_manager.WorldWideRemoveTask(task_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwideresetactivity); -XS(XS__worldwideresetactivity) { - dXSARGS; - if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: quest::worldwideresetactivity(uint32 task_id, int activity_id, [uint8 min_status = 0, uint max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - int activity_id = (int) SvIV(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 3) { - min_status = (uint8) SvUV(ST(2)); - } - - if (items == 4) { - max_status = (uint8) SvUV(ST(3)); - } - quest_manager.WorldWideResetActivity(task_id, activity_id, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidesetentityvariableclient); -XS(XS__worldwidesetentityvariableclient) { - dXSARGS; - if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: quest::worldwidesetentityvariableclient(string variable_name, string variable_value, [uint8 min_status = 0, uint max_status = 0])"); - { - const char *variable_name = (const char*) SvPV_nolen(ST(0)); - const char *variable_value = (const char*) SvPV_nolen(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 3) { - min_status = (uint8) SvUV(ST(2)); - } - - if (items == 4) { - max_status = (uint8) SvUV(ST(3)); - } - quest_manager.WorldWideSetEntityVariableClient(variable_name, variable_value, min_status, max_status); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidesetentityvariablenpc); -XS(XS__worldwidesetentityvariablenpc) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::worldwidesetentityvariablenpc(string variable_name, string variable_value)"); - { - const char *variable_name = (const char*) SvPV_nolen(ST(0)); - const char *variable_value = (const char*) SvPV_nolen(ST(1)); - quest_manager.WorldWideSetEntityVariableNPC(variable_name, variable_value); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidesignalnpc); -XS(XS__worldwidesignalnpc) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: quest::worldwidesignalnpc(uint32 signal)"); - { - uint32 signal = (uint32) SvUV(ST(0)); - quest_manager.WorldWideSignalNPC(signal); - } - - XSRETURN_EMPTY; -} - -XS(XS__worldwidesignalclient); -XS(XS__worldwidesignalclient) { - dXSARGS; - if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: quest::worldwidesignalclient(uint32 signal, [uint8 min_status = 0, uint max_status = 0])"); - { - uint32 signal = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 2) { - min_status = (uint8) SvUV(ST(1)); - } - - if (items == 3) { - max_status = (uint8) SvUV(ST(1)); - } - quest_manager.WorldWideSignalClient(signal, min_status, max_status); - } - - XSRETURN_EMPTY; -} -XS(XS__worldwideupdateactivity); -XS(XS__worldwideupdateactivity) { - dXSARGS; - if (items < 2 || items > 5) - Perl_croak(aTHX_ "Usage: quest::worldwideupdateactivity(uint32 task_id, int activity_id, [int activity_count = 1, uint8 min_status = 0, uint max_status = 0])"); - { - uint32 task_id = (uint32) SvUV(ST(0)); - int activity_id = (int) SvIV(ST(1)); - int activity_count = 1; - uint8 min_status = 0; - uint8 max_status = 0; - if (items == 3) { - activity_count = (int) SvIV(ST(2)); - } - - if (items == 4) { - min_status = (uint8) SvUV(ST(3)); - } - - if (items == 5) { - max_status = (uint8) SvUV(ST(4)); - } - quest_manager.WorldWideUpdateActivity(task_id, activity_id, activity_count, min_status, max_status); - } - - XSRETURN_EMPTY; -} - XS(XS__enablerecipe); XS(XS__enablerecipe) { dXSARGS; @@ -6483,7 +5126,7 @@ XS(XS__gethexcolorcode) { sv_setpv(TARG, hex_color_code.c_str()); XSprePUSH; PUSHTARG; - XSRETURN(1); + XSRETURN(1); } XS(XS__getaaexpmodifierbycharid); @@ -6491,7 +5134,7 @@ XS(XS__getaaexpmodifierbycharid) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::getaaexpmodifierbycharid(uint32 character_id, uint32 zone_id)"); - + dXSTARG; double aa_modifier; uint32 character_id = (uint32) SvUV(ST(0)); @@ -6507,7 +5150,7 @@ XS(XS__getexpmodifierbycharid) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::getexpmodifierbycharid(uint32 character_id, uint32 zone_id)"); - + dXSTARG; double exp_modifier; uint32 character_id = (uint32) SvUV(ST(0)); @@ -6544,221 +5187,6 @@ XS(XS__setexpmodifierbycharid) { XSRETURN_EMPTY; } -XS(XS__crosszoneaddldonlossbycharid); -XS(XS__crosszoneaddldonlossbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbycharid(int character_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Character; - uint8 update_subtype = CZLDoNUpdateSubtype_Loss; - int character_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonpointsbycharid); -XS(XS__crosszoneaddldonpointsbycharid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbycharid(int character_id, uint32 theme_id, int points)"); - - uint8 update_type = CZLDoNUpdateType_Character; - uint8 update_subtype = CZLDoNUpdateSubtype_Points; - int character_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - int points = (int) SvIV(ST(2)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id, points); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonwinbycharid); -XS(XS__crosszoneaddldonwinbycharid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbycharid(int character_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Character; - uint8 update_subtype = CZLDoNUpdateSubtype_Win; - int character_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonlossbygroupid); -XS(XS__crosszoneaddldonlossbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbygroupid(int group_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Group; - uint8 update_subtype = CZLDoNUpdateSubtype_Loss; - int group_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonpointsbygroupid); -XS(XS__crosszoneaddldonpointsbygroupid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbygroupid(int group_id, uint32 theme_id, int points)"); - - uint8 update_type = CZLDoNUpdateType_Group; - uint8 update_subtype = CZLDoNUpdateSubtype_Points; - int group_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - int points = (int) SvIV(ST(2)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id, points); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonwinbygroupid); -XS(XS__crosszoneaddldonwinbygroupid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbygroupid(int group_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Group; - uint8 update_subtype = CZLDoNUpdateSubtype_Win; - int group_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonlossbyraidid); -XS(XS__crosszoneaddldonlossbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyraidid(int raid_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Raid; - uint8 update_subtype = CZLDoNUpdateSubtype_Loss; - int raid_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonpointsbyraidid); -XS(XS__crosszoneaddldonpointsbyraidid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyraidid(int raid_id, uint32 theme_id, int points)"); - - uint8 update_type = CZLDoNUpdateType_Raid; - uint8 update_subtype = CZLDoNUpdateSubtype_Points; - int raid_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - int points = (int) SvIV(ST(2)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id, points); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonwinbyraidid); -XS(XS__crosszoneaddldonwinbyraidid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyraidid(int raid_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Raid; - uint8 update_subtype = CZLDoNUpdateSubtype_Win; - int raid_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonlossbyguildid); -XS(XS__crosszoneaddldonlossbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyguildid(int guild_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Guild; - uint8 update_subtype = CZLDoNUpdateSubtype_Loss; - int guild_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonpointsbyguildid); -XS(XS__crosszoneaddldonpointsbyguildid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyguildid(int guild_id, uint32 theme_id, int points)"); - - uint8 update_type = CZLDoNUpdateType_Guild; - uint8 update_subtype = CZLDoNUpdateSubtype_Points; - int guild_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - int points = (int) SvIV(ST(2)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id, points); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonwinbyguildid); -XS(XS__crosszoneaddldonwinbyguildid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyguildid(int guild_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Guild; - uint8 update_subtype = CZLDoNUpdateSubtype_Win; - int guild_id = (int) SvIV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonlossbyexpeditionid); -XS(XS__crosszoneaddldonlossbyexpeditionid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyexpeditionid(uint32 expedition_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Expedition; - uint8 update_subtype = CZLDoNUpdateSubtype_Loss; - uint32 expedition_id = (uint32) SvUV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonpointsbyexpeditionid); -XS(XS__crosszoneaddldonpointsbyexpeditionid) { - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyexpeditionid(uint32 expedition_id, uint32 theme_id, int points)"); - - uint8 update_type = CZLDoNUpdateType_Expedition; - uint8 update_subtype = CZLDoNUpdateSubtype_Points; - uint32 expedition_id = (uint32) SvUV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - int points = (int) SvIV(ST(2)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id, points); - XSRETURN_EMPTY; -} - -XS(XS__crosszoneaddldonwinbyexpeditionid); -XS(XS__crosszoneaddldonwinbyexpeditionid) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyexpeditionid(uint32 expedition_id, uint32 theme_id)"); - - uint8 update_type = CZLDoNUpdateType_Expedition; - uint8 update_subtype = CZLDoNUpdateSubtype_Win; - uint32 expedition_id = (uint32) SvUV(ST(0)); - uint32 theme_id = (uint32) SvUV(ST(1)); - quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); - XSRETURN_EMPTY; -} - XS(XS__getcleannpcnamebyid); XS(XS__getcleannpcnamebyid) { dXSARGS; @@ -6870,7 +5298,7 @@ XS(XS__getspellstat) { uint8 slot = 0; if (items == 3) slot = (uint8) SvUV(ST(2)); - + stat_value = quest_manager.getspellstat(spell_id, stat_identifier, slot); XSprePUSH; @@ -6879,6 +5307,2321 @@ XS(XS__getspellstat) { XSRETURN(1); } +XS(XS__crosszoneaddldonlossbycharid); +XS(XS__crosszoneaddldonlossbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbycharid(int character_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int character_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonlossbygroupid); +XS(XS__crosszoneaddldonlossbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbygroupid(int group_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int group_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonlossbyraidid); +XS(XS__crosszoneaddldonlossbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyraidid(int raid_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int raid_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonlossbyguildid); +XS(XS__crosszoneaddldonlossbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyguildid(int guild_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int guild_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonlossbyexpeditionid); +XS(XS__crosszoneaddldonlossbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyexpeditionid(uint32 expedition_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonlossbyclientname); +XS(XS__crosszoneaddldonlossbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonlossbyclientname(const char* client_name, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int update_identifier = 0; + int points = 1; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbycharid); +XS(XS__crosszoneaddldonpointsbycharid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbycharid(int character_id, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int character_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id, points); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbygroupid); +XS(XS__crosszoneaddldonpointsbygroupid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbygroupid(int group_id, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int group_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id, points); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbyraidid); +XS(XS__crosszoneaddldonpointsbyraidid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyraidid(int raid_id, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int raid_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id, points); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbyguildid); +XS(XS__crosszoneaddldonpointsbyguildid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyguildid(int guild_id, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int guild_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id, points); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbyexpeditionid); +XS(XS__crosszoneaddldonpointsbyexpeditionid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyexpeditionid(uint32 expedition_id, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id, points); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonpointsbyclientname); +XS(XS__crosszoneaddldonpointsbyclientname) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonpointsbyclientname(const char* client_name, uint32 theme_id, int points)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + int points = (int) SvIV(ST(2)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbycharid); +XS(XS__crosszoneaddldonwinbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbycharid(int character_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int character_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbygroupid); +XS(XS__crosszoneaddldonwinbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbygroupid(int group_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int group_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbyraidid); +XS(XS__crosszoneaddldonwinbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyraidid(int raid_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int raid_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbyguildid); +XS(XS__crosszoneaddldonwinbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyguildid(int guild_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int guild_id = (int) SvIV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbyexpeditionid); +XS(XS__crosszoneaddldonwinbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyexpeditionid(uint32 expedition_id, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneaddldonwinbyclientname); +XS(XS__crosszoneaddldonwinbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneaddldonwinbyclientname(const char* client_name, uint32 theme_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int update_identifier = 0; + int points = 1; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 theme_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbycharid); +XS(XS__crosszoneassigntaskbycharid) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbycharid(int character_id, uint32 task_identifier, [bool enforce_level_requirement = false])"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbygroupid); +XS(XS__crosszoneassigntaskbygroupid) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbygroupid(int group_id, uint32 task_identifier, [bool enforce_level_requirement = false])"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbyraidid); +XS(XS__crosszoneassigntaskbyraidid) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyraidid(int raid_id, uint32 task_identifier, [bool enforce_level_requirement = false])");\ + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbyguildid); +XS(XS__crosszoneassigntaskbyguildid) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyguildid(int guild_id, uint32 task_identifier, [bool enforce_level_requirement = false])"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbyexpeditionid); +XS(XS__crosszoneassigntaskbyexpeditionid) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyexpeditionid(uint32 expedition_id, uint32 task_identifier, [bool enforce_level_requirement = false])"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneassigntaskbyclientname); +XS(XS__crosszoneassigntaskbyclientname) { + dXSARGS; + if (items < 2 || items > 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneassigntaskbyclientname(const char* client_name, uint32 task_identifier, [bool enforce_level_requirement = false])"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvIV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + enforce_level_requirement = (bool) SvTRUE(ST(2)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbycharid); +XS(XS__crosszonecastspellbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbycharid(int character_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int character_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvIV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, character_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbygroupid); +XS(XS__crosszonecastspellbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbygroupid(int group_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int group_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvIV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, group_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbyraidid); +XS(XS__crosszonecastspellbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyraidid(int raid_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int raid_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvIV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, raid_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbyguildid); +XS(XS__crosszonecastspellbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyguildid(int guild_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int guild_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, guild_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbyexpeditionid); +XS(XS__crosszonecastspellbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyexpeditionid(uint32 expedition_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, expedition_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonecastspellbyclientname); +XS(XS__crosszonecastspellbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonecastspellbyclientname(const char* client_name, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, update_identifier, spell_id, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbycharid); +XS(XS__crosszonedisabletaskbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbycharid(int character_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbygroupid); +XS(XS__crosszonedisabletaskbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbygroupid(int group_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbyraidid); +XS(XS__crosszonedisabletaskbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyraidid(int raid_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbyguildid); +XS(XS__crosszonedisabletaskbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyguildid(int guild_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbyexpeditionid); +XS(XS__crosszonedisabletaskbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyexpeditionid(uint32 expedition_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonedisabletaskbyclientname); +XS(XS__crosszonedisabletaskbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonedisabletaskbyclientname(const char* client_name, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbycharid); +XS(XS__crosszoneenabletaskbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbycharid(int character_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbygroupid); +XS(XS__crosszoneenabletaskbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbygroupid(int group_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbyraidid); +XS(XS__crosszoneenabletaskbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyraidid(int raid_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbyguildid); +XS(XS__crosszoneenabletaskbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyguildid(int guild_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbyexpeditionid); +XS(XS__crosszoneenabletaskbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyexpeditionid(uint32 expedition_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneenabletaskbyclientname); +XS(XS__crosszoneenabletaskbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneenabletaskbyclientname(const char* client_name, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbycharid); +XS(XS__crosszonefailtaskbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbycharid(int character_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbygroupid); +XS(XS__crosszonefailtaskbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbygroupid(int group_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbyraidid); +XS(XS__crosszonefailtaskbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyraidid(int raid_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbyguildid); +XS(XS__crosszonefailtaskbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyguildid(int guild_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbyexpeditionid); +XS(XS__crosszonefailtaskbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyexpeditionid(uint32 expedition_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonefailtaskbyclientname); +XS(XS__crosszonefailtaskbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonefailtaskbyclientname(const char* client_name, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebycharid); +XS(XS__crosszonemarqueebycharid) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebycharid(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_Character; + int character_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, character_id, type, priority, fade_in, fade_out, duration, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebygroupid); +XS(XS__crosszonemarqueebygroupid) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebygroupid(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_Group; + int group_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, group_id, type, priority, fade_in, fade_out, duration, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebyraidid); +XS(XS__crosszonemarqueebyraidid) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyraidid(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_Raid; + int raid_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, raid_id, type, priority, fade_in, fade_out, duration, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebyguildid); +XS(XS__crosszonemarqueebyguildid) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyguildid(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_Guild; + int guild_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, guild_id, type, priority, fade_in, fade_out, duration, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebyexpeditionid); +XS(XS__crosszonemarqueebyexpeditionid) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyexpeditionid(uint32 expedition_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, expedition_id, type, priority, fade_in, fade_out, duration, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemarqueebyclientname); +XS(XS__crosszonemarqueebyclientname) { + dXSARGS; + if (items != 7) + Perl_croak(aTHX_ "Usage: quest::crosszonemarqueebyclientname(const char* client_name, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message)"); + { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + int priority = (int) SvIV(ST(2)); + int fade_in = (int) SvIV(ST(3)); + int fade_out = (int) SvIV(ST(4)); + int duration = (int) SvIV(ST(5)); + char *message = (char *) SvPV_nolen(ST(6)); + quest_manager.CrossZoneMarquee(update_type, update_identifier, type, priority, fade_in, fade_out, duration, message, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbycharid); +XS(XS__crosszonemessageplayerbycharid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbycharid(int character_id, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_Character; + int character_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, character_id, type, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbygroupid); +XS(XS__crosszonemessageplayerbygroupid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbygroupid(int group_id, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_Group; + int group_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, group_id, type, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbyraidid); +XS(XS__crosszonemessageplayerbyraidid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyraidid(int raid_id, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_Raid; + int raid_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, raid_id, type, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbyguildid); +XS(XS__crosszonemessageplayerbyguildid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyguildid(int guild_id, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_Guild; + int guild_id = (int) SvIV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, guild_id, type, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbyexpeditionid); +XS(XS__crosszonemessageplayerbyexpeditionid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyexpeditionid(uint32 expedition_id, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, expedition_id, type, message); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemessageplayerbyname); +XS(XS__crosszonemessageplayerbyname) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyname(const char* client_name, uint32 type, const char* message)"); + { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 type = (uint32) SvUV(ST(1)); + const char* message = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneMessage(update_type, update_identifier, type, message, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbycharid); +XS(XS__crosszonemoveplayerbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbycharid(int character_id, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int character_id = (int) SvIV(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbygroupid); +XS(XS__crosszonemoveplayerbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbygroupid(int group_id, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int group_id = (int) SvIV(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbyraidid); +XS(XS__crosszonemoveplayerbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyraidid(int raid_id, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int raid_id = (int) SvIV(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbyguildid); +XS(XS__crosszonemoveplayerbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyguildid(int guild_id, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int guild_id = (int) SvIV(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbyexpeditionid); +XS(XS__crosszonemoveplayerbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyexpeditionid(uint32 expedition_id, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint32 expedition_id = (uint32) SvUV(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveplayerbyname); +XS(XS__crosszonemoveplayerbyname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveplayerbyname(const char* client_name, string zone_short_name)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + const char* zone_short_name = (const char*) SvPV_nolen(ST(1)); + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebycharid); +XS(XS__crosszonemoveinstancebycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebycharid(int character_id, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + int character_id = (int) SvIV(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebygroupid); +XS(XS__crosszonemoveinstancebygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebygroupid(int group_id, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + int group_id = (int) SvIV(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebyraidid); +XS(XS__crosszonemoveinstancebyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyraidid(int raid_id, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + int raid_id = (int) SvIV(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebyguildid); +XS(XS__crosszonemoveinstancebyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyguildid(int guild_id, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + int guild_id = (int) SvIV(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebyexpeditionid); +XS(XS__crosszonemoveinstancebyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyexpeditionid(uint32 expedition_id, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonemoveinstancebyclientname); +XS(XS__crosszonemoveinstancebyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonemoveinstancebyclientname(const char* client_name, uint16 instance_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint16 instance_id = (uint16) SvUV(ST(1)); + quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbycharid); +XS(XS__crosszoneremovespellbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbycharid(int character_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int character_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, character_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbygroupid); +XS(XS__crosszoneremovespellbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbygroupid(int group_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int group_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, group_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbyraidid); +XS(XS__crosszoneremovespellbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyraidid(int raid_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int raid_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, raid_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbyguildid); +XS(XS__crosszoneremovespellbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyguildid(int guild_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int guild_id = (int) SvIV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, guild_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbyexpeditionid); +XS(XS__crosszoneremovespellbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyexpeditionid(uint32 expedition_id, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, expedition_id, spell_id); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovespellbyclientname); +XS(XS__crosszoneremovespellbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovespellbyclientname(const char* client_name, uint32 spell_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 spell_id = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSpell(update_type, update_subtype, update_identifier, spell_id, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbycharid); +XS(XS__crosszoneremovetaskbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbycharid(int character_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbygroupid); +XS(XS__crosszoneremovetaskbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbygroupid(int group_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbyraidid); +XS(XS__crosszoneremovetaskbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyraidid(int raid_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbyguildid); +XS(XS__crosszoneremovetaskbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyguildid(int guild_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbyexpeditionid); +XS(XS__crosszoneremovetaskbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyexpeditionid(uint32 expedition_id, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneremovetaskbyclientname); +XS(XS__crosszoneremovetaskbyclientname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszoneremovetaskbyclientname(const char* client_name, uint32 task_identifier)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybycharid); +XS(XS__crosszoneresetactivitybycharid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybycharid(int character_id, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybygroupid); +XS(XS__crosszoneresetactivitybygroupid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybygroupid(int group_id, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybyraidid); +XS(XS__crosszoneresetactivitybyraidid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyraidid(int raid_id, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybyguildid); +XS(XS__crosszoneresetactivitybyguildid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyguildid(int guild_id, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybyexpeditionid); +XS(XS__crosszoneresetactivitybyexpeditionid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyexpeditionid(uint32 expedition_id, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneresetactivitybyclientname); +XS(XS__crosszoneresetactivitybyclientname) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszoneresetactivitybyclientname(const char* client_name, uint32 task_identifier, int activity_id)"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int activity_id = (int) SvIV(ST(2)); + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebycharid); +XS(XS__crosszonesetentityvariablebycharid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebycharid(int character_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_Character; + int character_id = (int) SvIV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, character_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebygroupid); +XS(XS__crosszonesetentityvariablebygroupid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebygroupid(int group_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_Group; + int group_id = (int) SvIV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, group_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebyraidid); +XS(XS__crosszonesetentityvariablebyraidid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyraidid(int raid_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_Raid; + int raid_id = (int) SvIV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, raid_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebyguildid); +XS(XS__crosszonesetentityvariablebyguildid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyguildid(int guild_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_Guild; + int guild_id = (int) SvIV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, guild_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebyexpeditionid); +XS(XS__crosszonesetentityvariablebyexpeditionid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyexpeditionid(uint32 expedition_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint32 expedition_id = (uint32) SvUV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, expedition_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebyclientname); +XS(XS__crosszonesetentityvariablebyclientname) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyclientname(const char* client_name, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, update_identifier, variable_name, variable_value, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesetentityvariablebynpctypeid); +XS(XS__crosszonesetentityvariablebynpctypeid) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_id, const char* variable_name, const char* variable_value)"); + { + uint8 update_type = CZUpdateType_NPC; + int npc_id = (int) SvIV(ST(0)); + const char* variable_name = (const char*) SvPV_nolen(ST(1)); + const char* variable_value = (const char*) SvPV_nolen(ST(2)); + quest_manager.CrossZoneSetEntityVariable(update_type, npc_id, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbycharid); +XS(XS__crosszonesignalclientbycharid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Character; + int character_id = (int) SvIV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, character_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbygroupid); +XS(XS__crosszonesignalclientbygroupid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbygroupid(int group_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Group; + int group_id = (int) SvIV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, group_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbyraidid); +XS(XS__crosszonesignalclientbyraidid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyraidid(int raid_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Raid; + int raid_id = (int) SvIV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, raid_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbyguildid); +XS(XS__crosszonesignalclientbyguildid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyguildid(int guild_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Guild; + int guild_id = (int) SvIV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, guild_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbyexpeditionid); +XS(XS__crosszonesignalclientbyexpeditionid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyexpeditionid(uint32 expedition_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Expedition; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, expedition_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalclientbyname); +XS(XS__crosszonesignalclientbyname) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbyname(const char* client_name, uint32 signal)"); + { + uint8 update_type = CZUpdateType_Expedition; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, update_identifier, signal, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszonesignalnpcbynpctypeid); +XS(XS__crosszonesignalnpcbynpctypeid) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::crosszonesignalnpcbynpctypeid(uint32 npc_id, uint32 signal)"); + { + uint8 update_type = CZUpdateType_NPC; + uint32 npc_id = (uint32) SvUV(ST(0)); + uint32 signal = (uint32) SvUV(ST(1)); + quest_manager.CrossZoneSignal(update_type, npc_id, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybycharid); +XS(XS__crosszoneupdateactivitybycharid) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybycharid(int character_id, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int character_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybygroupid); +XS(XS__crosszoneupdateactivitybygroupid) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybygroupid(int group_id, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int group_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybyraidid); +XS(XS__crosszoneupdateactivitybyraidid) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyraidid(int raid_id, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int raid_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybyguildid); +XS(XS__crosszoneupdateactivitybyguildid) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyguildid(int guild_id, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int guild_id = (int) SvIV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybyexpeditionid); +XS(XS__crosszoneupdateactivitybyexpeditionid) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyexpeditionid(uint32 expedition_id, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + uint32 expedition_id = (uint32) SvUV(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_identifier, task_subidentifier, update_count, enforce_level_requirement); + } + XSRETURN_EMPTY; +} + +XS(XS__crosszoneupdateactivitybyclientname); +XS(XS__crosszoneupdateactivitybyclientname) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: quest::crosszoneupdateactivitybyclientname(const char* client_name, uint32 task_identifier, int activity_id, [int update_count = 1])"); + { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_identifier = 0; + const char* client_name = (const char*) SvPV_nolen(ST(0)); + uint32 task_identifier = (uint32) SvUV(ST(1)); + int task_subidentifier = (int) SvIV(ST(2)); + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 4) + update_count = (int) SvIV(ST(3)); + + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_identifier, task_subidentifier, update_count, enforce_level_requirement, client_name); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideassigntask); +XS(XS__worldwideassigntask) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideassigntask(uint32 task_identifier, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_AssignTask; + uint32 task_identifier = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidecastspell); +XS(XS__worldwidecastspell) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidecastspell(uint32 spell_id, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWSpellUpdateType_Cast; + uint32 spell_id = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidedisabletask); +XS(XS__worldwidedisabletask) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidedisabletask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_DisableTask; + uint32 task_identifier = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideenabletask); +XS(XS__worldwideenabletask) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideenabletask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_EnableTask; + uint32 task_identifier = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidefailtask); +XS(XS__worldwidefailtask) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidefailtask(uint32 task_id, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_FailTask; + uint32 task_identifier = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidemarquee); +XS(XS__worldwidemarquee) { + dXSARGS; + if (items < 6 || items > 8) + Perl_croak(aTHX_ "Usage: quest::worldwidemarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint32 type = (uint32) SvUV(ST(0)); + uint32 priority = (uint32) SvUV(ST(1)); + uint32 fade_in = (uint32) SvUV(ST(2)); + uint32 fade_out = (uint32) SvUV(ST(3)); + uint32 duration = (uint32) SvUV(ST(4)); + const char* message = (const char*) SvPV_nolen(ST(5)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 7) + min_status = (uint8) SvUV(ST(6)); + + if (items == 8) + max_status = (uint8) SvUV(ST(7)); + + quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidemessage); +XS(XS__worldwidemessage) { + dXSARGS; + if (items < 2 || items > 4) + Perl_croak(aTHX_ "Usage: quest::worldwidemessage(uint32 type, const char* message, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint32 type = (uint32) SvUV(ST(0)); + const char* message = (const char*) SvPV_nolen(ST(1)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 3) + min_status = (uint8) SvUV(ST(2)); + + if (items == 4) + max_status = (uint8) SvUV(ST(3)); + + quest_manager.WorldWideMessage(type, message, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidemove); +XS(XS__worldwidemove) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidemove(const char* zone_short_name, [uint8 min_status = 0, uint8 max_status = 0])"); + { + uint8 update_type = WWMoveUpdateType_MoveZone; + const char* zone_short_name = (const char*) SvPV_nolen(ST(0)); + uint16 instance_id = 0; + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidemoveinstance); +XS(XS__worldwidemoveinstance) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidemoveinstance(uint16 instance_id, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWMoveUpdateType_MoveZoneInstance; + const char* zone_short_name = ""; + uint16 instance_id = (uint16) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideremovespell); +XS(XS__worldwideremovespell) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideremovespell(uint32 spell_id, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWSpellUpdateType_Remove; + uint32 spell_id = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideremovetask); +XS(XS__worldwideremovetask) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideremovetask(uint32 task_identifier, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_RemoveTask; + uint32 task_identifier = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + + XSRETURN_EMPTY; +} + +XS(XS__worldwideresetactivity); +XS(XS__worldwideresetactivity) { + dXSARGS; + if (items < 2 || items > 4) + Perl_croak(aTHX_ "Usage: quest::worldwideresetactivity(uint32 task_identifier, int activity_id, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_ActivityReset; + uint32 task_identifier = (uint32) SvUV(ST(0)); + int task_subidentifier = (int) SvIV(ST(1)); + uint8 min_status = 0; + uint8 max_status = 0; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + min_status = (uint8) SvUV(ST(2)); + + if (items == 4) + max_status = (uint8) SvUV(ST(3)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidesetentityvariableclient); +XS(XS__worldwidesetentityvariableclient) { + dXSARGS; + if (items < 2 || items > 4) + Perl_croak(aTHX_ "Usage: quest::worldwidesetentityvariableclient(const char* variable_name, const char* variable_value, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWSetEntityVariableUpdateType_Character; + const char* variable_name = (const char*) SvPV_nolen(ST(0)); + const char* variable_value = (const char*) SvPV_nolen(ST(1)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 3) + min_status = (uint8) SvUV(ST(2)); + + if (items == 4) + max_status = (uint8) SvUV(ST(3)); + + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidesetentityvariablenpc); +XS(XS__worldwidesetentityvariablenpc) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::worldwidesetentityvariablenpc(const char* variable_name, const char* variable_value)"); + { + uint8 update_type = WWSetEntityVariableUpdateType_NPC; + const char* variable_name = (const char*) SvPV_nolen(ST(0)); + const char* variable_value = (const char*) SvPV_nolen(ST(1)); + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidesignalnpc); +XS(XS__worldwidesignalnpc) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::worldwidesignalnpc(uint32 signal)"); + { + uint8 update_type = WWSignalUpdateType_NPC; + uint32 signal = (uint32) SvUV(ST(0)); + quest_manager.WorldWideSignal(update_type, signal); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwidesignalclient); +XS(XS__worldwidesignalclient) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwidesignalclient(uint32 signal, [uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWSignalUpdateType_Character; + uint32 signal = (uint32) SvUV(ST(0)); + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideSignal(update_type, signal, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideupdateactivity); +XS(XS__worldwideupdateactivity) { + dXSARGS; + if (items < 2 || items > 5) + Perl_croak(aTHX_ "Usage: quest::worldwideupdateactivity(uint32 task_identifier, int activity_id, [int update_count = 1, uint8 min_status = 0, uint max_status = 0])"); + { + uint8 update_type = WWTaskUpdateType_ActivityUpdate; + uint32 task_identifier = (uint32) SvUV(ST(0)); + int task_subidentifier = (int) SvIV(ST(1)); + uint8 min_status = 0; + uint8 max_status = 0; + int update_count = 1; + bool enforce_level_requirement = false; + if (items == 3) + update_count = (int) SvIV(ST(2)); + + if (items == 4) + min_status = (uint8) SvUV(ST(3)); + + if (items == 5) + max_status = (uint8) SvUV(ST(4)); + + quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideaddldonloss); +XS(XS__worldwideaddldonloss) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideaddldonloss(uint32 theme_id, [min_status = 0, max_status = 0])"); + { + uint8 update_type = CZLDoNUpdateSubtype_Loss; + uint32 theme_id = (uint32) SvUV(ST(0)); + int points = 1; + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideaddldonpoints); +XS(XS__worldwideaddldonpoints) { + dXSARGS; + if (items < 1 || items > 4) + Perl_croak(aTHX_ "Usage: quest::worldwideaddldonpoints(uint32 theme_id. [int points = 1, min_status = 0, max_status = 0])"); + { + uint8 update_type = CZLDoNUpdateSubtype_Points; + uint32 theme_id = (uint32) SvUV(ST(0)); + int points = 1; + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + points = (int) SvIV(ST(1)); + + if (items == 3) + min_status = (uint8) SvUV(ST(2)); + + if (items == 4) + max_status = (uint8) SvUV(ST(3)); + + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); + } + XSRETURN_EMPTY; +} + +XS(XS__worldwideaddldonwin); +XS(XS__worldwideaddldonwin) { + dXSARGS; + if (items < 1 || items > 3) + Perl_croak(aTHX_ "Usage: quest::worldwideaddldonwin(uint32 theme_id, [min_status = 0, max_status = 0])"); + { + uint8 update_type = CZLDoNUpdateSubtype_Win; + uint32 theme_id = (uint32) SvUV(ST(0)); + int points = 1; + uint8 min_status = 0; + uint8 max_status = 0; + if (items == 2) + min_status = (uint8) SvUV(ST(1)); + + if (items == 3) + max_status = (uint8) SvUV(ST(2)); + + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); + } + XSRETURN_EMPTY; +} /* This is the callback perl will look for to setup the @@ -6985,79 +7728,114 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "crosszoneaddldonlossbyraidid"), XS__crosszoneaddldonlossbyraidid, file); newXS(strcpy(buf, "crosszoneaddldonlossbyguildid"), XS__crosszoneaddldonlossbyguildid, file); newXS(strcpy(buf, "crosszoneaddldonlossbyexpeditionid"), XS__crosszoneaddldonlossbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneaddldonlossbyclientname"), XS__crosszoneaddldonlossbyclientname, file); newXS(strcpy(buf, "crosszoneaddldonpointsbycharid"), XS__crosszoneaddldonpointsbycharid, file); newXS(strcpy(buf, "crosszoneaddldonpointsbygroupid"), XS__crosszoneaddldonpointsbygroupid, file); newXS(strcpy(buf, "crosszoneaddldonpointsbyraidid"), XS__crosszoneaddldonpointsbyraidid, file); newXS(strcpy(buf, "crosszoneaddldonpointsbyguildid"), XS__crosszoneaddldonpointsbyguildid, file); newXS(strcpy(buf, "crosszoneaddldonpointsbyexpeditionid"), XS__crosszoneaddldonpointsbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneaddldonpointsbyclientname"), XS__crosszoneaddldonpointsbyclientname, file); newXS(strcpy(buf, "crosszoneaddldonwinbycharid"), XS__crosszoneaddldonwinbycharid, file); newXS(strcpy(buf, "crosszoneaddldonwinbygroupid"), XS__crosszoneaddldonwinbygroupid, file); newXS(strcpy(buf, "crosszoneaddldonwinbyraidid"), XS__crosszoneaddldonwinbyraidid, file); newXS(strcpy(buf, "crosszoneaddldonwinbyguildid"), XS__crosszoneaddldonwinbyguildid, file); newXS(strcpy(buf, "crosszoneaddldonwinbyexpeditionid"), XS__crosszoneaddldonwinbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneaddldonwinbyclientname"), XS__crosszoneaddldonwinbyclientname, file); newXS(strcpy(buf, "crosszoneassigntaskbycharid"), XS__crosszoneassigntaskbycharid, file); newXS(strcpy(buf, "crosszoneassigntaskbygroupid"), XS__crosszoneassigntaskbygroupid, file); newXS(strcpy(buf, "crosszoneassigntaskbyraidid"), XS__crosszoneassigntaskbyraidid, file); newXS(strcpy(buf, "crosszoneassigntaskbyguildid"), XS__crosszoneassigntaskbyguildid, file); + newXS(strcpy(buf, "crosszoneassigntaskbyexpeditionid"), XS__crosszoneassigntaskbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneassigntaskbyclientname"), XS__crosszoneassigntaskbyclientname, file); newXS(strcpy(buf, "crosszonecastspellbycharid"), XS__crosszonecastspellbycharid, file); newXS(strcpy(buf, "crosszonecastspellbygroupid"), XS__crosszonecastspellbygroupid, file); newXS(strcpy(buf, "crosszonecastspellbyraidid"), XS__crosszonecastspellbyraidid, file); newXS(strcpy(buf, "crosszonecastspellbyguildid"), XS__crosszonecastspellbyguildid, file); + newXS(strcpy(buf, "crosszonecastspellbyexpeditionid"), XS__crosszonecastspellbyexpeditionid, file); + newXS(strcpy(buf, "crosszonecastspellbyclientname"), XS__crosszonecastspellbyclientname, file); newXS(strcpy(buf, "crosszonedisabletaskbycharid"), XS__crosszonedisabletaskbycharid, file); newXS(strcpy(buf, "crosszonedisabletaskbygroupid"), XS__crosszonedisabletaskbygroupid, file); newXS(strcpy(buf, "crosszonedisabletaskbyraidid"), XS__crosszonedisabletaskbyraidid, file); newXS(strcpy(buf, "crosszonedisabletaskbyguildid"), XS__crosszonedisabletaskbyguildid, file); + newXS(strcpy(buf, "crosszonedisabletaskbyexpeditionid"), XS__crosszonedisabletaskbyexpeditionid, file); + newXS(strcpy(buf, "crosszonedisabletaskbyclientname"), XS__crosszonedisabletaskbyclientname, file); newXS(strcpy(buf, "crosszoneenabletaskbycharid"), XS__crosszoneenabletaskbycharid, file); newXS(strcpy(buf, "crosszoneenabletaskbygroupid"), XS__crosszoneenabletaskbygroupid, file); newXS(strcpy(buf, "crosszoneenabletaskbyraidid"), XS__crosszoneenabletaskbyraidid, file); newXS(strcpy(buf, "crosszoneenabletaskbyguildid"), XS__crosszoneenabletaskbyguildid, file); + newXS(strcpy(buf, "crosszoneenabletaskbyexpeditionid"), XS__crosszoneenabletaskbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneenabletaskbyclientname"), XS__crosszoneenabletaskbyclientname, file); newXS(strcpy(buf, "crosszonefailtaskbycharid"), XS__crosszonefailtaskbycharid, file); newXS(strcpy(buf, "crosszonefailtaskbygroupid"), XS__crosszonefailtaskbygroupid, file); newXS(strcpy(buf, "crosszonefailtaskbyraidid"), XS__crosszonefailtaskbyraidid, file); newXS(strcpy(buf, "crosszonefailtaskbyguildid"), XS__crosszonefailtaskbyguildid, file); + newXS(strcpy(buf, "crosszonefailtaskbyexpeditionid"), XS__crosszonefailtaskbyexpeditionid, file); + newXS(strcpy(buf, "crosszonefailtaskbyclientname"), XS__crosszonefailtaskbyclientname, file); newXS(strcpy(buf, "crosszonemarqueebycharid"), XS__crosszonemarqueebycharid, file); newXS(strcpy(buf, "crosszonemarqueebygroupid"), XS__crosszonemarqueebygroupid, file); newXS(strcpy(buf, "crosszonemarqueebyraidid"), XS__crosszonemarqueebyraidid, file); newXS(strcpy(buf, "crosszonemarqueebyguildid"), XS__crosszonemarqueebyguildid, file); - newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file); + newXS(strcpy(buf, "crosszonemarqueebyexpeditionid"), XS__crosszonemarqueebyexpeditionid, file); + newXS(strcpy(buf, "crosszonemarqueebyclientname"), XS__crosszonemarqueebyclientname, file); + newXS(strcpy(buf, "crosszonemessageplayerbycharid"), XS__crosszonemessageplayerbycharid, file); newXS(strcpy(buf, "crosszonemessageplayerbygroupid"), XS__crosszonemessageplayerbygroupid, file); newXS(strcpy(buf, "crosszonemessageplayerbyraidid"), XS__crosszonemessageplayerbyraidid, file); newXS(strcpy(buf, "crosszonemessageplayerbyguildid"), XS__crosszonemessageplayerbyguildid, file); + newXS(strcpy(buf, "crosszonemessageplayerbyexpeditionid"), XS__crosszonemessageplayerbyexpeditionid, file); + newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file); newXS(strcpy(buf, "crosszonemoveplayerbycharid"), XS__crosszonemoveplayerbycharid, file); newXS(strcpy(buf, "crosszonemoveplayerbygroupid"), XS__crosszonemoveplayerbygroupid, file); newXS(strcpy(buf, "crosszonemoveplayerbyraidid"), XS__crosszonemoveplayerbyraidid, file); newXS(strcpy(buf, "crosszonemoveplayerbyguildid"), XS__crosszonemoveplayerbyguildid, file); + newXS(strcpy(buf, "crosszonemoveplayerbyexpeditionid"), XS__crosszonemoveplayerbyexpeditionid, file); + newXS(strcpy(buf, "crosszonemoveplayerbyname"), XS__crosszonemoveplayerbyname, file); newXS(strcpy(buf, "crosszonemoveinstancebycharid"), XS__crosszonemoveinstancebycharid, file); newXS(strcpy(buf, "crosszonemoveinstancebygroupid"), XS__crosszonemoveinstancebygroupid, file); newXS(strcpy(buf, "crosszonemoveinstancebyraidid"), XS__crosszonemoveinstancebyraidid, file); newXS(strcpy(buf, "crosszonemoveinstancebyguildid"), XS__crosszonemoveinstancebyguildid, file); + newXS(strcpy(buf, "crosszonemoveinstancebyexpeditionid"), XS__crosszonemoveinstancebyexpeditionid, file); + newXS(strcpy(buf, "crosszonemoveinstancebyclientname"), XS__crosszonemoveinstancebyclientname, file); newXS(strcpy(buf, "crosszoneremovespellbycharid"), XS__crosszoneremovespellbycharid, file); newXS(strcpy(buf, "crosszoneremovespellbygroupid"), XS__crosszoneremovespellbygroupid, file); newXS(strcpy(buf, "crosszoneremovespellbyraidid"), XS__crosszoneremovespellbyraidid, file); newXS(strcpy(buf, "crosszoneremovespellbyguildid"), XS__crosszoneremovespellbyguildid, file); + newXS(strcpy(buf, "crosszoneremovespellbyexpeditionid"), XS__crosszoneremovespellbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneremovespellbyclientname"), XS__crosszoneremovespellbyclientname, file); newXS(strcpy(buf, "crosszoneremovetaskbycharid"), XS__crosszoneremovetaskbycharid, file); newXS(strcpy(buf, "crosszoneremovetaskbygroupid"), XS__crosszoneremovetaskbygroupid, file); newXS(strcpy(buf, "crosszoneremovetaskbyraidid"), XS__crosszoneremovetaskbyraidid, file); newXS(strcpy(buf, "crosszoneremovetaskbyguildid"), XS__crosszoneremovetaskbyguildid, file); + newXS(strcpy(buf, "crosszoneremovetaskbyexpeditionid"), XS__crosszoneremovetaskbyexpeditionid, file); + newXS(strcpy(buf, "crosszoneremovetaskbyclientname"), XS__crosszoneremovetaskbyclientname, file); newXS(strcpy(buf, "crosszoneresetactivitybycharid"), XS__crosszoneresetactivitybycharid, file); newXS(strcpy(buf, "crosszoneresetactivitybygroupid"), XS__crosszoneresetactivitybygroupid, file); newXS(strcpy(buf, "crosszoneresetactivitybyraidid"), XS__crosszoneresetactivitybyraidid, file); newXS(strcpy(buf, "crosszoneresetactivitybyguildid"), XS__crosszoneresetactivitybyguildid, file); - newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); - newXS(strcpy(buf, "crosszonesetentityvariablebyclientname"), XS__crosszonesetentityvariablebyclientname, file); + newXS(strcpy(buf, "crosszoneresetactivitybyexpeditionid"), XS__crosszoneresetactivitybyexpeditionid, file); + newXS(strcpy(buf, "crosszoneresetactivitybyclientname"), XS__crosszoneresetactivitybyclientname, file); + newXS(strcpy(buf, "crosszonesetentityvariablebycharid"), XS__crosszonesetentityvariablebycharid, file); newXS(strcpy(buf, "crosszonesetentityvariablebygroupid"), XS__crosszonesetentityvariablebygroupid, file); newXS(strcpy(buf, "crosszonesetentityvariablebyraidid"), XS__crosszonesetentityvariablebyraidid, file); newXS(strcpy(buf, "crosszonesetentityvariablebyguildid"), XS__crosszonesetentityvariablebyguildid, file); + newXS(strcpy(buf, "crosszonesetentityvariablebyexpeditionid"), XS__crosszonesetentityvariablebyexpeditionid, file); + newXS(strcpy(buf, "crosszonesetentityvariablebyclientname"), XS__crosszonesetentityvariablebyclientname, file); + newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file); newXS(strcpy(buf, "crosszonesignalclientbygroupid"), XS__crosszonesignalclientbygroupid, file); newXS(strcpy(buf, "crosszonesignalclientbyraidid"), XS__crosszonesignalclientbyraidid, file); newXS(strcpy(buf, "crosszonesignalclientbyguildid"), XS__crosszonesignalclientbyguildid, file); + newXS(strcpy(buf, "crosszonesignalclientbyexpeditionid"), XS__crosszonesignalclientbyexpeditionid, file); newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file); newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file); newXS(strcpy(buf, "crosszoneupdateactivitybycharid"), XS__crosszoneupdateactivitybycharid, file); newXS(strcpy(buf, "crosszoneupdateactivitybygroupid"), XS__crosszoneupdateactivitybygroupid, file); newXS(strcpy(buf, "crosszoneupdateactivitybyraidid"), XS__crosszoneupdateactivitybyraidid, file); newXS(strcpy(buf, "crosszoneupdateactivitybyguildid"), XS__crosszoneupdateactivitybyguildid, file); + newXS(strcpy(buf, "crosszoneupdateactivitybyexpeditionid"), XS__crosszoneupdateactivitybyexpeditionid, file); + newXS(strcpy(buf, "crosszoneupdateactivitybyclientname"), XS__crosszoneupdateactivitybyclientname, file); + newXS(strcpy(buf, "worldwideaddldonloss"), XS__worldwideaddldonloss, file); + newXS(strcpy(buf, "worldwideaddldonpoints"), XS__worldwideaddldonpoints, file); + newXS(strcpy(buf, "worldwideaddldonwin"), XS__worldwideaddldonwin, file); newXS(strcpy(buf, "worldwidecastspell"), XS__worldwidecastspell, file); newXS(strcpy(buf, "worldwidedisabletask"), XS__worldwidedisabletask, file); newXS(strcpy(buf, "worldwideenabletask"), XS__worldwideenabletask, file); diff --git a/zone/event_codes.h b/zone/event_codes.h index 87143d11e..4a915ce9c 100644 --- a/zone/event_codes.h +++ b/zone/event_codes.h @@ -90,6 +90,7 @@ typedef enum { EVENT_BOT_COMMAND, EVENT_WARP, EVENT_TEST_BUFF, + EVENT_COMBINE, EVENT_CONSIDER, EVENT_CONSIDER_CORPSE, _LargestEventID diff --git a/zone/gm_commands/door_manipulation.cpp b/zone/gm_commands/door_manipulation.cpp index c9a950e52..afb91b07a 100644 --- a/zone/gm_commands/door_manipulation.cpp +++ b/zone/gm_commands/door_manipulation.cpp @@ -129,7 +129,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) std::vector move_h_options_negative; std::vector set_size_options_positive; std::vector set_size_options_negative; - for (const auto &move_option : move_options) { + for (const auto &move_option : move_options) { if (move_option == move_x_action) { move_x_options_positive.emplace_back( EQ::SayLinkEngine::GenerateQuestSaylink( @@ -165,7 +165,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} -.25", move_option), false, - "-.25" + ".25" ) ); } @@ -190,7 +190,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) } for (int move_index = -15; move_index <= 0; move_index += 5) { - int value = (move_index == 0 ? 1 : move_index); + int value = (move_index == 0 ? -1 : move_index); move_y_options_negative.emplace_back( EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} {}", move_option, value), @@ -204,7 +204,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} -.25", move_option), false, - "-.25" + ".25" ) ); } @@ -229,7 +229,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) } for (int move_index = -15; move_index <= 0; move_index += 5) { - int value = (move_index == 0 ? 1 : move_index); + int value = (move_index == 0 ? -1 : move_index); move_z_options_negative.emplace_back( EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} {}", move_option, value), @@ -243,7 +243,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} -.25", move_option), false, - "-.25" + ".25" ) ); } @@ -260,7 +260,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) } for (int move_index = -50; move_index <= 0; move_index += 5) { - int value = (move_index == 0 ? 1 : move_index); + int value = (move_index == 0 ? -1 : move_index); move_h_options_negative.emplace_back( EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} {}", move_option, value), @@ -283,7 +283,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) } for (int move_index = -100; move_index <= 0; move_index += 10) { - int value = (move_index == 0 ? 1 : move_index); + int value = (move_index == 0 ? -1 : move_index); set_size_options_negative.emplace_back( EQ::SayLinkEngine::GenerateQuestSaylink( fmt::format("#door edit {} {}", move_option, value), @@ -297,26 +297,30 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep) // we're passing a move action here if (!arg3.empty() && StringIsNumber(arg3)) { - int x_move = 0; - int y_move = 0; - int z_move = 0; - int h_move = 0; - int set_size = 0; + float x_move = 0.0f; + float y_move = 0.0f; + float z_move = 0.0f; + float h_move = 0.0f; + float set_size = 0.0f; if (arg2 == move_x_action) { - x_move = std::atoi(arg3.c_str()); + x_move = std::atof(arg3.c_str()); } + if (arg2 == move_y_action) { - y_move = std::atoi(arg3.c_str()); + y_move = std::atof(arg3.c_str()); } + if (arg2 == move_z_action) { - z_move = std::atoi(arg3.c_str()); + z_move = std::atof(arg3.c_str()); } + if (arg2 == move_h_action) { - h_move = std::atoi(arg3.c_str()); + h_move = std::atof(arg3.c_str()); } + if (arg2 == set_size_action) { - set_size = std::atoi(arg3.c_str()); + set_size = std::atof(arg3.c_str()); } door->SetLocation( diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 1992b78eb..3338bea5c 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1045,482 +1045,6 @@ void lua_send_mail(const char *to, const char *from, const char *subject, const quest_manager.SendMail(to, from, subject, message); } -void lua_cross_zone_assign_task_by_char_id(int character_id, uint32 task_id) { - quest_manager.CrossZoneAssignTaskByCharID(character_id, task_id); -} - -void lua_cross_zone_assign_task_by_char_id(int character_id, uint32 task_id, bool enforce_level_requirement) { - quest_manager.CrossZoneAssignTaskByCharID(character_id, task_id, enforce_level_requirement); -} - -void lua_cross_zone_assign_task_by_group_id(int group_id, uint32 task_id) { - quest_manager.CrossZoneAssignTaskByGroupID(group_id, task_id); -} - -void lua_cross_zone_assign_task_by_group_id(int group_id, uint32 task_id, bool enforce_level_requirement) { - quest_manager.CrossZoneAssignTaskByGroupID(group_id, task_id, enforce_level_requirement); -} - -void lua_cross_zone_assign_task_by_raid_id(int raid_id, uint32 task_id) { - quest_manager.CrossZoneAssignTaskByRaidID(raid_id, task_id); -} - -void lua_cross_zone_assign_task_by_raid_id(int raid_id, uint32 task_id, bool enforce_level_requirement) { - quest_manager.CrossZoneAssignTaskByRaidID(raid_id, task_id, enforce_level_requirement); -} - -void lua_cross_zone_assign_task_by_guild_id(int guild_id, uint32 task_id) { - quest_manager.CrossZoneAssignTaskByGuildID(guild_id, task_id); -} - -void lua_cross_zone_assign_task_by_guild_id(int guild_id, uint32 task_id, bool enforce_level_requirement) { - quest_manager.CrossZoneAssignTaskByGuildID(guild_id, task_id, enforce_level_requirement); -} - -void lua_cross_zone_cast_spell_by_char_id(int character_id, uint32 spell_id) { - quest_manager.CrossZoneCastSpellByCharID(character_id, spell_id); -} - -void lua_cross_zone_cast_spell_by_group_id(int group_id, uint32 spell_id) { - quest_manager.CrossZoneCastSpellByGroupID(group_id, spell_id); -} - -void lua_cross_zone_cast_spell_by_raid_id(int raid_id, uint32 spell_id) { - quest_manager.CrossZoneCastSpellByRaidID(raid_id, spell_id); -} - -void lua_cross_zone_cast_spell_by_guild_id(int guild_id, uint32 spell_id) { - quest_manager.CrossZoneCastSpellByGuildID(guild_id, spell_id); -} - -void lua_cross_zone_disable_task_by_char_id(int character_id, uint32 task_id) { - quest_manager.CrossZoneDisableTaskByCharID(character_id, task_id); -} - -void lua_cross_zone_disable_task_by_group_id(int group_id, uint32 task_id) { - quest_manager.CrossZoneDisableTaskByGroupID(group_id, task_id); -} - -void lua_cross_zone_disable_task_by_raid_id(int raid_id, uint32 task_id) { - quest_manager.CrossZoneDisableTaskByRaidID(raid_id, task_id); -} - -void lua_cross_zone_disable_task_by_guild_id(int guild_id, uint32 task_id) { - quest_manager.CrossZoneDisableTaskByGuildID(guild_id, task_id); -} - -void lua_cross_zone_enable_task_by_char_id(int character_id, uint32 task_id) { - quest_manager.CrossZoneEnableTaskByCharID(character_id, task_id); -} - -void lua_cross_zone_enable_task_by_group_id(int group_id, uint32 task_id) { - quest_manager.CrossZoneEnableTaskByGroupID(group_id, task_id); -} - -void lua_cross_zone_enable_task_by_raid_id(int raid_id, uint32 task_id) { - quest_manager.CrossZoneEnableTaskByRaidID(raid_id, task_id); -} - -void lua_cross_zone_enable_task_by_guild_id(int guild_id, uint32 task_id) { - quest_manager.CrossZoneEnableTaskByGuildID(guild_id, task_id); -} - -void lua_cross_zone_fail_task_by_char_id(int character_id, uint32 task_id) { - quest_manager.CrossZoneFailTaskByCharID(character_id, task_id); -} - -void lua_cross_zone_fail_task_by_group_id(int group_id, uint32 task_id) { - quest_manager.CrossZoneFailTaskByGroupID(group_id, task_id); -} - -void lua_cross_zone_fail_task_by_raid_id(int raid_id, uint32 task_id) { - quest_manager.CrossZoneFailTaskByRaidID(raid_id, task_id); -} - -void lua_cross_zone_fail_task_by_guild_id(int guild_id, uint32 task_id) { - quest_manager.CrossZoneFailTaskByGuildID(guild_id, task_id); -} - -void lua_cross_zone_marquee_by_char_id(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - quest_manager.CrossZoneMarqueeByCharID(character_id, type, priority, fade_in, fade_out, duration, message); -} - -void lua_cross_zone_marquee_by_group_id(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - quest_manager.CrossZoneMarqueeByGroupID(group_id, type, priority, fade_in, fade_out, duration, message); -} - -void lua_cross_zone_marquee_by_raid_id(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - quest_manager.CrossZoneMarqueeByRaidID(raid_id, type, priority, fade_in, fade_out, duration, message); -} - -void lua_cross_zone_marquee_by_guild_id(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - quest_manager.CrossZoneMarqueeByGuildID(guild_id, type, priority, fade_in, fade_out, duration, message); -} - -void lua_cross_zone_message_player_by_name(uint32 type, const char *character_name, const char *message) { - quest_manager.CrossZoneMessagePlayerByName(type, character_name, message); -} - -void lua_cross_zone_message_player_by_group_id(uint32 type, int group_id, const char *message) { - quest_manager.CrossZoneMessagePlayerByGroupID(type, group_id, message); -} - -void lua_cross_zone_message_player_by_raid_id(uint32 type, int raid_id, const char *message) { - quest_manager.CrossZoneMessagePlayerByRaidID(type, raid_id, message); -} - -void lua_cross_zone_message_player_by_guild_id(uint32 type, int guild_id, const char *message) { - quest_manager.CrossZoneMessagePlayerByGuildID(type, guild_id, message); -} - -void lua_cross_zone_move_player_by_char_id(int character_id, const char *zone_short_name) { - quest_manager.CrossZoneMovePlayerByCharID(character_id, zone_short_name); -} - -void lua_cross_zone_move_player_by_group_id(int group_id, const char *zone_short_name) { - quest_manager.CrossZoneMovePlayerByGroupID(group_id, zone_short_name); -} - -void lua_cross_zone_move_player_by_raid_id(int raid_id, const char *zone_short_name) { - quest_manager.CrossZoneMovePlayerByRaidID(raid_id, zone_short_name); -} - -void lua_cross_zone_move_player_by_guild_id(int guild_id, const char *zone_short_name) { - quest_manager.CrossZoneMovePlayerByGuildID(guild_id, zone_short_name); -} - -void lua_cross_zone_move_instance_by_char_id(int character_id, uint16 instance_id) { - quest_manager.CrossZoneMoveInstanceByCharID(character_id, instance_id); -} - -void lua_cross_zone_move_instance_by_group_id(int group_id, uint16 instance_id) { - quest_manager.CrossZoneMoveInstanceByGroupID(group_id, instance_id); -} - -void lua_cross_zone_move_instance_by_raid_id(int raid_id, uint16 instance_id) { - quest_manager.CrossZoneMoveInstanceByRaidID(raid_id, instance_id); -} - -void lua_cross_zone_move_instance_by_guild_id(int guild_id, uint16 instance_id) { - quest_manager.CrossZoneMoveInstanceByGuildID(guild_id, instance_id); -} - -void lua_cross_zone_remove_spell_by_char_id(int character_id, uint32 spell_id) { - quest_manager.CrossZoneRemoveSpellByCharID(character_id, spell_id); -} - -void lua_cross_zone_remove_spell_by_group_id(int group_id, uint32 spell_id) { - quest_manager.CrossZoneRemoveSpellByGroupID(group_id, spell_id); -} - -void lua_cross_zone_remove_spell_by_raid_id(int raid_id, uint32 spell_id) { - quest_manager.CrossZoneRemoveSpellByRaidID(raid_id, spell_id); -} - -void lua_cross_zone_remove_spell_by_guild_id(int guild_id, uint32 spell_id) { - quest_manager.CrossZoneRemoveSpellByGuildID(guild_id, spell_id); -} - -void lua_cross_zone_remove_task_by_char_id(int character_id, uint32 task_id) { - quest_manager.CrossZoneRemoveTaskByCharID(character_id, task_id); -} - -void lua_cross_zone_remove_task_by_group_id(int group_id, uint32 task_id) { - quest_manager.CrossZoneRemoveTaskByGroupID(group_id, task_id); -} - -void lua_cross_zone_remove_task_by_raid_id(int raid_id, uint32 task_id) { - quest_manager.CrossZoneRemoveTaskByRaidID(raid_id, task_id); -} - -void lua_cross_zone_remove_task_by_guild_id(int guild_id, uint32 task_id) { - quest_manager.CrossZoneRemoveTaskByGuildID(guild_id, task_id); -} - -void lua_cross_zone_reset_activity_by_char_id(int character_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneResetActivityByCharID(character_id, task_id, activity_id); -} - -void lua_cross_zone_reset_activity_by_group_id(int group_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneResetActivityByGroupID(group_id, task_id, activity_id); -} - -void lua_cross_zone_reset_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneResetActivityByRaidID(raid_id, task_id, activity_id); -} - -void lua_cross_zone_reset_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneResetActivityByGuildID(guild_id, task_id, activity_id); -} - -void lua_cross_zone_set_entity_variable_by_client_name(const char *character_name, const char *variable_name, const char *variable_value) { - quest_manager.CrossZoneSetEntityVariableByClientName(character_name, variable_name, variable_value); -} - -void lua_cross_zone_set_entity_variable_by_group_id(int group_id, const char *variable_name, const char *variable_value) { - quest_manager.CrossZoneSetEntityVariableByGroupID(group_id, variable_name, variable_value); -} - -void lua_cross_zone_set_entity_variable_by_raid_id(int raid_id, const char *variable_name, const char *variable_value) { - quest_manager.CrossZoneSetEntityVariableByRaidID(raid_id, variable_name, variable_value); -} - -void lua_cross_zone_set_entity_variable_by_guild_id(int guild_id, const char *variable_name, const char *variable_value) { - quest_manager.CrossZoneSetEntityVariableByGuildID(guild_id, variable_name, variable_value); -} - -void lua_cross_zone_signal_client_by_char_id(uint32 character_id, int signal) { - quest_manager.CrossZoneSignalPlayerByCharID(character_id, signal); -} - -void lua_cross_zone_signal_client_by_group_id(uint32 group_id, int signal) { - quest_manager.CrossZoneSignalPlayerByGroupID(group_id, signal); -} - -void lua_cross_zone_signal_client_by_raid_id(uint32 raid_id, int signal) { - quest_manager.CrossZoneSignalPlayerByRaidID(raid_id, signal); -} - -void lua_cross_zone_signal_client_by_guild_id(uint32 guild_id, int signal) { - quest_manager.CrossZoneSignalPlayerByGuildID(guild_id, signal); -} - -void lua_cross_zone_signal_client_by_name(const char *character_name, int signal) { - quest_manager.CrossZoneSignalPlayerByName(character_name, signal); -} - -void lua_cross_zone_signal_npc_by_npctype_id(uint32 npctype_id, int signal) { - quest_manager.CrossZoneSignalNPCByNPCTypeID(npctype_id, signal); -} - -void lua_cross_zone_update_activity_by_char_id(int character_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneUpdateActivityByCharID(character_id, task_id, activity_id); -} - -void lua_cross_zone_update_activity_by_char_id(int character_id, uint32 task_id, int activity_id, int activity_count) { - quest_manager.CrossZoneUpdateActivityByCharID(character_id, task_id, activity_id, activity_count); -} - -void lua_cross_zone_update_activity_by_group_id(int group_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneUpdateActivityByGroupID(group_id, task_id, activity_id); -} - -void lua_cross_zone_update_activity_by_group_id(int group_id, uint32 task_id, int activity_id, int activity_count) { - quest_manager.CrossZoneUpdateActivityByGroupID(group_id, task_id, activity_id, activity_count); -} - -void lua_cross_zone_update_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneUpdateActivityByRaidID(raid_id, task_id, activity_id); -} - -void lua_cross_zone_update_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id, int activity_count) { - quest_manager.CrossZoneUpdateActivityByRaidID(raid_id, task_id, activity_id, activity_count); -} - -void lua_cross_zone_update_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id) { - quest_manager.CrossZoneUpdateActivityByGuildID(guild_id, task_id, activity_id); -} - -void lua_cross_zone_update_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id, int activity_count) { - quest_manager.CrossZoneUpdateActivityByGuildID(guild_id, task_id, activity_id, activity_count); -} - -void lua_world_wide_assign_task(uint32 task_id) { - quest_manager.WorldWideAssignTask(task_id); -} - -void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement) { - quest_manager.WorldWideAssignTask(task_id, enforce_level_requirement); -} - -void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement, uint8 min_status) { - quest_manager.WorldWideAssignTask(task_id, enforce_level_requirement, min_status); -} - -void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideAssignTask(task_id, enforce_level_requirement, min_status, max_status); -} - -void lua_world_wide_cast_spell(uint32 spell_id) { - quest_manager.WorldWideCastSpell(spell_id); -} - -void lua_world_wide_cast_spell(uint32 spell_id, uint8 min_status) { - quest_manager.WorldWideCastSpell(spell_id, min_status); -} - -void lua_world_wide_cast_spell(uint32 spell_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideCastSpell(spell_id, min_status, max_status); -} - -void lua_world_wide_disable_task(uint32 task_id) { - quest_manager.WorldWideDisableTask(task_id); -} - -void lua_world_wide_disable_task(uint32 task_id, uint8 min_status) { - quest_manager.WorldWideDisableTask(task_id, min_status); -} - -void lua_world_wide_disable_task(uint32 task_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideDisableTask(task_id, min_status, max_status); -} - -void lua_world_wide_enable_task(uint32 task_id) { - quest_manager.WorldWideEnableTask(task_id); -} - -void lua_world_wide_enable_task(uint32 task_id, uint8 min_status) { - quest_manager.WorldWideEnableTask(task_id, min_status); -} - -void lua_world_wide_enable_task(uint32 task_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideEnableTask(task_id, min_status, max_status); -} - -void lua_world_wide_fail_task(uint32 task_id) { - quest_manager.WorldWideFailTask(task_id); -} - -void lua_world_wide_fail_task(uint32 task_id, uint8 min_status) { - quest_manager.WorldWideFailTask(task_id, min_status); -} - -void lua_world_wide_fail_task(uint32 task_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideFailTask(task_id, min_status, max_status); -} - -void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message); -} - -void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message, uint8 min_status) { - quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status); -} - -void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status, max_status); -} - -void lua_world_wide_message(uint32 type, const char *message) { - quest_manager.WorldWideMessage(type, message); -} - -void lua_world_wide_message(uint32 type, const char *message, uint8 min_status) { - quest_manager.WorldWideMessage(type, message, min_status); -} - -void lua_world_wide_message(uint32 type, const char *message, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideMessage(type, message, min_status, max_status); -} - -void lua_world_wide_move(const char *zone_short_name) { - quest_manager.WorldWideMove(zone_short_name); -} - -void lua_world_wide_move(const char *zone_short_name, uint8 min_status) { - quest_manager.WorldWideMove(zone_short_name, min_status); -} - -void lua_world_wide_move(const char *zone_short_name, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideMove(zone_short_name, min_status, max_status); -} - -void lua_world_wide_move_instance(uint16 instance_id) { - quest_manager.WorldWideMoveInstance(instance_id); -} - -void lua_world_wide_move_instance(uint16 instance_id, uint8 min_status) { - quest_manager.WorldWideMoveInstance(instance_id, min_status); -} - -void lua_world_wide_move_instance(uint16 instance_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideMoveInstance(instance_id, min_status, max_status); -} - -void lua_world_wide_remove_spell(uint32 spell_id) { - quest_manager.WorldWideRemoveSpell(spell_id); -} - -void lua_world_wide_remove_spell(uint32 spell_id, uint8 min_status) { - quest_manager.WorldWideRemoveSpell(spell_id, min_status); -} - -void lua_world_wide_remove_spell(uint32 spell_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideRemoveSpell(spell_id, min_status, max_status); -} - -void lua_world_wide_remove_task(uint32 task_id) { - quest_manager.WorldWideRemoveTask(task_id); -} - -void lua_world_wide_remove_task(uint32 task_id, uint8 min_status) { - quest_manager.WorldWideRemoveTask(task_id, min_status); -} - -void lua_world_wide_remove_task(uint32 task_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideRemoveTask(task_id, min_status, max_status); -} - -void lua_world_wide_reset_activity(uint32 task_id, int activity_id) { - quest_manager.WorldWideResetActivity(task_id, activity_id); -} - -void lua_world_wide_reset_activity(uint32 task_id, int activity_id, uint8 min_status) { - quest_manager.WorldWideResetActivity(task_id, activity_id, min_status); -} - -void lua_world_wide_reset_activity(uint32 task_id, int activity_id, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideResetActivity(task_id, activity_id, min_status, max_status); -} - -void lua_world_wide_set_entity_variable_client(const char *variable_name, const char *variable_value) { - quest_manager.WorldWideSetEntityVariableClient(variable_name, variable_value); -} - -void lua_world_wide_set_entity_variable_client(const char *variable_name, const char *variable_value, uint8 min_status) { - quest_manager.WorldWideSetEntityVariableClient(variable_name, variable_value, min_status); -} - -void lua_world_wide_set_entity_variable_client(const char *variable_name, const char *variable_value, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideSetEntityVariableClient(variable_name, variable_value, min_status, max_status); -} - -void lua_world_wide_set_entity_variable_npc(const char *variable_name, const char *variable_value) { - quest_manager.WorldWideSetEntityVariableNPC(variable_name, variable_value); -} - -void lua_world_wide_signal_client(uint32 signal) { - quest_manager.WorldWideSignalClient(signal); -} - -void lua_world_wide_signal_client(uint32 signal, uint8 min_status) { - quest_manager.WorldWideSignalClient(signal, min_status); -} - -void lua_world_wide_signal_client(uint32 signal, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideSignalClient(signal, min_status, max_status); -} - -void lua_world_wide_signal_npc(uint32 signal) { - quest_manager.WorldWideSignalNPC(signal); -} - -void lua_world_wide_update_activity(uint32 task_id, int activity_id) { - quest_manager.WorldWideUpdateActivity(task_id, activity_id); -} - -void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count) { - quest_manager.WorldWideUpdateActivity(task_id, activity_id, activity_count); -} - -void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count, uint8 min_status) { - quest_manager.WorldWideUpdateActivity(task_id, activity_id, activity_count, min_status); -} - -void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count, uint8 min_status, uint8 max_status) { - quest_manager.WorldWideUpdateActivity(task_id, activity_id, activity_count, min_status, max_status); -} - luabind::adl::object lua_get_qglobals(lua_State *L, Lua_NPC npc, Lua_Client client) { luabind::adl::object ret = luabind::newtable(L); @@ -2365,96 +1889,6 @@ 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); -} - std::string lua_get_clean_npc_name_by_id(uint32 npc_id) { return quest_manager.getcleannpcnamebyid(npc_id); } @@ -2491,6 +1925,1202 @@ int lua_get_spell_stat(uint32 spell_id, std::string stat_identifier, uint8 slot) return quest_manager.getspellstat(spell_id, stat_identifier, slot); } +void lua_cross_zone_add_ldon_loss_by_char_id(int character_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + 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 = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + 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 = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + 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 = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + 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 = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); +} + +void lua_cross_zone_add_ldon_loss_by_client_name(const char* client_name, uint32 theme_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Loss; + int update_identifier = 0; + int points = 1; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); +} + +void lua_cross_zone_add_ldon_points_by_char_id(int character_id, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id, points); +} + +void lua_cross_zone_add_ldon_points_by_group_id(int group_id, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id, points); +} + +void lua_cross_zone_add_ldon_points_by_raid_id(int raid_id, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id, points); +} + +void lua_cross_zone_add_ldon_points_by_guild_id(int guild_id, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id, points); +} + +void lua_cross_zone_add_ldon_points_by_expedition_id(uint32 expedition_id, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id, points); +} + +void lua_cross_zone_add_ldon_points_by_client_name(const char* client_name, uint32 theme_id, int points) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Points; + int update_identifier = 0; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); +} + +void lua_cross_zone_add_ldon_win_by_char_id(int character_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, character_id, theme_id); +} + +void lua_cross_zone_add_ldon_win_by_group_id(int group_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, group_id, theme_id); +} + +void lua_cross_zone_add_ldon_win_by_raid_id(int raid_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, raid_id, theme_id); +} + +void lua_cross_zone_add_ldon_win_by_guild_id(int guild_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, guild_id, theme_id); +} + +void lua_cross_zone_add_ldon_win_by_expedition_id(uint32 expedition_id, uint32 theme_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, expedition_id, theme_id); +} + +void lua_cross_zone_add_ldon_win_by_client_name(const char* client_name, uint32 theme_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZLDoNUpdateSubtype_Win; + int update_identifier = 0; + int points = 1; + quest_manager.CrossZoneLDoNUpdate(update_type, update_subtype, update_identifier, theme_id, points, client_name); +} + +void lua_cross_zone_assign_task_by_char_id(int character_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_char_id(int character_id, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_group_id(int group_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_group_id(int group_id, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_raid_id(int raid_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_raid_id(int raid_id, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_guild_id(int guild_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_guild_id(int guild_id, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_expedition_id(uint32 expedition_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_expedition_id(uint32 expedition_id, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_assign_task_by_client_name(const char* client_name, uint32 task_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_assign_task_by_client_name(const char* client_name, uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_AssignTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_cast_spell_by_char_id(int character_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + quest_manager.CrossZoneSpell(update_type, update_subtype, character_id, spell_id); +} + +void lua_cross_zone_cast_spell_by_group_id(int group_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + quest_manager.CrossZoneSpell(update_type, update_subtype, group_id, spell_id); +} + +void lua_cross_zone_cast_spell_by_raid_id(int raid_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + quest_manager.CrossZoneSpell(update_type, update_subtype, raid_id, spell_id); +} + +void lua_cross_zone_cast_spell_by_guild_id(int guild_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + quest_manager.CrossZoneSpell(update_type, update_subtype, guild_id, spell_id); +} + +void lua_cross_zone_cast_spell_by_expedition_id(uint32 expedition_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + quest_manager.CrossZoneSpell(update_type, update_subtype, expedition_id, spell_id); +} + +void lua_cross_zone_cast_spell_by_client_name(const char* client_name, uint32 spell_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZSpellUpdateSubtype_Cast; + int update_identifier = 0; + quest_manager.CrossZoneSpell(update_type, update_subtype, update_identifier, spell_id, client_name); +} + +void lua_cross_zone_disable_task_by_char_id(int character_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_disable_task_by_group_id(int group_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_disable_task_by_raid_id(int raid_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_disable_task_by_guild_id(int guild_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_disable_task_by_expedition_id(uint32 expedition_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_disable_task_by_client_name(const char* client_name, uint32 task_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_DisableTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_enable_task_by_char_id(int character_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_enable_task_by_group_id(int group_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_enable_task_by_raid_id(int raid_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_enable_task_by_guild_id(int guild_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_enable_task_by_expedition_id(uint32 expedition_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_enable_task_by_client_name(const char* client_name, uint32 task_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_EnableTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_fail_task_by_char_id(int character_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_fail_task_by_group_id(int group_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_fail_task_by_raid_id(int raid_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_fail_task_by_guild_id(int guild_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_fail_task_by_expedition_id(uint32 expedition_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_fail_task_by_client_name(const char* client_name, uint32 task_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_FailTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_marquee_by_char_id(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_Character; + quest_manager.CrossZoneMarquee(update_type, character_id, type, priority, fade_in, fade_out, duration, message); +} + +void lua_cross_zone_marquee_by_group_id(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_Group; + quest_manager.CrossZoneMarquee(update_type, group_id, type, priority, fade_in, fade_out, duration, message); +} + +void lua_cross_zone_marquee_by_raid_id(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_Raid; + quest_manager.CrossZoneMarquee(update_type, raid_id, type, priority, fade_in, fade_out, duration, message); +} + +void lua_cross_zone_marquee_by_guild_id(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_Guild; + quest_manager.CrossZoneMarquee(update_type, guild_id, type, priority, fade_in, fade_out, duration, message); +} + +void lua_cross_zone_marquee_by_expedition_id(uint32 expedition_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_Expedition; + quest_manager.CrossZoneMarquee(update_type, expedition_id, type, priority, fade_in, fade_out, duration, message); +} + +void lua_cross_zone_marquee_by_client_name(const char* client_name, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + quest_manager.CrossZoneMarquee(update_type, update_identifier, type, priority, fade_in, fade_out, duration, message, client_name); +} + +void lua_cross_zone_message_player_by_char_id(uint32 type, int character_id, const char* message) { + uint8 update_type = CZUpdateType_Character; + quest_manager.CrossZoneMessage(update_type, character_id, type, message); +} + +void lua_cross_zone_message_player_by_group_id(uint32 type, int group_id, const char* message) { + uint8 update_type = CZUpdateType_Group; + quest_manager.CrossZoneMessage(update_type, group_id, type, message); +} + +void lua_cross_zone_message_player_by_raid_id(uint32 type, int raid_id, const char* message) { + uint8 update_type = CZUpdateType_Raid; + quest_manager.CrossZoneMessage(update_type, raid_id, type, message); +} + +void lua_cross_zone_message_player_by_guild_id(uint32 type, int guild_id, const char* message) { + uint8 update_type = CZUpdateType_Guild; + quest_manager.CrossZoneMessage(update_type, guild_id, type, message); +} + +void lua_cross_zone_message_player_by_expedition_id(uint32 type, int expedition_id, const char* message) { + uint8 update_type = CZUpdateType_Expedition; + quest_manager.CrossZoneMessage(update_type, expedition_id, type, message); +} + +void lua_cross_zone_message_player_by_name(uint32 type, const char* client_name, const char* message) { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + quest_manager.CrossZoneMessage(update_type, update_identifier, type, message, client_name); +} + +void lua_cross_zone_move_player_by_char_id(int character_id, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_player_by_group_id(int group_id, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_player_by_raid_id(int raid_id, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_player_by_guild_id(int guild_id, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_player_by_expedition_id(int expedition_id, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_player_by_client_name(const char* client_name, const char* zone_short_name) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZone; + int update_identifier = 0; + uint16 instance_id = 0; + quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name); +} + +void lua_cross_zone_move_instance_by_char_id(int character_id, uint16 instance_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_instance_by_group_id(int group_id, uint16 instance_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_instance_by_raid_id(int raid_id, uint16 instance_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_instance_by_guild_id(int guild_id, uint16 instance_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_instance_by_expedition_id(uint32 expedition_id, uint16 instance_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id); +} + +void lua_cross_zone_move_instance_by_client_name(const char* client_name, uint16 instance_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance; + int update_identifier = 0; + const char* zone_short_name = ""; + quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name); +} + +void lua_cross_zone_remove_spell_by_char_id(int character_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + quest_manager.CrossZoneSpell(update_type, update_subtype, character_id, spell_id); +} + +void lua_cross_zone_remove_spell_by_group_id(int group_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + quest_manager.CrossZoneSpell(update_type, update_subtype, group_id, spell_id); +} + +void lua_cross_zone_remove_spell_by_raid_id(int raid_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + quest_manager.CrossZoneSpell(update_type, update_subtype, raid_id, spell_id); +} + +void lua_cross_zone_remove_spell_by_guild_id(int guild_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + quest_manager.CrossZoneSpell(update_type, update_subtype, guild_id, spell_id); +} + +void lua_cross_zone_remove_spell_by_expedition_id(uint32 expedition_id, uint32 spell_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + quest_manager.CrossZoneSpell(update_type, update_subtype, expedition_id, spell_id); +} + +void lua_cross_zone_remove_spell_by_client_name(const char* client_name, uint32 spell_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZSpellUpdateSubtype_Remove; + int update_identifier = 0; + quest_manager.CrossZoneSpell(update_type, update_subtype, update_identifier, spell_id, client_name); +} + +void lua_cross_zone_remove_task_by_char_id(int character_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_remove_task_by_group_id(int group_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_remove_task_by_raid_id(int raid_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_remove_task_by_guild_id(int guild_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_remove_task_by_expedition_id(uint32 expedition_id, uint32 task_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_cross_zone_remove_task_by_client_name(const char* client_name, uint32 task_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_RemoveTask; + int update_identifier = 0; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, task_subidentifier, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_reset_activity_by_char_id(int character_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_reset_activity_by_group_id(int group_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_reset_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_reset_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_reset_activity_by_expedition_id(uint32 expedition_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_reset_activity_by_client_name(const char* client_name, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityReset; + int update_identifier = 0; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, activity_id, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_set_entity_variable_by_char_id(int character_id, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_Character; + quest_manager.CrossZoneSetEntityVariable(update_type, character_id, variable_name, variable_value); +} + +void lua_cross_zone_set_entity_variable_by_group_id(int group_id, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_Group; + quest_manager.CrossZoneSetEntityVariable(update_type, group_id, variable_name, variable_value); +} + +void lua_cross_zone_set_entity_variable_by_raid_id(int raid_id, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_Raid; + quest_manager.CrossZoneSetEntityVariable(update_type, raid_id, variable_name, variable_value); +} + +void lua_cross_zone_set_entity_variable_by_guild_id(int guild_id, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_Guild; + quest_manager.CrossZoneSetEntityVariable(update_type, guild_id, variable_name, variable_value); +} + +void lua_cross_zone_set_entity_variable_by_expedition_id(uint32 expedition_id, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_Expedition; + quest_manager.CrossZoneSetEntityVariable(update_type, expedition_id, variable_name, variable_value); +} + +void lua_cross_zone_set_entity_variable_by_client_name(const char* character_name, const char* variable_name, const char* variable_value) { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + quest_manager.CrossZoneSetEntityVariable(update_type, update_identifier, variable_name, variable_value, character_name); +} + +void lua_cross_zone_signal_client_by_char_id(uint32 character_id, int signal) { + uint8 update_type = CZUpdateType_Character; + quest_manager.CrossZoneSignal(update_type, character_id, signal); +} + +void lua_cross_zone_signal_client_by_group_id(uint32 group_id, int signal) { + uint8 update_type = CZUpdateType_Group; + quest_manager.CrossZoneSignal(update_type, group_id, signal); +} + +void lua_cross_zone_signal_client_by_raid_id(uint32 raid_id, int signal) { + uint8 update_type = CZUpdateType_Raid; + quest_manager.CrossZoneSignal(update_type, raid_id, signal); +} + +void lua_cross_zone_signal_client_by_guild_id(uint32 guild_id, int signal) { + uint8 update_type = CZUpdateType_Guild; + quest_manager.CrossZoneSignal(update_type, guild_id, signal); +} + +void lua_cross_zone_signal_client_by_expedition_id(uint32 expedition_id, int signal) { + uint8 update_type = CZUpdateType_Expedition; + quest_manager.CrossZoneSignal(update_type, expedition_id, signal); +} + +void lua_cross_zone_signal_client_by_name(const char* client_name, int signal) { + uint8 update_type = CZUpdateType_ClientName; + int update_identifier = 0; + quest_manager.CrossZoneSignal(update_type, update_identifier, signal, client_name); +} + +void lua_cross_zone_signal_npc_by_npctype_id(uint32 npctype_id, int signal) { + uint8 update_type = CZUpdateType_NPC; + quest_manager.CrossZoneSignal(update_type, npctype_id, signal); +} + +void lua_cross_zone_update_activity_by_char_id(int character_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_char_id(int character_id, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_Character; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, character_id, task_id, activity_id, activity_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_group_id(int group_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_group_id(int group_id, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_Group; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, group_id, task_id, activity_id, activity_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_raid_id(int raid_id, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_Raid; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, raid_id, task_id, activity_id, activity_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_guild_id(int guild_id, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_Guild; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, guild_id, task_id, activity_id, activity_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_expedition_id(uint32 expedition_id, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, activity_id, update_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_expedition_id(uint32 expedition_id, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_Expedition; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, expedition_id, task_id, activity_id, activity_count, enforce_level_requirement); +} + +void lua_cross_zone_update_activity_by_client_name(const char* client_name, uint32 task_id, int activity_id) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_identifier = 0; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, activity_id, update_count, enforce_level_requirement, client_name); +} + +void lua_cross_zone_update_activity_by_client_name(const char* client_name, uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = CZUpdateType_ClientName; + uint8 update_subtype = CZTaskUpdateSubtype_ActivityUpdate; + int update_identifier = 0; + bool enforce_level_requirement = false; + quest_manager.CrossZoneTaskUpdate(update_type, update_subtype, update_identifier, task_id, activity_id, activity_count, enforce_level_requirement, client_name); +} + +void lua_world_wide_add_ldon_loss(uint32 theme_id) { + uint8 update_type = WWLDoNUpdateType_Loss; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id); +} + +void lua_world_wide_add_ldon_loss(uint32 theme_id, uint8 min_status) { + uint8 update_type = WWLDoNUpdateType_Loss; + int points = 1; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status); +} + +void lua_world_wide_add_ldon_loss(uint32 theme_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWLDoNUpdateType_Loss; + int points = 1; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); +} + +void lua_world_wide_add_ldon_points(uint32 theme_id, int points) { + uint8 update_type = WWLDoNUpdateType_Points; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points); +} + +void lua_world_wide_add_ldon_points(uint32 theme_id, int points, uint8 min_status) { + uint8 update_type = WWLDoNUpdateType_Points; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status); +} + +void lua_world_wide_add_ldon_points(uint32 theme_id, int points, uint8 min_status, uint8 max_status) { + uint8 update_type = WWLDoNUpdateType_Points; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); +} + +void lua_world_wide_add_ldon_win(uint32 theme_id) { + uint8 update_type = WWLDoNUpdateType_Win; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id); +} + +void lua_world_wide_add_ldon_win(uint32 theme_id, uint8 min_status) { + uint8 update_type = WWLDoNUpdateType_Win; + int points = 1; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status); +} + +void lua_world_wide_add_ldon_win(uint32 theme_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWLDoNUpdateType_Win; + int points = 1; + quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status); +} + +void lua_world_wide_assign_task(uint32 task_id) { + uint8 update_type = WWTaskUpdateType_AssignTask; + quest_manager.WorldWideTaskUpdate(update_type, task_id); +} + +void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement) { + uint8 update_type = WWTaskUpdateType_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement); +} + +void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_assign_task(uint32 task_id, bool enforce_level_requirement, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_AssignTask; + int task_subidentifier = -1; + int update_count = 1; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_cast_spell(uint32 spell_id) { + uint8 update_type = WWSpellUpdateType_Cast; + quest_manager.WorldWideSpell(update_type, spell_id); +} + +void lua_world_wide_cast_spell(uint32 spell_id, uint8 min_status) { + uint8 update_type = WWSpellUpdateType_Cast; + quest_manager.WorldWideSpell(update_type, spell_id, min_status); +} + +void lua_world_wide_cast_spell(uint32 spell_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWSpellUpdateType_Cast; + quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status); +} + +void lua_world_wide_disable_task(uint32 task_id) { + uint8 update_type = WWTaskUpdateType_DisableTask; + quest_manager.WorldWideTaskUpdate(update_type, task_id); +} + +void lua_world_wide_disable_task(uint32 task_id, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_disable_task(uint32 task_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_DisableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_enable_task(uint32 task_id) { + uint8 update_type = WWTaskUpdateType_EnableTask; + quest_manager.WorldWideTaskUpdate(update_type, task_id); +} + +void lua_world_wide_enable_task(uint32 task_id, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_enable_task(uint32 task_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_EnableTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_fail_task(uint32 task_id) { + uint8 update_type = WWTaskUpdateType_FailTask; + quest_manager.WorldWideTaskUpdate(update_type, task_id); +} + +void lua_world_wide_fail_task(uint32 task_id, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_fail_task(uint32 task_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_FailTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message) { + quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message); +} + +void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status) { + quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status); +} + +void lua_world_wide_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status, uint8 max_status) { + quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status, max_status); +} + +void lua_world_wide_message(uint32 type, const char* message) { + quest_manager.WorldWideMessage(type, message); +} + +void lua_world_wide_message(uint32 type, const char* message, uint8 min_status) { + quest_manager.WorldWideMessage(type, message, min_status); +} + +void lua_world_wide_message(uint32 type, const char* message, uint8 min_status, uint8 max_status) { + quest_manager.WorldWideMessage(type, message, min_status, max_status); +} + +void lua_world_wide_move(const char* zone_short_name) { + uint8 update_type = WWMoveUpdateType_MoveZone; + quest_manager.WorldWideMove(update_type, zone_short_name); +} + +void lua_world_wide_move(const char* zone_short_name, uint8 min_status) { + uint8 update_type = WWMoveUpdateType_MoveZone; + uint16 instance_id = 0; + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status); +} + +void lua_world_wide_move(const char* zone_short_name, uint8 min_status, uint8 max_status) { + uint8 update_type = WWMoveUpdateType_MoveZone; + uint16 instance_id = 0; + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status); +} + +void lua_world_wide_move_instance(uint16 instance_id) { + uint8 update_type = WWMoveUpdateType_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id); +} + +void lua_world_wide_move_instance(uint16 instance_id, uint8 min_status) { + uint8 update_type = WWMoveUpdateType_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status); +} + +void lua_world_wide_move_instance(uint16 instance_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWMoveUpdateType_MoveZoneInstance; + const char* zone_short_name = ""; + quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status); +} + +void lua_world_wide_remove_spell(uint32 spell_id) { + uint8 update_type = WWSpellUpdateType_Remove; + quest_manager.WorldWideSpell(update_type, spell_id); +} + +void lua_world_wide_remove_spell(uint32 spell_id, uint8 min_status) { + uint8 update_type = WWSpellUpdateType_Remove; + quest_manager.WorldWideSpell(update_type, spell_id, min_status); +} + +void lua_world_wide_remove_spell(uint32 spell_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWSpellUpdateType_Remove; + quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status); +} + +void lua_world_wide_remove_task(uint32 task_id) { + uint8 update_type = WWTaskUpdateType_RemoveTask; + quest_manager.WorldWideTaskUpdate(update_type, task_id); +} + +void lua_world_wide_remove_task(uint32 task_id, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_remove_task(uint32 task_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_RemoveTask; + int task_subidentifier = -1; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_reset_activity(uint32 task_id, int activity_id) { + uint8 update_type = WWTaskUpdateType_ActivityReset; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id); +} + +void lua_world_wide_reset_activity(uint32 task_id, int activity_id, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id, update_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_reset_activity(uint32 task_id, int activity_id, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_ActivityReset; + int update_count = 1; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id, update_count, enforce_level_requirement, min_status, max_status); +} + +void lua_world_wide_set_entity_variable_client(const char* variable_name, const char* variable_value) { + uint8 update_type = WWSetEntityVariableUpdateType_Character; + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value); +} + +void lua_world_wide_set_entity_variable_client(const char* variable_name, const char* variable_value, uint8 min_status) { + uint8 update_type = WWSetEntityVariableUpdateType_Character; + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value, min_status); +} + +void lua_world_wide_set_entity_variable_client(const char* variable_name, const char* variable_value, uint8 min_status, uint8 max_status) { + uint8 update_type = WWSetEntityVariableUpdateType_Character; + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value, min_status, max_status); +} + +void lua_world_wide_set_entity_variable_npc(const char* variable_name, const char* variable_value) { + uint8 update_type = WWSetEntityVariableUpdateType_NPC; + quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value); +} + +void lua_world_wide_signal_client(uint32 signal) { + uint8 update_type = WWSignalUpdateType_Character; + quest_manager.WorldWideSignal(update_type, signal); +} + +void lua_world_wide_signal_client(uint32 signal, uint8 min_status) { + uint8 update_type = WWSignalUpdateType_Character; + quest_manager.WorldWideSignal(update_type, signal, min_status); +} + +void lua_world_wide_signal_client(uint32 signal, uint8 min_status, uint8 max_status) { + uint8 update_type = WWSignalUpdateType_Character; + quest_manager.WorldWideSignal(update_type, signal, min_status, max_status); +} + +void lua_world_wide_signal_npc(uint32 signal) { + uint8 update_type = WWSignalUpdateType_NPC; + quest_manager.WorldWideSignal(update_type, signal); +} + +void lua_world_wide_update_activity(uint32 task_id, int activity_id) { + uint8 update_type = WWTaskUpdateType_ActivityUpdate; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id); +} + +void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count) { + uint8 update_type = WWTaskUpdateType_ActivityUpdate; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id, activity_count); +} + +void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count, uint8 min_status) { + uint8 update_type = WWTaskUpdateType_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id, activity_count, enforce_level_requirement, min_status); +} + +void lua_world_wide_update_activity(uint32 task_id, int activity_id, int activity_count, uint8 min_status, uint8 max_status) { + uint8 update_type = WWTaskUpdateType_ActivityUpdate; + bool enforce_level_requirement = false; + quest_manager.WorldWideTaskUpdate(update_type, task_id, activity_id, activity_count, enforce_level_requirement, min_status, max_status); +} + #define LuaCreateNPCParse(name, c_type, default_value) do { \ cur = table[#name]; \ if(luabind::type(cur) != LUA_TNIL) { \ @@ -2866,125 +3496,6 @@ luabind::scope lua_register_general() { luabind::def("wear_change", &lua_wear_change), luabind::def("voice_tell", &lua_voice_tell), luabind::def("send_mail", &lua_send_mail), - luabind::def("cross_zone_assign_task_by_char_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_char_id), - luabind::def("cross_zone_assign_task_by_char_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_char_id), - luabind::def("cross_zone_assign_task_by_group_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_group_id), - luabind::def("cross_zone_assign_task_by_group_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_group_id), - luabind::def("cross_zone_assign_task_by_raid_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_raid_id), - luabind::def("cross_zone_assign_task_by_raid_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_raid_id), - luabind::def("cross_zone_assign_task_by_guild_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_guild_id), - luabind::def("cross_zone_assign_task_by_guild_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_guild_id), - luabind::def("cross_zone_cast_spell_by_char_id", &lua_cross_zone_cast_spell_by_char_id), - luabind::def("cross_zone_cast_spell_by_group_id", &lua_cross_zone_cast_spell_by_group_id), - luabind::def("cross_zone_cast_spell_by_raid_id", &lua_cross_zone_cast_spell_by_raid_id), - luabind::def("cross_zone_cast_spell_by_guild_id", &lua_cross_zone_cast_spell_by_guild_id), - luabind::def("cross_zone_disable_task_by_char_id", &lua_cross_zone_disable_task_by_char_id), - luabind::def("cross_zone_disable_task_by_group_id", &lua_cross_zone_disable_task_by_group_id), - luabind::def("cross_zone_disable_task_by_raid_id", &lua_cross_zone_disable_task_by_raid_id), - luabind::def("cross_zone_disable_task_by_guild_id", &lua_cross_zone_disable_task_by_guild_id), - luabind::def("cross_zone_enable_task_by_char_id", &lua_cross_zone_enable_task_by_char_id), - luabind::def("cross_zone_enable_task_by_group_id", &lua_cross_zone_enable_task_by_group_id), - luabind::def("cross_zone_enable_task_by_raid_id", &lua_cross_zone_enable_task_by_raid_id), - luabind::def("cross_zone_enable_task_by_guild_id", &lua_cross_zone_enable_task_by_guild_id), - luabind::def("cross_zone_fail_task_by_char_id", &lua_cross_zone_fail_task_by_char_id), - luabind::def("cross_zone_fail_task_by_group_id", &lua_cross_zone_fail_task_by_group_id), - luabind::def("cross_zone_fail_task_by_raid_id", &lua_cross_zone_fail_task_by_raid_id), - luabind::def("cross_zone_fail_task_by_guild_id", &lua_cross_zone_fail_task_by_guild_id), - luabind::def("cross_zone_marquee_by_char_id", &lua_cross_zone_marquee_by_char_id), - luabind::def("cross_zone_marquee_by_group_id", &lua_cross_zone_marquee_by_group_id), - luabind::def("cross_zone_marquee_by_raid_id", &lua_cross_zone_marquee_by_raid_id), - luabind::def("cross_zone_marquee_by_guild_id", &lua_cross_zone_marquee_by_guild_id), - luabind::def("cross_zone_message_player_by_name", &lua_cross_zone_message_player_by_name), - luabind::def("cross_zone_message_player_by_group_id", &lua_cross_zone_message_player_by_group_id), - luabind::def("cross_zone_message_player_by_raid_id", &lua_cross_zone_message_player_by_raid_id), - luabind::def("cross_zone_message_player_by_guild_id", &lua_cross_zone_message_player_by_guild_id), - luabind::def("cross_zone_move_player_by_char_id", &lua_cross_zone_move_player_by_char_id), - luabind::def("cross_zone_move_player_by_group_id", &lua_cross_zone_move_player_by_group_id), - luabind::def("cross_zone_move_player_by_raid_id", &lua_cross_zone_move_player_by_raid_id), - luabind::def("cross_zone_move_player_by_guild_id", &lua_cross_zone_move_player_by_guild_id), - luabind::def("cross_zone_move_instance_by_char_id", &lua_cross_zone_move_instance_by_char_id), - luabind::def("cross_zone_move_instance_by_group_id", &lua_cross_zone_move_instance_by_group_id), - luabind::def("cross_zone_move_instance_by_raid_id", &lua_cross_zone_move_instance_by_raid_id), - luabind::def("cross_zone_move_instance_by_guild_id", &lua_cross_zone_move_instance_by_guild_id), - luabind::def("cross_zone_remove_spell_by_char_id", &lua_cross_zone_remove_spell_by_char_id), - luabind::def("cross_zone_remove_spell_by_group_id", &lua_cross_zone_remove_spell_by_group_id), - luabind::def("cross_zone_remove_spell_by_raid_id", &lua_cross_zone_remove_spell_by_raid_id), - luabind::def("cross_zone_remove_spell_by_guild_id", &lua_cross_zone_remove_spell_by_guild_id), - luabind::def("cross_zone_remove_task_by_char_id", &lua_cross_zone_remove_task_by_char_id), - luabind::def("cross_zone_remove_task_by_group_id", &lua_cross_zone_remove_task_by_group_id), - luabind::def("cross_zone_remove_task_by_raid_id", &lua_cross_zone_remove_task_by_raid_id), - luabind::def("cross_zone_remove_task_by_guild_id", &lua_cross_zone_remove_task_by_guild_id), - luabind::def("cross_zone_reset_activity_by_char_id", &lua_cross_zone_reset_activity_by_char_id), - luabind::def("cross_zone_reset_activity_by_group_id", &lua_cross_zone_reset_activity_by_group_id), - luabind::def("cross_zone_reset_activity_by_raid_id", &lua_cross_zone_reset_activity_by_raid_id), - luabind::def("cross_zone_reset_activity_by_guild_id", &lua_cross_zone_reset_activity_by_guild_id), - luabind::def("cross_zone_set_entity_variable_by_client_name", &lua_cross_zone_set_entity_variable_by_client_name), - luabind::def("cross_zone_set_entity_variable_by_group_id", &lua_cross_zone_set_entity_variable_by_group_id), - luabind::def("cross_zone_set_entity_variable_by_raid_id", &lua_cross_zone_set_entity_variable_by_raid_id), - luabind::def("cross_zone_set_entity_variable_by_guild_id", &lua_cross_zone_set_entity_variable_by_guild_id), - luabind::def("cross_zone_signal_client_by_char_id", &lua_cross_zone_signal_client_by_char_id), - luabind::def("cross_zone_signal_client_by_group_id", &lua_cross_zone_signal_client_by_group_id), - luabind::def("cross_zone_signal_client_by_raid_id", &lua_cross_zone_signal_client_by_raid_id), - luabind::def("cross_zone_signal_client_by_guild_id", &lua_cross_zone_signal_client_by_guild_id), - luabind::def("cross_zone_signal_client_by_name", &lua_cross_zone_signal_client_by_name), - luabind::def("cross_zone_signal_npc_by_npctype_id", &lua_cross_zone_signal_npc_by_npctype_id), - luabind::def("cross_zone_update_activity_by_char_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_char_id), - luabind::def("cross_zone_update_activity_by_char_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_char_id), - luabind::def("cross_zone_update_activity_by_group_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_group_id), - luabind::def("cross_zone_update_activity_by_group_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_group_id), - luabind::def("cross_zone_update_activity_by_raid_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_raid_id), - luabind::def("cross_zone_update_activity_by_raid_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_raid_id), - luabind::def("cross_zone_update_activity_by_guild_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_guild_id), - luabind::def("cross_zone_update_activity_by_guild_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_guild_id), - luabind::def("world_wide_assign_task", (void(*)(uint32))&lua_world_wide_assign_task), - luabind::def("world_wide_assign_task", (void(*)(uint32,bool))&lua_world_wide_assign_task), - luabind::def("world_wide_assign_task", (void(*)(uint32,bool,uint8))&lua_world_wide_assign_task), - luabind::def("world_wide_assign_task", (void(*)(uint32,bool,uint8,uint8))&lua_world_wide_assign_task), - luabind::def("world_wide_cast_spell", (void(*)(uint32))&lua_world_wide_cast_spell), - luabind::def("world_wide_cast_spell", (void(*)(uint32,uint8))&lua_world_wide_cast_spell), - luabind::def("world_wide_cast_spell", (void(*)(uint32,uint8,uint8))&lua_world_wide_cast_spell), - luabind::def("world_wide_disable_task", (void(*)(uint32))&lua_world_wide_disable_task), - luabind::def("world_wide_disable_task", (void(*)(uint32,uint8))&lua_world_wide_disable_task), - luabind::def("world_wide_disable_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_disable_task), - luabind::def("world_wide_enable_task", (void(*)(uint32))&lua_world_wide_enable_task), - luabind::def("world_wide_enable_task", (void(*)(uint32,uint8))&lua_world_wide_enable_task), - luabind::def("world_wide_enable_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_enable_task), - luabind::def("world_wide_fail_task", (void(*)(uint32))&lua_world_wide_fail_task), - luabind::def("world_wide_fail_task", (void(*)(uint32,uint8))&lua_world_wide_fail_task), - luabind::def("world_wide_fail_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_fail_task), - luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*))&lua_world_wide_marquee), - luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*,uint8))&lua_world_wide_marquee), - luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*,uint8,uint8))&lua_world_wide_marquee), - luabind::def("world_wide_message", (void(*)(uint32,const char*))&lua_world_wide_message), - luabind::def("world_wide_message", (void(*)(uint32,const char*,uint8))&lua_world_wide_message), - luabind::def("world_wide_message", (void(*)(uint32,const char*,uint8,uint8))&lua_world_wide_message), - luabind::def("world_wide_move", (void(*)(const char*))&lua_world_wide_move), - luabind::def("world_wide_move", (void(*)(const char*,uint8))&lua_world_wide_move), - luabind::def("world_wide_move", (void(*)(const char*,uint8,uint8))&lua_world_wide_move), - luabind::def("world_wide_move_instance", (void(*)(uint16))&lua_world_wide_move_instance), - luabind::def("world_wide_move_instance", (void(*)(uint16,uint8))&lua_world_wide_move_instance), - luabind::def("world_wide_move_instance", (void(*)(uint16,uint8,uint8))&lua_world_wide_move_instance), - luabind::def("world_wide_remove_spell", (void(*)(uint32))&lua_world_wide_remove_spell), - luabind::def("world_wide_remove_spell", (void(*)(uint32,uint8))&lua_world_wide_remove_spell), - luabind::def("world_wide_remove_spell", (void(*)(uint32,uint8,uint8))&lua_world_wide_remove_spell), - luabind::def("world_wide_remove_task", (void(*)(uint32))&lua_world_wide_remove_task), - luabind::def("world_wide_remove_task", (void(*)(uint32,uint8))&lua_world_wide_remove_task), - luabind::def("world_wide_remove_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_remove_task), - luabind::def("world_wide_reset_activity", (void(*)(uint32,int))&lua_world_wide_reset_activity), - luabind::def("world_wide_reset_activity", (void(*)(uint32,int,uint8))&lua_world_wide_reset_activity), - luabind::def("world_wide_reset_activity", (void(*)(uint32,int,uint8,uint8))&lua_world_wide_reset_activity), - luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*))&lua_world_wide_set_entity_variable_client), - luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*,uint8))&lua_world_wide_set_entity_variable_client), - luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*,uint8,uint8))&lua_world_wide_set_entity_variable_client), - luabind::def("world_wide_set_entity_variable_npc", &lua_world_wide_set_entity_variable_npc), - luabind::def("world_wide_signal_client", (void(*)(uint32))&lua_world_wide_signal_client), - luabind::def("world_wide_signal_client", (void(*)(uint32,uint8))&lua_world_wide_signal_client), - luabind::def("world_wide_signal_client", (void(*)(uint32,uint8,uint8))&lua_world_wide_signal_client), - luabind::def("world_wide_signal_npc", &lua_world_wide_signal_npc), - luabind::def("world_wide_update_activity", (void(*)(uint32,int))&lua_world_wide_update_activity), - luabind::def("world_wide_update_activity", (void(*)(uint32,int,int))&lua_world_wide_update_activity), - luabind::def("world_wide_update_activity", (void(*)(uint32,int,int,uint8))&lua_world_wide_update_activity), - luabind::def("world_wide_update_activity", (void(*)(uint32,int,int,uint8,uint8))&lua_world_wide_update_activity), luabind::def("get_qglobals", (luabind::adl::object(*)(lua_State*,Lua_NPC,Lua_Client))&lua_get_qglobals), luabind::def("get_qglobals", (luabind::adl::object(*)(lua_State*,Lua_Client))&lua_get_qglobals), luabind::def("get_qglobals", (luabind::adl::object(*)(lua_State*,Lua_NPC))&lua_get_qglobals), @@ -3041,21 +3552,6 @@ luabind::scope lua_register_general() { 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), luabind::def("get_gender_name", &lua_get_gender_name), luabind::def("get_deity_name", &lua_get_deity_name), luabind::def("get_inventory_slot_name", &lua_get_inventory_slot_name), @@ -3065,6 +3561,193 @@ luabind::scope lua_register_general() { luabind::def("get_spell_stat", (int(*)(uint32,std::string))&lua_get_spell_stat), luabind::def("get_spell_stat", (int(*)(uint32,std::string,uint8))&lua_get_spell_stat), + /* + Cross Zone + */ + 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_loss_by_group_id", &lua_cross_zone_add_ldon_loss_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_loss_by_guild_id", &lua_cross_zone_add_ldon_loss_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_loss_by_client_name", &lua_cross_zone_add_ldon_loss_by_client_name), + 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_points_by_group_id", &lua_cross_zone_add_ldon_points_by_group_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_points_by_guild_id", &lua_cross_zone_add_ldon_points_by_guild_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_points_by_client_name", &lua_cross_zone_add_ldon_points_by_client_name), + 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_win_by_group_id", &lua_cross_zone_add_ldon_win_by_group_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_win_by_guild_id", &lua_cross_zone_add_ldon_win_by_guild_id), + luabind::def("cross_zone_add_ldon_win_by_expedition_id", &lua_cross_zone_add_ldon_win_by_expedition_id), + luabind::def("cross_zone_add_ldon_win_by_client_name", &lua_cross_zone_add_ldon_win_by_client_name), + luabind::def("cross_zone_assign_task_by_char_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_char_id), + luabind::def("cross_zone_assign_task_by_char_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_char_id), + luabind::def("cross_zone_assign_task_by_group_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_group_id), + luabind::def("cross_zone_assign_task_by_group_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_group_id), + luabind::def("cross_zone_assign_task_by_raid_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_raid_id), + luabind::def("cross_zone_assign_task_by_raid_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_raid_id), + luabind::def("cross_zone_assign_task_by_guild_id", (void(*)(int,uint32))&lua_cross_zone_assign_task_by_guild_id), + luabind::def("cross_zone_assign_task_by_guild_id", (void(*)(int,uint32,bool))&lua_cross_zone_assign_task_by_guild_id), + luabind::def("cross_zone_assign_task_by_expedition_id", (void(*)(uint32,uint32))&lua_cross_zone_assign_task_by_expedition_id), + luabind::def("cross_zone_assign_task_by_expedition_id", (void(*)(uint32,uint32,bool))&lua_cross_zone_assign_task_by_expedition_id), + luabind::def("cross_zone_assign_task_by_client_name", (void(*)(const char*,uint32))&lua_cross_zone_assign_task_by_client_name), + luabind::def("cross_zone_assign_task_by_client_name", (void(*)(const char*,uint32,bool))&lua_cross_zone_assign_task_by_client_name), + luabind::def("cross_zone_cast_spell_by_char_id", &lua_cross_zone_cast_spell_by_char_id), + luabind::def("cross_zone_cast_spell_by_group_id", &lua_cross_zone_cast_spell_by_group_id), + luabind::def("cross_zone_cast_spell_by_raid_id", &lua_cross_zone_cast_spell_by_raid_id), + luabind::def("cross_zone_cast_spell_by_guild_id", &lua_cross_zone_cast_spell_by_guild_id), + luabind::def("cross_zone_cast_spell_by_expedition_id", &lua_cross_zone_cast_spell_by_expedition_id), + luabind::def("cross_zone_cast_spell_by_client_name", &lua_cross_zone_cast_spell_by_client_name), + luabind::def("cross_zone_disable_task_by_char_id", &lua_cross_zone_disable_task_by_char_id), + luabind::def("cross_zone_disable_task_by_group_id", &lua_cross_zone_disable_task_by_group_id), + luabind::def("cross_zone_disable_task_by_raid_id", &lua_cross_zone_disable_task_by_raid_id), + luabind::def("cross_zone_disable_task_by_guild_id", &lua_cross_zone_disable_task_by_guild_id), + luabind::def("cross_zone_disable_task_by_expedition_id", &lua_cross_zone_disable_task_by_expedition_id), + luabind::def("cross_zone_disable_task_by_client_name", &lua_cross_zone_disable_task_by_client_name), + luabind::def("cross_zone_enable_task_by_char_id", &lua_cross_zone_enable_task_by_char_id), + luabind::def("cross_zone_enable_task_by_group_id", &lua_cross_zone_enable_task_by_group_id), + luabind::def("cross_zone_enable_task_by_raid_id", &lua_cross_zone_enable_task_by_raid_id), + luabind::def("cross_zone_enable_task_by_guild_id", &lua_cross_zone_enable_task_by_guild_id), + luabind::def("cross_zone_enable_task_by_expedition_id", &lua_cross_zone_enable_task_by_expedition_id), + luabind::def("cross_zone_enable_task_by_client_name", &lua_cross_zone_enable_task_by_client_name), + luabind::def("cross_zone_fail_task_by_char_id", &lua_cross_zone_fail_task_by_char_id), + luabind::def("cross_zone_fail_task_by_group_id", &lua_cross_zone_fail_task_by_group_id), + luabind::def("cross_zone_fail_task_by_raid_id", &lua_cross_zone_fail_task_by_raid_id), + luabind::def("cross_zone_fail_task_by_guild_id", &lua_cross_zone_fail_task_by_guild_id), + luabind::def("cross_zone_fail_task_by_expedition_id", &lua_cross_zone_fail_task_by_expedition_id), + luabind::def("cross_zone_fail_task_by_client_name", &lua_cross_zone_fail_task_by_client_name), + luabind::def("cross_zone_marquee_by_char_id", &lua_cross_zone_marquee_by_char_id), + luabind::def("cross_zone_marquee_by_group_id", &lua_cross_zone_marquee_by_group_id), + luabind::def("cross_zone_marquee_by_raid_id", &lua_cross_zone_marquee_by_raid_id), + luabind::def("cross_zone_marquee_by_guild_id", &lua_cross_zone_marquee_by_guild_id), + luabind::def("cross_zone_marquee_by_expedition_id", &lua_cross_zone_marquee_by_expedition_id), + luabind::def("cross_zone_marquee_by_client_name", &lua_cross_zone_marquee_by_client_name), + luabind::def("cross_zone_message_player_by_char_id", &lua_cross_zone_message_player_by_char_id), + luabind::def("cross_zone_message_player_by_group_id", &lua_cross_zone_message_player_by_group_id), + luabind::def("cross_zone_message_player_by_raid_id", &lua_cross_zone_message_player_by_raid_id), + luabind::def("cross_zone_message_player_by_guild_id", &lua_cross_zone_message_player_by_guild_id), + luabind::def("cross_zone_message_player_by_expedition_id", &lua_cross_zone_message_player_by_expedition_id), + luabind::def("cross_zone_message_player_by_name", &lua_cross_zone_message_player_by_name), + luabind::def("cross_zone_move_player_by_char_id", &lua_cross_zone_move_player_by_char_id), + luabind::def("cross_zone_move_player_by_group_id", &lua_cross_zone_move_player_by_group_id), + luabind::def("cross_zone_move_player_by_raid_id", &lua_cross_zone_move_player_by_raid_id), + luabind::def("cross_zone_move_player_by_guild_id", &lua_cross_zone_move_player_by_guild_id), + luabind::def("cross_zone_move_player_by_expedition_id", &lua_cross_zone_move_player_by_expedition_id), + luabind::def("cross_zone_move_player_by_client_name", &lua_cross_zone_move_player_by_client_name), + luabind::def("cross_zone_move_instance_by_char_id", &lua_cross_zone_move_instance_by_char_id), + luabind::def("cross_zone_move_instance_by_group_id", &lua_cross_zone_move_instance_by_group_id), + luabind::def("cross_zone_move_instance_by_raid_id", &lua_cross_zone_move_instance_by_raid_id), + luabind::def("cross_zone_move_instance_by_guild_id", &lua_cross_zone_move_instance_by_guild_id), + luabind::def("cross_zone_move_instance_by_expedition_id", &lua_cross_zone_move_instance_by_expedition_id), + luabind::def("cross_zone_move_instance_by_client_name", &lua_cross_zone_move_instance_by_client_name), + luabind::def("cross_zone_remove_spell_by_char_id", &lua_cross_zone_remove_spell_by_char_id), + luabind::def("cross_zone_remove_spell_by_group_id", &lua_cross_zone_remove_spell_by_group_id), + luabind::def("cross_zone_remove_spell_by_raid_id", &lua_cross_zone_remove_spell_by_raid_id), + luabind::def("cross_zone_remove_spell_by_guild_id", &lua_cross_zone_remove_spell_by_guild_id), + luabind::def("cross_zone_remove_spell_by_expedition_id", &lua_cross_zone_remove_spell_by_expedition_id), + luabind::def("cross_zone_remove_spell_by_client_name", &lua_cross_zone_remove_spell_by_client_name), + luabind::def("cross_zone_remove_task_by_char_id", &lua_cross_zone_remove_task_by_char_id), + luabind::def("cross_zone_remove_task_by_group_id", &lua_cross_zone_remove_task_by_group_id), + luabind::def("cross_zone_remove_task_by_raid_id", &lua_cross_zone_remove_task_by_raid_id), + luabind::def("cross_zone_remove_task_by_guild_id", &lua_cross_zone_remove_task_by_guild_id), + luabind::def("cross_zone_remove_task_by_expedition_id", &lua_cross_zone_remove_task_by_expedition_id), + luabind::def("cross_zone_remove_task_by_client_name", &lua_cross_zone_remove_task_by_client_name), + luabind::def("cross_zone_reset_activity_by_char_id", &lua_cross_zone_reset_activity_by_char_id), + luabind::def("cross_zone_reset_activity_by_group_id", &lua_cross_zone_reset_activity_by_group_id), + luabind::def("cross_zone_reset_activity_by_raid_id", &lua_cross_zone_reset_activity_by_raid_id), + luabind::def("cross_zone_reset_activity_by_guild_id", &lua_cross_zone_reset_activity_by_guild_id), + luabind::def("cross_zone_reset_activity_by_expedition_id", &lua_cross_zone_reset_activity_by_expedition_id), + luabind::def("cross_zone_reset_activity_by_client_name", &lua_cross_zone_reset_activity_by_client_name), + luabind::def("cross_zone_set_entity_variable_by_client_name", &lua_cross_zone_set_entity_variable_by_client_name), + luabind::def("cross_zone_set_entity_variable_by_group_id", &lua_cross_zone_set_entity_variable_by_group_id), + luabind::def("cross_zone_set_entity_variable_by_raid_id", &lua_cross_zone_set_entity_variable_by_raid_id), + luabind::def("cross_zone_set_entity_variable_by_guild_id", &lua_cross_zone_set_entity_variable_by_guild_id), + luabind::def("cross_zone_set_entity_variable_by_expedition_id", &lua_cross_zone_set_entity_variable_by_expedition_id), + luabind::def("cross_zone_set_entity_variable_by_client_name", &lua_cross_zone_set_entity_variable_by_client_name), + luabind::def("cross_zone_signal_client_by_char_id", &lua_cross_zone_signal_client_by_char_id), + luabind::def("cross_zone_signal_client_by_group_id", &lua_cross_zone_signal_client_by_group_id), + luabind::def("cross_zone_signal_client_by_raid_id", &lua_cross_zone_signal_client_by_raid_id), + luabind::def("cross_zone_signal_client_by_guild_id", &lua_cross_zone_signal_client_by_guild_id), + luabind::def("cross_zone_signal_client_by_expedition_id", &lua_cross_zone_signal_client_by_expedition_id), + luabind::def("cross_zone_signal_client_by_name", &lua_cross_zone_signal_client_by_name), + luabind::def("cross_zone_signal_npc_by_npctype_id", &lua_cross_zone_signal_npc_by_npctype_id), + luabind::def("cross_zone_update_activity_by_char_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_char_id), + luabind::def("cross_zone_update_activity_by_char_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_char_id), + luabind::def("cross_zone_update_activity_by_group_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_group_id), + luabind::def("cross_zone_update_activity_by_group_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_group_id), + luabind::def("cross_zone_update_activity_by_raid_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_raid_id), + luabind::def("cross_zone_update_activity_by_raid_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_raid_id), + luabind::def("cross_zone_update_activity_by_guild_id", (void(*)(int,uint32,int))&lua_cross_zone_update_activity_by_guild_id), + luabind::def("cross_zone_update_activity_by_guild_id", (void(*)(int,uint32,int,int))&lua_cross_zone_update_activity_by_guild_id), + luabind::def("cross_zone_update_activity_by_expedition_id", (void(*)(uint32,uint32,int))&lua_cross_zone_update_activity_by_expedition_id), + luabind::def("cross_zone_update_activity_by_expedition_id", (void(*)(uint32,uint32,int,int))&lua_cross_zone_update_activity_by_expedition_id), + luabind::def("cross_zone_update_activity_by_client_name", (void(*)(const char*,uint32,int))&lua_cross_zone_update_activity_by_client_name), + luabind::def("cross_zone_update_activity_by_client_name", (void(*)(const char*,uint32,int,int))&lua_cross_zone_update_activity_by_client_name), + + /* + World Wide + */ + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32))&lua_world_wide_add_ldon_loss), + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32,uint8))&lua_world_wide_add_ldon_loss), + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32,uint8,uint8))&lua_world_wide_add_ldon_loss), + luabind::def("world_wide_add_ldon_points", (void(*)(uint32,int))&lua_world_wide_add_ldon_points), + luabind::def("world_wide_add_ldon_points", (void(*)(uint32,int,uint8))&lua_world_wide_add_ldon_points), + luabind::def("world_wide_add_ldon_points", (void(*)(uint32,int,uint8,uint8))&lua_world_wide_add_ldon_points), + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32))&lua_world_wide_add_ldon_win), + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32,uint8))&lua_world_wide_add_ldon_win), + luabind::def("world_wide_add_ldon_loss", (void(*)(uint32,uint8,uint8))&lua_world_wide_add_ldon_win), + luabind::def("world_wide_assign_task", (void(*)(uint32))&lua_world_wide_assign_task), + luabind::def("world_wide_assign_task", (void(*)(uint32,bool))&lua_world_wide_assign_task), + luabind::def("world_wide_assign_task", (void(*)(uint32,bool,uint8))&lua_world_wide_assign_task), + luabind::def("world_wide_assign_task", (void(*)(uint32,bool,uint8,uint8))&lua_world_wide_assign_task), + luabind::def("world_wide_cast_spell", (void(*)(uint32))&lua_world_wide_cast_spell), + luabind::def("world_wide_cast_spell", (void(*)(uint32,uint8))&lua_world_wide_cast_spell), + luabind::def("world_wide_cast_spell", (void(*)(uint32,uint8,uint8))&lua_world_wide_cast_spell), + luabind::def("world_wide_disable_task", (void(*)(uint32))&lua_world_wide_disable_task), + luabind::def("world_wide_disable_task", (void(*)(uint32,uint8))&lua_world_wide_disable_task), + luabind::def("world_wide_disable_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_disable_task), + luabind::def("world_wide_enable_task", (void(*)(uint32))&lua_world_wide_enable_task), + luabind::def("world_wide_enable_task", (void(*)(uint32,uint8))&lua_world_wide_enable_task), + luabind::def("world_wide_enable_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_enable_task), + luabind::def("world_wide_fail_task", (void(*)(uint32))&lua_world_wide_fail_task), + luabind::def("world_wide_fail_task", (void(*)(uint32,uint8))&lua_world_wide_fail_task), + luabind::def("world_wide_fail_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_fail_task), + luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*))&lua_world_wide_marquee), + luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*,uint8))&lua_world_wide_marquee), + luabind::def("world_wide_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,const char*,uint8,uint8))&lua_world_wide_marquee), + luabind::def("world_wide_message", (void(*)(uint32,const char*))&lua_world_wide_message), + luabind::def("world_wide_message", (void(*)(uint32,const char*,uint8))&lua_world_wide_message), + luabind::def("world_wide_message", (void(*)(uint32,const char*,uint8,uint8))&lua_world_wide_message), + luabind::def("world_wide_move", (void(*)(const char*))&lua_world_wide_move), + luabind::def("world_wide_move", (void(*)(const char*,uint8))&lua_world_wide_move), + luabind::def("world_wide_move", (void(*)(const char*,uint8,uint8))&lua_world_wide_move), + luabind::def("world_wide_move_instance", (void(*)(uint16))&lua_world_wide_move_instance), + luabind::def("world_wide_move_instance", (void(*)(uint16,uint8))&lua_world_wide_move_instance), + luabind::def("world_wide_move_instance", (void(*)(uint16,uint8,uint8))&lua_world_wide_move_instance), + luabind::def("world_wide_remove_spell", (void(*)(uint32))&lua_world_wide_remove_spell), + luabind::def("world_wide_remove_spell", (void(*)(uint32,uint8))&lua_world_wide_remove_spell), + luabind::def("world_wide_remove_spell", (void(*)(uint32,uint8,uint8))&lua_world_wide_remove_spell), + luabind::def("world_wide_remove_task", (void(*)(uint32))&lua_world_wide_remove_task), + luabind::def("world_wide_remove_task", (void(*)(uint32,uint8))&lua_world_wide_remove_task), + luabind::def("world_wide_remove_task", (void(*)(uint32,uint8,uint8))&lua_world_wide_remove_task), + luabind::def("world_wide_reset_activity", (void(*)(uint32,int))&lua_world_wide_reset_activity), + luabind::def("world_wide_reset_activity", (void(*)(uint32,int,uint8))&lua_world_wide_reset_activity), + luabind::def("world_wide_reset_activity", (void(*)(uint32,int,uint8,uint8))&lua_world_wide_reset_activity), + luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*))&lua_world_wide_set_entity_variable_client), + luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*,uint8))&lua_world_wide_set_entity_variable_client), + luabind::def("world_wide_set_entity_variable_client", (void(*)(const char*,const char*,uint8,uint8))&lua_world_wide_set_entity_variable_client), + luabind::def("world_wide_set_entity_variable_npc", &lua_world_wide_set_entity_variable_npc), + luabind::def("world_wide_signal_client", (void(*)(uint32))&lua_world_wide_signal_client), + luabind::def("world_wide_signal_client", (void(*)(uint32,uint8))&lua_world_wide_signal_client), + luabind::def("world_wide_signal_client", (void(*)(uint32,uint8,uint8))&lua_world_wide_signal_client), + luabind::def("world_wide_signal_npc", &lua_world_wide_signal_npc), + luabind::def("world_wide_update_activity", (void(*)(uint32,int))&lua_world_wide_update_activity), + luabind::def("world_wide_update_activity", (void(*)(uint32,int,int))&lua_world_wide_update_activity), + luabind::def("world_wide_update_activity", (void(*)(uint32,int,int,uint8))&lua_world_wide_update_activity), + luabind::def("world_wide_update_activity", (void(*)(uint32,int,int,uint8,uint8))&lua_world_wide_update_activity), + /** * Expansions */ diff --git a/zone/lua_parser.cpp b/zone/lua_parser.cpp index 3a01c643f..641f24040 100644 --- a/zone/lua_parser.cpp +++ b/zone/lua_parser.cpp @@ -133,6 +133,7 @@ const char *LuaEvents[_LargestEventID] = { "event_bot_command", "event_warp", "event_test_buff", + "event_combine", "event_consider", "event_consider_corpse" }; @@ -222,6 +223,7 @@ LuaParser::LuaParser() { PlayerArgumentDispatch[EVENT_COMBINE_VALIDATE] = handle_player_combine_validate; PlayerArgumentDispatch[EVENT_BOT_COMMAND] = handle_player_bot_command; PlayerArgumentDispatch[EVENT_WARP] = handle_player_warp; + PlayerArgumentDispatch[EVENT_COMBINE] = handle_player_quest_combine; PlayerArgumentDispatch[EVENT_CONSIDER] = handle_player_consider; PlayerArgumentDispatch[EVENT_CONSIDER_CORPSE] = handle_player_consider_corpse; diff --git a/zone/lua_parser_events.cpp b/zone/lua_parser_events.cpp index 4a0c154ca..0734c9e19 100644 --- a/zone/lua_parser_events.cpp +++ b/zone/lua_parser_events.cpp @@ -573,6 +573,11 @@ void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std lua_setfield(L, -2, "from_z"); } +void handle_player_quest_combine(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector* extra_pointers) { + lua_pushinteger(L, std::stoi(data)); + lua_setfield(L, -2, "container_slot"); + } + void handle_player_consider(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector* extra_pointers) { lua_pushinteger(L, std::stoi(data)); lua_setfield(L, -2, "entity_id"); diff --git a/zone/lua_parser_events.h b/zone/lua_parser_events.h index 2b6512c15..850116075 100644 --- a/zone/lua_parser_events.h +++ b/zone/lua_parser_events.h @@ -105,6 +105,8 @@ void handle_player_bot_command(QuestInterface *parse, lua_State* L, Client* clie std::vector *extra_pointers); void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector* extra_pointers); +void handle_player_quest_combine(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, + std::vector* extra_pointers); void handle_player_consider(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector* extra_pointers); void handle_player_consider_corpse(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, diff --git a/zone/lua_stat_bonuses.cpp b/zone/lua_stat_bonuses.cpp index ef012c6d7..40805d648 100644 --- a/zone/lua_stat_bonuses.cpp +++ b/zone/lua_stat_bonuses.cpp @@ -987,7 +987,7 @@ int32 Lua_StatBonuses::GetShieldEquipDmgMod() const { bool Lua_StatBonuses::GetTriggerOnValueAmount() const { Lua_Safe_Call_Bool(); - return self->TriggerOnValueAmount; + return self->TriggerOnCastRequirement; } int8 Lua_StatBonuses::GetStunBashChance() const { diff --git a/zone/mob.cpp b/zone/mob.cpp index 4f6673cb6..96591b9e1 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2838,10 +2838,17 @@ bool Mob::HateSummon() { if(summon_level == 1) { entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() ); + auto new_pos = m_Position; + float angle = new_pos.w - target->GetHeading(); + new_pos.w = target->GetHeading(); + + // probably should be like half melee range, but we can't get melee range nicely because reasons :) + new_pos = target->TryMoveAlong(new_pos, 5.0f, angle); + if (target->IsClient()) - target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Position.x, m_Position.y, m_Position.z, target->GetHeading(), 0, SummonPC); + target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), new_pos.x, new_pos.y, new_pos.z, new_pos.w, 0, SummonPC); else - target->GMMove(m_Position.x, m_Position.y, m_Position.z, target->GetHeading()); + target->GMMove(new_pos.x, new_pos.y, new_pos.z, new_pos.w); return true; } else if(summon_level == 2) { @@ -3602,81 +3609,20 @@ bool Mob::TrySpellTrigger(Mob *target, uint32 spell_id, int effect) return false; } - - -void Mob::TryTriggerOnValueAmount(bool IsHP, bool IsMana, bool IsEndur, bool IsPet) +void Mob::TryTriggerOnCastRequirement() { - /* - At present time there is no obvious difference between ReqTarget and ReqCaster - ReqTarget is typically used in spells cast on a target where the trigger occurs on that target. - ReqCaster is typically self only spells where the triggers on self. - Regardless both trigger on the owner of the buff. - */ - - /* - Base2 Range: 1004 = Below < 80% HP - Base2 Range: 500-520 = Below (base2 - 500)*5 HP - Base2 Range: 521 = Below (?) Mana UKNOWN - Will assume its 20% unless proven otherwise - Base2 Range: 522 = Below (40%) Endurance - Base2 Range: 523 = Below (40%) Mana - Base2 Range: 220-? = Number of pets on hatelist to trigger (base2 - 220) (Set at 30 pets max for now) - 38311 = < 10% mana; - */ - - if (!spellbonuses.TriggerOnValueAmount) - return; - - if (spellbonuses.TriggerOnValueAmount){ - + if (spellbonuses.TriggerOnCastRequirement) { int buff_count = GetMaxTotalSlots(); - - for(int e = 0; e < buff_count; e++){ - - uint32 spell_id = buffs[e].spellid; - - if (IsValidSpell(spell_id)){ - - for(int i = 0; i < EFFECT_COUNT; i++){ - + for (int e = 0; e < buff_count; e++) { + int spell_id = buffs[e].spellid; + if (IsValidSpell(spell_id)) { + for (int i = 0; i < EFFECT_COUNT; i++) { if ((spells[spell_id].effectid[i] == SE_TriggerOnReqTarget) || (spells[spell_id].effectid[i] == SE_TriggerOnReqCaster)) { - - int base2 = spells[spell_id].base2[i]; - bool use_spell = false; - - if (IsHP){ - if ((base2 >= 500 && base2 <= 520) && GetHPRatio() < (base2 - 500)*5) - use_spell = true; - - else if (base2 == 1004 && GetHPRatio() < 80) - use_spell = true; - } - - else if (IsMana){ - if ( (base2 = 521 && GetManaRatio() < 20) || (base2 = 523 && GetManaRatio() < 40)) - use_spell = true; - - else if (base2 == 38311 && GetManaRatio() < 10) - use_spell = true; - } - - else if (IsEndur){ - if (base2 == 522 && GetEndurancePercent() < 40){ - use_spell = true; - } - } - - else if (IsPet){ - int count = hate_list.GetSummonedPetCountOnHateList(this); - if ((base2 >= 220 && base2 <= 250) && count >= (base2 - 220)){ - use_spell = true; - } - } - - if (use_spell){ + if (PassCastRestriction(spells[spell_id].base2[i])) { SpellFinished(spells[spell_id].base[i], this, EQ::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff); - - if(!TryFadeEffect(e)) + if (!TryFadeEffect(e)) { BuffFadeBySlot(e); + } } } } @@ -3685,7 +3631,6 @@ void Mob::TryTriggerOnValueAmount(bool IsHP, bool IsMana, bool IsEndur, bool IsP } } - //Twincast Focus effects should stack across different types (Spell, AA - when implemented ect) void Mob::TryTwincast(Mob *caster, Mob *target, uint32 spell_id) { diff --git a/zone/mob.h b/zone/mob.h index 7d07c3f7f..b94438322 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -623,6 +623,7 @@ public: void Teleport(const glm::vec3 &pos); void Teleport(const glm::vec4 &pos); void TryMoveAlong(float distance, float angle, bool send = true); + glm::vec4 TryMoveAlong(const glm::vec4 &start, float distance, float angle); void ProcessForcedMovement(); inline void IncDeltaX(float in) { m_Delta.x += in; } inline void IncDeltaY(float in) { m_Delta.y += in; } @@ -796,7 +797,7 @@ public: void TryTriggerOnCastFocusEffect(focusType type, uint16 spell_id); bool TryTriggerOnCastProc(uint16 focusspellid, uint16 spell_id, uint16 proc_spellid); bool TrySpellTrigger(Mob *target, uint32 spell_id, int effect); - void TryTriggerOnValueAmount(bool IsHP = false, bool IsMana = false, bool IsEndur = false, bool IsPet = false); + void TryTriggerOnCastRequirement(); void TryTwincast(Mob *caster, Mob *target, uint32 spell_id); void TrySympatheticProc(Mob *target, uint32 spell_id); bool TryFadeEffect(int slot); @@ -844,6 +845,8 @@ public: bool CanFocusUseRandomEffectivenessByType(focusType type); int GetFocusRandomEffectivenessValue(int focus_base, int focus_base2, bool best_focus = 0); int GetHealRate() const { return itembonuses.HealRate + spellbonuses.HealRate + aabonuses.HealRate; } + int GetMemoryBlurChance(int base_chance); + bool TryDoubleMeleeRoundEffect(); bool GetUseDoubleMeleeRoundDmgBonus() const { return use_double_melee_round_dmg_bonus; } @@ -1532,6 +1535,7 @@ protected: bool endur_upkeep; bool degenerating_effects; // true if we have a buff that needs to be recalced every tick bool spawned_in_water; + public: bool GetWasSpawnedInWater() const; diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 8cb3d56e9..2030ea061 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -4016,7 +4016,7 @@ XS(XS_Client_Freeze); XS(XS_Client_Freeze) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Client:Freeze(THIS)"); + Perl_croak(aTHX_ "Usage: Client::Freeze(THIS)"); { Client *THIS; VALIDATE_THIS_IS_CLIENT; @@ -4029,7 +4029,7 @@ XS(XS_Client_UnFreeze); XS(XS_Client_UnFreeze) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Client:UnFreeze(THIS)"); + Perl_croak(aTHX_ "Usage: Client::UnFreeze(THIS)"); { Client *THIS; VALIDATE_THIS_IS_CLIENT; diff --git a/zone/perl_raids.cpp b/zone/perl_raids.cpp index 452741be6..bc739a8d6 100644 --- a/zone/perl_raids.cpp +++ b/zone/perl_raids.cpp @@ -304,7 +304,7 @@ XS(XS_Raid_GetClientByIndex); /* prototype to pass -Wmissing-prototypes */ XS(XS_Raid_GetClientByIndex) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_indez)"); // @categories Raid + Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_index)"); // @categories Raid { Raid *THIS; Client *RETVAL; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index cac4c34a8..df3d846e3 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -3220,872 +3220,6 @@ std::string QuestManager::GetZoneShortName(uint32 zone_id) { return ZoneName(zone_id); } -void QuestManager::CrossZoneAssignTaskByCharID(int character_id, uint32 task_id, bool enforce_level_requirement) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskAssignPlayer, sizeof(CZTaskAssignPlayer_Struct)); - CZTaskAssignPlayer_Struct* CZTA = (CZTaskAssignPlayer_Struct*) pack->pBuffer; - CZTA->npc_entity_id = owner->GetID(); - CZTA->character_id = character_id; - CZTA->task_id = task_id; - CZTA->enforce_level_requirement = enforce_level_requirement; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneAssignTaskByGroupID(int group_id, uint32 task_id, bool enforce_level_requirement) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskAssignGroup, sizeof(CZTaskAssignGroup_Struct)); - CZTaskAssignGroup_Struct* CZTA = (CZTaskAssignGroup_Struct*) pack->pBuffer; - CZTA->npc_entity_id = owner->GetID(); - CZTA->group_id = group_id; - CZTA->task_id = task_id; - CZTA->enforce_level_requirement = enforce_level_requirement; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneAssignTaskByRaidID(int raid_id, uint32 task_id, bool enforce_level_requirement) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskAssignRaid, sizeof(CZTaskAssignRaid_Struct)); - CZTaskAssignRaid_Struct* CZTA = (CZTaskAssignRaid_Struct*) pack->pBuffer; - CZTA->npc_entity_id = owner->GetID(); - CZTA->raid_id = raid_id; - CZTA->task_id = task_id; - CZTA->enforce_level_requirement = enforce_level_requirement; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneAssignTaskByGuildID(int guild_id, uint32 task_id, bool enforce_level_requirement) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskAssignGuild, sizeof(CZTaskAssignGuild_Struct)); - CZTaskAssignGuild_Struct* CZTA = (CZTaskAssignGuild_Struct*) pack->pBuffer; - CZTA->npc_entity_id = owner->GetID(); - CZTA->guild_id = guild_id; - CZTA->task_id = task_id; - CZTA->enforce_level_requirement = enforce_level_requirement; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneCastSpellByCharID(int character_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZCastSpellPlayer, sizeof(CZCastSpellPlayer_Struct)); - CZCastSpellPlayer_Struct* CZCS = (CZCastSpellPlayer_Struct*) pack->pBuffer; - CZCS->character_id = character_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneCastSpellByGroupID(int group_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZCastSpellGroup, sizeof(CZCastSpellGroup_Struct)); - CZCastSpellGroup_Struct* CZCS = (CZCastSpellGroup_Struct*) pack->pBuffer; - CZCS->group_id = group_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneCastSpellByRaidID(int raid_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZCastSpellRaid, sizeof(CZCastSpellRaid_Struct)); - CZCastSpellRaid_Struct* CZCS = (CZCastSpellRaid_Struct*) pack->pBuffer; - CZCS->raid_id = raid_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneCastSpellByGuildID(int guild_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZCastSpellGuild, sizeof(CZCastSpellGuild_Struct)); - CZCastSpellGuild_Struct* CZCS = (CZCastSpellGuild_Struct*) pack->pBuffer; - CZCS->guild_id = guild_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneDisableTaskByCharID(int character_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskDisablePlayer, sizeof(CZTaskDisablePlayer_Struct)); - CZTaskDisablePlayer_Struct* CZTD = (CZTaskDisablePlayer_Struct*) pack->pBuffer; - CZTD->character_id = character_id; - CZTD->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneDisableTaskByGroupID(int group_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskDisableGroup, sizeof(CZTaskDisableGroup_Struct)); - CZTaskDisableGroup_Struct* CZTD = (CZTaskDisableGroup_Struct*) pack->pBuffer; - CZTD->group_id = group_id; - CZTD->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneDisableTaskByRaidID(int raid_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskDisableRaid, sizeof(CZTaskDisableRaid_Struct)); - CZTaskDisableRaid_Struct* CZTD = (CZTaskDisableRaid_Struct*) pack->pBuffer; - CZTD->raid_id = raid_id; - CZTD->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneDisableTaskByGuildID(int guild_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskDisableGuild, sizeof(CZTaskDisableGuild_Struct)); - CZTaskDisableGuild_Struct* CZTD = (CZTaskDisableGuild_Struct*) pack->pBuffer; - CZTD->guild_id = guild_id; - CZTD->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneEnableTaskByCharID(int character_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskEnablePlayer, sizeof(CZTaskEnablePlayer_Struct)); - CZTaskEnablePlayer_Struct* CZTE = (CZTaskEnablePlayer_Struct*) pack->pBuffer; - CZTE->character_id = character_id; - CZTE->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneEnableTaskByGroupID(int group_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskEnableGroup, sizeof(CZTaskEnableGroup_Struct)); - CZTaskEnableGroup_Struct* CZTE = (CZTaskEnableGroup_Struct*) pack->pBuffer; - CZTE->group_id = group_id; - CZTE->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneEnableTaskByRaidID(int raid_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskEnableRaid, sizeof(CZTaskEnableRaid_Struct)); - CZTaskEnableRaid_Struct* CZTE = (CZTaskEnableRaid_Struct*) pack->pBuffer; - CZTE->raid_id = raid_id; - CZTE->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneEnableTaskByGuildID(int guild_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskEnableGuild, sizeof(CZTaskEnableGuild_Struct)); - CZTaskEnableGuild_Struct* CZTE = (CZTaskEnableGuild_Struct*) pack->pBuffer; - CZTE->guild_id = guild_id; - CZTE->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneFailTaskByCharID(int character_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskFailPlayer, sizeof(CZTaskFailPlayer_Struct)); - CZTaskFailPlayer_Struct* CZTF = (CZTaskFailPlayer_Struct*) pack->pBuffer; - CZTF->character_id = character_id; - CZTF->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneFailTaskByGroupID(int group_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskFailGroup, sizeof(CZTaskFailGroup_Struct)); - CZTaskFailGroup_Struct* CZTF = (CZTaskFailGroup_Struct*) pack->pBuffer; - CZTF->group_id = group_id; - CZTF->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneFailTaskByRaidID(int raid_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskFailRaid, sizeof(CZTaskFailRaid_Struct)); - CZTaskFailRaid_Struct* CZTF = (CZTaskFailRaid_Struct*) pack->pBuffer; - CZTF->raid_id = raid_id; - CZTF->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneFailTaskByGuildID(int guild_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskFailGuild, sizeof(CZTaskFailGuild_Struct)); - CZTaskFailGuild_Struct* CZTF = (CZTaskFailGuild_Struct*) pack->pBuffer; - CZTF->guild_id = guild_id; - CZTF->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMarqueeByCharID(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMarqueePlayer, sizeof(CZMarqueePlayer_Struct) + message_len); - CZMarqueePlayer_Struct* CZMS = (CZMarqueePlayer_Struct*) pack->pBuffer; - CZMS->character_id = character_id; - CZMS->type = type; - CZMS->priority = priority; - CZMS->fade_in = fade_in; - CZMS->fade_out = fade_out; - CZMS->duration = duration; - strn0cpy(CZMS->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMarqueeByGroupID(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMarqueeGroup, sizeof(CZMarqueeGroup_Struct) + message_len); - CZMarqueeGroup_Struct* CZMS = (CZMarqueeGroup_Struct*) pack->pBuffer; - CZMS->group_id = group_id; - CZMS->type = type; - CZMS->priority = priority; - CZMS->fade_in = fade_in; - CZMS->fade_out = fade_out; - CZMS->duration = duration; - strn0cpy(CZMS->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMarqueeByRaidID(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMarqueeRaid, sizeof(CZMarqueeRaid_Struct) + message_len); - CZMarqueeRaid_Struct* CZMS = (CZMarqueeRaid_Struct*) pack->pBuffer; - CZMS->raid_id = raid_id; - CZMS->type = type; - CZMS->priority = priority; - CZMS->fade_in = fade_in; - CZMS->fade_out = fade_out; - CZMS->duration = duration; - strn0cpy(CZMS->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMarqueeByGuildID(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMarqueeGuild, sizeof(CZMarqueeGuild_Struct) + message_len); - CZMarqueeGuild_Struct* CZMS = (CZMarqueeGuild_Struct*) pack->pBuffer; - CZMS->guild_id = guild_id; - CZMS->type = type; - CZMS->priority = priority; - CZMS->fade_in = fade_in; - CZMS->fade_out = fade_out; - CZMS->duration = duration; - strn0cpy(CZMS->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMessagePlayerByName(uint32 type, const char *character_name, const char *message) { - uint32 message_len = strlen(character_name) + 1; - uint32 message_len2 = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMessagePlayer, sizeof(CZMessagePlayer_Struct) + message_len + message_len2); - CZMessagePlayer_Struct* CZSC = (CZMessagePlayer_Struct*) pack->pBuffer; - CZSC->type = type; - strn0cpy(CZSC->character_name, character_name, 64); - strn0cpy(CZSC->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMessagePlayerByGroupID(uint32 type, int group_id, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMessageGroup, sizeof(CZMessageGroup_Struct) + message_len); - CZMessageGroup_Struct* CZGM = (CZMessageGroup_Struct*) pack->pBuffer; - CZGM->type = type; - CZGM->group_id = group_id; - strn0cpy(CZGM->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMessagePlayerByRaidID(uint32 type, int raid_id, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMessageRaid, sizeof(CZMessageRaid_Struct) + message_len); - CZMessageRaid_Struct* CZRM = (CZMessageRaid_Struct*) pack->pBuffer; - CZRM->type = type; - CZRM->raid_id = raid_id; - strn0cpy(CZRM->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMessagePlayerByGuildID(uint32 type, int guild_id, const char *message) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_CZMessageGuild, sizeof(CZMessageGuild_Struct) + message_len); - CZMessageGuild_Struct* CZGM = (CZMessageGuild_Struct*) pack->pBuffer; - CZGM->type = type; - CZGM->guild_id = guild_id; - strn0cpy(CZGM->message, message, 512); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMovePlayerByCharID(int character_id, const char *zone_short_name) { - uint32 message_len = strlen(zone_short_name) + 1; - auto pack = new ServerPacket(ServerOP_CZMovePlayer, sizeof(CZMovePlayer_Struct) + message_len); - CZMovePlayer_Struct* CZGM = (CZMovePlayer_Struct*) pack->pBuffer; - CZGM->character_id = character_id; - strn0cpy(CZGM->zone_short_name, zone_short_name, 32); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMovePlayerByGroupID(int group_id, const char *zone_short_name) { - uint32 message_len = strlen(zone_short_name) + 1; - auto pack = new ServerPacket(ServerOP_CZMoveGroup, sizeof(CZMoveGroup_Struct) + message_len); - CZMoveGroup_Struct* CZGM = (CZMoveGroup_Struct*) pack->pBuffer; - CZGM->group_id = group_id; - strn0cpy(CZGM->zone_short_name, zone_short_name, 32); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMovePlayerByRaidID(int raid_id, const char *zone_short_name) { - uint32 message_len = strlen(zone_short_name) + 1; - auto pack = new ServerPacket(ServerOP_CZMoveRaid, sizeof(CZMoveRaid_Struct) + message_len); - CZMoveRaid_Struct* CZRM = (CZMoveRaid_Struct*) pack->pBuffer; - CZRM->raid_id = raid_id; - strn0cpy(CZRM->zone_short_name, zone_short_name, 32); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMovePlayerByGuildID(int guild_id, const char *zone_short_name) { - uint32 message_len = strlen(zone_short_name) + 1; - auto pack = new ServerPacket(ServerOP_CZMoveGuild, sizeof(CZMoveGuild_Struct) + message_len); - CZMoveGuild_Struct* CZGM = (CZMoveGuild_Struct*) pack->pBuffer; - CZGM->guild_id = guild_id; - strn0cpy(CZGM->zone_short_name, zone_short_name, 32); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMoveInstanceByCharID(int character_id, uint16 instance_id) { - auto pack = new ServerPacket(ServerOP_CZMoveInstancePlayer, sizeof(CZMoveInstancePlayer_Struct)); - CZMoveInstancePlayer_Struct* CZMS = (CZMoveInstancePlayer_Struct*) pack->pBuffer; - CZMS->character_id = character_id; - CZMS->instance_id = instance_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMoveInstanceByGroupID(int group_id, uint16 instance_id) { - auto pack = new ServerPacket(ServerOP_CZMoveInstanceGroup, sizeof(CZMoveInstanceGroup_Struct)); - CZMoveInstanceGroup_Struct* CZMS = (CZMoveInstanceGroup_Struct*) pack->pBuffer; - CZMS->group_id = group_id; - CZMS->instance_id = instance_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMoveInstanceByRaidID(int raid_id, uint16 instance_id) { - auto pack = new ServerPacket(ServerOP_CZMoveInstanceRaid, sizeof(CZMoveInstanceRaid_Struct)); - CZMoveInstanceRaid_Struct* CZMS = (CZMoveInstanceRaid_Struct*) pack->pBuffer; - CZMS->raid_id = raid_id; - CZMS->instance_id = instance_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneMoveInstanceByGuildID(int guild_id, uint16 instance_id) { - auto pack = new ServerPacket(ServerOP_CZMoveInstanceGuild, sizeof(CZMoveInstanceGuild_Struct)); - CZMoveInstanceGuild_Struct* CZMS = (CZMoveInstanceGuild_Struct*) pack->pBuffer; - CZMS->guild_id = guild_id; - CZMS->instance_id = instance_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveSpellByCharID(int character_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZRemoveSpellPlayer, sizeof(CZRemoveSpellPlayer_Struct)); - CZRemoveSpellPlayer_Struct* CZCS = (CZRemoveSpellPlayer_Struct*) pack->pBuffer; - CZCS->character_id = character_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveSpellByGroupID(int group_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZRemoveSpellGroup, sizeof(CZRemoveSpellGroup_Struct)); - CZRemoveSpellGroup_Struct* CZCS = (CZRemoveSpellGroup_Struct*) pack->pBuffer; - CZCS->group_id = group_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveSpellByRaidID(int raid_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZRemoveSpellRaid, sizeof(CZRemoveSpellRaid_Struct)); - CZRemoveSpellRaid_Struct* CZCS = (CZRemoveSpellRaid_Struct*) pack->pBuffer; - CZCS->raid_id = raid_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveSpellByGuildID(int guild_id, uint32 spell_id) { - auto pack = new ServerPacket(ServerOP_CZRemoveSpellGuild, sizeof(CZRemoveSpellGuild_Struct)); - CZRemoveSpellGuild_Struct* CZCS = (CZRemoveSpellGuild_Struct*) pack->pBuffer; - CZCS->guild_id = guild_id; - CZCS->spell_id = spell_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveTaskByCharID(int character_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskRemovePlayer, sizeof(CZTaskRemovePlayer_Struct)); - CZTaskRemovePlayer_Struct* CZCS = (CZTaskRemovePlayer_Struct*) pack->pBuffer; - CZCS->character_id = character_id; - CZCS->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveTaskByGroupID(int group_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskRemoveGroup, sizeof(CZTaskRemoveGroup_Struct)); - CZTaskRemoveGroup_Struct* CZCS = (CZTaskRemoveGroup_Struct*) pack->pBuffer; - CZCS->group_id = group_id; - CZCS->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveTaskByRaidID(int raid_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskRemoveRaid, sizeof(CZTaskRemoveRaid_Struct)); - CZTaskRemoveRaid_Struct* CZCS = (CZTaskRemoveRaid_Struct*) pack->pBuffer; - CZCS->raid_id = raid_id; - CZCS->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneRemoveTaskByGuildID(int guild_id, uint32 task_id) { - auto pack = new ServerPacket(ServerOP_CZTaskRemoveGuild, sizeof(CZTaskRemoveGuild_Struct)); - CZTaskRemoveGuild_Struct* CZCS = (CZTaskRemoveGuild_Struct*) pack->pBuffer; - CZCS->guild_id = guild_id; - CZCS->task_id = task_id; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneResetActivityByCharID(int character_id, uint32 task_id, int activity_id) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityResetPlayer, sizeof(CZResetActivityPlayer_Struct)); - CZResetActivityPlayer_Struct* CZCA = (CZResetActivityPlayer_Struct*) pack->pBuffer; - CZCA->character_id = character_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneResetActivityByGroupID(int group_id, uint32 task_id, int activity_id) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityResetGroup, sizeof(CZResetActivityGroup_Struct)); - CZResetActivityGroup_Struct* CZCA = (CZResetActivityGroup_Struct*) pack->pBuffer; - CZCA->group_id = group_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneResetActivityByRaidID(int raid_id, uint32 task_id, int activity_id) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityResetRaid, sizeof(CZResetActivityRaid_Struct)); - CZResetActivityRaid_Struct* CZCA = (CZResetActivityRaid_Struct*) pack->pBuffer; - CZCA->raid_id = raid_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneResetActivityByGuildID(int guild_id, uint32 task_id, int activity_id) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityResetGuild, sizeof(CZResetActivityGuild_Struct)); - CZResetActivityGuild_Struct* CZCA = (CZResetActivityGuild_Struct*) pack->pBuffer; - CZCA->guild_id = guild_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneSignalNPCByNPCTypeID(uint32 npctype_id, uint32 signal) { - auto pack = new ServerPacket(ServerOP_CZSignalNPC, sizeof(CZNPCSignal_Struct)); - CZNPCSignal_Struct* CZSN = (CZNPCSignal_Struct*) pack->pBuffer; - CZSN->npctype_id = npctype_id; - CZSN->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSignalPlayerByCharID(int character_id, uint32 signal) { - auto pack = new ServerPacket(ServerOP_CZSignalClient, sizeof(CZClientSignal_Struct)); - CZClientSignal_Struct* CZSC = (CZClientSignal_Struct*) pack->pBuffer; - CZSC->character_id = character_id; - CZSC->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSetEntityVariableByClientName(const char *character_name, const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - uint32 message_len3 = strlen(character_name) + 1; - auto pack = new ServerPacket(ServerOP_CZSetEntityVariableByClientName, sizeof(CZSetEntVarByClientName_Struct) + message_len + message_len2 + message_len3); - CZSetEntVarByClientName_Struct* CZ = (CZSetEntVarByClientName_Struct*) pack->pBuffer; - strn0cpy(CZ->character_name, character_name, 64); - strn0cpy(CZ->variable_name, variable_name, 256); - strn0cpy(CZ->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSetEntityVariableByGroupID(int group_id, const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_CZSetEntityVariableByGroupID, sizeof(CZSetEntVarByGroupID_Struct) + message_len + message_len2); - CZSetEntVarByGroupID_Struct* CZ = (CZSetEntVarByGroupID_Struct*) pack->pBuffer; - CZ->group_id = group_id; - strn0cpy(CZ->variable_name, variable_name, 256); - strn0cpy(CZ->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSetEntityVariableByRaidID(int raid_id, const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_CZSetEntityVariableByRaidID, sizeof(CZSetEntVarByRaidID_Struct) + message_len + message_len2); - CZSetEntVarByRaidID_Struct* CZ = (CZSetEntVarByRaidID_Struct*) pack->pBuffer; - CZ->raid_id = raid_id; - strn0cpy(CZ->variable_name, variable_name, 256); - strn0cpy(CZ->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSetEntityVariableByGuildID(int guild_id, const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_CZSetEntityVariableByGuildID, sizeof(CZSetEntVarByGuildID_Struct) + message_len + message_len2); - CZSetEntVarByGuildID_Struct* CZ = (CZSetEntVarByGuildID_Struct*) pack->pBuffer; - CZ->guild_id = guild_id; - strn0cpy(CZ->variable_name, variable_name, 256); - strn0cpy(CZ->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSetEntityVariableByNPCTypeID(uint32 npctype_id, const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_CZSetEntityVariableByNPCTypeID, sizeof(CZSetEntVarByNPCTypeID_Struct) + message_len + message_len2); - CZSetEntVarByNPCTypeID_Struct* CZSNBYNID = (CZSetEntVarByNPCTypeID_Struct*) pack->pBuffer; - CZSNBYNID->npctype_id = npctype_id; - strn0cpy(CZSNBYNID->variable_name, variable_name, 256); - strn0cpy(CZSNBYNID->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSignalPlayerByGroupID(int group_id, uint32 signal) { - auto pack = new ServerPacket(ServerOP_CZSignalGroup, sizeof(CZGroupSignal_Struct)); - CZGroupSignal_Struct* CZGS = (CZGroupSignal_Struct*) pack->pBuffer; - CZGS->group_id = group_id; - CZGS->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSignalPlayerByRaidID(int raid_id, uint32 signal) { - auto pack = new ServerPacket(ServerOP_CZSignalRaid, sizeof(CZRaidSignal_Struct)); - CZRaidSignal_Struct* CZRS = (CZRaidSignal_Struct*) pack->pBuffer; - CZRS->raid_id = raid_id; - CZRS->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSignalPlayerByGuildID(int guild_id, uint32 signal) { - auto pack = new ServerPacket(ServerOP_CZSignalGuild, sizeof(CZGuildSignal_Struct)); - CZGuildSignal_Struct* CZGS = (CZGuildSignal_Struct*) pack->pBuffer; - CZGS->guild_id = guild_id; - CZGS->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneSignalPlayerByName(const char *character_name, uint32 signal) { - uint32 message_len = strlen(character_name) + 1; - auto pack = new ServerPacket(ServerOP_CZSignalClientByName, sizeof(CZClientSignalByName_Struct) + message_len); - CZClientSignalByName_Struct* CZSC = (CZClientSignalByName_Struct*) pack->pBuffer; - strn0cpy(CZSC->character_name, character_name, 64); - CZSC->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::CrossZoneUpdateActivityByCharID(int character_id, uint32 task_id, int activity_id, int activity_count) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityUpdatePlayer, sizeof(CZTaskActivityUpdatePlayer_Struct)); - CZTaskActivityUpdatePlayer_Struct* CZCA = (CZTaskActivityUpdatePlayer_Struct*) pack->pBuffer; - CZCA->character_id = character_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - CZCA->activity_count = activity_count; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneUpdateActivityByGroupID(int group_id, uint32 task_id, int activity_id, int activity_count) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityUpdateGroup, sizeof(CZTaskActivityUpdateGroup_Struct)); - CZTaskActivityUpdateGroup_Struct* CZCA = (CZTaskActivityUpdateGroup_Struct*) pack->pBuffer; - CZCA->group_id = group_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - CZCA->activity_count = activity_count; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneUpdateActivityByRaidID(int raid_id, uint32 task_id, int activity_id, int activity_count) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityUpdateRaid, sizeof(CZTaskActivityUpdateRaid_Struct)); - CZTaskActivityUpdateRaid_Struct* CZCA = (CZTaskActivityUpdateRaid_Struct*) pack->pBuffer; - CZCA->raid_id = raid_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - CZCA->activity_count = activity_count; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::CrossZoneUpdateActivityByGuildID(int guild_id, uint32 task_id, int activity_id, int activity_count) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_CZTaskActivityUpdateGuild, sizeof(CZTaskActivityUpdateGuild_Struct)); - CZTaskActivityUpdateGuild_Struct* CZCA = (CZTaskActivityUpdateGuild_Struct*) pack->pBuffer; - CZCA->guild_id = guild_id; - CZCA->task_id = task_id; - CZCA->activity_id = activity_id; - CZCA->activity_count = activity_count; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::WorldWideAssignTask(uint32 task_id, bool enforce_level_requirement, uint8 min_status, uint8 max_status) { - QuestManagerCurrentQuestVars(); - if (initiator && owner) { - auto pack = new ServerPacket(ServerOP_WWAssignTask, sizeof(WWAssignTask_Struct)); - WWAssignTask_Struct* WWTA = (WWAssignTask_Struct*) pack->pBuffer; - WWTA->npc_entity_id = owner->GetID(); - WWTA->task_id = task_id; - WWTA->enforce_level_requirement = enforce_level_requirement; - WWTA->min_status = min_status; - WWTA->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); - } -} - -void QuestManager::WorldWideCastSpell(uint32 spell_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWCastSpell, sizeof(WWCastSpell_Struct)); - WWCastSpell_Struct* WWCS = (WWCastSpell_Struct*) pack->pBuffer; - WWCS->spell_id = spell_id; - WWCS->min_status = min_status; - WWCS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideDisableTask(uint32 task_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWDisableTask, sizeof(WWDisableTask_Struct)); - WWDisableTask_Struct* WWDT = (WWDisableTask_Struct*) pack->pBuffer; - WWDT->task_id = task_id; - WWDT->min_status = min_status; - WWDT->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideEnableTask(uint32 task_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWEnableTask, sizeof(WWEnableTask_Struct)); - WWEnableTask_Struct* WWET = (WWEnableTask_Struct*) pack->pBuffer; - WWET->task_id = task_id; - WWET->min_status = min_status; - WWET->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideFailTask(uint32 task_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWFailTask, sizeof(WWFailTask_Struct)); - WWFailTask_Struct* WWFT = (WWFailTask_Struct*) pack->pBuffer; - WWFT->task_id = task_id; - WWFT->min_status = min_status; - WWFT->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message, uint8 min_status, uint8 max_status) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_WWMarquee, sizeof(WWMarquee_Struct) + message_len); - WWMarquee_Struct* WWMS = (WWMarquee_Struct*) pack->pBuffer; - WWMS->type = type; - WWMS->priority = priority; - WWMS->fade_in = fade_in; - WWMS->fade_out = fade_out; - WWMS->duration = duration; - strn0cpy(WWMS->message, message, 512); - WWMS->min_status = min_status; - WWMS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideMessage(uint32 type, const char *message, uint8 min_status, uint8 max_status) { - uint32 message_len = strlen(message) + 1; - auto pack = new ServerPacket(ServerOP_WWMessage, sizeof(WWMessage_Struct) + message_len); - WWMessage_Struct* WWMS = (WWMessage_Struct*) pack->pBuffer; - WWMS->type = type; - strn0cpy(WWMS->message, message, 512); - WWMS->min_status = min_status; - WWMS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideMove(const char *zone_short_name, uint8 min_status, uint8 max_status) { - uint32 message_len = strlen(zone_short_name) + 1; - auto pack = new ServerPacket(ServerOP_WWMove, sizeof(WWMove_Struct) + message_len); - WWMove_Struct* WWMS = (WWMove_Struct*) pack->pBuffer;; - strn0cpy(WWMS->zone_short_name, zone_short_name, 32); - WWMS->min_status = min_status; - WWMS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideMoveInstance(uint16 instance_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWMoveInstance, sizeof(WWMoveInstance_Struct)); - WWMoveInstance_Struct* WWMS = (WWMoveInstance_Struct*) pack->pBuffer; - WWMS->instance_id = instance_id; - WWMS->min_status = min_status; - WWMS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideRemoveSpell(uint32 spell_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWRemoveSpell, sizeof(WWRemoveSpell_Struct)); - WWRemoveSpell_Struct* WWRS = (WWRemoveSpell_Struct*) pack->pBuffer; - WWRS->spell_id = spell_id; - WWRS->min_status = min_status; - WWRS->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideRemoveTask(uint32 task_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWRemoveTask, sizeof(WWRemoveTask_Struct)); - WWRemoveTask_Struct* WWRT = (WWRemoveTask_Struct*) pack->pBuffer; - WWRT->task_id = task_id; - WWRT->min_status = min_status; - WWRT->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideResetActivity(uint32 task_id, int activity_id, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWResetActivity, sizeof(WWResetActivity_Struct)); - WWResetActivity_Struct* WWRA = (WWResetActivity_Struct*) pack->pBuffer; - WWRA->task_id = task_id; - WWRA->activity_id = activity_id; - WWRA->min_status = min_status; - WWRA->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideSetEntityVariableClient(const char *variable_name, const char *variable_value, uint8 min_status, uint8 max_status) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_WWSetEntityVariableClient, sizeof(WWSetEntVarClient_Struct) + message_len + message_len2); - WWSetEntVarClient_Struct* WWSC = (WWSetEntVarClient_Struct*) pack->pBuffer; - strn0cpy(WWSC->variable_name, variable_name, 256); - strn0cpy(WWSC->variable_value, variable_value, 256); - WWSC->min_status = min_status; - WWSC->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideSetEntityVariableNPC(const char *variable_name, const char *variable_value) { - uint32 message_len = strlen(variable_name) + 1; - uint32 message_len2 = strlen(variable_value) + 1; - auto pack = new ServerPacket(ServerOP_WWSetEntityVariableNPC, sizeof(WWSetEntVarNPC_Struct) + message_len + message_len2); - WWSetEntVarNPC_Struct* WWSN = (WWSetEntVarNPC_Struct*) pack->pBuffer; - strn0cpy(WWSN->variable_name, variable_name, 256); - strn0cpy(WWSN->variable_value, variable_value, 256); - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideSignalClient(uint32 signal, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWSignalClient, sizeof(WWSignalClient_Struct)); - WWSignalClient_Struct* WWSC = (WWSignalClient_Struct*) pack->pBuffer; - WWSC->signal = signal; - WWSC->min_status = min_status; - WWSC->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideSignalNPC(uint32 signal) { - auto pack = new ServerPacket(ServerOP_WWSignalNPC, sizeof(WWSignalNPC_Struct)); - WWSignalNPC_Struct* WWSN = (WWSignalNPC_Struct*) pack->pBuffer; - WWSN->signal = signal; - worldserver.SendPacket(pack); - safe_delete(pack); -} - -void QuestManager::WorldWideUpdateActivity(uint32 task_id, int activity_id, int activity_count, uint8 min_status, uint8 max_status) { - auto pack = new ServerPacket(ServerOP_WWUpdateActivity, sizeof(WWUpdateActivity_Struct)); - WWUpdateActivity_Struct* WWUA = (WWUpdateActivity_Struct*) pack->pBuffer; - WWUA->task_id = task_id; - WWUA->activity_id = activity_id; - WWUA->activity_count = activity_count; - WWUA->min_status = min_status; - WWUA->max_status = max_status; - worldserver.SendPacket(pack); - safe_delete(pack); -} - bool QuestManager::EnableRecipe(uint32 recipe_id) { bool success = false; @@ -4304,27 +3438,8 @@ void QuestManager::SetEXPModifierByCharID(uint32 character_id, uint32 zone_id, d database.SetEXPModifier(character_id, zone_id, exp_modifier); } -void QuestManager::CrossZoneLDoNUpdate(uint8 type, uint8 subtype, int identifier, uint32 theme_id, int points) { - auto pack = new ServerPacket(ServerOP_CZLDoNUpdate, sizeof(CZLDoNUpdate_Struct)); - CZLDoNUpdate_Struct* CZLU = (CZLDoNUpdate_Struct*)pack->pBuffer; - CZLU->update_type = type; - CZLU->update_subtype = subtype; - CZLU->update_identifier = identifier; - CZLU->theme_id = theme_id; - CZLU->points = points; - worldserver.SendPacket(pack); - safe_delete(pack); -} - std::string QuestManager::getgendername(uint32 gender_id) { - auto gender_name = "Unknown"; - if (gender_id == MALE) { - gender_name = "Male"; - } else if (gender_id == FEMALE) { - gender_name = "Female"; - } else if (gender_id == NEUTER) { - gender_name = "Neuter"; - } + std::string gender_name = GetGenderName(gender_id); return gender_name; } @@ -4345,3 +3460,205 @@ int QuestManager::getspellstat(uint32 spell_id, std::string stat_identifier, uin QuestManagerCurrentQuestVars(); return GetSpellStatValue(spell_id, stat_identifier.c_str(), slot); } + +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; + CZLU->update_type = update_type; + CZLU->update_subtype = update_subtype; + CZLU->update_identifier = update_identifier; + CZLU->theme_id = theme_id; + CZLU->points = points; + strn0cpy(CZLU->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneMarquee(uint8 update_type, int update_identifier, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZMarquee, sizeof(CZMarquee_Struct)); + CZMarquee_Struct* CZM = (CZMarquee_Struct*)pack->pBuffer; + CZM->update_type = update_type; + CZM->update_identifier = update_identifier; + CZM->type = type; + CZM->priority = priority; + CZM->fade_in = fade_in; + CZM->fade_out = fade_out; + CZM->duration = duration; + strn0cpy(CZM->message, message, 512); + strn0cpy(CZM->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneMessage(uint8 update_type, int update_identifier, uint32 type, const char* message, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZMessage, sizeof(CZMarquee_Struct)); + CZMessage_Struct* CZM = (CZMessage_Struct*)pack->pBuffer; + CZM->update_type = update_type; + CZM->update_identifier = update_identifier; + CZM->type = type; + strn0cpy(CZM->message, message, 512); + strn0cpy(CZM->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneMove(uint8 update_type, uint8 update_subtype, int update_identifier, const char* zone_short_name, uint16 instance_id, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZMove, sizeof(CZMove_Struct)); + CZMove_Struct* CZM = (CZMove_Struct*)pack->pBuffer; + CZM->update_type = update_type; + CZM->update_subtype = update_subtype; + CZM->update_identifier = update_identifier; + strn0cpy(CZM->zone_short_name, zone_short_name, 32); + CZM->instance_id = instance_id; + strn0cpy(CZM->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneSetEntityVariable(uint8 update_type, int update_identifier, const char* variable_name, const char* variable_value, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZSetEntityVariable, sizeof(CZSetEntityVariable_Struct)); + CZSetEntityVariable_Struct* CZM = (CZSetEntityVariable_Struct*)pack->pBuffer; + CZM->update_type = update_type; + CZM->update_identifier = update_identifier; + strn0cpy(CZM->variable_name, variable_name, 256); + strn0cpy(CZM->variable_value, variable_value, 256); + strn0cpy(CZM->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneSignal(uint8 update_type, int update_identifier, uint32 signal, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZSignal, sizeof(CZSignal_Struct)); + CZSignal_Struct* CZS = (CZSignal_Struct*)pack->pBuffer; + CZS->update_type = update_type; + CZS->update_identifier = update_identifier; + CZS->signal = signal; + strn0cpy(CZS->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneSpell(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 spell_id, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZSpell, sizeof(CZSpell_Struct)); + CZSpell_Struct* CZS = (CZSpell_Struct*)pack->pBuffer; + CZS->update_type = update_type; + CZS->update_subtype = update_subtype; + CZS->update_identifier = update_identifier; + CZS->spell_id = spell_id; + strn0cpy(CZS->client_name, client_name, 64); + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::CrossZoneTaskUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 task_identifier, int task_subidentifier, int update_count, bool enforce_level_requirement, const char* client_name) { + auto pack = new ServerPacket(ServerOP_CZTaskUpdate, sizeof(CZTaskUpdate_Struct)); + CZTaskUpdate_Struct* CZTU = (CZTaskUpdate_Struct*)pack->pBuffer; + CZTU->update_type = update_type; + CZTU->update_subtype = update_subtype; + CZTU->update_identifier = update_identifier; + CZTU->task_identifier = task_identifier; + CZTU->task_subidentifier = task_subidentifier; + CZTU->update_count = update_count; + CZTU->enforce_level_requirement = enforce_level_requirement; + strn0cpy(CZTU->client_name, client_name, 64); + 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; + WWLU->update_type = update_type; + WWLU->theme_id = theme_id; + WWLU->points = points; + WWLU->min_status = min_status; + WWLU->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWMarquee, sizeof(WWMarquee_Struct)); + WWMarquee_Struct* WWM = (WWMarquee_Struct*)pack->pBuffer; + WWM->type = type; + WWM->priority = priority; + WWM->fade_in = fade_in; + WWM->fade_out = fade_out; + WWM->duration = duration; + strn0cpy(WWM->message, message, 512); + WWM->min_status = min_status; + WWM->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideMessage(uint32 type, const char* message, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWMessage, sizeof(WWMarquee_Struct)); + WWMessage_Struct* WWM = (WWMessage_Struct*)pack->pBuffer; + WWM->type = type; + strn0cpy(WWM->message, message, 512); + WWM->min_status = min_status; + WWM->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideMove(uint8 update_type, const char* zone_short_name, uint16 instance_id, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWMove, sizeof(WWMove_Struct)); + WWMove_Struct* WWM = (WWMove_Struct*)pack->pBuffer; + WWM->update_type = update_type; + strn0cpy(WWM->zone_short_name, zone_short_name, 32); + WWM->instance_id = instance_id; + WWM->min_status = min_status; + WWM->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideSetEntityVariable(uint8 update_type, const char* variable_name, const char* variable_value, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWSetEntityVariable, sizeof(WWSetEntityVariable_Struct)); + WWSetEntityVariable_Struct* WWSEV = (WWSetEntityVariable_Struct*)pack->pBuffer; + WWSEV->update_type = update_type; + strn0cpy(WWSEV->variable_name, variable_name, 256); + strn0cpy(WWSEV->variable_value, variable_value, 256); + WWSEV->min_status = min_status; + WWSEV->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideSignal(uint8 update_type, uint32 signal, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWSignal, sizeof(WWSignal_Struct)); + WWSignal_Struct* WWS = (WWSignal_Struct*)pack->pBuffer; + WWS->update_type = update_type; + WWS->signal = signal; + WWS->min_status = min_status; + WWS->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideSpell(uint8 update_type, uint32 spell_id, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWSpell, sizeof(WWSpell_Struct)); + WWSpell_Struct* WWS = (WWSpell_Struct*)pack->pBuffer; + WWS->update_type = update_type; + WWS->spell_id = spell_id; + WWS->min_status = min_status; + WWS->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} + +void QuestManager::WorldWideTaskUpdate(uint8 update_type, uint32 task_identifier, int task_subidentifier, int update_count, bool enforce_level_requirement, uint8 min_status, uint8 max_status) { + auto pack = new ServerPacket(ServerOP_WWTaskUpdate, sizeof(WWTaskUpdate_Struct)); + WWTaskUpdate_Struct* WWTU = (WWTaskUpdate_Struct*)pack->pBuffer; + WWTU->update_type = update_type; + WWTU->task_identifier = task_identifier; + WWTU->task_subidentifier = task_subidentifier; + WWTU->update_count = update_count; + WWTU->enforce_level_requirement = enforce_level_requirement; + WWTU->min_status = min_status; + WWTU->max_status = max_status; + worldserver.SendPacket(pack); + safe_delete(pack); +} diff --git a/zone/questmgr.h b/zone/questmgr.h index 5d0c735ba..fa56f8dc2 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -290,87 +290,22 @@ public: static std::string GetZoneLongName(std::string zone_short_name); static std::string GetZoneLongNameByID(uint32 zone_id); static std::string GetZoneShortName(uint32 zone_id); - void CrossZoneAssignTaskByCharID(int character_id, uint32 task_id, bool enforce_level_requirement = false); - void CrossZoneAssignTaskByGroupID(int group_id, uint32 task_id, bool enforce_level_requirement = false); - void CrossZoneAssignTaskByRaidID(int raid_id, uint32 task_id, bool enforce_level_requirement = false); - void CrossZoneAssignTaskByGuildID(int guild_id, uint32 task_id, bool enforce_level_requirement = false); - void CrossZoneCastSpellByCharID(int character_id, uint32 spell_id); - void CrossZoneCastSpellByGroupID(int group_id, uint32 spell_id); - void CrossZoneCastSpellByRaidID(int raid_id, uint32 spell_id); - void CrossZoneCastSpellByGuildID(int guild_id, uint32 spell_id); - void CrossZoneDisableTaskByCharID(int character_id, uint32 task_id); - void CrossZoneDisableTaskByGroupID(int group_id, uint32 task_id); - void CrossZoneDisableTaskByRaidID(int raid_id, uint32 task_id); - void CrossZoneDisableTaskByGuildID(int guild_id, uint32 task_id); - void CrossZoneEnableTaskByCharID(int character_id, uint32 task_id); - void CrossZoneEnableTaskByGroupID(int group_id, uint32 task_id); - void CrossZoneEnableTaskByRaidID(int raid_id, uint32 task_id); - void CrossZoneEnableTaskByGuildID(int guild_id, uint32 task_id); - void CrossZoneFailTaskByCharID(int character_id, uint32 task_id); - void CrossZoneFailTaskByGroupID(int group_id, uint32 task_id); - void CrossZoneFailTaskByRaidID(int raid_id, uint32 task_id); - void CrossZoneFailTaskByGuildID(int guild_id, uint32 task_id); - void CrossZoneLDoNUpdate(uint8 type, uint8 subtype, int identifier, uint32 theme_id, int points = 1); - void CrossZoneMarqueeByCharID(int character_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message); - void CrossZoneMarqueeByGroupID(int group_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message); - void CrossZoneMarqueeByRaidID(int raid_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message); - void CrossZoneMarqueeByGuildID(int guild_id, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message); - void CrossZoneMessagePlayerByName(uint32 type, const char *character_name, const char *message); - void CrossZoneMessagePlayerByGroupID(uint32 type, int group_id, const char *message); - void CrossZoneMessagePlayerByRaidID(uint32 type, int raid_id, const char *message); - void CrossZoneMessagePlayerByGuildID(uint32 type, int guild_id, const char *message); - void CrossZoneMovePlayerByCharID(int character_id, const char *zone_short_name); - void CrossZoneMovePlayerByGroupID(int group_id, const char *zone_short_name); - void CrossZoneMovePlayerByRaidID(int raid_id, const char *zone_short_name); - void CrossZoneMovePlayerByGuildID(int guild_id, const char *zone_short_name); - void CrossZoneMoveInstanceByCharID(int character_id, uint16 instance_id); - void CrossZoneMoveInstanceByGroupID(int group_id, uint16 instance_id); - void CrossZoneMoveInstanceByRaidID(int raid_id, uint16 instance_id); - void CrossZoneMoveInstanceByGuildID(int guild_id, uint16 instance_id); - void CrossZoneRemoveSpellByCharID(int character_id, uint32 spell_id); - void CrossZoneRemoveSpellByGroupID(int group_id, uint32 spell_id); - void CrossZoneRemoveSpellByRaidID(int raid_id, uint32 spell_id); - void CrossZoneRemoveSpellByGuildID(int guild_id, uint32 spell_id); - void CrossZoneRemoveTaskByCharID(int character_id, uint32 task_id); - void CrossZoneRemoveTaskByGroupID(int group_id, uint32 task_id); - void CrossZoneRemoveTaskByRaidID(int raid_id, uint32 task_id); - void CrossZoneRemoveTaskByGuildID(int guild_id, uint32 task_id); - void CrossZoneResetActivityByCharID(int character_id, uint32 task_id, int activity_id); - void CrossZoneResetActivityByGroupID(int group_id, uint32 task_id, int activity_id); - void CrossZoneResetActivityByRaidID(int raid_id, uint32 task_id, int activity_id); - void CrossZoneResetActivityByGuildID(int guild_id, uint32 task_id, int activity_id); - void CrossZoneSetEntityVariableByNPCTypeID(uint32 npctype_id, const char *variable_name, const char *variable_value); - void CrossZoneSetEntityVariableByClientName(const char *character_name, const char *variable_name, const char *variable_value); - void CrossZoneSetEntityVariableByGroupID(int group_id, const char *variable_name, const char *variable_value); - void CrossZoneSetEntityVariableByRaidID(int raid_id, const char *variable_name, const char *variable_value); - void CrossZoneSetEntityVariableByGuildID(int guild_id, const char *variable_name, const char *variable_value); - void CrossZoneSignalPlayerByCharID(int charid, uint32 signal); - void CrossZoneSignalPlayerByGroupID(int group_id, uint32 signal); - void CrossZoneSignalPlayerByRaidID(int raid_id, uint32 signal); - void CrossZoneSignalPlayerByGuildID(int guild_id, uint32 signal); - void CrossZoneSignalNPCByNPCTypeID(uint32 npctype_id, uint32 signal); - void CrossZoneSignalPlayerByName(const char *character_name, uint32 signal); - void CrossZoneUpdateActivityByCharID(int character_id, uint32 task_id, int activity_id, int activity_count = 1); - void CrossZoneUpdateActivityByGroupID(int group_id, uint32 task_id, int activity_id, int activity_count = 1); - void CrossZoneUpdateActivityByRaidID(int raid_id, uint32 task_id, int activity_id, int activity_count = 1); - void CrossZoneUpdateActivityByGuildID(int guild_id, uint32 task_id, int activity_id, int activity_count = 1); - void WorldWideAssignTask(uint32 task_id, bool enforce_level_requirement = false, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideCastSpell(uint32 spell_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideDisableTask(uint32 task_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideEnableTask(uint32 task_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideFailTask(uint32 task_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char *message, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMessage(uint32 type, const char *message, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMove(const char *zone_short_name, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMoveInstance(uint16 instance_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideRemoveSpell(uint32 spell_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideRemoveTask(uint32 task_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideResetActivity(uint32 task_id, int activity_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSetEntityVariableClient(const char *variable_name, const char *variable_value, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSetEntityVariableNPC(const char *variable_name, const char *variable_value); - void WorldWideSignalClient(uint32 signal, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSignalNPC(uint32 signal); - void WorldWideUpdateActivity(uint32 task_id, int activity_id, int activity_count = 1, uint8 min_status = 0, uint8 max_status = 0); + void CrossZoneLDoNUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 theme_id, int points = 1, const char* client_name = ""); + void CrossZoneMarquee(uint8 update_type, int update_identifier, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, const char* client_name = ""); + void CrossZoneMessage(uint8 update_type, int update_identifier, uint32 type, const char* message, const char* client_name = ""); + void CrossZoneMove(uint8 update_type, uint8 update_subtype, int update_identifier, const char* zone_short_name, uint16 instance_id, const char* client_name = ""); + void CrossZoneSetEntityVariable(uint8 update_type, int update_identifier, const char* variable_name, const char* variable_value, const char* client_name = ""); + void CrossZoneSignal(uint8 update_type, int update_identifier, uint32 signal, const char* client_name = ""); + void CrossZoneSpell(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 spell_id, const char* client_name = ""); + void CrossZoneTaskUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 task_identifier, int task_subidentifier = -1, int update_count = 1, bool enforce_level_requirement = false, const char* client_name = ""); + void WorldWideLDoNUpdate(uint8 update_type, uint32 theme_id, int points = 1, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideMessage(uint32 type, const char* message, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideMove(uint8 update_type, const char* zone_short_name, uint16 instance_id = 0, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideSetEntityVariable(uint8 update_type, const char* variable_name, const char* variable_value, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideSignal(uint8 update_type, uint32 signal, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideSpell(uint8 update_type, uint32 spell_id, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideTaskUpdate(uint8 update_type, uint32 task_identifier, int task_subidentifier = -1, int update_count = 1, bool enforce_level_requirement = false, uint8 min_status = 0, uint8 max_status = 0); bool EnableRecipe(uint32 recipe_id); bool DisableRecipe(uint32 recipe_id); void ClearNPCTypeCache(int npctype_id); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index aaa6f38ad..f9033ab3c 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -63,6 +63,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove if (spell.disallow_sit && IsBuffSpell(spell_id) && IsClient() && (CastToClient()->IsSitting() || CastToClient()->GetHorseId() != 0)) return false; + bool CanMemoryBlurFromMez = true; + if (IsMezzed()) { //Check for special memory blur behavior when on mez, this needs to be before buff override. + CanMemoryBlurFromMez = false; + } + bool c_override = false; if (caster && caster->IsClient() && GetCastedSpellInvSlot() > 0) { const EQ::ItemInstance *inst = caster->CastToClient()->GetInv().GetItem(GetCastedSpellInvSlot()); @@ -343,31 +348,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Complete Heal"); #endif - //make sure they are not allready affected by this... - //I think that is the point of making this a buff. - //this is in the wrong spot, it should be in the immune - //section so the buff timer does not get refreshed! - - int i; - bool inuse = false; - int buff_count = GetMaxTotalSlots(); - for(i = 0; i < buff_count; i++) { - if(buffs[i].spellid == spell_id && i != buffslot) { - Message(0, "You must wait before you can be affected by this spell again."); - inuse = true; - break; - } - } - if(inuse) - break; - - int32 val = 0; - val = 7500 * effect_value; - if (caster) + int val = 7500 * effect_value; + if (caster) { val = caster->GetActSpellHealing(spell_id, val, this); - - if (val > 0) + } + if (val > 0) { HealDamage(val, caster); + } break; } @@ -387,7 +374,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove caster->SetMana(caster->GetMana() + std::abs(effect_value)); if (effect_value < 0) - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); #ifdef SPELL_EFFECT_SPAM if (caster) caster->Message(Chat::White, "You have gained %+i mana!", effect_value); @@ -403,7 +390,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove SetMana(GetMana() + effect_value); if (effect_value < 0) - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); } break; @@ -600,7 +587,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove snprintf(effect_desc, _EDLEN, "Invisibility to Animals"); #endif invisible_animals = true; - SetInvisible(0); break; } @@ -611,7 +597,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove snprintf(effect_desc, _EDLEN, "Invisibility to Undead"); #endif invisible_undead = true; - SetInvisible(0); break; } case SE_SeeInvis: @@ -1136,13 +1121,23 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove case SE_Purify: { - //Attempt to remove all Deterimental buffs. - int buff_count = GetMaxTotalSlots(); - for(int slot = 0; slot < buff_count; slot++) { - if (buffs[slot].spellid != SPELL_UNKNOWN && - IsDetrimentalSpell(buffs[slot].spellid) && spells[buffs[slot].spellid].dispel_flag == 0) - { - if (caster && TryDispel(caster->GetLevel(),buffs[slot].casterlevel, effect_value)){ + //Attempt to remove up to base amount of detrimental effects (excluding charm, fear, resurrection, and revival sickness). + int purify_count = spells[spell_id].base[i]; + if (purify_count > GetMaxTotalSlots()) { + purify_count = GetMaxTotalSlots(); + } + + for(int slot = 0; slot < purify_count; slot++) { + if (IsValidSpell(buffs[slot].spellid) && IsDetrimentalSpell(buffs[slot].spellid)){ + + if (!IsEffectInSpell(buffs[slot].spellid, SE_Charm) && + !IsEffectInSpell(buffs[slot].spellid, SE_Fear) && + buffs[slot].spellid != SPELL_RESURRECTION_SICKNESS && + buffs[slot].spellid != SPELL_RESURRECTION_SICKNESS2 && + buffs[slot].spellid != SPELL_RESURRECTION_SICKNESS3 && + buffs[slot].spellid != SPELL_RESURRECTION_SICKNESS4 && + buffs[slot].spellid != SPELL_REVIVAL_SICKNESS) + { BuffFadeBySlot(slot); } } @@ -1531,16 +1526,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Memory Blur: %d", effect_value); #endif - int wipechance = spells[spell_id].base[i]; - int bonus = 0; - - if (caster){ - bonus = caster->spellbonuses.IncreaseChanceMemwipe + - caster->itembonuses.IncreaseChanceMemwipe + - caster->aabonuses.IncreaseChanceMemwipe; + //Memory blur component of Mez spells is not checked again if Mez is recast on a target that is already mezed + if (!CanMemoryBlurFromMez && IsEffectInSpell(spell_id, SE_Mez)) { + break; + } + + int wipechance = 0; + + if (caster) { + wipechance = caster->GetMemoryBlurChance(effect_value); } - - wipechance += wipechance*bonus/100; if(zone->random.Roll(wipechance)) { @@ -2458,8 +2453,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #endif if(IsClient()) { CastToClient()->SetEndurance(CastToClient()->GetEndurance() + effect_value); - if (effect_value < 0) - TryTriggerOnValueAmount(false, false, true); + if (effect_value < 0) { + TryTriggerOnCastRequirement(); + } } break; } @@ -2470,10 +2466,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove snprintf(effect_desc, _EDLEN, "Current Endurance Once: %+i", effect_value); #endif - if(IsClient()) { + if (IsClient()) { CastToClient()->SetEndurance(CastToClient()->GetEndurance() + effect_value); - if (effect_value < 0) - TryTriggerOnValueAmount(false, false, true); + if (effect_value < 0) { + TryTriggerOnCastRequirement(); + } } break; } @@ -2652,7 +2649,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int32 mana_to_use = GetMana() - spell.base[i]; if(mana_to_use > -1) { SetMana(GetMana() - spell.base[i]); - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); // we take full dmg(-10 to make the damage the right sign) mana_damage = spell.base[i] / -10 * spell.base2[i]; Damage(caster, mana_damage, spell_id, spell.skill, false, i, true); @@ -2672,7 +2669,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int32 end_to_use = CastToClient()->GetEndurance() - spell.base[i]; if(end_to_use > -1) { CastToClient()->SetEndurance(CastToClient()->GetEndurance() - spell.base[i]); - TryTriggerOnValueAmount(false, false, true); + TryTriggerOnCastRequirement(); // we take full dmg(-10 to make the damage the right sign) end_damage = spell.base[i] / -10 * spell.base2[i]; Damage(caster, end_damage, spell_id, spell.skill, false, i, true); @@ -2754,7 +2751,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove else { dmg = ratio*max_mana/10; caster->SetMana(caster->GetMana() - max_mana); - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); } if(IsDetrimentalSpell(spell_id)) { @@ -3858,19 +3855,15 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster) } case SE_WipeHateList: { - if (IsMezSpell(buff.spellid)) + if (IsMezSpell(buff.spellid)) { break; - - int wipechance = spells[buff.spellid].base[i]; - int bonus = 0; - - if (caster) { - bonus = caster->spellbonuses.IncreaseChanceMemwipe + - caster->itembonuses.IncreaseChanceMemwipe + - caster->aabonuses.IncreaseChanceMemwipe; } - wipechance += wipechance * bonus / 100; + int wipechance = 0; + + if (caster) { + wipechance = caster->GetMemoryBlurChance(effect_value); + } if (zone->random.Roll(wipechance)) { if (IsAIControlled()) { @@ -8528,3 +8521,42 @@ int Mob::GetFocusRandomEffectivenessValue(int focus_base, int focus_base2, bool return zone->random.Int(focus_base, focus_base2); } + +int Mob::GetMemoryBlurChance(int base_chance) +{ + /* + Memory Blur mechanic for SPA 62 + Chance formula is effect chance + charisma modifer + caster level modifier + Effect chance is base value of spell + Charisma modifier is CHA/10 = %, with MAX of 15% (thus 150 cha gives you max bonus) + Caster level modifier. +100% if caster < level 17 which scales down to 25% at > 53. ** + (Yes the above gets worse as you level. Behavior was confirmed on live.) + Memory blur is applied to mez on initial cast using same formula. However, recasting on a target that + is already mezed will not give a chance to memory blur. The blur is not checked on buff ticks. + + SPA 242 SE_IncreaseChanceMemwipe modifies the final chance after all bonuses are applied. + This is also applied to memory blur from mez spells. + + this = caster + */ + int cha_mod = int(GetCHA() / 10); + cha_mod = std::min(cha_mod, 15); + + int lvl_mod = 0; + if (GetLevel() < 17) { + lvl_mod = 100; + } + else if (GetLevel() > 53) { + lvl_mod = 25; + } + else { + lvl_mod = 100 + ((GetLevel() - 16)*-2);//Derived from above range of values.** + } + + int chance = cha_mod + lvl_mod + base_chance; + + int chance_mod = spellbonuses.IncreaseChanceMemwipe + itembonuses.IncreaseChanceMemwipe + aabonuses.IncreaseChanceMemwipe; + + chance += chance * chance_mod / 100; + return chance; +} diff --git a/zone/spells.cpp b/zone/spells.cpp index c098060a0..dd101ba51 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -383,7 +383,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, GetName() ); - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); return(false); } @@ -2467,7 +2467,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui LogSpells("Spell [{}]: consuming [{}] mana", spell_id, mana_used); if (!DoHPToManaCovert(mana_used)) { SetMana(GetMana() - mana_used); - TryTriggerOnValueAmount(false, true); + TryTriggerOnCastRequirement(); } } // one may want to check if this is a disc or not, but we actually don't, there are non disc stuff that have end cost @@ -2478,7 +2478,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui if (mgb) end_cost *= 2; SetEndurance(GetEndurance() - EQ::ClampUpper(end_cost, GetEndurance())); - TryTriggerOnValueAmount(false, false, true); + TryTriggerOnCastRequirement(); } if (mgb) SetMGB(false); @@ -2931,6 +2931,11 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, LogSpells("Check Stacking on old [{}] ([{}]) @ lvl [{}] (by [{}]) vs. new [{}] ([{}]) @ lvl [{}] (by [{}])", sp1.name, spellid1, caster_level1, (caster1==nullptr)?"Nobody":caster1->GetName(), sp2.name, spellid2, caster_level2, (caster2==nullptr)?"Nobody":caster2->GetName()); + if (spellbonuses.CompleteHealBuffBlocker && IsEffectInSpell(spellid2, SE_CompleteHeal)) { + Message(0, "You must wait before you can be affected by this spell again."); + return -1; + } + if (spellid1 == spellid2 ) { if (!IsStackableDot(spellid1) && !IsEffectInSpell(spellid1, SE_ManaBurn)) { // mana burn spells we need to use the stacking command blocks live actually checks those first, we should probably rework to that too if (caster_level1 > caster_level2) { // cur buff higher level than new @@ -3401,7 +3406,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid buffs[emptyslot].focusproclimit_procamt = 0; buffs[emptyslot].instrument_mod = caster ? caster->GetInstrumentMod(spell_id) : 10; - if (level_override > 0) { + if (level_override > 0 || buffs[emptyslot].numhits > 0) { buffs[emptyslot].UpdateClient = true; } else { if (buffs[emptyslot].ticsremaining > (1 + CalcBuffDuration_formula(caster_level, spells[spell_id].buffdurationformula, spells[spell_id].buffduration))) diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index 4beaedf52..ea46fae9a 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -375,6 +375,14 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob } DBTradeskillRecipe_Struct spec; + + if (parse->EventPlayer(EVENT_COMBINE, user, std::to_string(in_combine->container_slot), 0) == 1) { + auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0); + user->QueuePacket(outapp); + safe_delete(outapp); + return; + } + if (!content_db.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) { LogTradeskillsDetail("[HandleCombine] Check 2"); @@ -774,7 +782,7 @@ void Client::SendTradeskillSearchResults( for (auto row = results.begin(); row != results.end(); ++row) { if (row == nullptr || row[0] == nullptr || row[1] == nullptr || row[2] == nullptr || row[3] == nullptr || - row[5] == nullptr) { + row[4] == nullptr || row[5] == nullptr) { continue; } @@ -782,27 +790,36 @@ void Client::SendTradeskillSearchResults( const char *name = row[1]; uint32 trivial = (uint32) atoi(row[2]); uint32 comp_count = (uint32) atoi(row[3]); - uint32 tradeskill = (uint16) atoi(row[5]); + uint32 tradeskill = (uint16) atoi(row[4]); + uint32 must_learn = (uint16) atoi(row[5]); + // Skip the recipes that exceed the threshold in skill difference // Recipes that have either been made before or were // explicitly learned are excempt from that limit + + auto character_learned_recipe = CharacterRecipeListRepository::GetRecipe( + character_learned_recipe_list, + recipe_id + ); + if (RuleB(Skills, UseLimitTradeskillSearchSkillDiff) && ((int32) trivial - (int32) GetSkill((EQ::skills::SkillType) tradeskill)) > RuleI(Skills, MaxTradeskillSearchSkillDiff)) { LogTradeskills("Checking limit recipe_id [{}] name [{}]", recipe_id, name); - auto character_learned_recipe = CharacterRecipeListRepository::GetRecipe( - character_learned_recipe_list, - recipe_id - ); - if (character_learned_recipe.made_count == 0) { continue; } } + //Skip recipes that must be learned + if ((must_learn & 0xf) && !character_learned_recipe.recipe_id) { + continue; + } + + auto outapp = new EQApplicationPacket(OP_RecipeReply, sizeof(RecipeReply_Struct)); RecipeReply_Struct *reply = (RecipeReply_Struct *) outapp->pBuffer; @@ -1481,7 +1498,7 @@ bool ZoneDatabase::GetTradeRecipe( recipe_id ); - if (character_learned_recipe.made_count > 0) { + if (character_learned_recipe.recipe_id) { //If this exists we learned it LogTradeskills("[GetTradeRecipe] made_count [{}]", character_learned_recipe.made_count); spec->has_learnt = true; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 76db92dd6..97e9d6091 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -935,6 +935,32 @@ void Mob::TryMoveAlong(float distance, float angle, bool send) Teleport(new_pos); } +// like above, but takes a starting position and returns a new location instead of actually moving +glm::vec4 Mob::TryMoveAlong(const glm::vec4 &start, float distance, float angle) +{ + angle += start.w; + angle = FixHeading(angle); + + glm::vec3 tmp_pos; + glm::vec3 new_pos = start; + new_pos.x += distance * g_Math.FastSin(angle); + new_pos.y += distance * g_Math.FastCos(angle); + new_pos.z += GetZOffset(); + + if (zone->HasMap()) { + auto new_z = zone->zonemap->FindClosestZ(new_pos, nullptr); + if (new_z != BEST_Z_INVALID) + new_pos.z = new_z; + + if (zone->zonemap->LineIntersectsZone(start, new_pos, 0.0f, &tmp_pos)) + new_pos = tmp_pos; + } + + new_pos.z = GetFixedZ(new_pos); + + return {new_pos.x, new_pos.y, new_pos.z, start.w}; +} + int ZoneDatabase::GetHighestGrid(uint32 zoneid) { std::string query = StringFormat("SELECT COALESCE(MAX(id), 0) FROM grid WHERE zoneid = %i", zoneid); diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index fb4d0d4bb..98fe2a0f3 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1887,49 +1887,286 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } break; } - case ServerOP_CZCastSpellPlayer: + case ServerOP_CZSpell: { - CZCastSpellPlayer_Struct* CZSC = (CZCastSpellPlayer_Struct*) pack->pBuffer; - Client* client = entity_list.GetClientByCharID(CZSC->character_id); - if (client) { - client->SpellFinished(CZSC->spell_id, client); - } - break; - } - case ServerOP_CZCastSpellGroup: - { - CZCastSpellGroup_Struct* CZSC = (CZCastSpellGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZSC->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->SpellFinished(CZSC->spell_id, group_member); + CZSpell_Struct* CZS = (CZSpell_Struct*) pack->pBuffer; + uint8 update_type = CZS->update_type; + uint8 update_subtype = CZS->update_subtype; + int update_identifier = CZS->update_identifier; + uint32 spell_id = CZS->spell_id; + const char* client_name = CZS->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + client->SpellFinished(spell_id, client); + break; + case CZSpellUpdateSubtype_Remove: + client->BuffFadeBySpellID(spell_id); + break; + } + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + group_member->SpellFinished(spell_id, group_member); + break; + case CZSpellUpdateSubtype_Remove: + group_member->BuffFadeBySpellID(spell_id); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + raid_member->SpellFinished(spell_id, raid_member); + break; + case CZSpellUpdateSubtype_Remove: + raid_member->BuffFadeBySpellID(spell_id); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + client.second->SpellFinished(spell_id, client.second); + break; + case CZSpellUpdateSubtype_Remove: + client.second->BuffFadeBySpellID(spell_id); + break; + } + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + client.second->SpellFinished(spell_id, client.second); + break; + case CZSpellUpdateSubtype_Remove: + client.second->BuffFadeBySpellID(spell_id); + break; + } + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + switch (update_subtype) { + case CZSpellUpdateSubtype_Cast: + client->SpellFinished(spell_id, client); + break; + case CZSpellUpdateSubtype_Remove: + client->BuffFadeBySpellID(spell_id); + break; } } } break; } - case ServerOP_CZCastSpellRaid: + case ServerOP_CZTaskUpdate: { - CZCastSpellRaid_Struct* CZSC = (CZCastSpellRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZSC->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->SpellFinished(CZSC->spell_id, raid_member); + CZTaskUpdate_Struct* CZTU = (CZTaskUpdate_Struct*) pack->pBuffer; + uint8 update_type = CZTU->update_type; + uint8 update_subtype = CZTU->update_subtype; + int update_identifier = CZTU->update_identifier; + uint32 task_identifier = CZTU->task_identifier; + int task_subidentifier = CZTU->task_subidentifier; + int update_count = CZTU->update_count; + bool enforce_level_requirement = CZTU->enforce_level_requirement; + const char* client_name = CZTU->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + client->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + client->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + client->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + client->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + client->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + client->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + client->RemoveTaskByTaskID(task_identifier); + break; } } - } - break; - } - case ServerOP_CZCastSpellGuild: - { - CZCastSpellGuild_Struct* CZSC = (CZCastSpellGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZSC->guild_id) { - client.second->SpellFinished(CZSC->spell_id, client.second); + break; + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + group_member->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + group_member->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + group_member->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + group_member->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + group_member->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + group_member->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + group_member->RemoveTaskByTaskID(task_identifier); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + raid_member->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + raid_member->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + raid_member->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + raid_member->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + raid_member->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + raid_member->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + raid_member->RemoveTaskByTaskID(task_identifier); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + client.second->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + client.second->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + client.second->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + client.second->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + client.second->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + client.second->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + client.second->RemoveTaskByTaskID(task_identifier); + break; + } + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + client.second->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + client.second->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + client.second->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + client.second->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + client.second->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + client.second->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + client.second->RemoveTaskByTaskID(task_identifier); + break; + } + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + switch (update_subtype) { + case CZTaskUpdateSubtype_ActivityReset: + client->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case CZTaskUpdateSubtype_ActivityUpdate: + client->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case CZTaskUpdateSubtype_AssignTask: + client->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case CZTaskUpdateSubtype_DisableTask: + client->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_EnableTask: + client->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case CZTaskUpdateSubtype_FailTask: + client->FailTask(task_identifier); + break; + case CZTaskUpdateSubtype_RemoveTask: + client->RemoveTaskByTaskID(task_identifier); + break; + } } } break; @@ -1942,7 +2179,8 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) int update_identifier = CZLU->update_identifier; uint32 theme_id = CZLU->theme_id; int points = CZLU->points; - if (update_type == CZLDoNUpdateType_Character) { + const char* client_name = CZLU->client_name; + if (update_type == CZUpdateType_Character) { auto client = entity_list.GetClientByCharID(update_identifier); if (client) { switch (update_subtype) { @@ -1960,7 +2198,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } } break; - } else if (update_type == CZLDoNUpdateType_Group) { + } else if (update_type == CZUpdateType_Group) { auto client_group = entity_list.GetGroupByID(update_identifier); if (client_group) { for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { @@ -1982,7 +2220,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } } } - } else if (update_type == CZLDoNUpdateType_Raid) { + } else if (update_type == CZUpdateType_Raid) { auto client_raid = entity_list.GetRaidByID(update_identifier); if (client_raid) { for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { @@ -2004,7 +2242,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } } } - } else if (update_type == CZLDoNUpdateType_Guild) { + } else if (update_type == CZUpdateType_Guild) { for (auto &client : entity_list.GetClientList()) { if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { switch (update_subtype) { @@ -2022,7 +2260,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } } } - } else if (update_type == CZLDoNUpdateType_Expedition) { + } else if (update_type == CZUpdateType_Expedition) { for (auto &client : entity_list.GetClientList()) { if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { switch (update_subtype) { @@ -2040,877 +2278,531 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } } } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + switch (update_subtype) { + case CZLDoNUpdateSubtype_Loss: + client->AddLDoNLoss(theme_id); + break; + case CZLDoNUpdateSubtype_Points: + client->UpdateLDoNPoints(theme_id, points); + break; + case CZLDoNUpdateSubtype_Win: + client->AddLDoNWin(theme_id); + break; + default: + break; + } + } + break; + } + break; + } + case ServerOP_CZMarquee: + { + CZMarquee_Struct* CZM = (CZMarquee_Struct*) pack->pBuffer; + uint8 update_type = CZM->update_type; + int update_identifier = CZM->update_identifier; + uint32 type = CZM->type; + uint32 priority = CZM->priority; + uint32 fade_in = CZM->fade_in; + uint32 fade_out = CZM->fade_out; + uint32 duration = CZM->duration; + const char* message = CZM->message; + const char* client_name = CZM->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + client->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + group_member->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + raid_member->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + client.second->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + client.second->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + client->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); + } } break; } - case ServerOP_CZMarqueePlayer: + case ServerOP_CZMessage: { - CZMarqueePlayer_Struct* CZMS = (CZMarqueePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZMS->character_id); - std::string message = CZMS->message; - if (client) { - client->SendMarqueeMessage(CZMS->type, CZMS->priority, CZMS->fade_in, CZMS->fade_out, CZMS->duration, message); + CZMessage_Struct* CZM = (CZMessage_Struct*) pack->pBuffer; + uint8 update_type = CZM->update_type; + int update_identifier = CZM->update_identifier; + uint32 type = CZM->type; + const char* message = CZM->message; + const char* client_name = CZM->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + client->Message(type, message); + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + group_member->Message(type, message); + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + raid_member->Message(type, message); + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + client.second->Message(type, message); + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + client.second->Message(type, message); + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + client->Message(type, message); + } } break; } - case ServerOP_CZMarqueeGroup: + case ServerOP_CZMove: { - CZMarqueeGroup_Struct* CZMS = (CZMarqueeGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZMS->group_id); - std::string message = CZMS->message; - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->SendMarqueeMessage(CZMS->type, CZMS->priority, CZMS->fade_in, CZMS->fade_out, CZMS->duration, message); + CZMove_Struct* CZM = (CZMove_Struct*) pack->pBuffer; + uint8 update_type = CZM->update_type; + uint8 update_subtype = CZM->update_subtype; + int update_identifier = CZM->update_identifier; + const char* zone_short_name = CZM->zone_short_name; + uint16 instance_id = CZM->instance_id; + const char* client_name = CZM->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + client->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + client->MoveZoneInstance(instance_id); + break; + } + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + group_member->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + group_member->MoveZoneInstance(instance_id); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + raid_member->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + raid_member->MoveZoneInstance(instance_id); + break; + } + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + client.second->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + client.second->MoveZoneInstance(instance_id); + break; + } + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + client.second->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + client.second->MoveZoneInstance(instance_id); + break; + } + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + switch (update_subtype) { + case CZMoveUpdateSubtype_MoveZone: + client->MoveZone(zone_short_name); + break; + case CZMoveUpdateSubtype_MoveZoneInstance: + client->MoveZoneInstance(instance_id); + break; } } } break; } - case ServerOP_CZMarqueeRaid: + case ServerOP_CZSetEntityVariable: { - CZMarqueeRaid_Struct* CZMS = (CZMarqueeRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZMS->raid_id); - std::string message = CZMS->message; - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->SendMarqueeMessage(CZMS->type, CZMS->priority, CZMS->fade_in, CZMS->fade_out, CZMS->duration, message); + CZSetEntityVariable_Struct* CZSEV = (CZSetEntityVariable_Struct*) pack->pBuffer; + uint8 update_type = CZSEV->update_type; + int update_identifier = CZSEV->update_identifier; + const char* variable_name = CZSEV->variable_name; + const char* variable_value = CZSEV->variable_value; + const char* client_name = CZSEV->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + client->SetEntityVariable(variable_name, variable_value); + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + group_member->SetEntityVariable(variable_name, variable_value); + } } } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + raid_member->SetEntityVariable(variable_name, variable_value); + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + client.second->SetEntityVariable(variable_name, variable_value); + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + client.second->SetEntityVariable(variable_name, variable_value); + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + client->SetEntityVariable(variable_name, variable_value); + } + } else if (update_type == CZUpdateType_NPC) { + auto npc = entity_list.GetNPCByNPCTypeID(update_identifier); + if (npc) { + npc->SetEntityVariable(variable_name, variable_value); + } } break; } - case ServerOP_CZMarqueeGuild: + case ServerOP_CZSignal: { - CZMarqueeGuild_Struct* CZMS = (CZMarqueeGuild_Struct*) pack->pBuffer; - std::string message = CZMS->message; + CZSignal_Struct* CZS = (CZSignal_Struct*) pack->pBuffer; + uint8 update_type = CZS->update_type; + int update_identifier = CZS->update_identifier; + uint32 signal = CZS->signal; + const char* client_name = CZS->client_name; + if (update_type == CZUpdateType_Character) { + auto client = entity_list.GetClientByCharID(update_identifier); + if (client) { + client->Signal(signal); + } + } else if (update_type == CZUpdateType_Group) { + auto client_group = entity_list.GetGroupByID(update_identifier); + if (client_group) { + for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { + if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { + auto group_member = client_group->members[member_index]->CastToClient(); + group_member->Signal(signal); + } + } + } + } else if (update_type == CZUpdateType_Raid) { + auto client_raid = entity_list.GetRaidByID(update_identifier); + if (client_raid) { + for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { + if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { + auto raid_member = client_raid->members[member_index].member->CastToClient(); + raid_member->Signal(signal); + } + } + } + } else if (update_type == CZUpdateType_Guild) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) { + client.second->Signal(signal); + } + } + } else if (update_type == CZUpdateType_Expedition) { + for (auto &client: entity_list.GetClientList()) { + if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) { + client.second->Signal(signal); + } + } + } else if (update_type == CZUpdateType_ClientName) { + auto client = entity_list.GetClientByName(client_name); + if (client) { + client->Signal(signal); + } + } else if (update_type = CZUpdateType_NPC) { + auto npc = entity_list.GetNPCByNPCTypeID(update_identifier); + if (npc) { + npc->SignalNPC(signal); + } + } + break; + } + case ServerOP_WWLDoNUpdate: + { + WWLDoNUpdate_Struct* WWLU = (WWLDoNUpdate_Struct*) pack->pBuffer; + uint8 update_type = WWLU->update_type; + uint32 theme_id = WWLU->theme_id; + int points = WWLU->points; + uint8 min_status = WWLU->min_status; + uint8 max_status = WWLU->max_status; for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZMS->guild_id) { - client.second->SendMarqueeMessage(CZMS->type, CZMS->priority, CZMS->fade_in, CZMS->fade_out, CZMS->duration, message); - } - } - break; - } - case ServerOP_CZMessagePlayer: - { - CZMessagePlayer_Struct* CZCS = (CZMessagePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByName(CZCS->character_name); - if (client) { - client->Message(CZCS->type, CZCS->message); - } - break; - } - case ServerOP_CZMessageGroup: - { - CZMessageGroup_Struct* CZGM = (CZMessageGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZGM->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->Message(CZGM->type, CZGM->message); - } - } - } - break; - } - case ServerOP_CZMessageRaid: - { - CZMessageRaid_Struct* CZRM = (CZMessageRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZRM->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->Message(CZRM->type, CZRM->message); - } - } - } - break; - } - case ServerOP_CZMessageGuild: - { - CZMessageGuild_Struct* CZGM = (CZMessageGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZGM->guild_id) { - client.second->Message(CZGM->type, CZGM->message); - } - } - break; - } - case ServerOP_CZMovePlayer: - { - CZMovePlayer_Struct* CZMP = (CZMovePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZMP->character_id); - if (client) { - client->MoveZone(CZMP->zone_short_name); - } - break; - } - case ServerOP_CZMoveGroup: - { - CZMoveGroup_Struct* CZMG = (CZMoveGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZMG->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->MoveZone(CZMG->zone_short_name); - } - } - } - break; - } - case ServerOP_CZMoveRaid: - { - CZMoveRaid_Struct* CZMR = (CZMoveRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZMR->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->MoveZone(CZMR->zone_short_name); - } - } - } - break; - } - case ServerOP_CZMoveGuild: - { - CZMoveGuild_Struct* CZMG = (CZMoveGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZMG->guild_id) { - client.second->MoveZone(CZMG->zone_short_name); - } - } - break; - } - - case ServerOP_CZMoveInstancePlayer: - { - CZMoveInstancePlayer_Struct* CZMP = (CZMoveInstancePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZMP->character_id); - if (client) { - client->MoveZoneInstance(CZMP->instance_id); - } - break; - } - case ServerOP_CZMoveInstanceGroup: - { - CZMoveInstanceGroup_Struct* CZMG = (CZMoveInstanceGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZMG->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->MoveZoneInstance(CZMG->instance_id); - } - } - } - break; - } - case ServerOP_CZMoveInstanceRaid: - { - CZMoveInstanceRaid_Struct* CZMR = (CZMoveInstanceRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZMR->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->MoveZoneInstance(CZMR->instance_id); - } - } - } - break; - } - case ServerOP_CZMoveInstanceGuild: - { - CZMoveInstanceGuild_Struct* CZMG = (CZMoveInstanceGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZMG->guild_id) { - client.second->MoveZoneInstance(CZMG->instance_id); - } - } - break; - } - case ServerOP_CZRemoveSpellPlayer: - { - CZRemoveSpellPlayer_Struct* CZRS = (CZRemoveSpellPlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZRS->character_id); - if (client) { - client->BuffFadeBySpellID(CZRS->spell_id); - } - break; - } - case ServerOP_CZRemoveSpellGroup: - { - CZRemoveSpellGroup_Struct* CZRS = (CZRemoveSpellGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZRS->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->BuffFadeBySpellID(CZRS->spell_id); - } - } - } - break; - } - case ServerOP_CZRemoveSpellRaid: - { - CZRemoveSpellRaid_Struct* CZRS = (CZRemoveSpellRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZRS->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->BuffFadeBySpellID(CZRS->spell_id); - } - } - } - break; - } - case ServerOP_CZRemoveSpellGuild: - { - CZRemoveSpellGuild_Struct* CZRS = (CZRemoveSpellGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZRS->guild_id) { - client.second->BuffFadeBySpellID(CZRS->spell_id); - } - } - break; - } - case ServerOP_CZSetEntityVariableByClientName: - { - CZSetEntVarByClientName_Struct* CZCS = (CZSetEntVarByClientName_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByName(CZCS->character_name); - if (client) { - client->SetEntityVariable(CZCS->variable_name, CZCS->variable_value); - } - break; - } - case ServerOP_CZSetEntityVariableByGroupID: - { - CZSetEntVarByGroupID_Struct* CZCS = (CZSetEntVarByGroupID_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZCS->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->SetEntityVariable(CZCS->variable_name, CZCS->variable_value); - } - } - } - break; - } - case ServerOP_CZSetEntityVariableByRaidID: - { - CZSetEntVarByRaidID_Struct* CZCS = (CZSetEntVarByRaidID_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZCS->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->SetEntityVariable(CZCS->variable_name, CZCS->variable_value); - } - } - } - break; - } - case ServerOP_CZSetEntityVariableByGuildID: - { - CZSetEntVarByGuildID_Struct* CZCS = (CZSetEntVarByGuildID_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZCS->guild_id) { - client.second->SetEntityVariable(CZCS->variable_name, CZCS->variable_value); - } - } - break; - } - case ServerOP_CZSetEntityVariableByNPCTypeID: - { - CZSetEntVarByNPCTypeID_Struct* CZM = (CZSetEntVarByNPCTypeID_Struct*) pack->pBuffer; - auto npc = entity_list.GetNPCByNPCTypeID(CZM->npctype_id); - if (npc != 0) { - npc->SetEntityVariable(CZM->variable_name, CZM->variable_value); - } - break; - } - case ServerOP_CZSignalNPC: - { - CZNPCSignal_Struct* CZCN = (CZNPCSignal_Struct*) pack->pBuffer; - auto npc = entity_list.GetNPCByNPCTypeID(CZCN->npctype_id); - if (npc != 0) { - npc->SignalNPC(CZCN->signal); - } - break; - } - case ServerOP_CZSignalClient: - { - CZClientSignal_Struct* CZCS = (CZClientSignal_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZCS->character_id); - if (client) { - client->Signal(CZCS->signal); - } - break; - } - case ServerOP_CZSignalGroup: - { - CZGroupSignal_Struct* CZGS = (CZGroupSignal_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZGS->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->Signal(CZGS->signal); - } - } - } - break; - } - case ServerOP_CZSignalRaid: - { - CZRaidSignal_Struct* CZRS = (CZRaidSignal_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZRS->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->Signal(CZRS->signal); - } - } - } - break; - } - case ServerOP_CZSignalGuild: - { - CZGuildSignal_Struct* CZGS = (CZGuildSignal_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZGS->guild_id) { - client.second->Signal(CZGS->signal); - } - } - break; - } - case ServerOP_CZSignalClientByName: - { - CZClientSignalByName_Struct* CZCS = (CZClientSignalByName_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByName(CZCS->character_name); - if (client) { - client->Signal(CZCS->signal); - } - break; - } - case ServerOP_CZTaskAssignPlayer: - { - CZTaskAssignPlayer_Struct* CZTA = (CZTaskAssignPlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZTA->character_id); - if (client) { - client->AssignTask(CZTA->task_id, CZTA->npc_entity_id, CZTA->enforce_level_requirement); - } - break; - } - case ServerOP_CZTaskAssignGroup: - { - CZTaskAssignGroup_Struct* CZTA = (CZTaskAssignGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZTA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->AssignTask(CZTA->task_id, CZTA->npc_entity_id, CZTA->enforce_level_requirement); - } - } - } - break; - } - case ServerOP_CZTaskAssignRaid: - { - CZTaskAssignRaid_Struct* CZTA = (CZTaskAssignRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZTA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->AssignTask(CZTA->task_id, CZTA->npc_entity_id, CZTA->enforce_level_requirement); - } - } - } - break; - } - case ServerOP_CZTaskAssignGuild: - { - CZTaskAssignGuild_Struct* CZTA = (CZTaskAssignGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZTA->guild_id) { - client.second->AssignTask(CZTA->task_id, CZTA->npc_entity_id, CZTA->enforce_level_requirement); - } - } - break; - } - case ServerOP_CZTaskActivityResetPlayer: - { - CZTaskActivityResetPlayer_Struct* CZRA = (CZTaskActivityResetPlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZRA->character_id); - if (client) { - client->ResetTaskActivity(CZRA->task_id, CZRA->activity_id); - } - break; - } - case ServerOP_CZTaskActivityResetGroup: - { - CZTaskActivityResetGroup_Struct* CZRA = (CZTaskActivityResetGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZRA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->ResetTaskActivity(CZRA->task_id, CZRA->activity_id); - } - } - } - break; - } - case ServerOP_CZTaskActivityResetRaid: - { - CZTaskActivityResetRaid_Struct* CZRA = (CZTaskActivityResetRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZRA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->ResetTaskActivity(CZRA->task_id, CZRA->activity_id); - } - } - } - break; - } - case ServerOP_CZTaskActivityResetGuild: - { - CZTaskActivityResetGuild_Struct* CZRA = (CZTaskActivityResetGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZRA->guild_id) { - client.second->ResetTaskActivity(CZRA->task_id, CZRA->activity_id); - } - } - break; - } - case ServerOP_CZTaskActivityUpdatePlayer: - { - CZTaskActivityUpdatePlayer_Struct* CZUA = (CZTaskActivityUpdatePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZUA->character_id); - if (client) { - client->UpdateTaskActivity(CZUA->task_id, CZUA->activity_id, CZUA->activity_count); - } - break; - } - case ServerOP_CZTaskActivityUpdateGroup: - { - CZTaskActivityUpdateGroup_Struct* CZUA = (CZTaskActivityUpdateGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZUA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->UpdateTaskActivity(CZUA->task_id, CZUA->activity_id, CZUA->activity_count); - } - } - } - break; - } - case ServerOP_CZTaskActivityUpdateRaid: - { - CZTaskActivityUpdateRaid_Struct* CZUA = (CZTaskActivityUpdateRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZUA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->UpdateTaskActivity(CZUA->task_id, CZUA->activity_id, CZUA->activity_count); - } - } - } - break; - } - case ServerOP_CZTaskActivityUpdateGuild: - { - CZTaskActivityUpdateGuild_Struct* CZUA = (CZTaskActivityUpdateGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZUA->guild_id) { - client.second->UpdateTaskActivity(CZUA->task_id, CZUA->activity_id, CZUA->activity_count); - } - } - break; - } - case ServerOP_CZTaskDisablePlayer: - { - CZTaskDisablePlayer_Struct* CZUA = (CZTaskDisablePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZUA->character_id); - if (client) { - client->DisableTask(1, reinterpret_cast(CZUA->task_id)); - } - break; - } - case ServerOP_CZTaskDisableGroup: - { - CZTaskDisableGroup_Struct* CZUA = (CZTaskDisableGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZUA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->DisableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - } - break; - } - case ServerOP_CZTaskDisableRaid: - { - CZTaskDisableRaid_Struct* CZUA = (CZTaskDisableRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZUA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->DisableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - } - break; - } - case ServerOP_CZTaskDisableGuild: - { - CZTaskDisableGuild_Struct* CZUA = (CZTaskDisableGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZUA->guild_id) { - client.second->DisableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - break; - } - case ServerOP_CZTaskEnablePlayer: - { - CZTaskEnablePlayer_Struct* CZUA = (CZTaskEnablePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZUA->character_id); - if (client) { - client->EnableTask(1, reinterpret_cast(CZUA->task_id)); - } - break; - } - case ServerOP_CZTaskEnableGroup: - { - CZTaskEnableGroup_Struct* CZUA = (CZTaskEnableGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZUA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->EnableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - } - break; - } - case ServerOP_CZTaskEnableRaid: - { - CZTaskEnableRaid_Struct* CZUA = (CZTaskEnableRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZUA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->EnableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - } - break; - } - case ServerOP_CZTaskEnableGuild: - { - CZTaskEnableGuild_Struct* CZUA = (CZTaskEnableGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZUA->guild_id) { - client.second->EnableTask(1, reinterpret_cast(CZUA->task_id)); - } - } - break; - } - case ServerOP_CZTaskFailPlayer: - { - CZTaskFailPlayer_Struct* CZUA = (CZTaskFailPlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZUA->character_id); - if (client) { - client->FailTask(CZUA->task_id); - } - break; - } - case ServerOP_CZTaskFailGroup: - { - CZTaskFailGroup_Struct* CZUA = (CZTaskFailGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZUA->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->FailTask(CZUA->task_id); - } - } - } - break; - } - case ServerOP_CZTaskFailRaid: - { - CZTaskFailRaid_Struct* CZUA = (CZTaskFailRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZUA->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->FailTask(CZUA->task_id); - } - } - } - break; - } - case ServerOP_CZTaskFailGuild: - { - CZTaskFailGuild_Struct* CZUA = (CZTaskFailGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZUA->guild_id) { - client.second->FailTask(CZUA->task_id); - } - } - break; - } - case ServerOP_CZTaskRemovePlayer: - { - CZTaskRemovePlayer_Struct* CZTR = (CZTaskRemovePlayer_Struct*) pack->pBuffer; - auto client = entity_list.GetClientByCharID(CZTR->character_id); - if (client) { - client->RemoveTaskByTaskID(CZTR->task_id); - } - break; - } - case ServerOP_CZTaskRemoveGroup: - { - CZTaskRemoveGroup_Struct* CZTR = (CZTaskRemoveGroup_Struct*) pack->pBuffer; - auto client_group = entity_list.GetGroupByID(CZTR->group_id); - if (client_group) { - for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) { - if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) { - auto group_member = client_group->members[member_index]->CastToClient(); - group_member->RemoveTaskByTaskID(CZTR->task_id); - } - } - } - break; - } - case ServerOP_CZTaskRemoveRaid: - { - CZTaskRemoveRaid_Struct* CZTR = (CZTaskRemoveRaid_Struct*) pack->pBuffer; - auto client_raid = entity_list.GetRaidByID(CZTR->raid_id); - if (client_raid) { - for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) { - if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) { - auto raid_member = client_raid->members[member_index].member->CastToClient(); - raid_member->RemoveTaskByTaskID(CZTR->task_id); - } - } - } - break; - } - case ServerOP_CZTaskRemoveGuild: - { - CZTaskRemoveGuild_Struct* CZTR = (CZTaskRemoveGuild_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - if (client.second->GuildID() > 0 && client.second->GuildID() == CZTR->guild_id) { - client.second->RemoveTaskByTaskID(CZTR->task_id); - } - } - break; - } - case ServerOP_WWAssignTask: - { - WWAssignTask_Struct* WWAT = (WWAssignTask_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWAT->min_status && (client_status <= WWAT->max_status || WWAT->max_status == 0)) { - client.second->AssignTask(WWAT->task_id, WWAT->npc_entity_id, WWAT->enforce_level_requirement); - } - } - break; - } - case ServerOP_WWCastSpell: - { - WWCastSpell_Struct* WWCS = (WWCastSpell_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWCS->min_status && (client_status <= WWCS->max_status || WWCS->max_status == 0)) { - client.second->SpellFinished(WWCS->spell_id, client.second); - } - } - break; - } - case ServerOP_WWDisableTask: - { - WWDisableTask_Struct* WWDT = (WWDisableTask_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWDT->min_status && (client_status <= WWDT->max_status || WWDT->max_status == 0)) { - client.second->DisableTask(1, reinterpret_cast(WWDT->task_id)); - } - } - break; - } - case ServerOP_WWEnableTask: - { - WWEnableTask_Struct* WWET = (WWEnableTask_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWET->min_status && (client_status <= WWET->max_status || WWET->max_status == 0)) { - client.second->EnableTask(1, reinterpret_cast(WWET->task_id)); - } - } - break; - } - case ServerOP_WWFailTask: - { - WWFailTask_Struct* WWFT = (WWFailTask_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWFT->min_status && (client_status <= WWFT->max_status || WWFT->max_status == 0)) { - client.second->FailTask(WWFT->task_id); + switch (update_type) { + case WWLDoNUpdateType_Loss: + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->AddLDoNLoss(theme_id); + } + break; + case WWLDoNUpdateType_Points: + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->UpdateLDoNPoints(theme_id, points); + } + break; + case WWLDoNUpdateType_Win: + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->AddLDoNWin(theme_id); + } + break; } } break; } case ServerOP_WWMarquee: { - WWMarquee_Struct* WWMS = (WWMarquee_Struct*) pack->pBuffer; - std::string message = WWMS->message; + WWMarquee_Struct* WWM = (WWMarquee_Struct*) pack->pBuffer; + uint32 type = WWM->type; + uint32 priority = WWM->priority; + uint32 fade_in = WWM->fade_in; + uint32 fade_out = WWM->fade_out; + uint32 duration = WWM->duration; + const char* message = WWM->message; + uint8 min_status = WWM->min_status; + uint8 max_status = WWM->max_status; for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWMS->min_status && (client_status <= WWMS->max_status || WWMS->max_status == 0)) { - client.second->SendMarqueeMessage(WWMS->type, WWMS->priority, WWMS->fade_in, WWMS->fade_out, WWMS->duration, message); + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); } } break; } case ServerOP_WWMessage: { - WWMessage_Struct* WWMS = (WWMessage_Struct*) pack->pBuffer; + WWMessage_Struct* WWM = (WWMessage_Struct*) pack->pBuffer; + uint32 type = WWM->type; + const char* message = WWM->message; + uint8 min_status = WWM->min_status; + uint8 max_status = WWM->max_status; for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWMS->min_status && (client_status <= WWMS->max_status || WWMS->max_status == 0)) { - client.second->Message(WWMS->type, WWMS->message); + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->Message(type, message); } } break; } case ServerOP_WWMove: { - WWMove_Struct* WWMS = (WWMove_Struct*) pack->pBuffer; + WWMove_Struct* WWM = (WWMove_Struct*) pack->pBuffer; + uint8 update_type = WWM->update_type; + uint16 instance_id = WWM->instance_id; + const char* zone_short_name = WWM->zone_short_name; + uint8 min_status = WWM->min_status; + uint8 max_status = WWM->max_status; for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWMS->min_status && (client_status <= WWMS->max_status || WWMS->max_status == 0)) { - client.second->MoveZone(WWMS->zone_short_name); + switch (update_type) { + case WWMoveUpdateType_MoveZone: + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->MoveZone(zone_short_name); + } + break; + case WWMoveUpdateType_MoveZoneInstance: + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->MoveZoneInstance(instance_id); + } + break; } } break; } - case ServerOP_WWMoveInstance: + case ServerOP_WWSetEntityVariable: { - WWMoveInstance_Struct* WWMS = (WWMoveInstance_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWMS->min_status && (client_status <= WWMS->max_status || WWMS->max_status == 0)) { - client.second->MoveZoneInstance(WWMS->instance_id); + WWSetEntityVariable_Struct* WWSEV = (WWSetEntityVariable_Struct*) pack->pBuffer; + uint8 update_type = WWSEV->update_type; + const char* variable_name = WWSEV->variable_name; + const char* variable_value = WWSEV->variable_value; + uint8 min_status = WWSEV->min_status; + uint8 max_status = WWSEV->max_status; + if (update_type == WWSetEntityVariableUpdateType_Character) { + for (auto &client : entity_list.GetClientList()) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->SetEntityVariable(variable_name, variable_value); + } + } + } else if (update_type == WWSetEntityVariableUpdateType_NPC) { + for (auto &npc : entity_list.GetNPCList()) { + npc.second->SetEntityVariable(variable_name, variable_value); } } break; } - case ServerOP_WWRemoveSpell: + case ServerOP_WWSignal: { - WWRemoveSpell_Struct* WWRS = (WWRemoveSpell_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWRS->min_status && (client_status <= WWRS->max_status || WWRS->max_status == 0)) { - client.second->BuffFadeBySpellID(WWRS->spell_id); + WWSignal_Struct* WWS = (WWSignal_Struct*) pack->pBuffer; + uint8 update_type = WWS->update_type; + uint32 signal = WWS->signal; + uint8 min_status = WWS->min_status; + uint8 max_status = WWS->max_status; + if (update_type == WWSignalUpdateType_Character) { + for (auto &client : entity_list.GetClientList()) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->Signal(signal); + } + } + } else if (update_type == WWSignalUpdateType_NPC) { + for (auto &npc : entity_list.GetNPCList()) { + npc.second->SignalNPC(signal); } } break; } - case ServerOP_WWRemoveTask: + case ServerOP_WWSpell: { - WWRemoveTask_Struct* WWRT = (WWRemoveTask_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWRT->min_status && (client_status <= WWRT->max_status || WWRT->max_status == 0)) { - client.second->RemoveTaskByTaskID(WWRT->task_id); + WWSpell_Struct* WWS = (WWSpell_Struct*) pack->pBuffer; + uint8 update_type = WWS->update_type; + uint32 spell_id = WWS->spell_id; + uint8 min_status = WWS->min_status; + uint8 max_status = WWS->max_status; + if (update_type == WWSpellUpdateType_Cast) { + for (auto &client : entity_list.GetClientList()) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->SpellFinished(spell_id, client.second); + } + } + } else if (update_type == WWSpellUpdateType_Remove) { + for (auto &client : entity_list.GetClientList()) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + client.second->BuffFadeBySpellID(spell_id); + } } } break; } - case ServerOP_WWResetActivity: + case ServerOP_WWTaskUpdate: { - WWResetActivity_Struct* WWRA = (WWResetActivity_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWRA->min_status && (client_status <= WWRA->max_status || WWRA->max_status == 0)) { - client.second->ResetTaskActivity(WWRA->task_id, WWRA->activity_id); - } - } - break; - } - case ServerOP_WWSetEntityVariableClient: - { - WWSetEntVarClient_Struct* WWSC = (WWSetEntVarClient_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWSC->min_status && (client_status <= WWSC->max_status || WWSC->max_status == 0)) { - client.second->SetEntityVariable(WWSC->variable_name, WWSC->variable_value); - } - } - break; - } - case ServerOP_WWSetEntityVariableNPC: - { - WWSetEntVarNPC_Struct* WWSN = (WWSetEntVarNPC_Struct*) pack->pBuffer; - for (auto &npc : entity_list.GetNPCList()) { - npc.second->SetEntityVariable(WWSN->variable_name, WWSN->variable_value); - } - break; - } - case ServerOP_WWSignalClient: - { - WWSignalClient_Struct* WWSC = (WWSignalClient_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWSC->min_status && (client_status <= WWSC->max_status || WWSC->max_status == 0)) { - client.second->Signal(WWSC->signal); - } - } - break; - } - case ServerOP_WWSignalNPC: - { - WWSignalNPC_Struct* WWSN = (WWSignalNPC_Struct*) pack->pBuffer; - for (auto &npc : entity_list.GetNPCList()) { - npc.second->SignalNPC(WWSN->signal); - } - break; - } - case ServerOP_WWUpdateActivity: - { - WWUpdateActivity_Struct* WWUA = (WWUpdateActivity_Struct*) pack->pBuffer; - for (auto &client : entity_list.GetClientList()) { - auto client_status = client.second->Admin(); - if (client_status >= WWUA->min_status && (client_status <= WWUA->max_status || WWUA->max_status == 0)) { - client.second->UpdateTaskActivity(WWUA->task_id, WWUA->activity_id, WWUA->activity_count); + WWTaskUpdate_Struct* WWTU = (WWTaskUpdate_Struct*) pack->pBuffer; + uint8 update_type = WWTU->update_type; + uint32 task_identifier = WWTU->task_identifier; + int task_subidentifier = WWTU->task_subidentifier; + int update_count = WWTU->update_count; + bool enforce_level_requirement = WWTU->enforce_level_requirement; + uint8 min_status = WWTU->min_status; + uint8 max_status = WWTU->max_status; + for (auto &client : entity_list.GetClientList()) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + switch (update_type) { + case WWTaskUpdateType_ActivityReset: + client.second->ResetTaskActivity(task_identifier, task_subidentifier); + break; + case WWTaskUpdateType_ActivityUpdate: + client.second->UpdateTaskActivity(task_identifier, task_subidentifier, update_count); + break; + case WWTaskUpdateType_AssignTask: + client.second->AssignTask(task_identifier, task_subidentifier, enforce_level_requirement); + break; + case WWTaskUpdateType_DisableTask: + client.second->DisableTask(1, reinterpret_cast(task_identifier)); + break; + case WWTaskUpdateType_EnableTask: + client.second->EnableTask(1, reinterpret_cast(task_identifier)); + break; + case WWTaskUpdateType_FailTask: + client.second->FailTask(task_identifier); + break; + case WWTaskUpdateType_RemoveTask: + client.second->RemoveTaskByTaskID(task_identifier); + break; + } } } break; @@ -2999,7 +2891,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) case ServerOP_CZClientMessageString: { auto buf = reinterpret_cast(pack->pBuffer); - Client* client = entity_list.GetClientByName(buf->character_name); + Client* client = entity_list.GetClientByName(buf->client_name); if (client) { client->MessageString(buf); } diff --git a/zone/zone.cpp b/zone/zone.cpp index 98fb346aa..e5b810a1f 100755 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -153,7 +153,6 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) { LogInfo("Zone Bootup: [{}] ([{}]: [{}])", zonename, iZoneID, iInstanceID); parse->Init(); UpdateWindowTitle(nullptr); - zone->GetTimeSync(); zone->RequestUCSServerStatus(); @@ -1818,7 +1817,8 @@ void Zone::Repop(uint32 delay) void Zone::GetTimeSync() { - if (worldserver.Connected() && !zone_has_current_time) { + if (!zone_has_current_time) { + LogInfo("Requesting world time"); auto pack = new ServerPacket(ServerOP_GetWorldTime, 1); worldserver.SendPacket(pack); safe_delete(pack); diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 7e195ab14..4b33dcfad 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -167,7 +167,9 @@ bool ZoneDatabase::GetZoneCFG( "fast_regen_endurance, " // 59 "npc_max_aggro_dist, " // 60 "max_movement_update_range, " // 61 - "underworld_teleport_index " // 62 + "underworld_teleport_index, " // 62 + "lava_damage, " // 63 + "min_lava_damage " // 64 "FROM zone WHERE zoneidnumber = %i AND version = %i %s", zoneid, instance_id, @@ -220,6 +222,8 @@ bool ZoneDatabase::GetZoneCFG( zone_data->FastRegenEndurance = atoi(row[59]); zone_data->NPCAggroMaxDist = atoi(row[60]); zone_data->underworld_teleport_index = atoi(row[62]); + zone_data->LavaDamage = atoi(row[63]); + zone_data->MinLavaDamage = atoi(row[64]); int bindable = 0; bindable = atoi(row[31]);