Fixes multi-link Perl croaks, allowing the quest API reader to function properly.

This commit is contained in:
Kinglykrab 2019-09-10 21:48:15 -04:00
parent 28d5c8f301
commit 499c0fdca5
7 changed files with 72 additions and 144 deletions

View File

@ -226,8 +226,7 @@ XS(XS__spawn);
XS(XS__spawn) {
dXSARGS;
if (items != 6)
Perl_croak(aTHX_
"Usage: quest::spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z)");
Perl_croak(aTHX_ "Usage: quest::spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z)");
uint16 RETVAL;
dXSTARG;
@ -249,8 +248,7 @@ XS(XS__spawn2);
XS(XS__spawn2) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: quest::spawn2(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, float heading)");
Perl_croak(aTHX_ "Usage: quest::spawn2(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, float heading)");
uint16 RETVAL;
dXSTARG;
@ -272,8 +270,7 @@ XS(XS__unique_spawn);
XS(XS__unique_spawn) {
dXSARGS;
if (items != 6 && items != 7)
Perl_croak(aTHX_
"Usage: quest::unique_spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, [float heading])");
Perl_croak(aTHX_ "Usage: quest::unique_spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, [float heading])");
uint16 RETVAL;
dXSTARG;
@ -1315,8 +1312,7 @@ XS(XS__targlobal);
XS(XS__targlobal) {
dXSARGS;
if (items != 6)
Perl_croak(aTHX_
"Usage: quest::targlobal(stirng key, string value, string duration, int npc_id, int chararacter_id, int zone_id)");
Perl_croak(aTHX_ "Usage: quest::targlobal(stirng key, string value, string duration, int npc_id, int chararacter_id, int zone_id)");
char *key = (char *) SvPV_nolen(ST(0));
char *str_value = (char *) SvPV_nolen(ST(1));
@ -1411,8 +1407,7 @@ XS(XS__moveto);
XS(XS__moveto) {
dXSARGS;
if (items != 3 && items != 4 && items != 5)
Perl_croak(aTHX_
"Usage: quest::moveto(float x, float y, float z, [float heading], [bool save_guard_location])");
Perl_croak(aTHX_ "Usage: quest::moveto(float x, float y, float z, [float heading], [bool save_guard_location])");
float x = (float) SvNV(ST(0));
float y = (float) SvNV(ST(1));
@ -1561,8 +1556,7 @@ XS(XS__set_proximity);
XS(XS__set_proximity) {
dXSARGS;
if (items != 4 && items != 6 && items != 7)
Perl_croak(aTHX_
"Usage: quest::set_proximity(float min_x, float max_x, float min_y, float max_y, [float min_z], [float max_z], [say])");
Perl_croak(aTHX_ "Usage: quest::set_proximity(float min_x, float max_x, float min_y, float max_y, [float min_z], [float max_z], [say])");
float min_x = (float) SvNV(ST(0));
float max_x = (float) SvNV(ST(1));
@ -1643,8 +1637,7 @@ XS(XS__spawn_condition);
XS(XS__spawn_condition) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: quest::spawn_condition(string zone_short, [int instance_id], uint16 condition_id, int16 value)");
Perl_croak(aTHX_ "Usage: quest::spawn_condition(string zone_short, [int instance_id], uint16 condition_id, int16 value)");
if (items == 3) {
char *zone_short = (char *) SvPV_nolen(ST(0));
@ -1701,8 +1694,7 @@ XS(XS__toggle_spawn_event);
XS(XS__toggle_spawn_event) {
dXSARGS;
if (items != 4)
Perl_croak(aTHX_
"Usage: quest::toggle_spawn_event(uint32 event_id, [bool is_enabled = false], [bool is_strict = false], [bool reset_base = false])");
Perl_croak(aTHX_ "Usage: quest::toggle_spawn_event(uint32 event_id, [bool is_enabled = false], [bool is_strict = false], [bool reset_base = false])");
uint32 event_id = (int) SvIV(ST(0));
bool is_enabled = ((int) SvIV(ST(1))) == 0 ? false : true;
@ -1763,8 +1755,7 @@ XS(XS__summonburiedplayercorpse);
XS(XS__summonburiedplayercorpse) {
dXSARGS;
if (items != 5)
Perl_croak(aTHX_
"Usage: quest::summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)");
Perl_croak(aTHX_ "Usage: quest::summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)");
bool RETVAL;
uint32 char_id = (int) SvIV(ST(0));
@ -1781,8 +1772,7 @@ XS(XS__summonallplayercorpses);
XS(XS__summonallplayercorpses) {
dXSARGS;
if (items != 5)
Perl_croak(aTHX_
"Usage: quest::summonallplayercorpses(int char_id, float dest_x, float dest_y, float dest_z, float dest_heading)");
Perl_croak(aTHX_ "Usage: quest::summonallplayercorpses(int char_id, float dest_x, float dest_y, float dest_z, float dest_heading)");
bool RETVAL;
uint32 char_id = (int) SvIV(ST(0));
@ -2038,8 +2028,7 @@ XS(XS__playerfeature);
XS(XS__playerfeature) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_
"Usage: quest::playerfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int setting)");
Perl_croak(aTHX_ "Usage: quest::playerfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int setting)");
char *str_value = (char *) SvPV_nolen(ST(0));
int int_value = (int) SvIV(ST(1));
@ -2053,8 +2042,7 @@ XS(XS__npcfeature);
XS(XS__npcfeature) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_
"Usage: quest::npcfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int value)");
Perl_croak(aTHX_ "Usage: quest::npcfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int value)");
char *str_value = (char *) SvPV_nolen(ST(0));
int int_value = (int) SvIV(ST(1));
@ -2281,8 +2269,7 @@ XS(XS__updatetaskactivity) {
}
quest_manager.updatetaskactivity(task_id, activity_id, count, ignore_quest_update);
} else {
Perl_croak(aTHX_
"Usage: quest::updatetaskactivity(int task_id, int activity_id, [int count], [bool ignore_quest_update = false])");
Perl_croak(aTHX_ "Usage: quest::updatetaskactivity(int task_id, int activity_id, [int count], [bool ignore_quest_update = false])");
}
XSRETURN_EMPTY;
@ -2570,8 +2557,7 @@ XS(XS__popup) {
int duration = 0;
if ((items < 2) || (items > 5))
Perl_croak(aTHX_
"Usage: quest::popup(string window_title, string message, int popup_id, int buttons, int duration)");
Perl_croak(aTHX_ "Usage: quest::popup(string window_title, string message, int popup_id, int buttons, int duration)");
if (items >= 3)
popup_id = (int) SvIV(ST(2));
@ -2652,8 +2638,7 @@ XS(XS__CreateGroundObject);
XS(XS__CreateGroundObject) {
dXSARGS;
if (items != 5 && items != 6)
Perl_croak(aTHX_
"Usage: quest::creategroundobject(int item_id, float x, float y, float z, float heading, [uint32 decay_time-ms = 300000])");
Perl_croak(aTHX_ "Usage: quest::creategroundobject(int item_id, float x, float y, float z, float heading, [uint32 decay_time-ms = 300000])");
int item_id = (int) SvIV(ST(0));
float x = (float) SvNV(ST(1));
@ -2676,8 +2661,7 @@ XS(XS__CreateGroundObjectFromModel);
XS(XS__CreateGroundObjectFromModel) {
dXSARGS;
if (items < 5 || items > 7)
Perl_croak(aTHX_
"Usage: quest::creategroundobjectfrommodel(string model_name, float x, float y, float z, float heading, [int object_type], [uint32 decay_time-ms = 300000])");
Perl_croak(aTHX_ "Usage: quest::creategroundobjectfrommodel(string model_name, float x, float y, float z, float heading, [int object_type], [uint32 decay_time-ms = 300000])");
char *modelname = (char *) SvPV_nolen(ST(0));
float x = (float) SvNV(ST(1));
@ -2702,8 +2686,7 @@ XS(XS__CreateDoor);
XS(XS__CreateDoor) {
dXSARGS;
if (items < 5 || items > 7)
Perl_croak(aTHX_
"Usage: quest::createdoor(string model_name, float x, float y, float z, float heading, [int object_type = 58], [int size = 100])");
Perl_croak(aTHX_ "Usage: quest::createdoor(string model_name, float x, float y, float z, float heading, [int object_type = 58], [int size = 100])");
char *modelname = (char *) SvPV_nolen(ST(0));
float x = (float) SvNV(ST(1));
@ -3032,8 +3015,7 @@ XS(XS__MovePCInstance);
XS(XS__MovePCInstance) {
dXSARGS;
if (items != 5 && items != 6)
Perl_croak(aTHX_
"Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])");
Perl_croak(aTHX_ "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])");
int zone_id = (int) SvIV(ST(0));
int instanceid = (int) SvIV(ST(1));
@ -3286,8 +3268,7 @@ XS(XS__wearchange);
XS(XS__wearchange) {
dXSARGS;
if (items < 2)
Perl_croak(aTHX_
"Usage: quest::wearchange(uint8 slot, uint16 texture_id, [uint32 hero_forge_model_id = 0], [uint32 elite_material_id = 0])");
Perl_croak(aTHX_ "Usage: quest::wearchange(uint8 slot, uint16 texture_id, [uint32 hero_forge_model_id = 0], [uint32 elite_material_id = 0])");
uint8 slot = (int) SvUV(ST(0));
uint16 texture_id = (int) SvUV(ST(1));
@ -3535,8 +3516,7 @@ XS(XS__crosszonesetentityvariablebynpctypeid) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_
"Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)");
Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)");
if (items == 3) {
uint32 npc_type_id = (uint32) SvIV(ST(0));
@ -3553,8 +3533,7 @@ XS(XS__crosszonesetentityvariablebyclientname) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_
"Usage: quest::crosszonesetentityvariablebyclientname(string client_name, string key, string value)");
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));
@ -3586,8 +3565,7 @@ XS(XS__worldwidemarquee);
XS(XS__worldwidemarquee) {
dXSARGS;
if (items != 6)
Perl_croak(aTHX_
"Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message)");
Perl_croak(aTHX_ "Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message)");
if (items == 6) {
uint32 color_id = (uint32) SvIV(ST(0));

View File

@ -961,8 +961,7 @@ XS(XS_Client_SetEXP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SetEXP) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Client::SetEXP(THIS, uint32 experience_points, uint32 aa_experience_points, [bool resexp=false])");
Perl_croak(aTHX_ "Usage: Client::SetEXP(THIS, uint32 experience_points, uint32 aa_experience_points, [bool resexp=false])");
{
Client *THIS;
uint32 set_exp = (uint32) SvUV(ST(1));
@ -992,8 +991,7 @@ XS(XS_Client_SetBindPoint); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SetBindPoint) {
dXSARGS;
if (items < 1 || items > 6)
Perl_croak(aTHX_
"Usage: Client::SetBindPoint(THIS, int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f)");
Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f)");
{
Client *THIS;
int to_zone;
@ -1260,8 +1258,7 @@ XS(XS_Client_MovePCInstance); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_MovePCInstance) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Client::MovePCInstance(THIS, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading)");
Perl_croak(aTHX_ "Usage: Client::MovePCInstance(THIS, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading)");
{
Client *THIS;
uint32 zoneID = (uint32) SvUV(ST(1));
@ -1335,8 +1332,7 @@ XS(XS_Client_GetFactionLevel); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_GetFactionLevel) {
dXSARGS;
if (items != 8)
Perl_croak(aTHX_
"Usage: Client::GetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint32 player_race_id, uint32 player_class_id, uint32 player_deity_id, uint32 player_faction_id, Mob*)");
Perl_croak(aTHX_ "Usage: Client::GetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint32 player_race_id, uint32 player_class_id, uint32 player_deity_id, uint32 player_faction_id, Mob*)");
{
Client *THIS;
FACTION_VALUE RETVAL;
@ -1376,8 +1372,7 @@ XS(XS_Client_SetFactionLevel); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SetFactionLevel) {
dXSARGS;
if (items != 6)
Perl_croak(aTHX_
"Usage: Client::SetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint8 character_class, uint8 character_race, uint8 character_deity)");
Perl_croak(aTHX_ "Usage: Client::SetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint8 character_class, uint8 character_race, uint8 character_deity)");
{
Client *THIS;
uint32 char_id = (uint32) SvUV(ST(1));
@ -1403,8 +1398,7 @@ XS(XS_Client_SetFactionLevel2); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SetFactionLevel2) {
dXSARGS;
if (items < 7 || items > 8)
Perl_croak(aTHX_
"Usage: Client::SetFactionLevel2(THIS, uint32 character_id, int32 faction_id, uint8 character_class, uint8 character_race, uint8 character_deity, int32 value, uint8 temp)");
Perl_croak(aTHX_ "Usage: Client::SetFactionLevel2(THIS, uint32 character_id, int32 faction_id, uint8 character_class, uint8 character_race, uint8 character_deity, int32 value, uint8 temp)");
{
Client *THIS;
uint32 char_id = (uint32) SvUV(ST(1));
@ -1724,8 +1718,7 @@ XS(XS_Client_AddMoneyToPP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_AddMoneyToPP) {
dXSARGS;
if (items != 6)
Perl_croak(aTHX_
"Usage: Client::AddMoneyToPP(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, bool update_client)");
Perl_croak(aTHX_ "Usage: Client::AddMoneyToPP(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, bool update_client)");
{
Client *THIS;
uint32 copper = (uint32) SvUV(ST(1));
@ -3095,8 +3088,7 @@ XS(XS_Client_DeleteItemInInventory); /* prototype to pass -Wmissing-prototypes *
XS(XS_Client_DeleteItemInInventory) {
dXSARGS;
if (items < 2 || items > 4)
Perl_croak(aTHX_
"Usage: Client::DeleteItemInInventory(THIS, int16 slot_id, [int8 quantity = 0], [bool client_update = false])");
Perl_croak(aTHX_ "Usage: Client::DeleteItemInInventory(THIS, int16 slot_id, [int8 quantity = 0], [bool client_update = false])");
{
Client *THIS;
int16 slot_id = (int16) SvIV(ST(1));
@ -3132,8 +3124,7 @@ XS(XS_Client_SummonItem); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SummonItem) {
dXSARGS;
if (items < 2 || items > 10)
Perl_croak(aTHX_
"Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = cursor])");
Perl_croak(aTHX_ "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = cursor])");
{
Client *THIS;
uint32 item_id = (uint32) SvUV(ST(1));
@ -4834,8 +4825,7 @@ XS(XS_Client_GrantAlternateAdvancementAbility); /* prototype to pass -Wmissing-p
XS(XS_Client_GrantAlternateAdvancementAbility) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Client::GrantAlternateAdvancementAbility(THIS, int aa_id, int points, [bool ignore_cost = false])");
Perl_croak(aTHX_ "Usage: Client::GrantAlternateAdvancementAbility(THIS, int aa_id, int points, [bool ignore_cost = false])");
{
Client *THIS;
bool RETVAL;
@ -4992,8 +4982,7 @@ XS(XS_Client_UpdateTaskActivity); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_UpdateTaskActivity) {
dXSARGS;
if (items < 4)
Perl_croak(aTHX_
"Usage: Client::UpdateTaskActivity(THIS, int task_id, int activity_id, int count, [bool ignore_quest_update = false])");
Perl_croak(aTHX_ "Usage: Client::UpdateTaskActivity(THIS, int task_id, int activity_id, int count, [bool ignore_quest_update = false])");
{
bool ignore_quest_update = false;
@ -5052,8 +5041,7 @@ XS(XS_Client_AssignTask); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_AssignTask) {
dXSARGS;
if (items != 3 && items != 4)
Perl_croak(aTHX_
"Usage: Client::AssignTask(THIS, int task_id, int npc_id, [bool enforce_level_requirement = false])");
Perl_croak(aTHX_ "Usage: Client::AssignTask(THIS, int task_id, int npc_id, [bool enforce_level_requirement = false])");
{
Client *THIS;
int TaskID = (int) SvIV(ST(1));
@ -5964,8 +5952,7 @@ XS(XS_Client_SendMarqueeMessage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SendMarqueeMessage) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Client::SendMarqueeMessage(THIS, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string msg)");
Perl_croak(aTHX_ "Usage: Client::SendMarqueeMessage(THIS, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string msg)");
{
Client *THIS;
uint32 type = (uint32) SvUV(ST(1));
@ -6144,8 +6131,7 @@ XS(XS_Client_QuestReward); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_QuestReward) {
dXSARGS;
if (items < 1 || items > 9)
Perl_croak(aTHX_
"Usage: Client::QuestReward(THIS, int32 mob, int32 copper, int32 silver, int32 gold, int32 platinum, int32 item_id, int32 exp, [bool faction = false])");
Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, int32 mob, int32 copper, int32 silver, int32 gold, int32 platinum, int32 item_id, int32 exp, [bool faction = false])");
{
Client *THIS;
Mob *mob = nullptr;
@ -6245,8 +6231,7 @@ XS(XS_Client_Popup2); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_Popup2) {
dXSARGS;
if (items < 3 || items > 10)
Perl_croak(aTHX_
"Usage: Client::SendFullPopup(THIS, string title, string text, uint32 popup_id, uint32 negative_id, uint32 buttons, uint32 duration, string button_name_0, string button_name_1, uint32 sound_controls)");
Perl_croak(aTHX_ "Usage: Client::SendFullPopup(THIS, string title, string text, uint32 popup_id, uint32 negative_id, uint32 buttons, uint32 duration, string button_name_0, string button_name_1, uint32 sound_controls)");
{
Client *THIS;
char *Title = (char *) SvPV_nolen(ST(1));

View File

@ -1222,8 +1222,7 @@ XS(XS_EntityList_MessageStatus); /* prototype to pass -Wmissing-prototypes */
XS(XS_EntityList_MessageStatus) {
dXSARGS;
if (items < 5)
Perl_croak(aTHX_
"Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)");
Perl_croak(aTHX_ "Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)");
{
EntityList *THIS;
uint32 to_guilddbid = (uint32) SvUV(ST(1));
@ -1248,8 +1247,7 @@ XS(XS_EntityList_MessageClose); /* prototype to pass -Wmissing-prototypes */
XS(XS_EntityList_MessageClose) {
dXSARGS;
if (items < 6)
Perl_croak(aTHX_
"Usage: EntityList::MessageClose(THIS, Mob* sender, bool skip_sender, float distance, uint32 emote_color_type, string message)");
Perl_croak(aTHX_ "Usage: EntityList::MessageClose(THIS, Mob* sender, bool skip_sender, float distance, uint32 emote_color_type, string message)");
{
EntityList *THIS;
Mob *sender;
@ -1682,8 +1680,7 @@ XS(XS_EntityList_MessageGroup); /* prototype to pass -Wmissing-prototypes */
XS(XS_EntityList_MessageGroup) {
dXSARGS;
if (items < 5)
Perl_croak(aTHX_
"Usage: EntityList::MessageGroup(THIS, Mob* sender, bool skip_close, uint32 emote_color_type, string message)");
Perl_croak(aTHX_ "Usage: EntityList::MessageGroup(THIS, Mob* sender, bool skip_close, uint32 emote_color_type, string message)");
{
EntityList *THIS;
Mob *sender;
@ -1716,8 +1713,7 @@ XS(XS_EntityList_GetRandomClient); /* prototype to pass -Wmissing-prototypes */
XS(XS_EntityList_GetRandomClient) {
dXSARGS;
if ((items < 5) || (items > 6))
Perl_croak(aTHX_
"Usage: EntityList::GetRandomClient(THIS, float x, float y, float z, float distance, [Client* exclude_client = nullptr])");
Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, float x, float y, float z, float distance, [Client* exclude_client = nullptr])");
{
EntityList *THIS;
Client *RETVAL, *c = nullptr;

View File

@ -486,8 +486,7 @@ XS(XS_Group_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
XS(XS_Group_TeleportGroup) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
{
Group *THIS;
Mob *sender;

View File

@ -794,8 +794,7 @@ XS(XS_Mob_Attack); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Attack) {
dXSARGS;
if (items < 2 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])");
Perl_croak(aTHX_ "Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])");
{
Mob *THIS;
bool RETVAL;
@ -842,8 +841,7 @@ XS(XS_Mob_Damage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Damage) {
dXSARGS;
if (items < 5 || items > 8)
Perl_croak(aTHX_
"Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])");
Perl_croak(aTHX_ "Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])");
{
Mob *THIS;
Mob *from;
@ -1447,8 +1445,7 @@ XS(XS_Mob_MakeTempPet); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_MakeTempPet) {
dXSARGS;
if (items < 2 || items > 6)
Perl_croak(aTHX_
"Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])");
Perl_croak(aTHX_ "Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
@ -1498,8 +1495,7 @@ XS(XS_Mob_TypesTempPet); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_TypesTempPet) {
dXSARGS;
if (items < 2 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])");
Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])");
{
Mob *THIS;
uint32 typesid = (uint32) SvUV(ST(1));
@ -3680,8 +3676,7 @@ XS(XS_Mob_Message_StringID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Message_StringID) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])");
Perl_croak(aTHX_ "Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])");
{
Mob *THIS;
uint32 type = (uint32) SvUV(ST(1));
@ -3805,8 +3800,7 @@ XS(XS_Mob_CastSpell); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastSpell) {
dXSARGS;
if (items < 3 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])");
Perl_croak(aTHX_ "Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
@ -3862,8 +3856,7 @@ XS(XS_Mob_SpellFinished); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SpellFinished) {
dXSARGS;
if (items < 2 || items > 5)
Perl_croak(aTHX_
"Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])");
Perl_croak(aTHX_ "Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
@ -4045,8 +4038,7 @@ XS(XS_Mob_CanBuffStack); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CanBuffStack) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::CanBuffStack(THIS, uint16 spell_id, uint8 caster_level, [bool fail_if_overwritten = false])");
Perl_croak(aTHX_ "Usage: Mob::CanBuffStack(THIS, uint16 spell_id, uint8 caster_level, [bool fail_if_overwritten = false])");
{
Mob *THIS;
int RETVAL;
@ -5044,8 +5036,7 @@ XS(XS_Mob_AddToHateList); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_AddToHateList) {
dXSARGS;
if (items < 2 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::AddToHateList(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0], [bool yell_for_help = true], [bool frenzy = false], [bool buff_tic = false])");
Perl_croak(aTHX_ "Usage: Mob::AddToHateList(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0], [bool yell_for_help = true], [bool frenzy = false], [bool buff_tic = false])");
{
Mob *THIS;
Mob *other;
@ -5609,8 +5600,7 @@ XS(XS_Mob_NavigateTo); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_NavigateTo) {
dXSARGS;
if (items < 4 || items > 5)
Perl_croak(aTHX_
"Usage: Mob::NavigateTo(THIS, float x, float y, float z)");
Perl_croak(aTHX_ "Usage: Mob::NavigateTo(THIS, float x, float y, float z)");
{
Mob *THIS;
float x = (float) SvNV(ST(1));
@ -5735,8 +5725,7 @@ XS(XS_Mob_NPCSpecialAttacks); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_NPCSpecialAttacks) {
dXSARGS;
if (items < 3 || items > 5)
Perl_croak(aTHX_
"Usage: Mob::NPCSpecialAttacks(THIS, string abilities_string, int perm_tag, [bool reset = true], [bool remove = true])");
Perl_croak(aTHX_ "Usage: Mob::NPCSpecialAttacks(THIS, string abilities_string, int perm_tag, [bool reset = true], [bool remove = true])");
{
Mob *THIS;
char *parse = (char *) SvPV_nolen(ST(1));
@ -6476,8 +6465,7 @@ XS(XS_Mob_DoSpecialAttackDamage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_DoSpecialAttackDamage) {
dXSARGS;
if (items < 4 || items > 6)
Perl_croak(aTHX_
"Usage: Mob::DoSpecialAttackDamage(THIS, Mob* target, int skill, int32 max_damage, [int32 min_damage = 1], [int32 hate_override = -11])");
Perl_croak(aTHX_ "Usage: Mob::DoSpecialAttackDamage(THIS, Mob* target, int skill, int32 max_damage, [int32 min_damage = 1], [int32 hate_override = -11])");
{
Mob *THIS;
Mob *target;
@ -6620,8 +6608,7 @@ XS(XS_Mob_ProjectileAnim); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_ProjectileAnim) {
dXSARGS;
if (items < 3 || items > 9)
Perl_croak(aTHX_
"Usage: Mob::ProjectileAnim(THIS, Mob* mob, int item_id, [bool is_arrow = false], [float speed = 0], [float angle = 0], [float tilt = 0], [float arc = 0])");
Perl_croak(aTHX_ "Usage: Mob::ProjectileAnim(THIS, Mob* mob, int item_id, [bool is_arrow = false], [float speed = 0], [float angle = 0], [float tilt = 0], [float arc = 0])");
{
Mob *THIS;
@ -6703,8 +6690,7 @@ XS(XS_Mob_SendAppearanceEffect); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SendAppearanceEffect) {
dXSARGS;
if (items < 2 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::SendAppearanceEffect(THIS, int32 param_1, [int32 param_2 = 0], [int32 param_3 = 0], [int32 param_4 = 0], [int32 param_5 = 0], [Client* single_client_to_send_to = null])");
Perl_croak(aTHX_ "Usage: Mob::SendAppearanceEffect(THIS, int32 param_1, [int32 param_2 = 0], [int32 param_3 = 0], [int32 param_4 = 0], [int32 param_5 = 0], [Client* single_client_to_send_to = null])");
{
Mob *THIS;
int32 parm1 = (int32) SvIV(ST(1));
@ -6833,8 +6819,7 @@ XS(XS_Mob_SendIllusion); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SendIllusion) {
dXSARGS;
if (items < 2 || items > 14)
Perl_croak(aTHX_
"Usage: Mob::SendIllusion(THIS, uint16 race, [uint8 gender = 0xFF], [uint8 texture face = 0xFF], [uint8 hairstyle = 0xFF], [uint8 hair_color = 0xFF], [uint8 beard = 0xFF], [uint8 beard_color =FF], [uint32 drakkin_tattoo = 0xFFFFFFFF], [uint32 drakkin_details = 0xFFFFFFFF], [float size = -1])");
Perl_croak(aTHX_ "Usage: Mob::SendIllusion(THIS, uint16 race, [uint8 gender = 0xFF], [uint8 texture face = 0xFF], [uint8 hairstyle = 0xFF], [uint8 hair_color = 0xFF], [uint8 beard = 0xFF], [uint8 beard_color =FF], [uint32 drakkin_tattoo = 0xFFFFFFFF], [uint32 drakkin_details = 0xFFFFFFFF], [float size = -1])");
{
Mob *THIS;
uint16 race = (uint16) SvIV(ST(1));
@ -6882,8 +6867,7 @@ XS(XS_Mob_CameraEffect); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CameraEffect) {
dXSARGS;
if (items < 2 || items > 5)
Perl_croak(aTHX_
"Usage: Mob::CameraEffect(THIS, uint32 duration, [uint32 intensity = 0], [Client* single_client = nullptr], [bool is_world_wide = false])");
Perl_croak(aTHX_ "Usage: Mob::CameraEffect(THIS, uint32 duration, [uint32 intensity = 0], [Client* single_client = nullptr], [bool is_world_wide = false])");
{
Mob *THIS;
uint32 duration = (uint32) SvUV(ST(1));
@ -6925,8 +6909,7 @@ XS(XS_Mob_SpellEffect); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SpellEffect) {
dXSARGS;
if (items < 2 || items > 8)
Perl_croak(aTHX_
"Usage: Mob::SpellEffect(THIS, uint32 effect, [uint32 duration = 5000], [uint32 finish_delay = 0], [bool zone_wide = false], [uint32 unk20 = 3000], [bool perm_effect = false], [Client* single_client])");
Perl_croak(aTHX_ "Usage: Mob::SpellEffect(THIS, uint32 effect, [uint32 duration = 5000], [uint32 finish_delay = 0], [bool zone_wide = false], [uint32 unk20 = 3000], [bool perm_effect = false], [Client* single_client])");
{
Mob *THIS;
uint32 effect = (uint32) SvUV(ST(1));
@ -7054,8 +7037,7 @@ XS(XS_Mob_SetGlobal);
XS(XS_Mob_SetGlobal) {
dXSARGS;
if (items < 5 || items > 6)
Perl_croak(aTHX_
"Usage: SetGlobal(THIS, string var_name, string new_value, int options, string duration, [Mob* other = nullptr])");
Perl_croak(aTHX_ "Usage: SetGlobal(THIS, string var_name, string new_value, int options, string duration, [Mob* other = nullptr])");
{
Mob *THIS;
char *varname = (char *) SvPV_nolen(ST(1));
@ -7091,8 +7073,7 @@ XS(XS_Mob_TarGlobal);
XS(XS_Mob_TarGlobal) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: TarGlobal(THIS, string var_name, string value, string duration, int npc_id, int character_id, int zone_id)");
Perl_croak(aTHX_ "Usage: TarGlobal(THIS, string var_name, string value, string duration, int npc_id, int character_id, int zone_id)");
{
Mob *THIS;
char *varname = (char *) SvPV_nolen(ST(1));
@ -7141,8 +7122,7 @@ XS(XS_Mob_SetSlotTint); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetSlotTint) {
dXSARGS;
if (items != 5)
Perl_croak(aTHX_
"Usage: Mob::SetSlotTint(THIS, uint8 material_slot, uint8 red_tint, uint8 green_tint, uint8 blue_tint)");
Perl_croak(aTHX_ "Usage: Mob::SetSlotTint(THIS, uint8 material_slot, uint8 red_tint, uint8 green_tint, uint8 blue_tint)");
{
Mob *THIS;
uint8 material_slot = (uint8) SvIV(ST(1));
@ -7167,8 +7147,7 @@ XS(XS_Mob_WearChange); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_WearChange) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::WearChange(THIS, uint8 material_slot, uint16 texture, [uint32 color = 0, uint32 hero_forge_model = 0])");
Perl_croak(aTHX_ "Usage: Mob::WearChange(THIS, uint8 material_slot, uint16 texture, [uint32 color = 0, uint32 hero_forge_model = 0])");
{
Mob *THIS;
uint8 material_slot = (uint8) SvIV(ST(1));
@ -7598,8 +7577,7 @@ XS(XS_Mob_DoMeleeSkillAttackDmg); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_DoMeleeSkillAttackDmg) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Mob::DoMeleeSkillAttackDmg(THIS, Mob* target, uint16 weapon_damage, int skill, int16 chance_mod, int16 focus, uint8 can_riposte)");
Perl_croak(aTHX_ "Usage: Mob::DoMeleeSkillAttackDmg(THIS, Mob* target, uint16 weapon_damage, int skill, int16 chance_mod, int16 focus, uint8 can_riposte)");
{
Mob *THIS;
Mob *target;
@ -7634,8 +7612,7 @@ XS(XS_Mob_DoArcheryAttackDmg); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_DoArcheryAttackDmg) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Mob::DoArcheryAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)");
Perl_croak(aTHX_ "Usage: Mob::DoArcheryAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)");
{
Mob *THIS;
Mob *target;
@ -7670,8 +7647,7 @@ XS(XS_Mob_DoThrowingAttackDmg); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_DoThrowingAttackDmg) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Mob::DoThrowingAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)");
Perl_croak(aTHX_ "Usage: Mob::DoThrowingAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)");
{
Mob *THIS;
Mob *target;

View File

@ -97,8 +97,7 @@ XS(XS_NPC_AddItem); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_AddItem) {
dXSARGS;
if (items < 2 || items > 10)
Perl_croak(aTHX_
"Usage: NPC::AddItem(THIS, uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0])");
Perl_croak(aTHX_ "Usage: NPC::AddItem(THIS, uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0])");
{
NPC *THIS;
uint32 itemid = (uint32) SvUV(ST(1));
@ -1283,8 +1282,7 @@ XS(XS_NPC_MoveTo); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_MoveTo) {
dXSARGS;
if (items != 4 && items != 5 && items != 6)
Perl_croak(aTHX_
"Usage: NPC::MoveTo(THIS, float x, float y, float z, [float heading], [bool save_guard_location = false])");
Perl_croak(aTHX_ "Usage: NPC::MoveTo(THIS, float x, float y, float z, [float heading], [bool save_guard_location = false])");
{
NPC *THIS;
float mtx = (float) SvNV(ST(1));
@ -1391,8 +1389,7 @@ XS(XS_NPC_AI_SetRoambox); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_AI_SetRoambox) {
dXSARGS;
if (items < 6 || items > 8)
Perl_croak(aTHX_
"Usage: NPC::AI_SetRoambox(THIS, float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500])");
Perl_croak(aTHX_ "Usage: NPC::AI_SetRoambox(THIS, float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500])");
{
NPC *THIS;
float iDist = (float) SvNV(ST(1));
@ -1852,8 +1849,7 @@ XS(XS_NPC_AddSpellToNPCList); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_AddSpellToNPCList) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: NPC::AddAISpell(THIS, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust)");
Perl_croak(aTHX_ "Usage: NPC::AddAISpell(THIS, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust)");
{
NPC *THIS;
int priority = (int) SvIV(ST(1));

View File

@ -420,8 +420,7 @@ XS(XS_Raid_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
XS(XS_Raid_TeleportGroup) {
dXSARGS;
if (items != 8)
Perl_croak(aTHX_
"Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)");
Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)");
{
Raid *THIS;
Mob *sender;
@ -457,8 +456,7 @@ XS(XS_Raid_TeleportRaid); /* prototype to pass -Wmissing-prototypes */
XS(XS_Raid_TeleportRaid) {
dXSARGS;
if (items != 7)
Perl_croak(aTHX_
"Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
{
Raid *THIS;
Mob *sender;