mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[Quest API] Fix parameters in some Perl worldwide methods. (#2224)
This commit is contained in:
parent
ce8b8da0d6
commit
30e34c67b4
@ -7691,15 +7691,18 @@ XS(XS__worldwideaddldonloss) {
|
||||
Perl_croak(aTHX_ "Usage: quest::worldwideaddldonloss(uint32 theme_id, [min_status = 0, max_status = 0])");
|
||||
{
|
||||
uint8 update_type = CZLDoNUpdateSubtype_AddLoss;
|
||||
uint32 theme_id = (uint32)SvUV(ST(0));
|
||||
uint32 theme_id = (uint32) SvUV(ST(0));
|
||||
int points = 1;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8)SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
max_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status);
|
||||
}
|
||||
@ -7710,21 +7713,25 @@ 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])");
|
||||
Perl_croak(aTHX_ "Usage: quest::worldwideaddldonpoints(uint32 theme_id, [int points = 1, min_status = 0, max_status = 0])");
|
||||
{
|
||||
uint8 update_type = CZLDoNUpdateSubtype_AddPoints;
|
||||
uint32 theme_id = (uint32)SvUV(ST(0));
|
||||
uint32 theme_id = (uint32) SvUV(ST(0));
|
||||
int points = 1;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
points = (int)SvIV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
min_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
points = (int) SvIV(ST(1));
|
||||
}
|
||||
|
||||
if (items == 4)
|
||||
max_status = (uint8)SvUV(ST(3));
|
||||
if (items > 2) {
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
if (items > 3) {
|
||||
max_status = (uint8) SvUV(ST(3));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status);
|
||||
}
|
||||
@ -7738,15 +7745,18 @@ XS(XS__worldwideaddldonwin) {
|
||||
Perl_croak(aTHX_ "Usage: quest::worldwideaddldonwin(uint32 theme_id, [min_status = 0, max_status = 0])");
|
||||
{
|
||||
uint8 update_type = CZLDoNUpdateSubtype_AddWin;
|
||||
uint32 theme_id = (uint32)SvUV(ST(0));
|
||||
uint32 theme_id = (uint32) SvUV(ST(0));
|
||||
int points = 1;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8)SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
max_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status);
|
||||
}
|
||||
@ -7766,11 +7776,14 @@ XS(XS__worldwideassigntask) {
|
||||
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)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -7787,11 +7800,14 @@ XS(XS__worldwidecastspell) {
|
||||
uint32 spell_id = (uint32) SvUV(ST(0));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status);
|
||||
}
|
||||
@ -7807,11 +7823,14 @@ XS(XS__worldwidedialoguewindow) {
|
||||
const char* message = (const char*) SvPV_nolen(ST(0));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8)SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
max_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideDialogueWindow(message, min_status, max_status);
|
||||
}
|
||||
@ -7831,11 +7850,14 @@ XS(XS__worldwidedisabletask) {
|
||||
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)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -7855,11 +7877,14 @@ XS(XS__worldwideenabletask) {
|
||||
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)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -7879,11 +7904,14 @@ XS(XS__worldwidefailtask) {
|
||||
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)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -7904,11 +7932,14 @@ XS(XS__worldwidemarquee) {
|
||||
const char* message = (const char*) SvPV_nolen(ST(5));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 7)
|
||||
min_status = (uint8) SvUV(ST(6));
|
||||
|
||||
if (items == 8)
|
||||
if (items > 6) {
|
||||
min_status = (uint8) SvUV(ST(6));
|
||||
}
|
||||
|
||||
if (items > 7) {
|
||||
max_status = (uint8) SvUV(ST(7));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideMarquee(type, priority, fade_in, fade_out, duration, message, min_status, max_status);
|
||||
}
|
||||
@ -7925,11 +7956,14 @@ XS(XS__worldwidemessage) {
|
||||
const char* message = (const char*) SvPV_nolen(ST(1));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 3)
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
|
||||
if (items == 4)
|
||||
if (items > 2) {
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
if (items > 3) {
|
||||
max_status = (uint8) SvUV(ST(3));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideMessage(type, message, min_status, max_status);
|
||||
}
|
||||
@ -7947,11 +7981,14 @@ XS(XS__worldwidemove) {
|
||||
uint16 instance_id = 0;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status);
|
||||
}
|
||||
@ -7969,11 +8006,14 @@ XS(XS__worldwidemoveinstance) {
|
||||
uint16 instance_id = (uint16) SvUV(ST(0));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideMove(update_type, zone_short_name, instance_id, min_status, max_status);
|
||||
}
|
||||
@ -7991,11 +8031,14 @@ XS(XS__worldwideremoveldonloss) {
|
||||
int points = 1;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8)SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
max_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status);
|
||||
}
|
||||
@ -8013,11 +8056,14 @@ XS(XS__worldwideremoveldonwin) {
|
||||
int points = 1;
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8)SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
max_status = (uint8)SvUV(ST(2));
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideLDoNUpdate(update_type, theme_id, points, min_status, max_status);
|
||||
}
|
||||
@ -8034,11 +8080,14 @@ XS(XS__worldwideremovespell) {
|
||||
uint32 spell_id = (uint32) SvUV(ST(0));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideSpell(update_type, spell_id, min_status, max_status);
|
||||
}
|
||||
@ -8058,11 +8107,14 @@ XS(XS__worldwideremovetask) {
|
||||
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)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -8083,11 +8135,14 @@ XS(XS__worldwideresetactivity) {
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
int update_count = 1;
|
||||
bool enforce_level_requirement = false;
|
||||
if (items == 3)
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
|
||||
if (items == 4)
|
||||
if (items > 2) {
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
if (items > 3) {
|
||||
max_status = (uint8) SvUV(ST(3));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
@ -8105,11 +8160,14 @@ XS(XS__worldwidesetentityvariableclient) {
|
||||
const char* variable_value = (const char*) SvPV_nolen(ST(1));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 3)
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
|
||||
if (items == 4)
|
||||
if (items > 2) {
|
||||
min_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
if (items > 3) {
|
||||
max_status = (uint8) SvUV(ST(3));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideSetEntityVariable(update_type, variable_name, variable_value, min_status, max_status);
|
||||
}
|
||||
@ -8153,11 +8211,14 @@ XS(XS__worldwidesignalclient) {
|
||||
uint32 signal = (uint32) SvUV(ST(0));
|
||||
uint8 min_status = AccountStatus::Player;
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
if (items == 2)
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
|
||||
if (items == 3)
|
||||
if (items > 1) {
|
||||
min_status = (uint8) SvUV(ST(1));
|
||||
}
|
||||
|
||||
if (items > 2) {
|
||||
max_status = (uint8) SvUV(ST(2));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideSignal(update_type, signal, min_status, max_status);
|
||||
}
|
||||
@ -8177,14 +8238,18 @@ XS(XS__worldwideupdateactivity) {
|
||||
uint8 max_status = AccountStatus::Player;
|
||||
int update_count = 1;
|
||||
bool enforce_level_requirement = false;
|
||||
if (items == 3)
|
||||
|
||||
if (items > 2) {
|
||||
update_count = (int) SvIV(ST(2));
|
||||
}
|
||||
|
||||
if (items == 4)
|
||||
if (items > 3) {
|
||||
min_status = (uint8) SvUV(ST(3));
|
||||
}
|
||||
|
||||
if (items == 5)
|
||||
if (items > 4) {
|
||||
max_status = (uint8) SvUV(ST(4));
|
||||
}
|
||||
|
||||
quest_manager.WorldWideTaskUpdate(update_type, task_identifier, task_subidentifier, update_count, enforce_level_requirement, min_status, max_status);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user