summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/script_commands.txt2
-rw-r--r--npc/custom/jobmaster.txt260
-rw-r--r--npc/jobs/2-2/alchemist.txt9
-rw-r--r--npc/jobs/2-2a/Creator.txt111
-rw-r--r--sql-files/upgrades/2014-05-17--00-06.sql2
-rw-r--r--src/map/atcommand.c221
-rw-r--r--src/map/skill.c41
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc60
12 files changed, 424 insertions, 300 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 638c959cb..45311592a 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1140,7 +1140,7 @@ From here on, we will have the commands sorted as followed:
-- 5.1: Time-Related Commands
-- 5.2: Guild-Related Commands
6 - Other Commands
-7 - Instance Commands
+7 - Instance-Related Commands
8 - Quest Log Commands
9 - Battleground Commands
10 - Mercenary Commands
diff --git a/npc/custom/jobmaster.txt b/npc/custom/jobmaster.txt
index ed55b4d87..346e3ddff 100644
--- a/npc/custom/jobmaster.txt
+++ b/npc/custom/jobmaster.txt
@@ -3,70 +3,91 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.1 Fixed reset on Baby job change. [Euphy]
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy]
//= 1.3 Kagerou/Oboro added. [Euphy]
+//= 1.4 Improved legibility (renamed variables, replaced
+// numbers with constants; Changed syntax to match
+// Hercules standards; Fixed status point exploit upon
+// Baby Novice job change. [Haru]
//============================================================
prontera,153,193,6 script Job Master 2_F_MAGICMASTER,{
-function Job_Menu; function A_An;
+ function Job_Menu; function A_An;
mes "[Job Master]";
- if (Class > 4049) {
+ if (Class > Job_Soul_Linker) {
mes "No more jobs are available.";
close;
}
if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
- mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")+" before proceeding.";
+ mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")
+ +" before proceeding.";
close;
}
- if (.SkillPointCheck && SkillPoint) {
+ if (.skill_point_check && SkillPoint > 0) {
mes "Please use all your skill points before proceeding.";
close;
}
- set .@eac, eaclass();
- set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class);
- if (.@i > 6 && .@i < 22) {
- if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) {
- set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .Rebirth[1]-JobLevel;
- mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";
+ .@eac = eaclass();
+ .@base = .third_classes ? roclass(.@eac&EAJ_UPPERMASK) : Class;
+ if (.@base >= Job_Knight && .@base <= Job_Crusader2) {
+ if (BaseLevel < .rebirth_blevel || JobLevel < .rebirth_jlevel) {
+ .@blvl = .rebirth_blevel - BaseLevel;
+ .@jlvl = .rebirth_jlevel - JobLevel;
+ mes "You need "
+ + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" more base levels "+ (JobLevel < .rebirth_jlevel ? "and " : "")) : "")
+ + (JobLevel < .rebirth_jlevel ? (.rebirth_jlevel - JobLevel) +" more job levels " : "")
+ + "to continue.";
close;
}
- if (Class > 21) {
+ if (Class > Job_Crusader2) {
mes "Switch to third class?";
next;
Job_Menu(roclass(.@eac|EAJL_THIRD));
close;
}
- while(1) {
+ while (true) {
mes "Select an option.";
next;
- set .@i, select(" ~ ^0055FFRebirth^000000:"+((.ThirdClass)?" ~ ^FF0000Third Class^000000":"")+": ~ ^777777Cancel^000000");
- if (.@i==3) close;
+ .@choice = select(" ~ ^0055FFRebirth^000000:"+(.third_classes ? " ~ ^FF0000Third Class^000000" : "")+": ~ ^777777Cancel^000000");
+ if (.@choice == 3)
+ close;
mes "[Job Master]";
mes "Are you sure?";
next;
- Job_Menu(((.@i==1)?4001:roclass(.@eac|EAJL_THIRD)));
+ if (.@choice == 1)
+ Job_Menu(Job_Novice_High);
+ else
+ Job_Menu(roclass(.@eac|EAJL_THIRD));
mes "[Job Master]";
}
}
- set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2);
- if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99;
- if (Class == Job_Ninja) setarray .@exp[0],.@j1,70;
- if (.@exp[0] && .ThirdClass) {
- if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
- set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel;
- mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";
+ .@job1 = roclass(.@eac|EAJL_2_1);
+ .@job2 = roclass(.@eac|EAJL_2_2);
+ if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) {
+ .@newclass = roclass(.@eac|EAJL_THIRD);
+ .@required_jlevel = 99;
+ } else if (Class == Job_Ninja) {
+ .@newclass = .@job1;
+ .@required_jlevel = 70;
+ }
+ if (.@newclass && .third_classes) {
+ if (BaseLevel < .rebirth_blevel || JobLevel < .@required_jlevel) {
+ mes "You need "
+ + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" more base levels "+ (JobLevel < .@required_jlevel ? "and " : "")) : "")
+ + (JobLevel < .@required_jlevel ? (.@required_jlevel - JobLevel) +" more job levels " : "")
+ + "to continue.";
close;
}
- mes "Switch to "+jobname(.@exp[0])+"?";
+ mes "Switch to "+jobname(.@newclass)+"?";
next;
- Job_Menu(.@exp[0]);
+ Job_Menu(.@newclass);
close;
}
if (.@eac&EAJL_2)
@@ -75,114 +96,163 @@ function Job_Menu; function A_An;
close;
}
if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
- if (JobLevel < .JobReq[0])
- mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class.";
- else if (Class == 4001 && .LastJob && lastJob) {
+ if (JobLevel < .jobchange_first) {
+ mes "A job level of "+.jobchange_first+" is required to change into the 1st Class.";
+ } else if (Class == Job_Novice_High && .linear_jobchange && lastJob) {
mes "Switch classes now?";
next;
Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
- } else switch(Class) {
- case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023);
- case 4001: Job_Menu(4002,4003,4004,4005,4006,4007);
- case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045);
- default: mes "An error has occurred."; break;
+ } else if (Class == Job_Novice) {
+ Job_Menu(Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief,
+ Job_SuperNovice, Job_Taekwon, Job_Gunslinger, Job_Ninja, Job_Baby);
+ } else if (Class == Job_Novice_High) {
+ Job_Menu(Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High);
+ } else if (Class == Job_Baby) {
+ Job_Menu(Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer, Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief,
+ Job_Super_Baby);
+ } else {
+ mes "An error has occurred.";
}
close;
}
- if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
+ if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1) {
mes "No more jobs are available.";
- else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
- mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class.";
- else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
+ } else if (!(.@eac&EAJL_2) && JobLevel < .jobchange_second) {
+ mes "A job level of "+.jobchange_second+" is required to change into the 2nd Class.";
+ } else if (.linear_jobchange && lastJob && (.@eac&EAJL_UPPER)) {
mes "Switch classes now?";
next;
- Job_Menu(lastJob+4001);
- } else
- Job_Menu(.@j1,.@j2);
+ Job_Menu(lastJob+Job_Novice_High);
+ } else {
+ Job_Menu(.@job1, .@job2);
+ }
close;
function Job_Menu {
- while(1) {
+ while (true) {
if (getargcount() > 1) {
mes "Select a job.";
- set .@menu$,"";
- for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
- set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":";
- set .@menu$, .@menu$+" ~ ^777777Cancel^000000";
+ .@menu$ = "";
+ for (.@i = 0; .@i < getargcount(); ++.@i)
+ .@menu$ += " ~ "+jobname(getarg(.@i))+":";
+ .@menu$ += " ~ ^777777Cancel^000000";
next;
- set .@i, getarg(select(.@menu$)-1,0);
- if (!.@i) close;
- if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) {
+ .@newjob = getarg(select(.@menu$)-1, 0);
+ if (!.@newjob) close;
+ if ((.@newjob == Job_SuperNovice || .@newjob == Job_Super_Baby) && BaseLevel < .supernovice_level) {
mes "[Job Master]";
- mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+".";
+ mes "A base level of "+.supernovice_level+" is required to turn into a "+jobname(.@newjob)+".";
close;
}
mes "[Job Master]";
mes "Are you sure?";
next;
- } else
- set .@i, getarg(0);
- if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) {
+ } else {
+ .@newjob = getarg(0);
+ }
+ if (select(" ~ Change into ^0055FF"+jobname(.@newjob)+"^000000 class: ~ ^777777"+(getargcount() > 1 ? "Go back" : "Cancel")+"^000000") == 1) {
mes "[Job Master]";
- mes "You are now "+A_An(jobname(.@i))+"!";
- if (.@i==4001 && .LastJob) set lastJob, Class;
- jobchange .@i;
- if (.@i==4001 || .@i==4023) resetlvl(1);
- specialeffect2 338; specialeffect2 432;
- if (.Platinum) callsub Get_Platinum;
+ mes "You are now "+A_An(jobname(.@newjob))+"!";
+ if (.@newjob == Job_Novice_High && .linear_jobchange)
+ lastJob = Class; // Note: This is incompatible with the Valkyrie rebirth script.
+ jobchange .@newjob;
+ if (.@newjob == Job_Novice_High)
+ resetlvl(1);
+ specialeffect2 EF_ANGEL2;
+ specialeffect2 EF_ELECTRIC;
+ if (.platinum)
+ callsub Get_Platinum;
close;
}
- if (getargcount() == 1) return;
+ if (getargcount() == 1)
+ return;
mes "[Job Master]";
}
end;
}
function A_An {
- setarray .@A$[0],"a","e","i","o","u";
- set .@B$, "_"+getarg(0);
- for(set .@i,0; .@i<5; set .@i,.@i+1)
- if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
+ setarray .@vowels$, "a", "e", "i", "o", "u";
+ .@firstletter$ = strtolower(charat(getarg(0), 0));
+ for (.@i = 0; .@i < getarraysize(.@vowels); ++.@i) {
+ if (.@vowels$[.@i] == .@firstletter$)
+ return "an "+getarg(0);
+ }
return "a "+getarg(0);
}
Get_Platinum:
- skill 142,1,0;
- switch(BaseClass) {
- case 0: if (Class !=23) skill 143,1,0; break;
- case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break;
- case 2: skill 157,1,0; break;
- case 3: skill 147,1,0; skill 148,1,0; break;
- case 4: skill 156,1,0; break;
- case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break;
- case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break;
- default: break;
+ skill NV_FIRSTAID, 1, 0;
+ if (BaseClass == Job_Novice) {
+ if (Class != Job_SuperNovice)
+ skill NV_TRICKDEAD, 1, 0;
+ } else if (BaseClass == Job_Swordman) {
+ skill SM_MOVINGRECOVERY, 1, 0;
+ skill SM_FATALBLOW, 1, 0;
+ skill SM_AUTOBERSERK, 1, 0;
+ } else if (BaseClass == Job_Mage) {
+ skill MG_ENERGYCOAT, 1, 0;
+ } else if (BaseClass == Job_Archer) {
+ skill AC_MAKINGARROW, 1, 0;
+ skill AC_CHARGEARROW, 1, 0;
+ } else if (BaseClass == Job_Acolyte) {
+ skill AL_HOLYLIGHT, 1, 0;
+ } else if (BaseClass == Job_Merchant) {
+ skill MC_CARTREVOLUTION, 1, 0;
+ skill MC_CHANGECART, 1, 0;
+ skill MC_LOUD, 1, 0;
+ } else if (BaseClass == Job_Thief) {
+ skill TF_SPRINKLESAND, 1, 0;
+ skill TF_BACKSLIDING, 1, 0;
+ skill TF_PICKSTONE, 1, 0;
+ skill TF_THROWSTONE, 1, 0;
}
- switch(BaseJob) {
- case 7: skill 1001,1,0; break;
- case 8: skill 1014,1,0; break;
- case 9: skill 1006,1,0; break;
- case 10: skill 1012,1,0; skill 1013,1,0; break;
- case 11: skill 1009,1,0; break;
- case 12: skill 1003,1,0; skill 1004,1,0; break;
- case 14: skill 1002,1,0; break;
- case 15: skill 1015,1,0; skill 1016,1,0; break;
- case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break;
- case 17: skill 1005,1,0; break;
- case 18: skill 238,1,0; break;
- case 19: skill 1010,1,0; break;
- case 20: skill 1011,1,0; break;
- default: break;
+
+ if (BaseJob == Job_Knight) {
+ skill KN_CHARGEATK, 1, 0;
+ } else if (BaseJob == Job_Priest) {
+ skill PR_REDEMPTIO, 1, 0;
+ } else if (BaseJob == Job_Wizard) {
+ skill WZ_SIGHTBLASTER, 1, 0;
+ } else if (BaseJob == Job_Blacksmith) {
+ skill BS_UNFAIRLYTRICK, 1, 0;
+ skill BS_GREED, 1, 0;
+ } else if (BaseJob == Job_Hunter) {
+ skill HT_PHANTASMIC, 1, 0;
+ } else if (BaseJob == Job_Assassin) {
+ skill AS_SONICACCEL, 1, 0;
+ skill AS_VENOMKNIFE, 1, 0;
+ } else if (BaseJob == Job_Crusader) {
+ skill CR_SHRINK, 1, 0;
+ } else if (BaseJob == Job_Monk) {
+ skill MO_KITRANSLATION, 1, 0;
+ skill MO_BALKYOUNG, 1, 0;
+ } else if (BaseJob == Job_Sage) {
+ skill SA_CREATECON, 1, 0;
+ skill SA_ELEMENTWATER, 1, 0;
+ skill SA_ELEMENTGROUND, 1, 0;
+ skill SA_ELEMENTFIRE, 1, 0;
+ skill SA_ELEMENTWIND, 1, 0;
+ } else if (BaseJob == Job_Rogue) {
+ skill RG_CLOSECONFINE, 1, 0;
+ } else if (BaseJob == Job_Alchemist) {
+ skill AM_BIOETHICS, 1, 0;
+ } else if (BaseJob == Job_Bard) {
+ skill BA_PANGVOICE, 1, 0;
+ } else if (BaseJob == Job_Dancer) {
+ skill DC_WINKCHARM, 1, 0;
}
return;
OnInit:
- setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class
- setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class
- set .ThirdClass,1; // Enable third classes? (1: yes / 0: no)
- set .SNovice,45; // Minimum base level to turn into Super Novice
- set .LastJob,1; // Enforce linear class changes? (1: yes / 0: no)
- set .SkillPointCheck,1; // Force player to use up all skill points? (1: yes / 0: no)
- set .Platinum,1; // Get platinum skills automatically? (1: yes / 0: no)
+ .rebirth_blevel = 99; // Minimum base level to reborn OR change to third class
+ .rebirth_jlevel = 50; // Minimum base job level to reborn OR change to third class
+ .jobchange_first = 10; // Minimum job level to turn into 1st class
+ .jobchange_second = 40; // Minimum job level to turn into 2nd class
+ .third_classes = 1; // Enable third classes? (1: yes / 0: no)
+ .supernovice_level = 45; // Minimum base level to turn into Super Novice
+ .linear_jobchange = 1; // Enforce linear class changes? (1: yes / 0: no)
+ .skill_point_check = 1; // Force player to use up all skill points? (1: yes / 0: no)
+ .platinum = 1; // Get platinum skills automatically? (1: yes / 0: no)
end;
}
diff --git a/npc/jobs/2-2/alchemist.txt b/npc/jobs/2-2/alchemist.txt
index 6f0cea599..7e5ca7e33 100644
--- a/npc/jobs/2-2/alchemist.txt
+++ b/npc/jobs/2-2/alchemist.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= nestor_zulueta (Fusion), converted by Darkchild
//===== Current Version: =====================================
-//= 3.0
+//= 3.1
//===== Description: =========================================
//= [Official Conversion]
//= Job quest for Alchemist classes
@@ -15,6 +15,7 @@
//= 2.8 Fixed minor typo in test section. [L0ne_W0lf]
//= 2.9 Added Quest Log commands. [Kisuka]
//= 3.0 Removed the need for use of 'goto.' [L0ne_W0lf]
+//= 3.1 Added missing changequest commands. [Kisuka]
//============================================================
alde_alche,27,185,5 script Alchemist Guildsman#am 4_F_ALCHE,{
@@ -465,6 +466,7 @@ alde_alche,175,107,3 script Fastidious Alchemist#am 4_M_ALCHE_B,{
mes "He'll teach you how to do the experiments. Just tell him that";
mes "I sent you.";
set ALCH_Q,6;
+ changequest 2031,2032;
close;
}
else {
@@ -1090,6 +1092,7 @@ alde_alche,13,15,7 script Studying Man#am 4_M_ALCHE_C,{
mes "and cast away the last";
mes "vestiges of Merchant life!!";
set ALCH_Q,40;
+ changequest 2033,2034;
close;
}
else if (countitem(7134) > 2 && countitem(713) > 2 && countitem(507) > 0 && countitem(508) > 0 && countitem(509) > 0) {
@@ -1687,6 +1690,9 @@ alde_alche,101,184,4 script Master Alchemist#am 2_M_DYEINGER,{
if(checkquest(2039) != -1) {
changequest 2039,2040;
}
+ if(checkquest(2034) != -1) {
+ changequest 2034,2040;
+ }
mes "Ah, well done.";
mes "I can see that you";
mes "have learned all of";
@@ -1703,7 +1709,6 @@ alde_alche,101,184,4 script Master Alchemist#am 2_M_DYEINGER,{
mes "illustrious Union.";
mes "I hope you learn a lot...";
next;
-
if (.@jlevel == 50) {
getitem 7133,1; //Slim_Potion_Create_Book
mes "[Vincent Carsciallo]";
diff --git a/npc/jobs/2-2a/Creator.txt b/npc/jobs/2-2a/Creator.txt
index a8a81f0c9..59f7e17e2 100644
--- a/npc/jobs/2-2a/Creator.txt
+++ b/npc/jobs/2-2a/Creator.txt
@@ -4,19 +4,19 @@
//= Nana
//= finished, optimized and tested by Lupus
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Description: =========================================
//= Advance Class jobchanger after kRO Normals.
//===== Additional Comments: =================================
//= 1.1 Made all into functions, additional checks, etc. [Lupus]
//= 1.2 Made numbers into constants. [Vicious]
//= 1.3 Now saves/restores all the quest skills [Lupus]
+//= 1.4 Corrected check for the Bioethics quest variable [Haru]
//============================================================
valkyrie,53,50,3 script Biochemist#Valkyrie 2_M_DYEINGER,{
if (ADVJOB == 0 || Upper != 1) {
- set .@karma_d,rand(1,10);
- if (.@karma_d > 4) {
+ if (rand(1,10) > 4) {
mes "[Biochemist]";
mes "Congratulations.";
mes "Honor to the warriors!";
@@ -37,8 +37,7 @@ valkyrie,53,50,3 script Biochemist#Valkyrie 2_M_DYEINGER,{
mes "fought that earned me";
mes "a place in Valhalla...";
close;
- }
- else if (ADVJOB == Job_Creator && Class == Job_Merchant_High && JobLevel > 39) {
+ } else if (ADVJOB == Job_Creator && Class == Job_Merchant_High && JobLevel > 39) {
mes "[Biochemist]";
mes "Yes...";
mes "It's about time.";
@@ -63,7 +62,7 @@ valkyrie,53,50,3 script Biochemist#Valkyrie 2_M_DYEINGER,{
close;
}
jobchange Job_Creator;
- set ADVJOB,0;
+ ADVJOB = 0;
mes "[Biochemist]";
mes "Congratulations!";
mes "As a Biochemist,";
@@ -71,64 +70,60 @@ valkyrie,53,50,3 script Biochemist#Valkyrie 2_M_DYEINGER,{
mes "vast knowledge for the";
mes "right purposes.";
close;
- }
- else {
- if (Class == Job_Creator && MISC_QUEST & 64 && getskilllv("AM_BIOETHICS") == 0) {
+ } else if (Class == Job_Creator && bioeth == 13 && getskilllv(AM_BIOETHICS) == 0) {
+ mes "[Biochemist]";
+ mes "Ah, have you come to";
+ mes "retrieve the memories";
+ mes "lost to you? Yes, you";
+ mes "must be here for the";
+ mes "secrets of life that";
+ mes "were once yours...";
+ next;
+ if (select("Yes:No") == 1) {
mes "[Biochemist]";
- mes "Ah, have you come to";
- mes "retrieve the memories";
- mes "lost to you? Yes, you";
- mes "must be here for the";
- mes "secrets of life that";
- mes "were once yours...";
+ mes "Close your eyes and";
+ mes "put your mind at rest.";
+ mes "We will return to your";
+ mes "past to recollect the";
+ mes "fragments of your lost";
+ mes "memories.";
next;
- if (select("Yes:No") == 1) {
- mes "[Biochemist]";
- mes "Close your eyes and";
- mes "put your mind at rest.";
- mes "We will return to your";
- mes "past to recollect the";
- mes "fragments of your lost";
- mes "memories.";
- next;
- mes "[Biochemist]";
- mes "When you open your eyes,";
- mes "you will clearly remember";
- mes "the secret of life. You will";
- mes "also remember the weight of";
- mes "responsibility in using these";
- mes "secrets for the right ends...";
- next;
- skill 238,1,0;
- mes "[Biochemist]";
- mes "Open your eyes...";
- mes "Now that you have";
- mes "remembered how to";
- mes "create artificial life, I only";
- mes "ask that you treat all of your";
- mes "creations with respect.";
- close;
- }
mes "[Biochemist]";
- mes "If you wish to";
- mes "retrieve your lost";
- mes "memories, please";
- mes "come back to me.";
- mes "The secret to creating";
- mes "life is no trifling thing...";
+ mes "When you open your eyes,";
+ mes "you will clearly remember";
+ mes "the secret of life. You will";
+ mes "also remember the weight of";
+ mes "responsibility in using these";
+ mes "secrets for the right ends...";
+ next;
+ skill AM_BIOETHICS,1,0;
+ mes "[Biochemist]";
+ mes "Open your eyes...";
+ mes "Now that you have";
+ mes "remembered how to";
+ mes "create artificial life, I only";
+ mes "ask that you treat all of your";
+ mes "creations with respect.";
close;
}
mes "[Biochemist]";
- mes "Welcome";
- mes "to Valhalla,";
- mes "the Hall of Honor.";
- next;
- mes "[Biochemist]";
- mes "Please make";
- mes "yourself comfortable";
- mes "while you are here.";
- mes "Honor to the warriors!";
+ mes "If you wish to";
+ mes "retrieve your lost";
+ mes "memories, please";
+ mes "come back to me.";
+ mes "The secret to creating";
+ mes "life is no trifling thing...";
close;
}
+ mes "[Biochemist]";
+ mes "Welcome";
+ mes "to Valhalla,";
+ mes "the Hall of Honor.";
+ next;
+ mes "[Biochemist]";
+ mes "Please make";
+ mes "yourself comfortable";
+ mes "while you are here.";
+ mes "Honor to the warriors!";
+ close;
}
-
diff --git a/sql-files/upgrades/2014-05-17--00-06.sql b/sql-files/upgrades/2014-05-17--00-06.sql
index a9943ce38..4e5d0d32a 100644
--- a/sql-files/upgrades/2014-05-17--00-06.sql
+++ b/sql-files/upgrades/2014-05-17--00-06.sql
@@ -1,3 +1,3 @@
#1400256139
-RENAME TABLE `incuvate` TO `incubate`;
+ALTER TABLE `pet` CHANGE `incuvate` `incubate` int(11) unsigned NOT NULL default '0';
INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139);
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 4a183ded4..a7e4cef39 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1721,67 +1721,63 @@ ACMD(hair_color)
/*==========================================
* @go [city_number or city_name] - Updated by Harbin
*------------------------------------------*/
-ACMD(go)
-{
+ACMD(go) {
int i;
- int town;
+ int town = INT_MAX; // Initialized to INT_MAX instead of -1 to avoid conflicts with those who map [-3:-1] to @memo locations.
char map_name[MAP_NAME_LENGTH];
- int16 m;
const struct {
char map[MAP_NAME_LENGTH];
int x, y;
+ int min_match; ///< Minimum string length to match
} data[] = {
- { MAP_PRONTERA, 156, 191 }, // 0=Prontera
- { MAP_MORROC, 156, 93 }, // 1=Morroc
- { MAP_GEFFEN, 119, 59 }, // 2=Geffen
- { MAP_PAYON, 162, 233 }, // 3=Payon
- { MAP_ALBERTA, 192, 147 }, // 4=Alberta
+ { MAP_PRONTERA, 156, 191, 3 }, // 0 = Prontera
+ { MAP_MORROC, 156, 93, 4 }, // 1 = Morroc
+ { MAP_GEFFEN, 119, 59, 3 }, // 2 = Geffen
+ { MAP_PAYON, 162, 233, 3 }, // 3 = Payon
+ { MAP_ALBERTA, 192, 147, 3 }, // 4 = Alberta
#ifdef RENEWAL
- { MAP_IZLUDE, 128, 146 }, // 5=Izlude (Renewal)
+ { MAP_IZLUDE, 128, 146, 3 }, // 5 = Izlude (Renewal)
#else
- { MAP_IZLUDE, 128, 114 }, // 5=Izlude
+ { MAP_IZLUDE, 128, 114, 3 }, // 5 = Izlude
#endif
- { MAP_ALDEBARAN, 140, 131 }, // 6=Al de Baran
- { MAP_LUTIE, 147, 134 }, // 7=Lutie
- { MAP_COMODO, 209, 143 }, // 8=Comodo
- { MAP_YUNO, 157, 51 }, // 9=Yuno
- { MAP_AMATSU, 198, 84 }, // 10=Amatsu
- { MAP_GONRYUN, 160, 120 }, // 11=Gonryun
- { MAP_UMBALA, 89, 157 }, // 12=Umbala
- { MAP_NIFLHEIM, 21, 153 }, // 13=Niflheim
- { MAP_LOUYANG, 217, 40 }, // 14=Louyang
- { MAP_NOVICE, 53, 111 }, // 15=Training Grounds
- { MAP_JAIL, 23, 61 }, // 16=Prison
- { MAP_JAWAII, 249, 127 }, // 17=Jawaii
- { MAP_AYOTHAYA, 151, 117 }, // 18=Ayothaya
- { MAP_EINBROCH, 64, 200 }, // 19=Einbroch
- { MAP_LIGHTHALZEN, 158, 92 }, // 20=Lighthalzen
- { MAP_EINBECH, 70, 95 }, // 21=Einbech
- { MAP_HUGEL, 96, 145 }, // 22=Hugel
- { MAP_RACHEL, 130, 110 }, // 23=Rachel
- { MAP_VEINS, 216, 123 }, // 24=Veins
- { MAP_MOSCOVIA, 223, 184 }, // 25=Moscovia
- { MAP_MIDCAMP, 180, 240 }, // 26=Midgard Camp
- { MAP_MANUK, 282, 138 }, // 27=Manuk
- { MAP_SPLENDIDE, 197, 176 }, // 28=Splendide
- { MAP_BRASILIS, 182, 239 }, // 29=Brasilis
- { MAP_DICASTES, 198, 187 }, // 30=El Dicastes
- { MAP_MORA, 44, 151 }, // 31=Mora
- { MAP_DEWATA, 200, 180 }, // 32=Dewata
- { MAP_MALANGDO, 140, 114 }, // 33=Malangdo Island
- { MAP_MALAYA, 242, 211 }, // 34=Malaya Port
- { MAP_ECLAGE, 110, 39 }, // 35=Eclage
+ { MAP_ALDEBARAN, 140, 131, 3 }, // 6 = Aldebaran
+ { MAP_LUTIE, 147, 134, 3 }, // 7 = Lutie
+ { MAP_COMODO, 209, 143, 3 }, // 8 = Comodo
+ { MAP_YUNO, 157, 51, 3 }, // 9 = Juno
+ { MAP_AMATSU, 198, 84, 3 }, // 10 = Amatsu
+ { MAP_GONRYUN, 160, 120, 3 }, // 11 = Kunlun
+ { MAP_UMBALA, 89, 157, 3 }, // 12 = Umbala
+ { MAP_NIFLHEIM, 21, 153, 3 }, // 13 = Niflheim
+ { MAP_LOUYANG, 217, 40, 3 }, // 14 = Luoyang
+ { MAP_NOVICE, 53, 111, 3 }, // 15 = Training Grounds
+ { MAP_JAIL, 23, 61, 3 }, // 16 = Prison
+ { MAP_JAWAII, 249, 127, 3 }, // 17 = Jawaii
+ { MAP_AYOTHAYA, 151, 117, 3 }, // 18 = Ayothaya
+ { MAP_EINBROCH, 64, 200, 5 }, // 19 = Einbroch
+ { MAP_LIGHTHALZEN, 158, 92, 3 }, // 20 = Lighthalzen
+ { MAP_EINBECH, 70, 95, 5 }, // 21 = Einbech
+ { MAP_HUGEL, 96, 145, 3 }, // 22 = Hugel
+ { MAP_RACHEL, 130, 110, 3 }, // 23 = Rachel
+ { MAP_VEINS, 216, 123, 3 }, // 24 = Veins
+ { MAP_MOSCOVIA, 223, 184, 3 }, // 25 = Moscovia
+ { MAP_MIDCAMP, 180, 240, 3 }, // 26 = Midgard Camp
+ { MAP_MANUK, 282, 138, 3 }, // 27 = Manuk
+ { MAP_SPLENDIDE, 197, 176, 3 }, // 28 = Splendide
+ { MAP_BRASILIS, 182, 239, 3 }, // 29 = Brasilis
+ { MAP_DICASTES, 198, 187, 3 }, // 30 = El Dicastes
+ { MAP_MORA, 44, 151, 4 }, // 31 = Mora
+ { MAP_DEWATA, 200, 180, 3 }, // 32 = Dewata
+ { MAP_MALANGDO, 140, 114, 5 }, // 33 = Malangdo Island
+ { MAP_MALAYA, 242, 211, 5 }, // 34 = Malaya Port
+ { MAP_ECLAGE, 110, 39, 3 }, // 35 = Eclage
};
memset(map_name, '\0', sizeof(map_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
- // get the number
- town = atoi(message);
-
- if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data))
- {// no value matched so send the list of locations
+ if (!message || !*message || sscanf(message, "%11s", map_name) < 1) {
+ // no value matched so send the list of locations
const char* text;
// attempt to find the text help string
@@ -1795,98 +1791,49 @@ ACMD(go)
return false;
}
-
- // get possible name of the city
- map_name[MAP_NAME_LENGTH-1] = '\0';
- for (i = 0; map_name[i]; i++)
- map_name[i] = TOLOWER(map_name[i]);
- // try to identify the map name
- if (strncmp(map_name, "prontera", 3) == 0) {
- town = 0;
- } else if (strncmp(map_name, "morocc", 4) == 0 ||
- strncmp(map_name, "morroc", 4) == 0) {
- town = 1;
- } else if (strncmp(map_name, "geffen", 3) == 0) {
- town = 2;
- } else if (strncmp(map_name, "payon", 3) == 0) {
- town = 3;
- } else if (strncmp(map_name, "alberta", 3) == 0) {
- town = 4;
- } else if (strncmp(map_name, "izlude", 3) == 0) {
- town = 5;
- } else if (strncmp(map_name, "aldebaran", 3) == 0) {
- town = 6;
- } else if (strncmp(map_name, "lutie", 3) == 0 ||
- strcmp(map_name, "christmas") == 0 ||
- strncmp(map_name, "xmas", 3) == 0 ||
- strncmp(map_name, "x-mas", 3) == 0) {
- town = 7;
- } else if (strncmp(map_name, "comodo", 3) == 0) {
- town = 8;
- } else if (strncmp(map_name, "juno", 3) == 0 ||
- strncmp(map_name, "yuno", 3) == 0) {
- town = 9;
- } else if (strncmp(map_name, "amatsu", 3) == 0) {
- town = 10;
- } else if (strncmp(map_name, "kunlun", 3) == 0 ||
- strncmp(map_name, "gonryun", 3) == 0) {
- town = 11;
- } else if (strncmp(map_name, "umbala", 3) == 0) {
- town = 12;
- } else if (strncmp(map_name, "niflheim", 3) == 0) {
- town = 13;
- } else if (strncmp(map_name, "louyang", 3) == 0) {
- town = 14;
- } else if (strncmp(map_name, "new_1-1", 3) == 0 ||
- strncmp(map_name, "startpoint", 3) == 0 ||
- strncmp(map_name, "beginning", 3) == 0) {
- town = 15;
- } else if (strncmp(map_name, "sec_pri", 3) == 0 ||
- strncmp(map_name, "prison", 3) == 0 ||
- strncmp(map_name, "jail", 3) == 0) {
- town = 16;
- } else if (strncmp(map_name, "jawaii", 3) == 0) {
- town = 17;
- } else if (strncmp(map_name, "ayothaya", 3) == 0) {
- town = 18;
- } else if (strncmp(map_name, "einbroch", 5) == 0) {
- town = 19;
- } else if (strncmp(map_name, "lighthalzen", 3) == 0) {
- town = 20;
- } else if (strncmp(map_name, "einbech", 5) == 0) {
- town = 21;
- } else if (strncmp(map_name, "hugel", 3) == 0) {
- town = 22;
- } else if (strncmp(map_name, "rachel", 3) == 0) {
- town = 23;
- } else if (strncmp(map_name, "veins", 3) == 0) {
- town = 24;
- } else if (strncmp(map_name, "moscovia", 3) == 0) {
- town = 25;
- } else if (strncmp(map_name, "mid_camp", 3) == 0) {
- town = 26;
- } else if (strncmp(map_name, "manuk", 3) == 0) {
- town = 27;
- } else if (strncmp(map_name, "splendide", 3) == 0) {
- town = 28;
- } else if (strncmp(map_name, "brasilis", 3) == 0) {
- town = 29;
- } else if (strncmp(map_name, "dicastes01", 3) == 0) {
- town = 30;
- } else if (strcmp(map_name, "mora") == 0) {
- town = 31;
- } else if (strncmp(map_name, "dewata", 3) == 0) {
- town = 32;
- } else if (strncmp(map_name, "malangdo", 5) == 0) {
- town = 33;
- } else if (strncmp(map_name, "malaya", 5) == 0) {
- town = 34;
- } else if (strncmp(map_name, "eclage", 3) == 0) {
- town = 35;
+
+ // Numeric entry
+ if (ISDIGIT(*message) || (message[0] == '-' && ISDIGIT(message[1]))) {
+ town = atoi(message);
}
-
+
+ if (town < 0 || town >= ARRAYLENGTH(data)) {
+ map_name[MAP_NAME_LENGTH-1] = '\0';
+
+ // Match maps on the list
+ for (i = 0; i < ARRAYLENGTH(data); i++) {
+ if (strncmpi(map_name, data[i].map, data[i].min_match) == 0) {
+ town = i;
+ break;
+ }
+ }
+ }
+
+ if (town < 0 || town >= ARRAYLENGTH(data)) {
+ // Alternate spellings
+ if (strncmpi(map_name, "morroc", 4) == 0) { // Correct town name for 'morocc'
+ town = 1;
+ } else if (strncmpi(map_name, "lutie", 3) == 0) { // Correct town name for 'xmas'
+ town = 7;
+ } else if (strncmpi(map_name, "juno", 3) == 0) { // Correct town name for 'yuno'
+ town = 9;
+ } else if (strncmpi(map_name, "kunlun", 3) == 0) { // Original town name for 'gonryun'
+ town = 11;
+ } else if (strncmpi(map_name, "luoyang", 3) == 0) { // Original town name for 'louyang'
+ town = 14;
+ } else if (strncmpi(map_name, "startpoint", 3) == 0 // Easy to remember alternatives to 'new_1-1'
+ || strncmpi(map_name, "beginning", 3) == 0) {
+ town = 15;
+ } else if (strncmpi(map_name, "prison", 3) == 0 // Easy to remember alternatives to 'sec_pri'
+ || strncmpi(map_name, "jail", 3) == 0) {
+ town = 16;
+ } else if (strncmpi(map_name, "rael", 3) == 0) { // Original town name for 'rachel'
+ town = 23;
+ }
+ }
+
if (town >= 0 && town < ARRAYLENGTH(data)) {
- m = map->mapname2mapid(data[town].map);
+ int16 m = map->mapname2mapid(data[town].map);
if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(247));
return false;
@@ -1901,7 +1848,7 @@ ACMD(go)
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
- } else { // if you arrive here, you have an error in town variable when reading of names
+ } else {
clif->message(fd, msg_txt(38)); // Invalid location number or name.
return false;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 94bcd1d1b..383720361 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8122,7 +8122,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( dstsd && dstsd->special_state.no_magic_damage )
break;
- if ( sd && sd->status.party_id == 0 )
+ if ( sd == NULL || (sd && sd->status.party_id == 0 ) )
count = 1;
else
count = party->foreachsamemap(party->sub_count, sd, 0);
@@ -15285,6 +15285,36 @@ bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce
return wall;
}
+
+/**
+ * Verifies if an user can use SC_CLOAKING
+ **/
+bool skill_can_cloak(struct map_session_data *sd) {
+ nullpo_retr(false, sd);
+
+ //Avoid cloaking with no wall and low skill level. [Skotlex]
+ //Due to the cloaking card, we have to check the wall versus to known
+ //skill level rather than the used one. [Skotlex]
+ //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
+ if (pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(&sd->bl,NULL))
+ return false;
+
+ return true;
+}
+
+/**
+ * Verifies if an user can still be cloaked (AS_CLOAKING)
+ * Is called via map->foreachinrange when any kind of wall disapears
+ **/
+int skill_check_cloaking_end(struct block_list *bl, va_list ap) {
+ TBL_PC *sd = BL_CAST(BL_PC, bl);
+
+ if (sd && sd->sc.data[SC_CLOAKING] && !skill->can_cloak(sd))
+ status_change_end(bl, SC_CLOAKING, INVALID_TIMER);
+
+ return 0;
+}
+
bool skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce)
{
static int dx[] = { 0, 1, 0, -1, -1, 1, 1, -1};
@@ -15433,6 +15463,13 @@ int skill_delunit (struct skill_unit* su) {
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false);
map->list[su->bl.m].icewall_num--;
+ // AS_CLOAKING in low levels requires a wall to be cast, thus it needs to be
+ // checked again when a wall disapears! issue:8182 [Panikon]
+ map->foreachinarea(skill->check_cloaking_end, su->bl.m,
+ // Use 3x3 area to check for users near cell
+ su->bl.x - 1, su->bl.y - 1,
+ su->bl.x + 1, su->bl.x + 1,
+ BL_PC);
break;
case SA_LANDPROTECTOR:
skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,false);
@@ -18535,6 +18572,8 @@ void skill_defaults(void) {
skill->autospell = skill_autospell;
skill->calc_heal = skill_calc_heal;
skill->check_cloaking = skill_check_cloaking;
+ skill->check_cloaking_end = skill_check_cloaking_end;
+ skill->can_cloak = skill_can_cloak;
skill->enchant_elemental_end = skill_enchant_elemental_end;
skill->not_ok = skillnotok;
skill->not_ok_hom = skillnotok_hom;
diff --git a/src/map/skill.h b/src/map/skill.h
index 66d6dc39e..6666fbbf2 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1918,6 +1918,8 @@ struct skill_interface {
int (*autospell) (struct map_session_data *md,uint16 skill_id);
int (*calc_heal) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal);
bool (*check_cloaking) (struct block_list *bl, struct status_change_entry *sce);
+ int (*check_cloaking_end) (struct block_list *bl, va_list ap);
+ bool (*can_cloak) (struct map_session_data *sd);
int (*enchant_elemental_end) (struct block_list *bl, int type);
int (*not_ok) (uint16 skill_id, struct map_session_data *sd);
int (*not_ok_hom) (uint16 skill_id, struct homun_data *hd);
diff --git a/src/map/status.c b/src/map/status.c
index 316dce8e6..a1a7e1969 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6944,11 +6944,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
return 0;
break;
case SC_CLOAKING:
- //Avoid cloaking with no wall and low skill level. [Skotlex]
- //Due to the cloaking card, we have to check the wall versus to known
- //skill level rather than the used one. [Skotlex]
- //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
- if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) )
+ if (sd && !skill->can_cloak(sd))
return 0;
break;
case SC_MODECHANGE:
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index b6202d687..57c34db0d 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -4493,6 +4493,10 @@ struct {
struct HPMHookPoint *HP_skill_calc_heal_post;
struct HPMHookPoint *HP_skill_check_cloaking_pre;
struct HPMHookPoint *HP_skill_check_cloaking_post;
+ struct HPMHookPoint *HP_skill_check_cloaking_end_pre;
+ struct HPMHookPoint *HP_skill_check_cloaking_end_post;
+ struct HPMHookPoint *HP_skill_can_cloak_pre;
+ struct HPMHookPoint *HP_skill_can_cloak_post;
struct HPMHookPoint *HP_skill_enchant_elemental_end_pre;
struct HPMHookPoint *HP_skill_enchant_elemental_end_post;
struct HPMHookPoint *HP_skill_not_ok_pre;
@@ -9534,6 +9538,10 @@ struct {
int HP_skill_calc_heal_post;
int HP_skill_check_cloaking_pre;
int HP_skill_check_cloaking_post;
+ int HP_skill_check_cloaking_end_pre;
+ int HP_skill_check_cloaking_end_post;
+ int HP_skill_can_cloak_pre;
+ int HP_skill_can_cloak_post;
int HP_skill_enchant_elemental_end_pre;
int HP_skill_enchant_elemental_end_post;
int HP_skill_not_ok_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 47a651a49..7cccaeb22 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -2282,6 +2282,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->autospell, HP_skill_autospell) },
{ HP_POP(skill->calc_heal, HP_skill_calc_heal) },
{ HP_POP(skill->check_cloaking, HP_skill_check_cloaking) },
+ { HP_POP(skill->check_cloaking_end, HP_skill_check_cloaking_end) },
+ { HP_POP(skill->can_cloak, HP_skill_can_cloak) },
{ HP_POP(skill->enchant_elemental_end, HP_skill_enchant_elemental_end) },
{ HP_POP(skill->not_ok, HP_skill_not_ok) },
{ HP_POP(skill->not_ok_hom, HP_skill_not_ok_hom) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index cbd822239..f16f7406b 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -60303,6 +60303,66 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *
}
return retVal___;
}
+int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_cloaking_end_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_can_cloak(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_skill_can_cloak_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.can_cloak(sd);
+ }
+ if( HPMHooks.count.HP_skill_can_cloak_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
int HP_skill_enchant_elemental_end(struct block_list *bl, int type) {
int hIndex = 0;
int retVal___ = 0;