summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/help.txt2
-rw-r--r--conf/messages.conf1
-rw-r--r--db/const.txt1
-rw-r--r--db/job_db2.txt2
-rw-r--r--db/pre-re/exp.txt4
-rw-r--r--db/pre-re/job_db1.txt2
-rw-r--r--db/pre-re/skill_db.txt26
-rw-r--r--db/pre-re/skill_require_db.txt28
-rw-r--r--db/pre-re/skill_tree.conf90
-rw-r--r--db/re/exp.txt4
-rw-r--r--db/re/job_db1.txt2
-rw-r--r--db/re/skill_db.txt26
-rw-r--r--db/re/skill_require_db.txt28
-rw-r--r--db/re/skill_tree.conf84
-rw-r--r--doc/item_db.txt1
-rw-r--r--src/common/mmo.h1
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/clif.c32
-rw-r--r--src/map/duel.h8
-rw-r--r--src/map/elemental.c102
-rw-r--r--src/map/elemental.h43
-rw-r--r--src/map/guild.c262
-rw-r--r--src/map/guild.h63
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/instance.c171
-rw-r--r--src/map/instance.h7
-rw-r--r--src/map/intif.c665
-rw-r--r--src/map/intif.h104
-rw-r--r--src/map/itemdb.c5
-rw-r--r--src/map/log.c49
-rw-r--r--src/map/log.h42
-rw-r--r--src/map/map.c16
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/mercenary.c43
-rw-r--r--src/map/mercenary.h16
-rw-r--r--src/map/packets.h35
-rw-r--r--src/map/party.c155
-rw-r--r--src/map/party.h48
-rw-r--r--src/map/pc.c27
-rw-r--r--src/map/pc.h5
-rw-r--r--src/map/script.c30
-rw-r--r--src/map/skill.c40
-rw-r--r--src/map/skill.h25
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/storage.c47
-rw-r--r--src/map/storage.h10
-rw-r--r--src/map/unit.c2
48 files changed, 1418 insertions, 949 deletions
diff --git a/conf/help.txt b/conf/help.txt
index 18630bf59..211ed5b19 100644
--- a/conf/help.txt
+++ b/conf/help.txt
@@ -102,7 +102,7 @@ jobchange: "Params: <job name|ID>\n" "Changes your job.\n"
" 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby\n"
"4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi\n"
"4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby\n"
- "4211 Kagerou 4212 Oboro\n"
+ "4211 Kagerou 4212 Oboro 4215 Rebellion\n"
"----- Baby Novice And Baby 1st Class -----\n"
"4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer\n"
"4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief\n"
diff --git a/conf/messages.conf b/conf/messages.conf
index d7b25a258..fc8599f5b 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -652,6 +652,7 @@
691: Sura T
692: Genetic T
693: Shadow Chaser T
+694: Rebellion
//------------------------------------
diff --git a/db/const.txt b/db/const.txt
index 81421eac6..544638efb 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -164,6 +164,7 @@ Job_Super_Baby_E 4191
Job_Kagerou 4211
Job_Oboro 4212
+Job_Rebellion 4215
EAJL_2_1 0x100
EAJL_2_2 0x200
diff --git a/db/job_db2.txt b/db/job_db2.txt
index a36cc3d88..5c5f9a445 100644
--- a/db/job_db2.txt
+++ b/db/job_db2.txt
@@ -287,3 +287,5 @@
4211,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5
// Oboro
4212,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5
+// Rebellion
+4215,5,6,0,6,0,5,0,0,0,6,5,6,0,0,4,0,5,0,0,5,6,0,0,0,5,2,0,0,0,3,6,1,0,0,5,4,0,0,5,0,1,0,6,0,5,0,0,1,0,1
diff --git a/db/pre-re/exp.txt b/db/pre-re/exp.txt
index 0bb010b7c..7fff53932 100644
--- a/db/pre-re/exp.txt
+++ b/db/pre-re/exp.txt
@@ -53,7 +53,7 @@
//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
-99,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217,4559382,5129260,5488173,5859059,6241919,7374168,9570662,10458427,11380262,12336168,13326144,14994907,16130400,17304200,18516326,19766760,21085096,22473939,23935933,25473761,27090141,28787825,30569594,32438257,34396650,36447628,38594068,40838862,43184915,45635142,48192464,50859807,53640095,56536248,59551182,62687799,65948990,69337627,72856561,76508620,80296602,84223275,88291372,92503586,96862571,101370933,106031232,110845975,115817614,120948544,126241098,131697545,137320088,143110859,149071919,155205253,161512770,167996297,174657580,181498280,188519973,195724146,203112195,210685425,218445048,226392181,234527844,242852961,251368358,260074760,268972793,278062983,287345754,296821429,306490229,316352273,326407578,336656059,347097530,357731703,368558190,379576502,390786051,402186149,413776012,425554759,437521412,449674899,462014055,474537623,487244256,500132518,513200886,526447751,539871420,553470119,567241993,581185110,595297462,609576966,624021468,638628745,653396504,668322389,683403980,698638797,714024301,729557897,745236936,761058717,777020492,793119465,809352795,825717601,842210961,858829917,875571475,892432609,909410264,926501355,943702774,961011389,978424047,995937576,1013548788,1031254481,1049051440,1066936441,1084906252,1102957634,1121087346,1139292145,1157568786,1175914029,1194324635,1212797373,1231329018,1249916355,1268556179,1287245299,1305980536,1324758729,1343576732,1362431419,1381319683,1400238439,1419184625,1438155202,1457147157,1476157502,1495183278,1514221554,1533269429,1552324031,1571382520,1590442090,1609499966,1628553409,1647599713,1666636209,1685660263,1704669278,1723660695,1742631992,1761580687,1780504336,1799400534,1818266916,1837101157,1855900974,1874664122,1893388399,1912071644,1930711737,1949306600,1967854196,1986352530,2004799649,2023193642,2041532640,2059814816,2078038384,2096201600,2114302763,2132340212,2150312328,2168217533,2186054291,2203821106,2221516523,2239139127,2256687544,2274160439,2291556517,2308874523,2326113241,2343271492,2360348137,2377342074,2394252239,2411077605,2427817182,2444470016,2461035190,2477511822,2493899065,2510196107,2526402170,2542516509,2558538414,2574467207,2590302243,2606042908,2621688620,2637238829,2652693014,2668050684,2683311379,2698474666,2713540143,2728507434,2743376192,2758146097,2772816855,2787388198,2801859883,2816231694,2830503439,2844674950,2858746082,2872716714,2886586747,2900356105,2914024733,2927592598,2941059688,2954426010,2967691593,2980856483,2993920747,3006884469,3019747752,3032510717,3045173501,3057736259,3070199161,3082562393,3094826158,3106990673,3119056170,3131022894,3142891106,3154661079,3166333099,3177907466,3189384491,3200764497,3212047820,3223234805,3234325809,3245321200,3256221356,3267026664,3277737521,3288354333,3298877514,3309307489,3319644689,3329889553,3340042528,3350104069,3360074637,3369954700,3379744733,3389445216,3399056636,3408579485,3418014261,3427361466,3436621608,3445795199,3454882755,3463884797,3472801849,3481634440,3490383101,3499048368,3507630778,3516130872,3524549194,3532886290,3541142708,3549318998,3557415713,3565433406,3573372633,3581233950,3589017916,3596725090,3604356032,3611911302,3619391462,3626797073,3634128697,3641386897,3648572235,3655685273,3662726573,3669696697,3676596205,3683425658,3690185617,3696876640,3703499285,3710054109,3716541669,3722962519,3729317213,3735606303,3741830339,3747989871,3754085446,3760117610,3766086907,3771993879,3777839066,3783623006,3789346235,3795009287,3800612694,3806156985,3811642688,3817070327,3822440424,3827753500,3833010071,3838210653,3843355757,3848445893,3853481568,3858463286,3863391548,3868266853,3873089696,3877860570,3882579965,3887248368,3891866263,3896434130,3900952448,3905421692,3909842333,3914214841,3918539681,3922817316,3927048205,3931232805,3935371569,3939464947,3943513385,3947517328,3951477216,3955393486,3959266573,3963096907,3966884916,3970631025,3974335655,3977999224,3981622147,3985204835,3988747697,3992251137,3995715558,3999141358,4002528933,4005878676,4009190975,4012466216,4015704782,4018907052,4022073402,4025204206,4028299834,4031360652,4034387025,4037379312,4040337871,4043263057,4046155220,4049014709,4051841869,4054637042,4057400566,4060132778,4062834010,4065504592,4068144851,4070755111,4073335693,4075886914,4078409090,4080902532,4083367550,4085804450,4088213536,4090595108,4092949463,4095276897,4097577701,4099852165,4102100575,4104323215,4106520366,4108692307,4110839312,4112961655,4115059606,4117133433,4119183400,4121209770,4123212802,4125192754,4127149880,4129084433,4130996662,4132886814,4134755133,4136601862,4138427240,4140231505,4142014891,4143777631,4145519954,4147242089,4148944261,4150626693,4152289606,4153933218,4155557746,4157163403,4158750402,4160318952,4161869260,4163401532,4164915971,4166412777,4167892150,4169354286,4170799380,4172227625,4173639211,4175034327,4176413160,4177775894,4179122712,4180453795,4181769321,4183069467,4184354408,4185624318,4186879367,4188119725,4189345560,4190557037,4191754321,4192937573,4194106954,4195262623,4196404736,4197533449,4198648916,4199751289,4200840717,4201917350,4202981334,4204032815,4205071936,4206098840,4207113668,4208116558,4209107648,4210087074,4211054971,4212011472,4212956708,4213890810,4214813906,4215726123,4216627588,4217518424,4218398755,4219268703,4220128387,4220977927,4221817441,4222647044,4223466852,4224276979,4225077537,4225868637,4226650390,4227422904,4228186286,4228940643,4229686080,4230422700,4231150607,4231869902,4232580686,4233283058,4233977116,4234662957,4235340677,4236010370,4236672131,4237326053,4237972227,4238610743,4239241692,4239865161,4240481239,4241090012,4241691565,4242285983,4242873350,4243453749,4244027261,4244593967,4245153947,4245707279,4246254042,4246794313,4247328169,4247855684,4248376933,4248891990,4249400928,4249903818,4250400732,4250891740,4251376912,4251856316,4252330020,4252798092,4253260597,4253717602,4254169171,4254615368,4255056257,4255491900,4255922359,4256347695,4256767969,4257183240,4257593568,4257999011,4258399627,4258795472,4259186603,4259573076,4259954946,4260332267,4260705093,4261073477,4261437472,4261797129,4262152500,4262503636,4262850586,4263193401,4263532129,4263866819,4264197518,4264524274,4264847134,4265166143,4265481348,4265792793,4266100523,4266404582,4266705014,4267001861,4267295166,4267584971,4267871318,4268154248,4268433801,4268710017,4268982936,4269252597,4269519039,4269782300,4270042418,4270299430,4270553373,4270804284,4271052198,4271297151,4271539179,4271778316,4272014596,4272248054,4272478723,4272706636,4272931826,4273154325,4273374166,4273591380,4273805998,4274018051,4274227570,4274434585,4274639125,4274841221,4275040901,4275238194,4275433128,4275625732,4275816033,4276004059,4276189837,4276373393,4276554754,4276733946,4276910995,4277085927,4277258767,4277429540,4277598270,4277764982,4277929700,4278092447,4278253247,4278412124,4278569100,4278724198,4278877440,4279028849,4279178446,4279326253,4279472291,4279616582,4279759146,4279900004,4280039176,4280176683,4280312544,4280446779,4280579407,4280710448,4280839920,4280967842,4281094233,4281219111,4281342494,4281464400,4281584846,4281703850,4281821429,4281937601,4282052382,4282165788,4282277836,4282388543,4282497924,4282605995,4282712772,4282818270,4282922505,4283025492,4283127245,4283227779,4283327109,4283425250,4283522215,4283618019,4283712675,4283806197,4283898599,4283989894,4284080096,4284169217,4284257270,4284344268,4284430224,4284515150,4284599059,4284681963,4284763873,4284844802,4284924761,4285003762,4285081817,4285158936,4285235131,4285310413,4285384793,4285458282,4285530890,4285602628,4285673507,4285743536,4285812726,4285881087,4285948628,4286015360,4286081292,4286146434,4286210795,4286274385,4286337213,4286399288,4286460619,4286521215,4286581084,4286640236,4286698679,4286756421,4286813471,4286869837,4286925527,4286980550,4287034913,4287088625,4287141693,4287194125,4287245928,4287297110,4287347678,4287397640,4287447003,4287495774,4287543961,4287591570,4287638608,4287685082,4287730999,4287776365,4287821187,4287865472,4287909226,4287952455,4287995166,4288037365,4288079058,4288120251,4288160950,4288201161,4288240890,4288280143,4288318925,4288357242,4288395099,4288432502,4288469457,4288505969,4288542043,4288577684,4288612898,4288647690,4288682064,4288716026,4288749581,4288782733,4288815488,4288847850,4288879824,4288911414,4288942626,4288973463,4289003930,4289034032,4289063773,4289093157,4289122189,4289150873,4289179213,4289207213,4289234877,4289262209,4289289213,4289315893,4289342253,4289368297,4289394029,4289419452,4289444570,4289469387,4289493906,4289518131,4289542066,4289565714,4289589078,4289612162,4289634969,4289657502,4289679765,4289701761,4289723493,4289744964,4289766178,4289787137,4289807845,4289828305,4289848519,4289868491,4289888223,4289907718,4289926979,4289946009,4289964811,4289983388,4290001742,4290019876,4290037792,4290055493,4290072982,4290090261,4290107333,4290124200,4290140865,4290157330,4290173597,4290189669,4290205548,4290221237,4290236737,4290252051,4290267182,4290282131,4290296901,4290311494,4290325912,4290340157,4290354231,4290368136,4290381874,4290395447,4290408857,4290422107,4290435198,4290448132,4290460910,4290473535,4290486009,4290498333,4290510509,4290522539,4290534425,4290546168,4290557770,4290569233,4290580558,4290591748,4290602803,4290613726,4290624518,4290635180,4290645714,4290656122,4290666405,4290676565,4290686603,4290696520,4290706318,4290715999,4290725564,4290735014,4290744350,4290753574,4290762688,4290771692,4290780588,4290789378,4290798062,4290806642,4290815119,4290823494,4290831769,4290839944,4290848021,4290856001,4290863886,4290871676,4290879373,4290886977,4290894490,4290901913,4290909247,4290916493,4290923652,4290930725,4290937713,4290944617,4290951438,4290958178,4290964837,4290971416,4290977916,4290984338,4290990683,4290996952,4291003145,4291009264,4291015310,4291021283,4291027184,4291033015,4291038776,4291044468,4291050091,4291055647,4291061136,4291066559,4291071917,4291077211,4291082441,4291087609,4291092715,4291097759,4291102743,4291107667,4291112532,4291117338,4291122087,4291126779
+99,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217,4559382,5129260,5488173,5859059,6241919,7374168,9570662,10458427,11380262,12336168,13326144,14994907,16130400,17304200,18516326,19766760,21085096,22473939,23935933,25473761,27090141,28787825,30569594,32438257,34396650,36447628,38594068,40838862,43184915,45635142,48192464,50859807,53640095,56536248,59551182,62687799,65948990,69337627,72856561,76508620,80296602,84223275,88291372,92503586,96862571,101370933,106031232,110845975,115817614,120948544,126241098,131697545,137320088,143110859,149071919,155205253,161512770,167996297,174657580,181498280,188519973,195724146,203112195,210685425,218445048,226392181,234527844,242852961,251368358,260074760,268972793,278062983,287345754,296821429,306490229,316352273,326407578,336656059,347097530,357731703,368558190,379576502,390786051,402186149,413776012,425554759,437521412,449674899,462014055,474537623,487244256,500132518,513200886,526447751,539871420,553470119,567241993,581185110,595297462,609576966,624021468,638628745,653396504,668322389,683403980,698638797,714024301,729557897,745236936,761058717,777020492,793119465,809352795,825717601,842210961,858829917,875571475,892432609,909410264,926501355,943702774,961011389,978424047,995937576,1013548788,1031254481,1049051440,1066936441,1084906252,1102957634,1121087346,1139292145,1157568786,1175914029,1194324635,1212797373,1231329018,1249916355,1268556179,1287245299,1305980536,1324758729,1343576732,1362431419,1381319683,1400238439,1419184625,1438155202,1457147157,1476157502,1495183278,1514221554,1533269429,1552324031,1571382520,1590442090,1609499966,1628553409,1647599713,1666636209,1685660263,1704669278,1723660695,1742631992,1761580687,1780504336,1799400534,1818266916,1837101157,1855900974,1874664122,1893388399,1912071644,1930711737,1949306600,1967854196,1986352530,2004799649,2023193642,2041532640,2059814816,2078038384,2096201600,2114302763,2132340212,2150312328,2168217533,2186054291,2203821106,2221516523,2239139127,2256687544,2274160439,2291556517,2308874523,2326113241,2343271492,2360348137,2377342074,2394252239,2411077605,2427817182,2444470016,2461035190,2477511822,2493899065,2510196107,2526402170,2542516509,2558538414,2574467207,2590302243,2606042908,2621688620,2637238829,2652693014,2668050684,2683311379,2698474666,2713540143,2728507434,2743376192,2758146097,2772816855,2787388198,2801859883,2816231694,2830503439,2844674950,2858746082,2872716714,2886586747,2900356105,2914024733,2927592598,2941059688,2954426010,2967691593,2980856483,2993920747,3006884469,3019747752,3032510717,3045173501,3057736259,3070199161,3082562393,3094826158,3106990673,3119056170,3131022894,3142891106,3154661079,3166333099,3177907466,3189384491,3200764497,3212047820,3223234805,3234325809,3245321200,3256221356,3267026664,3277737521,3288354333,3298877514,3309307489,3319644689,3329889553,3340042528,3350104069,3360074637,3369954700,3379744733,3389445216,3399056636,3408579485,3418014261,3427361466,3436621608,3445795199,3454882755,3463884797,3472801849,3481634440,3490383101,3499048368,3507630778,3516130872,3524549194,3532886290,3541142708,3549318998,3557415713,3565433406,3573372633,3581233950,3589017916,3596725090,3604356032,3611911302,3619391462,3626797073,3634128697,3641386897,3648572235,3655685273,3662726573,3669696697,3676596205,3683425658,3690185617,3696876640,3703499285,3710054109,3716541669,3722962519,3729317213,3735606303,3741830339,3747989871,3754085446,3760117610,3766086907,3771993879,3777839066,3783623006,3789346235,3795009287,3800612694,3806156985,3811642688,3817070327,3822440424,3827753500,3833010071,3838210653,3843355757,3848445893,3853481568,3858463286,3863391548,3868266853,3873089696,3877860570,3882579965,3887248368,3891866263,3896434130,3900952448,3905421692,3909842333,3914214841,3918539681,3922817316,3927048205,3931232805,3935371569,3939464947,3943513385,3947517328,3951477216,3955393486,3959266573,3963096907,3966884916,3970631025,3974335655,3977999224,3981622147,3985204835,3988747697,3992251137,3995715558,3999141358,4002528933,4005878676,4009190975,4012466216,4015704782,4018907052,4022073402,4025204206,4028299834,4031360652,4034387025,4037379312,4040337871,4043263057,4046155220,4049014709,4051841869,4054637042,4057400566,4060132778,4062834010,4065504592,4068144851,4070755111,4073335693,4075886914,4078409090,4080902532,4083367550,4085804450,4088213536,4090595108,4092949463,4095276897,4097577701,4099852165,4102100575,4104323215,4106520366,4108692307,4110839312,4112961655,4115059606,4117133433,4119183400,4121209770,4123212802,4125192754,4127149880,4129084433,4130996662,4132886814,4134755133,4136601862,4138427240,4140231505,4142014891,4143777631,4145519954,4147242089,4148944261,4150626693,4152289606,4153933218,4155557746,4157163403,4158750402,4160318952,4161869260,4163401532,4164915971,4166412777,4167892150,4169354286,4170799380,4172227625,4173639211,4175034327,4176413160,4177775894,4179122712,4180453795,4181769321,4183069467,4184354408,4185624318,4186879367,4188119725,4189345560,4190557037,4191754321,4192937573,4194106954,4195262623,4196404736,4197533449,4198648916,4199751289,4200840717,4201917350,4202981334,4204032815,4205071936,4206098840,4207113668,4208116558,4209107648,4210087074,4211054971,4212011472,4212956708,4213890810,4214813906,4215726123,4216627588,4217518424,4218398755,4219268703,4220128387,4220977927,4221817441,4222647044,4223466852,4224276979,4225077537,4225868637,4226650390,4227422904,4228186286,4228940643,4229686080,4230422700,4231150607,4231869902,4232580686,4233283058,4233977116,4234662957,4235340677,4236010370,4236672131,4237326053,4237972227,4238610743,4239241692,4239865161,4240481239,4241090012,4241691565,4242285983,4242873350,4243453749,4244027261,4244593967,4245153947,4245707279,4246254042,4246794313,4247328169,4247855684,4248376933,4248891990,4249400928,4249903818,4250400732,4250891740,4251376912,4251856316,4252330020,4252798092,4253260597,4253717602,4254169171,4254615368,4255056257,4255491900,4255922359,4256347695,4256767969,4257183240,4257593568,4257999011,4258399627,4258795472,4259186603,4259573076,4259954946,4260332267,4260705093,4261073477,4261437472,4261797129,4262152500,4262503636,4262850586,4263193401,4263532129,4263866819,4264197518,4264524274,4264847134,4265166143,4265481348,4265792793,4266100523,4266404582,4266705014,4267001861,4267295166,4267584971,4267871318,4268154248,4268433801,4268710017,4268982936,4269252597,4269519039,4269782300,4270042418,4270299430,4270553373,4270804284,4271052198,4271297151,4271539179,4271778316,4272014596,4272248054,4272478723,4272706636,4272931826,4273154325,4273374166,4273591380,4273805998,4274018051,4274227570,4274434585,4274639125,4274841221,4275040901,4275238194,4275433128,4275625732,4275816033,4276004059,4276189837,4276373393,4276554754,4276733946,4276910995,4277085927,4277258767,4277429540,4277598270,4277764982,4277929700,4278092447,4278253247,4278412124,4278569100,4278724198,4278877440,4279028849,4279178446,4279326253,4279472291,4279616582,4279759146,4279900004,4280039176,4280176683,4280312544,4280446779,4280579407,4280710448,4280839920,4280967842,4281094233,4281219111,4281342494,4281464400,4281584846,4281703850,4281821429,4281937601,4282052382,4282165788,4282277836,4282388543,4282497924,4282605995,4282712772,4282818270,4282922505,4283025492,4283127245,4283227779,4283327109,4283425250,4283522215,4283618019,4283712675,4283806197,4283898599,4283989894,4284080096,4284169217,4284257270,4284344268,4284430224,4284515150,4284599059,4284681963,4284763873,4284844802,4284924761,4285003762,4285081817,4285158936,4285235131,4285310413,4285384793,4285458282,4285530890,4285602628,4285673507,4285743536,4285812726,4285881087,4285948628,4286015360,4286081292,4286146434,4286210795,4286274385,4286337213,4286399288,4286460619,4286521215,4286581084,4286640236,4286698679,4286756421,4286813471,4286869837,4286925527,4286980550,4287034913,4287088625,4287141693,4287194125,4287245928,4287297110,4287347678,4287397640,4287447003,4287495774,4287543961,4287591570,4287638608,4287685082,4287730999,4287776365,4287821187,4287865472,4287909226,4287952455,4287995166,4288037365,4288079058,4288120251,4288160950,4288201161,4288240890,4288280143,4288318925,4288357242,4288395099,4288432502,4288469457,4288505969,4288542043,4288577684,4288612898,4288647690,4288682064,4288716026,4288749581,4288782733,4288815488,4288847850,4288879824,4288911414,4288942626,4288973463,4289003930,4289034032,4289063773,4289093157,4289122189,4289150873,4289179213,4289207213,4289234877,4289262209,4289289213,4289315893,4289342253,4289368297,4289394029,4289419452,4289444570,4289469387,4289493906,4289518131,4289542066,4289565714,4289589078,4289612162,4289634969,4289657502,4289679765,4289701761,4289723493,4289744964,4289766178,4289787137,4289807845,4289828305,4289848519,4289868491,4289888223,4289907718,4289926979,4289946009,4289964811,4289983388,4290001742,4290019876,4290037792,4290055493,4290072982,4290090261,4290107333,4290124200,4290140865,4290157330,4290173597,4290189669,4290205548,4290221237,4290236737,4290252051,4290267182,4290282131,4290296901,4290311494,4290325912,4290340157,4290354231,4290368136,4290381874,4290395447,4290408857,4290422107,4290435198,4290448132,4290460910,4290473535,4290486009,4290498333,4290510509,4290522539,4290534425,4290546168,4290557770,4290569233,4290580558,4290591748,4290602803,4290613726,4290624518,4290635180,4290645714,4290656122,4290666405,4290676565,4290686603,4290696520,4290706318,4290715999,4290725564,4290735014,4290744350,4290753574,4290762688,4290771692,4290780588,4290789378,4290798062,4290806642,4290815119,4290823494,4290831769,4290839944,4290848021,4290856001,4290863886,4290871676,4290879373,4290886977,4290894490,4290901913,4290909247,4290916493,4290923652,4290930725,4290937713,4290944617,4290951438,4290958178,4290964837,4290971416,4290977916,4290984338,4290990683,4290996952,4291003145,4291009264,4291015310,4291021283,4291027184,4291033015,4291038776,4291044468,4291050091,4291055647,4291061136,4291066559,4291071917,4291077211,4291082441,4291087609,4291092715,4291097759,4291102743,4291107667,4291112532,4291117338,4291122087,4291126779
//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
-50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,1,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1943306,2244059,2584282,2968115,3400000,3884688,4427246,5033064,5707855,6457661,7288852,8208125,9222500,10339317,11566230,12911197,14382470,15988583,17738338,19640789,21705223,23941143,26358244,28966392,31775600,34796000,38037819,41511350,45226922,49194872,53425513,57929105,62715823,67795725,73178721,78874542,84892710,91242506,97932943,104972733,112370263,120133566,128270295,136787699,145692601,154991375,164689926,174793673,185307530,196235893,207582627,219351052,231543938,244163492,257211358,270688607,284595740,298932685,313698799,328892871,344513126,360557232,377022309,393904936,411201163,428906522,447016041,465524258,484425237,503712583,523379460,543418608,563822364,584582678,605691135,627138976,648917115,671016163,693426449,716138040,739140762,762424222,785977830,809790819,833852265,858151108,882676174,907416194,932359821,957495652,982812246,1008298142,1033941875,1059731995,1085657082,1111705763,1137866726,1164128735,1190480643,1216911407,1243410098,1269965914,1296568193,1323206421,1349870242,1376549469,1403234090,1429914278,1456580397,1483223010,1509832883,1536400993,1562918530,1589376904,1615767747,1642082917,1668314501,1694454815,1720496409,1746432067,1772254807,1797957882,1823534782,1848979230,1874285184,1899446836,1924458610,1949315159,1974011367,1998542342,2022903418,2047090150,2071098310,2094923887,2118563083,2142012307,2165268175,2188327503,2211187307,2233844796,2256297369,2278542611,2300578289,2322402347,2344012903,2365408244,2386586822,2407547248,2428288289,2448808865,2469108042,2489185029,2509039173,2528669956,2548076989,2567260008,2586218871,2604953553,2623464142,2641750834,2659813929,2677653830,2695271035,2712666136,2729839813,2746792832,2763526041,2780040365,2796336805,2812416433,2828280388,2843929874,2859366157,2874590560,2889604462,2904409294,2919006536,2933397714,2947584399,2961568203,2975350775,2988933801,3002319001,3015508125,3028502953,3041305291,3053916970,3066339843,3078575783,3090626683,3102494451,3114181011,3125688300,3137018266,3148172868,3159154072,3169963851,3180604184,3191077054,3201384446,3211528348,3221510747,3231333629,3240998979,3250508779,3259865006,3269069632,3278124624,3287031942,3295793538,3304411356,3312887331,3321223387,3329421440,3337483392,3345411135,3353206549,3360871500,3368407842,3375817414,3383102041,3390263534,3397303689,3404224286,3411027090,3417713850,3424286299,3430746152,3437095109,3443334852,3449467047,3455493342,3461415367,3467234735,3472953041,3478571863,3484092761,3489517276,3494846931,3500083232,3505227667,3510281705,3515246797,3520124376,3524915857,3529622637,3534246095,3538787592,3543248471,3547630058,3551933659,3556160565,3560312047,3564389360,3568393741,3572326410,3576188570,3579981406,3583706087,3587363764,3590955573,3594482632,3597946043,3601346892,3604686248,3607965165,3611184681,3614345817,3617449581,3620496963,3623488939,3626426470,3629310502,3632141966,3634921779,3637650842,3640330044,3642960259,3645542346,3648077152,3650565509,3653008236,3655406140,3657760013,3660070635,3662338774,3664565184,3666750607,3668895774,3671001402,3673068197,3675096854,3677088055,3679042471,3680960763,3682843579,3684691557,3686505325,3688285499,3690032685,3691747478,3693430465,3695082220,3696703310,3698294290,3699855707,3701388097,3702891989,3704367901,3705816342,3707237813,3708632806,3710001804,3711345282,3712663706,3713957535,3715227220,3716473203,3717695918,3718895792,3720073245,3721228689,3722362528,3723475160,3724566975,3725638356,3726689680,3727721318,3728733632,3729726979,3730701710,3731658168,3732596692,3733517613,3734421257,3735307945,3736177990,3737031701,3737869381,3738691328,3739497833,3740289184,3741065662,3741827543,3742575099,3743308597,3744028298,3744734459,3745427333,3746107167,3746774204,3747428682,3748070836,3748700896,3749319088,3749925634,3750520750,3751104651,3751677546,3752239641,3752791138,3753332236,3753863129,3754384008,3754895060,3755396470,3755888418,3756371081,3756844634,3757309248,3757765090,3758212325,3758651114,3759081616,3759503986,3759918377,3760324939,3760723819,3761115161,3761499107,3761875797,3762245366,3762607949,3762963676,3763312677,3763655079,3763991005,3764320578,3764643917,3764961140,3765272361,3765577694,3765877250,3766171137,3766459463,3766742332,3767019847,3767292109,3767559217,3767821269,3768078359,3768330582,3768578029,3768820790,3769058954,3769292607,3769521835,3769746721,3769967347,3770183794,3770396141,3770604465,3770808842,3771009346,3771206051,3771399029,3771588350,3771774083,3771956296,3772135055,3772310426,3772482473,3772651259,3772816845,3772979292,3773138659,3773295005,3773448386,3773598859,3773746479,3773891300,3774033375,3774172755,3774309492,3774443636,3774575236,3774704340,3774830995,3774955248,3775077144,3775196728,3775314043,3775429133,3775542040,3775652805,3775761468,3775868070,3775972649,3776075244,3776175892,3776274631,3776371496,3776466523,3776559747,3776651202,3776740921,3776828938,3776915285,3776999993,3777083093,3777164616,3777244592,3777323050,3777400019,3777475527,3777549602,3777622271,3777693560,3777763496,3777832105,3777899411,3777965440,3778030215,3778093760,3778156099,3778217255,3778277250,3778336106,3778393844,3778450486,3778506053,3778560565,3778614042,3778666503,3778717968,3778768456,3778817986,3778866575,3778914242,3778961003,3779006877,3779051880,3779096028,3779139338,3779181825,3779223505,3779264394,3779304506,3779343857,3779382460,3779420330,3779457481,3779493927,3779529681,3779564756,3779599164,3779632919,3779666033,3779698518,3779730386,3779761649,3779792318,3779822405,3779851920,3779880875,3779909280,3779937145,3779964481,3779991298,3780017605,3780043413,3780068731,3780093568,3780117933,3780141835,3780165283,3780188286,3780210852,3780232989,3780254706,3780276010,3780296909,3780317412,3780337525,3780357256,3780376612,3780395601,3780414229,3780432503,3780450430,3780468016,3780485268,3780502193,3780518796,3780535084,3780551062,3780566737,3780582114,3780597199,3780611997,3780626514,3780640755,3780654726,3780668431,3780681876,3780695066,3780708005,3780720698,3780733150,3780745366,3780757349,3780769105,3780780637,3780791950,3780803048,3780813936,3780824617,3780835095,3780845374,3780855458,3780865350,3780875054,3780884574,3780893913,3780903074,3780912061,3780920878,3780929527,3780938012,3780946336,3780954501,3780962511,3780970369,3780978078,3780985640,3780993059,3781000337,3781007476,3781014480,3781021351,3781028091,3781034703,3781041189,3781047552,3781053794,3781059918,3781065925,3781071818,3781077599,3781083270,3781088834,3781094292,3781099646,3781104899,3781110052,3781115107,3781120066,3781124931,3781129703,3781134384,3781138976,3781143481,3781147901,3781152237,3781156490,3781160662,3781164755,3781168770,3781172709,3781176573,3781180364,3781184083,3781187731,3781191310,3781194821,3781198265,3781201644,3781204958,3781208209,3781211399,3781214528,3781217598,3781220609,3781223563,3781226461,3781229304,3781232093,3781234829,3781237513,3781240146,3781242729,3781245263,3781247749,3781250187,3781252579,3781254926,3781257228,3781259486,3781261701,3781263874,3781266006,3781268097,3781270149,3781272162,3781274136,3781276073,3781277973,3781279837,3781281666,3781283460,3781285220,3781286946,3781288639,3781290300,3781291930,3781293529,3781295097,3781296636,3781298145,3781299626,3781301078,3781302503,3781303901,3781305272,3781306617,3781307937,3781309231,3781310501,3781311747,3781312969,3781314168,3781315344,3781316498,3781317630,3781318740,3781319829,3781320897,3781321945,3781322973,3781323982,3781324972,3781325943,3781326895,3781327829,3781328745,3781329644,3781330526,3781331391,3781332240,3781333073,3781333890,3781334691,3781335477,3781336248,3781337004,3781337746,3781338474,3781339188,3781339888,3781340575,3781341249,3781341910,3781342559,3781343195,3781343819,3781344431,3781345032,3781345621,3781346199,3781346766,3781347322,3781347868,3781348403,3781348928,3781349443,3781349948,3781350444,3781350930,3781351407,3781351875,3781352334,3781352784,3781353226,3781353659,3781354084,3781354501,3781354910,3781355311,3781355705,3781356091,3781356470,3781356842,3781357207,3781357565,3781357916,3781358260,3781358598,3781358929,3781359254,3781359573,3781359886,3781360193,3781360494,3781360789,3781361079,3781361363,3781361642,3781361915,3781362183,3781362446,3781362704,3781362957,3781363205,3781363449,3781363688,3781363922,3781364152,3781364378,3781364599,3781364816,3781365029,3781365238,3781365443,3781365644,3781365841,3781366034,3781366224,3781366410,3781366593,3781366772,3781366948,3781367120,3781367289,3781367455,3781367618,3781367778,3781367934,3781368088,3781368239,3781368387,3781368532,3781368674,3781368813,3781368950,3781369084,3781369216,3781369345,3781369472,3781369596,3781369718,3781369838,3781369955,3781370070,3781370183,3781370294,3781370403,3781370509,3781370613,3781370715,3781370815,3781370914,3781371011,3781371106,3781371199,3781371290,3781371380,3781371468,3781371554,3781371638,3781371721,3781371802,3781371882,3781371960,3781372037,3781372112,3781372186,3781372258,3781372329,3781372399,3781372467,3781372534,3781372600,3781372664,3781372727,3781372789,3781372850,3781372910,3781372969,3781373026,3781373082,3781373137,3781373191,3781373244,3781373296,3781373347,3781373397,3781373446,3781373494,3781373541,3781373587,3781373632,3781373677,3781373721,3781373764,3781373806,3781373847,3781373887,3781373927,3781373966,3781374004,3781374041,3781374078,3781374114,3781374149,3781374184,3781374218,3781374251,3781374284,3781374316,3781374347,3781374378,3781374408,3781374438,3781374467,3781374496,3781374524,3781374551,3781374578,3781374604,3781374630,3781374655,3781374680,3781374704,3781374728,3781374751,3781374774,3781374797,3781374819,3781374841,3781374862,3781374883,3781374903,3781374923,3781374943,3781374962,3781374981,3781375000,3781375018,3781375036,3781375053,3781375070,3781375087,3781375103,3781375119,3781375135,3781375151,3781375166,3781375181,3781375196,3781375210,3781375224,3781375238,3781375252,3781375265,3781375278,3781375291,3781375303,3781375315,3781375327,3781375339,3781375351,3781375362,3781375373,3781375384,3781375395,3781375405,3781375415,3781375425,3781375435,3781375445,3781375454,3781375463,3781375472,3781375481,3781375490,3781375499,3781375507,3781375515,3781375523,3781375531,3781375539,3781375547,3781375554,3781375561,3781375568,3781375575,3781375582,3781375589,3781375596,3781375602,3781375608,3781375614,3781375620,3781375626,3781375632,3781375638,3781375644,3781375649,3781375654,3781375659,3781375664
+50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1943306,2244059,2584282,2968115,3400000,3884688,4427246,5033064,5707855,6457661,7288852,8208125,9222500,10339317,11566230,12911197,14382470,15988583,17738338,19640789,21705223,23941143,26358244,28966392,31775600,34796000,38037819,41511350,45226922,49194872,53425513,57929105,62715823,67795725,73178721,78874542,84892710,91242506,97932943,104972733,112370263,120133566,128270295,136787699,145692601,154991375,164689926,174793673,185307530,196235893,207582627,219351052,231543938,244163492,257211358,270688607,284595740,298932685,313698799,328892871,344513126,360557232,377022309,393904936,411201163,428906522,447016041,465524258,484425237,503712583,523379460,543418608,563822364,584582678,605691135,627138976,648917115,671016163,693426449,716138040,739140762,762424222,785977830,809790819,833852265,858151108,882676174,907416194,932359821,957495652,982812246,1008298142,1033941875,1059731995,1085657082,1111705763,1137866726,1164128735,1190480643,1216911407,1243410098,1269965914,1296568193,1323206421,1349870242,1376549469,1403234090,1429914278,1456580397,1483223010,1509832883,1536400993,1562918530,1589376904,1615767747,1642082917,1668314501,1694454815,1720496409,1746432067,1772254807,1797957882,1823534782,1848979230,1874285184,1899446836,1924458610,1949315159,1974011367,1998542342,2022903418,2047090150,2071098310,2094923887,2118563083,2142012307,2165268175,2188327503,2211187307,2233844796,2256297369,2278542611,2300578289,2322402347,2344012903,2365408244,2386586822,2407547248,2428288289,2448808865,2469108042,2489185029,2509039173,2528669956,2548076989,2567260008,2586218871,2604953553,2623464142,2641750834,2659813929,2677653830,2695271035,2712666136,2729839813,2746792832,2763526041,2780040365,2796336805,2812416433,2828280388,2843929874,2859366157,2874590560,2889604462,2904409294,2919006536,2933397714,2947584399,2961568203,2975350775,2988933801,3002319001,3015508125,3028502953,3041305291,3053916970,3066339843,3078575783,3090626683,3102494451,3114181011,3125688300,3137018266,3148172868,3159154072,3169963851,3180604184,3191077054,3201384446,3211528348,3221510747,3231333629,3240998979,3250508779,3259865006,3269069632,3278124624,3287031942,3295793538,3304411356,3312887331,3321223387,3329421440,3337483392,3345411135,3353206549,3360871500,3368407842,3375817414,3383102041,3390263534,3397303689,3404224286,3411027090,3417713850,3424286299,3430746152,3437095109,3443334852,3449467047,3455493342,3461415367,3467234735,3472953041,3478571863,3484092761,3489517276,3494846931,3500083232,3505227667,3510281705,3515246797,3520124376,3524915857,3529622637,3534246095,3538787592,3543248471,3547630058,3551933659,3556160565,3560312047,3564389360,3568393741,3572326410,3576188570,3579981406,3583706087,3587363764,3590955573,3594482632,3597946043,3601346892,3604686248,3607965165,3611184681,3614345817,3617449581,3620496963,3623488939,3626426470,3629310502,3632141966,3634921779,3637650842,3640330044,3642960259,3645542346,3648077152,3650565509,3653008236,3655406140,3657760013,3660070635,3662338774,3664565184,3666750607,3668895774,3671001402,3673068197,3675096854,3677088055,3679042471,3680960763,3682843579,3684691557,3686505325,3688285499,3690032685,3691747478,3693430465,3695082220,3696703310,3698294290,3699855707,3701388097,3702891989,3704367901,3705816342,3707237813,3708632806,3710001804,3711345282,3712663706,3713957535,3715227220,3716473203,3717695918,3718895792,3720073245,3721228689,3722362528,3723475160,3724566975,3725638356,3726689680,3727721318,3728733632,3729726979,3730701710,3731658168,3732596692,3733517613,3734421257,3735307945,3736177990,3737031701,3737869381,3738691328,3739497833,3740289184,3741065662,3741827543,3742575099,3743308597,3744028298,3744734459,3745427333,3746107167,3746774204,3747428682,3748070836,3748700896,3749319088,3749925634,3750520750,3751104651,3751677546,3752239641,3752791138,3753332236,3753863129,3754384008,3754895060,3755396470,3755888418,3756371081,3756844634,3757309248,3757765090,3758212325,3758651114,3759081616,3759503986,3759918377,3760324939,3760723819,3761115161,3761499107,3761875797,3762245366,3762607949,3762963676,3763312677,3763655079,3763991005,3764320578,3764643917,3764961140,3765272361,3765577694,3765877250,3766171137,3766459463,3766742332,3767019847,3767292109,3767559217,3767821269,3768078359,3768330582,3768578029,3768820790,3769058954,3769292607,3769521835,3769746721,3769967347,3770183794,3770396141,3770604465,3770808842,3771009346,3771206051,3771399029,3771588350,3771774083,3771956296,3772135055,3772310426,3772482473,3772651259,3772816845,3772979292,3773138659,3773295005,3773448386,3773598859,3773746479,3773891300,3774033375,3774172755,3774309492,3774443636,3774575236,3774704340,3774830995,3774955248,3775077144,3775196728,3775314043,3775429133,3775542040,3775652805,3775761468,3775868070,3775972649,3776075244,3776175892,3776274631,3776371496,3776466523,3776559747,3776651202,3776740921,3776828938,3776915285,3776999993,3777083093,3777164616,3777244592,3777323050,3777400019,3777475527,3777549602,3777622271,3777693560,3777763496,3777832105,3777899411,3777965440,3778030215,3778093760,3778156099,3778217255,3778277250,3778336106,3778393844,3778450486,3778506053,3778560565,3778614042,3778666503,3778717968,3778768456,3778817986,3778866575,3778914242,3778961003,3779006877,3779051880,3779096028,3779139338,3779181825,3779223505,3779264394,3779304506,3779343857,3779382460,3779420330,3779457481,3779493927,3779529681,3779564756,3779599164,3779632919,3779666033,3779698518,3779730386,3779761649,3779792318,3779822405,3779851920,3779880875,3779909280,3779937145,3779964481,3779991298,3780017605,3780043413,3780068731,3780093568,3780117933,3780141835,3780165283,3780188286,3780210852,3780232989,3780254706,3780276010,3780296909,3780317412,3780337525,3780357256,3780376612,3780395601,3780414229,3780432503,3780450430,3780468016,3780485268,3780502193,3780518796,3780535084,3780551062,3780566737,3780582114,3780597199,3780611997,3780626514,3780640755,3780654726,3780668431,3780681876,3780695066,3780708005,3780720698,3780733150,3780745366,3780757349,3780769105,3780780637,3780791950,3780803048,3780813936,3780824617,3780835095,3780845374,3780855458,3780865350,3780875054,3780884574,3780893913,3780903074,3780912061,3780920878,3780929527,3780938012,3780946336,3780954501,3780962511,3780970369,3780978078,3780985640,3780993059,3781000337,3781007476,3781014480,3781021351,3781028091,3781034703,3781041189,3781047552,3781053794,3781059918,3781065925,3781071818,3781077599,3781083270,3781088834,3781094292,3781099646,3781104899,3781110052,3781115107,3781120066,3781124931,3781129703,3781134384,3781138976,3781143481,3781147901,3781152237,3781156490,3781160662,3781164755,3781168770,3781172709,3781176573,3781180364,3781184083,3781187731,3781191310,3781194821,3781198265,3781201644,3781204958,3781208209,3781211399,3781214528,3781217598,3781220609,3781223563,3781226461,3781229304,3781232093,3781234829,3781237513,3781240146,3781242729,3781245263,3781247749,3781250187,3781252579,3781254926,3781257228,3781259486,3781261701,3781263874,3781266006,3781268097,3781270149,3781272162,3781274136,3781276073,3781277973,3781279837,3781281666,3781283460,3781285220,3781286946,3781288639,3781290300,3781291930,3781293529,3781295097,3781296636,3781298145,3781299626,3781301078,3781302503,3781303901,3781305272,3781306617,3781307937,3781309231,3781310501,3781311747,3781312969,3781314168,3781315344,3781316498,3781317630,3781318740,3781319829,3781320897,3781321945,3781322973,3781323982,3781324972,3781325943,3781326895,3781327829,3781328745,3781329644,3781330526,3781331391,3781332240,3781333073,3781333890,3781334691,3781335477,3781336248,3781337004,3781337746,3781338474,3781339188,3781339888,3781340575,3781341249,3781341910,3781342559,3781343195,3781343819,3781344431,3781345032,3781345621,3781346199,3781346766,3781347322,3781347868,3781348403,3781348928,3781349443,3781349948,3781350444,3781350930,3781351407,3781351875,3781352334,3781352784,3781353226,3781353659,3781354084,3781354501,3781354910,3781355311,3781355705,3781356091,3781356470,3781356842,3781357207,3781357565,3781357916,3781358260,3781358598,3781358929,3781359254,3781359573,3781359886,3781360193,3781360494,3781360789,3781361079,3781361363,3781361642,3781361915,3781362183,3781362446,3781362704,3781362957,3781363205,3781363449,3781363688,3781363922,3781364152,3781364378,3781364599,3781364816,3781365029,3781365238,3781365443,3781365644,3781365841,3781366034,3781366224,3781366410,3781366593,3781366772,3781366948,3781367120,3781367289,3781367455,3781367618,3781367778,3781367934,3781368088,3781368239,3781368387,3781368532,3781368674,3781368813,3781368950,3781369084,3781369216,3781369345,3781369472,3781369596,3781369718,3781369838,3781369955,3781370070,3781370183,3781370294,3781370403,3781370509,3781370613,3781370715,3781370815,3781370914,3781371011,3781371106,3781371199,3781371290,3781371380,3781371468,3781371554,3781371638,3781371721,3781371802,3781371882,3781371960,3781372037,3781372112,3781372186,3781372258,3781372329,3781372399,3781372467,3781372534,3781372600,3781372664,3781372727,3781372789,3781372850,3781372910,3781372969,3781373026,3781373082,3781373137,3781373191,3781373244,3781373296,3781373347,3781373397,3781373446,3781373494,3781373541,3781373587,3781373632,3781373677,3781373721,3781373764,3781373806,3781373847,3781373887,3781373927,3781373966,3781374004,3781374041,3781374078,3781374114,3781374149,3781374184,3781374218,3781374251,3781374284,3781374316,3781374347,3781374378,3781374408,3781374438,3781374467,3781374496,3781374524,3781374551,3781374578,3781374604,3781374630,3781374655,3781374680,3781374704,3781374728,3781374751,3781374774,3781374797,3781374819,3781374841,3781374862,3781374883,3781374903,3781374923,3781374943,3781374962,3781374981,3781375000,3781375018,3781375036,3781375053,3781375070,3781375087,3781375103,3781375119,3781375135,3781375151,3781375166,3781375181,3781375196,3781375210,3781375224,3781375238,3781375252,3781375265,3781375278,3781375291,3781375303,3781375315,3781375327,3781375339,3781375351,3781375362,3781375373,3781375384,3781375395,3781375405,3781375415,3781375425,3781375435,3781375445,3781375454,3781375463,3781375472,3781375481,3781375490,3781375499,3781375507,3781375515,3781375523,3781375531,3781375539,3781375547,3781375554,3781375561,3781375568,3781375575,3781375582,3781375589,3781375596,3781375602,3781375608,3781375614,3781375620,3781375626,3781375632,3781375638,3781375644,3781375649,3781375654,3781375659,3781375664
diff --git a/db/pre-re/job_db1.txt b/db/pre-re/job_db1.txt
index d25f0891a..3872789e9 100644
--- a/db/pre-re/job_db1.txt
+++ b/db/pre-re/job_db1.txt
@@ -279,3 +279,5 @@
4211, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000
// Oboro
4212, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000
+// Rebellion
+4215, 28000,88 , 0 ,450 ,500 ,2000, 2000, 2000, 2000, 2000, 2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 700 , 750 , 700 ,1500 ,1500 ,2000 ,2000
diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt
index ec7a8bdbc..a663e4b57 100644
--- a/db/pre-re/skill_db.txt
+++ b/db/pre-re/skill_db.txt
@@ -1028,6 +1028,32 @@
//2547,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMAX#Maximum Magic Attack#
//2548,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMIN#Minimal Magic Attack#
+// Rebellion
+2551,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED,Flip The Coin Greed//Not in the skill tree. Why and what does it do? Need real max level.
+2552,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_RICHS_COIN,Rich's Coin
+2553,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_MASS_SPIRAL,Mass Spiral
+2554,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_BANISHING_BUSTER,Banishing Buster
+2555,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_TRAP,Bind Trap
+2556,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_FLICKER,Flicker
+2557,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_S_STORM,Shatter Storm
+2558,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_E_CHAIN,Eternal Chain
+2559,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_QD_SHOT,Quick Draw Shot
+2560,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_C_MARKER,Crimson Marker
+2561,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIREDANCE,Fire Dance
+2562,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_H_MINE,Howling Mine
+2563,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_P_ALTER,Platinum Alter
+2564,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FALLEN_ANGEL,Fallen Angel
+2565,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP,Round Trip
+2566,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_D_TAIL,Dragon Tail
+2567,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIRE_RAIN,Fire Rain
+2568,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HEAT_BARREL,Heat Barrel
+2569,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_AM_BLAST,Anti-Material Blast
+2570,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_SLUGSHOT,Slug Shot
+2571,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HAMMER_OF_GOD,Hammer of God
+2572,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP_PLUSATK,Round Trip Plus Attack
+2573,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_FLICKER_ATK,Bind Flicker Attack//Max level guess based on Bind Trap max level.
+2574,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED_ATK,Flip The Coin Greed Attack//Guess on max level is from Flip The Coin Greed
+
// Kagerou & Oboro
3001,0,6,4,0,0,0,1,1,no,0,0,0,none,0, KO_YAMIKUMO,Yamikumo
3002,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0, KO_RIGHT,Right Hand Mastery
diff --git a/db/pre-re/skill_require_db.txt b/db/pre-re/skill_require_db.txt
index 5b04d5f6a..7f4597f61 100644
--- a/db/pre-re/skill_require_db.txt
+++ b/db/pre-re/skill_require_db.txt
@@ -443,7 +443,7 @@
1004,0,0,15,0,0,0,99,2,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#ƒxƒiƒ€ƒiƒCƒt#
1005,0,0,25,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#ƒN??[ƒYƒRƒ“ƒtƒ@ƒCƒ“#
1006,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#ƒTƒCƒgƒuƒ‰ƒXƒ^?[#
-1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^?»??
+1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^???
1008,0,0,30,0,0,0,99,0,0,none,0,12115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒ`ƒFƒ“ƒW#
1009,0,0,10,0,0,0,11,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#ƒtƒ@ƒ“ƒ^ƒXƒ~ƒbƒNƒA??[#
1010,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#ƒpƒ“ƒ{ƒCƒX#
@@ -793,6 +793,32 @@
//2543,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_RAY_OF_PROTECTION#Ray of Protection#
//2544,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CARTDECORATE#Cart Decorate#
+// Rebellion
+2551,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED#Flip The Coin Greed#
+2552,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_RICHS_COIN#Rich's Coin#
+2553,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_MASS_SPIRAL#Mass Spiral#
+2554,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_BANISHING_BUSTER#Banishing Buster#
+2555,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_TRAP#Bind Trap#
+2556,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FLICKER#Flicker#
+2557,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_S_STORM#Shatter Storm#
+2558,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_E_CHAIN#Eternal Chain#
+2559,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_QD_SHOT#Quick Draw Shot#
+2560,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_C_MARKER#Crimson Marker#
+2561,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIREDANCE#Fire Dance#
+2562,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_H_MINE#Howling Mine#
+2563,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_P_ALTER#Platinum Alter#
+2564,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FALLEN_ANGEL#Fallen Angel#
+2565,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP#Round Trip#
+2566,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_D_TAIL#Dragon Tail#
+2567,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIRE_RAIN#Fire Rain#
+2568,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HEAT_BARREL#Heat Barrel#
+2569,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_AM_BLAST#Anti-Material Blast#
+2570,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_SLUGSHOT#Slug Shot#
+2571,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HAMMER_OF_GOD#Hammer of God#
+2572,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP_PLUSATK#Round Trip Plus Attack#
+2573,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_FLICKER_ATK#Bind Flicker Attack#
+2574,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED_ATK#Flip The Coin Greed Attack#
+
//****
// Kagerou/Oboro
3001,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KO_YAMIKUMO#Yamikumo#
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index 23563b17e..5269ab466 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -11,7 +11,7 @@
// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
-Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
skills: { // SKILL_NAMEs come from the Name (16th column) value in db/pre-re/skill_db.txt
@@ -19,8 +19,8 @@ Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so
SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
- SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
- }
+ SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
+ }
}
*/
//====================================================
@@ -1545,7 +1545,7 @@ Lord_Knight: {
KN_SPEARMASTERY: 10
KN_PIERCE: 5
KN_SPEARSTAB: 5
- KN_RIDING: 1
+ KN_RIDING: 1
}
LK_HEADCRUSH: {
MaxLevel: 5
@@ -3852,3 +3852,85 @@ Oboro: {
}
}
}
+Rebellion: {
+ inherit: ( "Gunslinger" );
+
+ skills: {
+ RL_RICHS_COIN: {
+ MaxLevel: 1
+ GS_GLITTERING: 5
+ }
+ RL_MASS_SPIRAL: {
+ MaxLevel: 5
+ GS_PIERCINGSHOT: 1
+ }
+ RL_BANISHING_BUSTER: {
+ MaxLevel: 5
+ RL_S_STORM: 1
+ }
+ RL_B_TRAP: 5
+ RL_FLICKER: {
+ MaxLevel: 1
+ GS_FLING: 1
+ }
+ RL_S_STORM: {
+ MaxLevel: 5
+ GS_DISARM: 1
+ GS_DUST: 1
+ }
+ RL_E_CHAIN: {
+ MaxLevel: 10
+ GS_CHAINACTION: 10
+ }
+ RL_QD_SHOT: {
+ MaxLevel: 1
+ RL_E_CHAIN: 1
+ }
+ RL_C_MARKER: {
+ MaxLevel: 1
+ GS_INCREASING: 1
+ }
+ RL_FIREDANCE: {
+ MaxLevel: 5
+ RL_FALLEN_ANGEL: 1
+ }
+ RL_H_MINE: {
+ MaxLevel: 5
+ GS_SPREADATTACK: 1
+ }
+ RL_P_ALTER: 5
+ RL_FALLEN_ANGEL: {
+ MaxLevel: 5
+ GS_DESPERADO: 10
+ }
+ RL_R_TRIP: {
+ MaxLevel: 5
+ RL_FIRE_RAIN: 1
+ }
+ RL_D_TAIL: {
+ MaxLevel: 5
+ RL_H_MINE: 3
+ RL_C_MARKER: 1
+ }
+ RL_FIRE_RAIN: {
+ MaxLevel: 5
+ GS_GATLINGFEVER: 1
+ }
+ RL_HEAT_BARREL: {
+ MaxLevel: 5
+ RL_FIREDANCE: 2
+ }
+ RL_AM_BLAST: {
+ MaxLevel: 5
+ RL_MASS_SPIRAL: 1
+ }
+ RL_SLUGSHOT: {
+ MaxLevel: 5
+ RL_BANISHING_BUSTER: 3
+ }
+ RL_HAMMER_OF_GOD: {
+ MaxLevel: 5
+ RL_AM_BLAST: 3
+ }
+ }
+}
diff --git a/db/re/exp.txt b/db/re/exp.txt
index 8ed6b6c83..c3bf5ccc0 100644
--- a/db/re/exp.txt
+++ b/db/re/exp.txt
@@ -14,7 +14,7 @@
//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
-150,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,95285001,95570856,95857570,96145142,96433581,96722886,97013058,97304097,97596010,97888798,98182468,98477013,98772449,99068767,99365976,99664076,99963074,100262963,100563750,100865445,101168046,101471554,101775968,102081298,102387542,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
+150,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,95285001,95570856,95857570,96145142,96433581,96722886,97013058,97304097,97596010,97888798,98182468,98477013,98772449,99068767,99365976,99664076,99963074,100262963,100563750,100865445,101168046,101471554,101775968,102081298,102387542,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
//Job - Novice & Baby Novice
10,0:4023,1,4,10,18,28,40,91,151,205,268,340
@@ -35,7 +35,7 @@
70,4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,1,2400,3800,6200,10400,15200,22900,27100,30000,32500,35700,41300,45000,45800,47600,50300,58700,63900,67100,70300,73500,90600,96200,102700,110200,121400,144700,152900,163100,173300,183500,213500,224700,236000,247200,260700,299800,324800,343600,362300,374800,474400,497000,512100,542200,564800,644300,678200,712100,754500,796900,949300,988100,1026800,1065600,1104300,1334800,1391400,1425300,1470600,1515800,2003800,2032800,2119900,2236100,2323200,3025300,3433300,3776600,4436900,6758400,6893567,7031438,7172066,7315507,7461817,7611053,7763273,7918538,8076908,8238446,8403214,8571278,8742703,8917556,9095906,9277823,9463379,9652646,9845698,10042611,10243463,10448332,10657298,10870443,11087851,11309607,11535798,11766513,12001843,12241879,12486716,12736450,12991178,13251001,13516020,13786340,14062066,14343307,14630172,14922775,15221230,15525654,15836166,16152889,16475946,16805464,17141572,17484403,17834091,18190773,18554587,18925679,19304193,19690275,20084081,20485761,20895474,21313383,21739651,22174444,22617932,23070290,23531695,24002329,24482374,24972021,25471459,25980888,26500505,27030513,27571121,28122541,28684990,29258689,29843861,30440736,31049550,31670540,32303950,32950028,33609027,34281207,34966831,35666167,36379490,37107077,37849216,38606199,39378323,40165889,40969204,41788587,42624358,43476846,44346384,45233310,46137977,47060734,48001949,48961986,49941222,50940047,51958847,52998023,54057983,55139142,56241925,57366761,58514094,59684376,60878062,62095624,63337535,64604285,65896368,67214294,68558580,69929746,71328337,72754901,74210000,75694198,77208082,78752240,80327283,81933824,83572498,85243944,86948821,88687798,90461554,92270781,94116197,95998522,97918488,99876855,101874391,103911877,105990115,108109912,110272108,112477552,114727100,117021643,119362070,121749311,124184295,126667979,129201333,131785360,134421064,137109474,139851658,142648694,145501659,148411694,151379927,154407515,157495667,160645574,163858476,167135646,170478357,173887915,177365675,180912990,184531248,188221869,191986305,195826026,199742548,203737391,207812135,211968366,216207731,220531878,224942505,229441357,234030182,238710775,243484978,248354670,253321760,258388190,263555950
//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
-50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,120267768,121470444,122685151,123912002,125151118,126402630,127666657,128943321,130232751,131535078,132850429,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
+50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,120267768,121470444,122685151,123912002,125151118,126402630,127666657,128943321,130232751,131535078,132850429,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
//Job - Ninja/Gunslinger
70,24:25,1,100,200,300,400,600,700,1000,1200,1400,1700,1900,2400,2700,3200,3600,4200,4900,5500,6100,6900,7700,8400,9300,10100,11100,12100,13000,14600,16100,17500,18600,21500,23300,24700,27000,29000,30000,32400,35000,38100,41100,44000,46700,49600,52500,55600,58900,62700,65500,69200,72300,81200,84100,89300,95500,100900,107800,114900,120700,128600,150500,176900,196100,219600,234200,247900,266400,281300,296600,308000,311079,314189,317330,320503,323708,326945,330214,333516,336851,340219,343621,347057,350527,354032,357572,361147,364758,368405,372089,375809,379567,383362,387195,391066,394976,398925,402914,406943,411012,415122,419273,423465,427699,431975,436294,440656,445062,449512,454007,458547,463132,467763,472440,477164,481935,486754,491621,496537,501502,506517,511582,516697,521863,527081,532351,537674,543050,548480,553964,559503,565098,570748,576455,582219,588041,593921,599860,605858,611916,618035,624215,630457,636761,643128,649559,656054,662614,669240,675932,682691,689517,696412,703376,710409,717513,724688,731934,739253,746645,754111,761652,769268,776960,784729,792576,800501,808506,816591,824756,833003,841333,849746,858243,866825,875493,884247,893089,902019,911039,920149,929350,938643,948029,957509,967084,976754,996289,1016214,1036538,1057268,1078413,1099981,1121980,1144419,1167307,1190653,1214466,1238755,1263530,1288800,1314575,1340866,1367683,1395036,1422936,1451394,1480421,1510029,1540229,1571033,1602453,1634502,1667192,1700535,1734545,1769235,1804619,1840711,1877525,1915075,1953376,1992443,2032291,2072936,2114394,2156681,2199814,2243810,2288686,2334459,2381148,2428770,2477345,2526891,2577428,2628976,2681555,2735186,2789889,2845686,2902599,2960650,3019862,3080259,3141864,3204701,3268794,3334169,3400852,3468868,3538245,3609009,3681189,3754812,3829908
diff --git a/db/re/job_db1.txt b/db/re/job_db1.txt
index 085e29625..ff175592a 100644
--- a/db/re/job_db1.txt
+++ b/db/re/job_db1.txt
@@ -269,3 +269,5 @@
4211, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500
// Oboro
4212, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500
+// Rebellion
+4215, 28000,88 , 0 ,450 ,540 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490 ,590 ,440 ,940 ,1040 ,2000 ,2000 ,600
diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt
index 4b01cb34e..9296d34da 100644
--- a/db/re/skill_db.txt
+++ b/db/re/skill_db.txt
@@ -1040,6 +1040,32 @@
//2547,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMAX#Maximum Magic Attack#
//2548,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMIN#Minimal Magic Attack#
+// Rebellion
+2551,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED,Flip The Coin Greed//Not in the skill tree. Why and what does it do? Need real max level.
+2552,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_RICHS_COIN,Rich's Coin
+2553,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_MASS_SPIRAL,Mass Spiral
+2554,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_BANISHING_BUSTER,Banishing Buster
+2555,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_TRAP,Bind Trap
+2556,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_FLICKER,Flicker
+2557,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_S_STORM,Shatter Storm
+2558,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_E_CHAIN,Eternal Chain
+2559,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_QD_SHOT,Quick Draw Shot
+2560,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_C_MARKER,Crimson Marker
+2561,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIREDANCE,Fire Dance
+2562,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_H_MINE,Howling Mine
+2563,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_P_ALTER,Platinum Alter
+2564,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FALLEN_ANGEL,Fallen Angel
+2565,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP,Round Trip
+2566,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_D_TAIL,Dragon Tail
+2567,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIRE_RAIN,Fire Rain
+2568,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HEAT_BARREL,Heat Barrel
+2569,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_AM_BLAST,Anti-Material Blast
+2570,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_SLUGSHOT,Slug Shot
+2571,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HAMMER_OF_GOD,Hammer of God
+2572,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP_PLUSATK,Round Trip Plus Attack
+2573,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_FLICKER_ATK,Bind Flicker Attack//Max level guess based on Bind Trap max level.
+2574,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED_ATK,Flip The Coin Greed Attack//Guess on max level is from Flip The Coin Greed
+
// Kagerou & Oboro
3001,0,6,4,0,0,0,1,1,no,0,0,0,none,0, KO_YAMIKUMO,Yamikumo
3002,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0, KO_RIGHT,Right Hand Mastery
diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt
index 2f2c1e8b6..c85f45b37 100644
--- a/db/re/skill_require_db.txt
+++ b/db/re/skill_require_db.txt
@@ -455,7 +455,7 @@
1004,0,0,15,0,0,0,99,2,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#ƒxƒiƒ€ƒiƒCƒt#
1005,0,0,25,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#ƒN??[ƒYƒRƒ“ƒtƒ@ƒCƒ“#
1006,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#ƒTƒCƒgƒuƒ‰ƒXƒ^?[#
-1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^?»??
+1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^???
1008,0,0,30,0,0,0,99,0,0,none,0,12115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#ƒGƒ‹ƒŒ?ƒ“ƒ^ƒ‹ƒ`ƒFƒ“ƒW#
1009,0,0,10,0,0,0,11,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#ƒtƒ@ƒ“ƒ^ƒXƒ~ƒbƒNƒA??[#
1010,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#ƒpƒ“ƒ{ƒCƒX#
@@ -805,6 +805,32 @@
//2543,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_RAY_OF_PROTECTION#Ray of Protection#
//2544,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CARTDECORATE#Cart Decorate#
+// Rebellion
+2551,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED#Flip The Coin Greed#
+2552,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_RICHS_COIN#Rich's Coin#
+2553,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_MASS_SPIRAL#Mass Spiral#
+2554,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_BANISHING_BUSTER#Banishing Buster#
+2555,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_TRAP#Bind Trap#
+2556,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FLICKER#Flicker#
+2557,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_S_STORM#Shatter Storm#
+2558,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_E_CHAIN#Eternal Chain#
+2559,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_QD_SHOT#Quick Draw Shot#
+2560,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_C_MARKER#Crimson Marker#
+2561,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIREDANCE#Fire Dance#
+2562,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_H_MINE#Howling Mine#
+2563,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_P_ALTER#Platinum Alter#
+2564,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FALLEN_ANGEL#Fallen Angel#
+2565,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP#Round Trip#
+2566,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_D_TAIL#Dragon Tail#
+2567,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIRE_RAIN#Fire Rain#
+2568,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HEAT_BARREL#Heat Barrel#
+2569,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_AM_BLAST#Anti-Material Blast#
+2570,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_SLUGSHOT#Slug Shot#
+2571,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HAMMER_OF_GOD#Hammer of God#
+2572,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP_PLUSATK#Round Trip Plus Attack#
+2573,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_FLICKER_ATK#Bind Flicker Attack#
+2574,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED_ATK#Flip The Coin Greed Attack#
+
//****
// Kagerou/Oboro
3001,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KO_YAMIKUMO#Yamikumo#
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index c745c514f..02e4dd0fc 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -11,7 +11,7 @@
// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
-Job_Name: { //Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
skills: { // SKILL_NAMEs come from the Name (16th column) value in db/re/skill_db.txt
@@ -3849,3 +3849,85 @@ Oboro: {
}
}
}
+Rebellion: {
+ inherit: ( "Gunslinger" );
+
+ skills: {
+ RL_RICHS_COIN: {
+ MaxLevel: 1
+ GS_GLITTERING: 5
+ }
+ RL_MASS_SPIRAL: {
+ MaxLevel: 5
+ GS_PIERCINGSHOT: 1
+ }
+ RL_BANISHING_BUSTER: {
+ MaxLevel: 5
+ RL_S_STORM: 1
+ }
+ RL_B_TRAP: 5
+ RL_FLICKER: {
+ MaxLevel: 1
+ GS_FLING: 1
+ }
+ RL_S_STORM: {
+ MaxLevel: 5
+ GS_DISARM: 1
+ GS_DUST: 1
+ }
+ RL_E_CHAIN: {
+ MaxLevel: 10
+ GS_CHAINACTION: 10
+ }
+ RL_QD_SHOT: {
+ MaxLevel: 1
+ RL_E_CHAIN: 1
+ }
+ RL_C_MARKER: {
+ MaxLevel: 1
+ GS_INCREASING: 1
+ }
+ RL_FIREDANCE: {
+ MaxLevel: 5
+ RL_FALLEN_ANGEL: 1
+ }
+ RL_H_MINE: {
+ MaxLevel: 5
+ GS_SPREADATTACK: 1
+ }
+ RL_P_ALTER: 5
+ RL_FALLEN_ANGEL: {
+ MaxLevel: 5
+ GS_DESPERADO: 10
+ }
+ RL_R_TRIP: {
+ MaxLevel: 5
+ RL_FIRE_RAIN: 1
+ }
+ RL_D_TAIL: {
+ MaxLevel: 5
+ RL_H_MINE: 3
+ RL_C_MARKER: 1
+ }
+ RL_FIRE_RAIN: {
+ MaxLevel: 5
+ GS_GATLINGFEVER: 1
+ }
+ RL_HEAT_BARREL: {
+ MaxLevel: 5
+ RL_FIREDANCE: 2
+ }
+ RL_AM_BLAST: {
+ MaxLevel: 5
+ RL_MASS_SPIRAL: 1
+ }
+ RL_SLUGSHOT: {
+ MaxLevel: 5
+ RL_BANISHING_BUSTER: 3
+ }
+ RL_HAMMER_OF_GOD: {
+ MaxLevel: 5
+ RL_AM_BLAST: 3
+ }
+ }
+}
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 77f6e1a37..1cf92977c 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -76,6 +76,7 @@ Job: Equippable jobs. Uses the following bitmask table:
Death Knight (2^27): 0x08000000
Dark Collector (2^28): 0x10000000
Kagerou/Oboro (2^29): 0x20000000
+ Rebellion (2^30): 0x40000000
Upper: Equippable upper-types. Uses the following bitmasks:
1: Normal jobs
diff --git a/src/common/mmo.h b/src/common/mmo.h
index b51d0ec4a..f49a859e0 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -772,6 +772,7 @@ enum {
JOB_KAGEROU = 4211,
JOB_OBORO,
+ JOB_REBELLION = 4215,
JOB_MAX,
};
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 4f784ecc5..cec314134 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3561,7 +3561,7 @@ ACMD(reloadmobdb) {
homun->reload();
mercenary->read_db();
mercenary->read_skilldb();
- elemental->reload_elementaldb();
+ elemental->reload_db();
clif->message(fd, msg_txt(98)); // Monster database has been reloaded.
return true;
diff --git a/src/map/battle.c b/src/map/battle.c
index 98e132077..327a4b98c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -791,7 +791,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
damage += 4;
if(sd->status.party_id && (skill2_lv=pc->checkskill(sd,TK_POWER)) > 0) {
- if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 )
+ if( (i = party->foreachsamemap(party->sub_count, sd, 0)) > 1 )
damage += 2 * skill2_lv * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/;
}
#else
@@ -1556,7 +1556,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
c = 0;
memset (p_sd, 0, sizeof(p_sd));
- party_foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
+ party->foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
c = ( c > 1 ? rand()%c : 0 );
if( (psd = map->id2sd(p_sd[c])) && pc->checkskill(psd,WL_COMET) > 0 ){
@@ -4534,7 +4534,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#ifndef RENEWAL
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
- if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
+ if( (i = party->foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
ATK_ADDRATE(2*temp*i);
}
#endif
diff --git a/src/map/clif.c b/src/map/clif.c
index ed75e9aa0..d69d501ac 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9368,7 +9368,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
maplist[sd->bl.m].users_pvp++;
}
if( maplist[sd->bl.m].instance_id >= 0 ) {
- instances[maplist[sd->bl.m].instance_id].users++;
+ instance->list[maplist[sd->bl.m].instance_id].users++;
instance->check_idle(maplist[sd->bl.m].instance_id);
}
sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS]
@@ -16017,20 +16017,20 @@ int clif_instance(int instance_id, int type, int flag) {
unsigned char buf[255];
enum send_target target = PARTY;
- switch( instances[instance_id].owner_type ) {
+ switch( instance->list[instance_id].owner_type ) {
case IOT_NONE:
return 0;
case IOT_GUILD:
target = GUILD;
- sd = guild->getavailablesd(guild->search(instances[instance_id].owner_id));
+ sd = guild->getavailablesd(guild->search(instance->list[instance_id].owner_id));
break;
case IOT_PARTY:
/* default is already PARTY */
- sd = party->getavailablesd(party->search(instances[instance_id].owner_id));
+ sd = party->getavailablesd(party->search(instance->list[instance_id].owner_id));
break;
case IOT_CHAR:
target = SELF;
- sd = map->id2sd(instances[instance_id].owner_id);
+ sd = map->id2sd(instance->list[instance_id].owner_id);
break;
}
@@ -16043,7 +16043,7 @@ int clif_instance(int instance_id, int type, int flag) {
// Required to start the instancing information window on Client
// This window re-appear each "refresh" of client automatically until type 4 is send to client.
WBUFW(buf,0) = 0x02CB;
- memcpy(WBUFP(buf,2),instances[instance_id].name,INSTANCE_NAME_LENGTH);
+ memcpy(WBUFP(buf,2),instance->list[instance_id].name,INSTANCE_NAME_LENGTH);
WBUFW(buf,63) = flag;
clif->send(buf,packet_len(0x02CB),&sd->bl,target);
break;
@@ -16058,13 +16058,13 @@ int clif_instance(int instance_id, int type, int flag) {
case 4:
// S 0x2cd <Instance Name>.61B <Instance Remaining Time>.L <Instance Noplayers close time>.L
WBUFW(buf,0) = 0x02CD;
- memcpy(WBUFP(buf,2),instances[instance_id].name,61);
+ memcpy(WBUFP(buf,2),instance->list[instance_id].name,61);
if( type == 3 ) {
- WBUFL(buf,63) = instances[instance_id].progress_timeout;
+ WBUFL(buf,63) = instance->list[instance_id].progress_timeout;
WBUFL(buf,67) = 0;
} else {
WBUFL(buf,63) = 0;
- WBUFL(buf,67) = instances[instance_id].idle_timeout;
+ WBUFL(buf,67) = instance->list[instance_id].idle_timeout;
}
clif->send(buf,packet_len(0x02CD),&sd->bl,target);
break;
@@ -16086,24 +16086,24 @@ int clif_instance(int instance_id, int type, int flag) {
void clif_instance_join(int fd, int instance_id)
{
- if( instances[instance_id].idle_timer != INVALID_TIMER ) {
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
WFIFOL(fd,63) = 0;
- WFIFOL(fd,67) = instances[instance_id].idle_timeout;
+ WFIFOL(fd,67) = instance->list[instance_id].idle_timeout;
WFIFOSET(fd,packet_len(0x02CD));
- } else if( instances[instance_id].progress_timer != INVALID_TIMER ) {
+ } else if( instance->list[instance_id].progress_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
- WFIFOL(fd,63) = instances[instance_id].progress_timeout;
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
+ WFIFOL(fd,63) = instance->list[instance_id].progress_timeout;
WFIFOL(fd,67) = 0;
WFIFOSET(fd,packet_len(0x02CD));
} else {
WFIFOHEAD(fd,packet_len(0x02CB));
WFIFOW(fd,0) = 0x02CB;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
WFIFOW(fd,63) = 0;
WFIFOSET(fd,packet_len(0x02CB));
}
diff --git a/src/map/duel.h b/src/map/duel.h
index 7802f6163..d1ec58415 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -1,5 +1,7 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _DUEL_H_
#define _DUEL_H_
@@ -11,8 +13,6 @@ struct duel {
#define MAX_DUEL 1024
-
-
/*=====================================
* Interface : duel.h
* Generated by HerculesInterfaceMaker
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 12e8f4c4e..5a3630c70 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -39,22 +39,24 @@
#include <string.h>
#include <math.h>
+struct elemental_interface elemental_s;
+
int elemental_search_index(int class_) {
int i;
- ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, elemental->elemental_db[i].class_ == class_);
+ ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, elemental->db[i].class_ == class_);
return (i == MAX_ELEMENTAL_CLASS)?-1:i;
}
bool elemental_class(int class_) {
- return (bool)(elemental_search_index(class_) > -1);
+ return (bool)(elemental->search_index(class_) > -1);
}
struct view_data * elemental_get_viewdata(int class_) {
- int i = elemental_search_index(class_);
+ int i = elemental->search_index(class_);
if( i < 0 )
return 0;
- return &elemental->elemental_db[i].vd;
+ return &elemental->db[i].vd;
}
int elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) {
@@ -64,10 +66,10 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
nullpo_retr(1,sd);
- if( (i = elemental_search_index(class_)) < 0 )
+ if( (i = elemental->search_index(class_)) < 0 )
return 0;
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
memset(&ele,0,sizeof(struct s_elemental));
ele.char_id = sd->status.char_id;
@@ -75,27 +77,27 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
ele.mode = EL_MODE_PASSIVE; // Initial mode
i = db->status.size+1; // summon level
- //[(Caster�s Max HP/ 3 ) + (Caster�s INT x 10 )+ (Caster�s Job Level x 20 )] x [(Elemental Summon Level + 2) / 3]
+ //[(Caster's Max HP/ 3 ) + (Caster's INT x 10 )+ (Caster's Job Level x 20 )] x [(Elemental Summon Level + 2) / 3]
ele.hp = ele.max_hp = (sd->battle_status.max_hp/3 + sd->battle_status.int_*10 + sd->status.job_level) * ((i + 2) / 3);
- //Caster�s Max SP /4
+ //Caster's Max SP /4
ele.sp = ele.max_sp = sd->battle_status.max_sp/4;
- //Caster�s [ Max SP / (18 / Elemental Summon Skill Level) 1- 100 ]
+ //Caster's [ Max SP / (18 / Elemental Summon Skill Level) 1- 100 ]
ele.atk = (sd->battle_status.max_sp / (18 / i) * 1 - 100);
- //Caster�s [ Max SP / (18 / Elemental Summon Skill Level) ]
+ //Caster's [ Max SP / (18 / Elemental Summon Skill Level) ]
ele.atk2 = sd->battle_status.max_sp / 18;
- //Caster�s HIT + (Caster�s Base Level )
+ //Caster's HIT + (Caster's Base Level)
ele.hit = sd->battle_status.hit + sd->status.base_level;
- //[Elemental Summon Skill Level x (Caster�s INT / 2 + Caster�s DEX / 4)]
+ //[Elemental Summon Skill Level x (Caster's INT / 2 + Caster's DEX / 4)]
ele.matk = i * (sd->battle_status.int_ / 2 + sd->battle_status.dex / 4);
- //150 + [Caster�s DEX / 10] + [Elemental Summon Skill Level x 3 ]
+ //150 + [Caster's DEX / 10] + [Elemental Summon Skill Level x 3 ]
ele.amotion = 150 + sd->battle_status.dex / 10 + i * 3;
- //Caster�s DEF + (Caster�s Base Level / (5 � Elemental Summon Skill Level)
+ //Caster's DEF + (Caster's Base Level / (5 - Elemental Summon Skill Level)
ele.def = sd->battle_status.def + sd->status.base_level / (5-i);
- //Caster�s MDEF + (Caster�s INT / (5 - Elemental Summon Skill Level)
+ //Caster's MDEF + (Caster's INT / (5 - Elemental Summon Skill Level)
ele.mdef = sd->battle_status.mdef + sd->battle_status.int_ / (5-i);
- //Caster�s FLEE + (Caster�s Base Level / (5 � Elemental Summon Skill Level)
+ //Caster's FLEE + (Caster's Base Level / (5 - Elemental Summon Skill Level)
ele.flee = sd->status.base_level / (5-i);
- //Caster�s HIT + (Caster�s Base Level )
+ //Caster's HIT + (Caster's Base Level)
ele.hit = sd->battle_status.hit + sd->status.base_level;
//per individual bonuses
@@ -167,7 +169,7 @@ int elemental_save(struct elemental_data *ed) {
return 1;
}
-static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t data) {
+int elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
struct elemental_data *ed;
@@ -177,7 +179,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat
return 1;
if( ed->summon_timer != tid ) {
- ShowError("elemental_summon_end %d != %d.\n", ed->summon_timer, tid);
+ ShowError("elemental_summon_end_timer %d != %d.\n", ed->summon_timer, tid);
return 0;
}
@@ -190,7 +192,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat
void elemental_summon_stop(struct elemental_data *ed) {
nullpo_retv(ed);
if( ed->summon_timer != INVALID_TIMER )
- timer->delete(ed->summon_timer, elemental_summon_end);
+ timer->delete(ed->summon_timer, elemental->summon_end_timer);
ed->summon_timer = INVALID_TIMER;
}
@@ -215,7 +217,7 @@ int elemental_delete(struct elemental_data *ed, int reply) {
void elemental_summon_init(struct elemental_data *ed) {
if( ed->summon_timer == INVALID_TIMER )
- ed->summon_timer = timer->add(timer->gettick() + ed->elemental.life_time, elemental_summon_end, ed->master->bl.id, 0);
+ ed->summon_timer = timer->add(timer->gettick() + ed->elemental.life_time, elemental->summon_end_timer, ed->master->bl.id, 0);
ed->regen.state.block = 0;
}
@@ -224,7 +226,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
struct map_session_data *sd;
struct elemental_data *ed;
struct s_elemental_db *db;
- int i = elemental_search_index(ele->class_);
+ int i = elemental->search_index(ele->class_);
if( (sd = map->charid2sd(ele->char_id)) == NULL )
return 0;
@@ -234,7 +236,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
return 0;
}
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
if( !sd->ed ) { // Initialize it after first summon.
sd->ed = ed = (struct elemental_data*)aCalloc(1,sizeof(struct elemental_data));
ed->bl.type = BL_ELEM;
@@ -259,7 +261,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
status_calc_elemental(ed,1);
ed->last_spdrain_time = ed->last_thinktime = timer->gettick();
ed->summon_timer = INVALID_TIMER;
- elemental_summon_init(ed);
+ elemental->summon_init(ed);
} else {
memcpy(&sd->ed->elemental, ele, sizeof(struct s_elemental));
ed = sd->ed;
@@ -598,7 +600,7 @@ int elemental_set_target( struct map_session_data *sd, struct block_list *bl ) {
return 1;
}
-static int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
+int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
struct elemental_data *ed;
struct block_list **target;
int dist;
@@ -634,7 +636,7 @@ static int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap
return 0;
}
-static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
+int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
struct block_list *target = NULL;
int master_dist, view_range, mode;
@@ -713,7 +715,7 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_
target = map->id2bl(ed->ud.target);
if( !target )
- map->foreachinrange(elemental_ai_sub_timer_activesearch, &ed->bl, view_range, BL_CHAR, ed, &target, status_get_mode(&ed->bl));
+ map->foreachinrange(elemental->ai_sub_timer_activesearch, &ed->bl, view_range, BL_CHAR, ed, &target, status_get_mode(&ed->bl));
if( !target ) { //No targets available.
elemental->unlocktarget(ed);
@@ -743,16 +745,16 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_
return 0;
}
-static int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
unsigned int tick = va_arg(ap,unsigned int);
if(sd->status.ele_id && sd->ed)
- elemental_ai_sub_timer(sd->ed,sd,tick);
+ elemental->ai_sub_timer(sd->ed,sd,tick);
return 0;
}
-static int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
- map->map_foreachpc(elemental_ai_sub_foreachclient,tick);
+int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ map->map_foreachpc(elemental->ai_sub_foreachclient,tick);
return 0;
}
@@ -765,7 +767,9 @@ int read_elementaldb(void) {
struct status_data *estatus;
sprintf(line, "%s/%s", map->db_path, "elemental_db.txt");
- memset(elemental->elemental_db,0,sizeof(elemental->elemental_db));
+
+ if( runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
+ memset(elemental->db,0,sizeof(elemental->db));
fp = fopen(line, "r");
if( !fp ) {
@@ -792,7 +796,7 @@ int read_elementaldb(void) {
continue;
}
- db = &elemental->elemental_db[j];
+ db = &elemental->db[j];
db->class_ = atoi(str[0]);
safestrncpy(db->sprite, str[1], NAME_LENGTH);
safestrncpy(db->name, str[2], NAME_LENGTH);
@@ -882,7 +886,7 @@ int read_elemental_skilldb(void) {
}
class_ = atoi(str[0]);
- ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, class_ == elemental->elemental_db[i].class_);
+ ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, class_ == elemental->db[i].class_);
if( i == MAX_ELEMENTAL_CLASS ) {
ShowError("read_elemental_skilldb : Class not found in elemental_db for skill entry, line %d.\n", k);
continue;
@@ -894,7 +898,7 @@ int read_elemental_skilldb(void) {
continue;
}
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
skill_lv = atoi(str[2]);
skillmode = atoi(str[3]);
@@ -919,7 +923,7 @@ int read_elemental_skilldb(void) {
}
void reload_elementaldb(void) {
- read_elementaldb();
+ elemental->read_db();
elemental->reload_skilldb();
}
@@ -928,11 +932,11 @@ void reload_elemental_skilldb(void) {
}
int do_init_elemental(void) {
- read_elementaldb();
+ elemental->read_db();
elemental->read_skilldb();
- timer->add_func_list(elemental_ai_timer,"elemental_ai_timer");
- timer->add_interval(timer->gettick()+MIN_ELETHINKTIME,elemental_ai_timer,0,0,MIN_ELETHINKTIME);
+ timer->add_func_list(elemental->ai_timer,"elemental_ai_timer");
+ timer->add_interval(timer->gettick()+MIN_ELETHINKTIME,elemental->ai_timer,0,0,MIN_ELETHINKTIME);
return 0;
}
@@ -949,6 +953,13 @@ void do_final_elemental(void) {
void elemental_defaults(void) {
elemental = &elemental_s;
+ /* */
+ elemental->init = do_init_elemental;
+ elemental->final = do_final_elemental;
+
+ /* */
+ memset(elemental->db,0,sizeof(elemental->db));
+
/* funcs */
elemental->class = elemental_class;
@@ -978,8 +989,15 @@ void elemental_defaults(void) {
elemental->skill_get_requirements = elemental_skill_get_requirements;
elemental->read_skilldb = read_elemental_skilldb;
- elemental->reload_elementaldb = reload_elementaldb;
+ elemental->reload_db = reload_elementaldb;
elemental->reload_skilldb = reload_elemental_skilldb;
- elemental->do_init_elemental = do_init_elemental;
- elemental->do_final_elemental = do_final_elemental;
+
+ elemental->search_index = elemental_search_index;
+ elemental->summon_init = elemental_summon_init;
+ elemental->summon_end_timer = elemental_summon_end_timer;
+ elemental->ai_sub_timer_activesearch = elemental_ai_sub_timer_activesearch;
+ elemental->ai_sub_timer = elemental_ai_sub_timer;
+ elemental->ai_sub_foreachclient = elemental_ai_sub_foreachclient;
+ elemental->ai_timer = elemental_ai_timer;
+ elemental->read_db = read_elementaldb;
}
diff --git a/src/map/elemental.h b/src/map/elemental.h
index ccc3bcb5f..b42d5c0b7 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -1,9 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _ELEMENTAL_H_
#define _ELEMENTAL_H_
+
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+
+/**
+ * Defines
+ **/
#define MIN_ELETHINKTIME 100
#define MIN_ELEDISTANCE 2
#define MAX_ELEDISTANCE 5
@@ -13,10 +20,18 @@
#define EL_SKILLMODE_PASIVE 0x1
#define EL_SKILLMODE_ASSIST 0x2
#define EL_SKILLMODE_AGGRESSIVE 0x4
+
+#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
+#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
+
+/**
+ * Structures
+ **/
struct elemental_skill {
unsigned short id, lv;
short mode;
};
+
struct s_elemental_db {
int class_;
char sprite[NAME_LENGTH], name[NAME_LENGTH];
@@ -26,6 +41,7 @@ struct s_elemental_db {
struct view_data vd;
struct elemental_skill skill[MAX_ELESKILLTREE];
};
+
struct elemental_data {
struct block_list bl;
struct unit_data ud;
@@ -46,9 +62,6 @@ struct elemental_data {
int target_id, attacked_id;
};
-#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
-#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
-
/*=====================================
* Interface : elemental.h
* Generated by HerculesInterfaceMaker
@@ -57,8 +70,11 @@ struct elemental_data {
struct elemental_interface {
/* vars */
- struct s_elemental_db elemental_db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ struct s_elemental_db db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ /* */
+ int (*init) (void);
+ void (*final) (void);
/* funcs */
bool (*class) (int class_);
struct view_data * (*get_viewdata) (int class_);
@@ -87,11 +103,18 @@ struct elemental_interface {
struct skill_condition (*skill_get_requirements) (uint16 skill_id, uint16 skill_lv);
int (*read_skilldb) (void);
- void (*reload_elementaldb) (void);
+ void (*reload_db) (void);
void (*reload_skilldb) (void);
- int (*do_init_elemental) (void);
- void (*do_final_elemental) (void);
-} elemental_s;
+
+ int (*search_index) (int class_);
+ void (*summon_init) (struct elemental_data *ed);
+ int (*summon_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_sub_timer_activesearch) (struct block_list *bl, va_list ap);
+ int (*ai_sub_timer) (struct elemental_data *ed, struct map_session_data *sd, unsigned int tick);
+ int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
+ int (*ai_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*read_db) (void);
+};
struct elemental_interface *elemental;
diff --git a/src/map/guild.c b/src/map/guild.c
index 797b3b370..b66961262 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -32,50 +32,10 @@
struct guild_interface guild_s;
-static DBMap* guild_db; // int guild_id -> struct guild*
-static DBMap* castle_db; // int castle_id -> struct guild_castle*
-static DBMap* guild_expcache_db; // int char_id -> struct guild_expcache*
-static DBMap* guild_infoevent_db; // int guild_id -> struct eventlist*
-
-struct eventlist {
- char name[EVENT_NAME_LENGTH];
- struct eventlist *next;
-};
-
-//Constant related to the flash of the Guild EXP cache
-#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
-#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
-#define GUILD_PAYEXP_LIST 8192 //The maximum number of cache
-
-//Guild EXP cache
-
-struct guild_expcache {
- int guild_id, account_id, char_id;
- uint64 exp;
-};
-static struct eri *expcache_ers; //For handling of guild exp payment.
-
-#define MAX_GUILD_SKILL_REQUIRE 5
-struct{
- int id;
- int max;
- struct{
- short id;
- short lv;
- }need[MAX_GUILD_SKILL_REQUIRE];
-} guild_skill_tree[MAX_GUILDSKILL];
-
-int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data);
-static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
-/* guild flags cache */
-struct npc_data **guild_flags;
-unsigned short guild_flags_count;
-
/*==========================================
* Retrieves and validates the sd pointer for this guild member [Skotlex]
*------------------------------------------*/
-static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
+TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
TBL_PC* sd = map->id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
@@ -90,15 +50,14 @@ static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
return sd;
}
- // Modified [Komurka]
+// Modified [Komurka]
int guild_skill_get_max (int id) {
if (id < GD_SKILLBASE || id >= GD_SKILLBASE+MAX_GUILDSKILL)
return 0;
- return guild_skill_tree[id-GD_SKILLBASE].max;
+ return guild->skill_tree[id-GD_SKILLBASE].max;
}
// Retrive skill_lv learned by guild
-
int guild_checkskill(struct guild *g, int id) {
int idx = id - GD_SKILLBASE;
if (idx < 0 || idx >= MAX_GUILDSKILL)
@@ -109,7 +68,7 @@ int guild_checkskill(struct guild *g, int id) {
/*==========================================
* guild_skill_tree.txt reading - from jA [Komurka]
*------------------------------------------*/
-static bool guild_read_guildskill_tree_db(char* split[], int columns, int current)
+bool guild_read_guildskill_tree_db(char* split[], int columns, int current)
{// <skill id>,<max lv>,<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>
int k, id, skill_id;
@@ -122,18 +81,18 @@ static bool guild_read_guildskill_tree_db(char* split[], int columns, int curren
return false;
}
- guild_skill_tree[id].id = skill_id;
- guild_skill_tree[id].max = atoi(split[1]);
+ guild->skill_tree[id].id = skill_id;
+ guild->skill_tree[id].max = atoi(split[1]);
- if( guild_skill_tree[id].id == GD_GLORYGUILD && battle_config.require_glory_guild && guild_skill_tree[id].max == 0 )
+ if( guild->skill_tree[id].id == GD_GLORYGUILD && battle_config.require_glory_guild && guild->skill_tree[id].max == 0 )
{// enable guild's glory when required for emblems
- guild_skill_tree[id].max = 1;
+ guild->skill_tree[id].max = 1;
}
for( k = 0; k < MAX_GUILD_SKILL_REQUIRE; k++ )
{
- guild_skill_tree[id].need[k].id = atoi(split[k*2+2]);
- guild_skill_tree[id].need[k].lv = atoi(split[k*2+3]);
+ guild->skill_tree[id].need[k].id = atoi(split[k*2+2]);
+ guild->skill_tree[id].need[k].lv = atoi(split[k*2+3]);
}
return true;
@@ -155,14 +114,14 @@ int guild_check_skill_require(struct guild *g,int id)
for(i=0;i<MAX_GUILD_SKILL_REQUIRE;i++)
{
- if(guild_skill_tree[idx].need[i].id == 0) break;
- if(guild_skill_tree[idx].need[i].lv > guild->checkskill(g,guild_skill_tree[idx].need[i].id))
+ if(guild->skill_tree[idx].need[i].id == 0) break;
+ if(guild->skill_tree[idx].need[i].lv > guild->checkskill(g,guild->skill_tree[idx].need[i].id))
return 0;
}
return 1;
}
-static bool guild_read_castledb(char* str[], int columns, int current)
+bool guild_read_castledb(char* str[], int columns, int current)
{// <castle id>,<map name>,<castle name>,<castle event>[,<reserved/unused switch flag>]
struct guild_castle *gc;
int mapindex = mapindex_name2id(str[1]);
@@ -176,7 +135,7 @@ static bool guild_read_castledb(char* str[], int columns, int current)
safestrncpy(gc->castle_name, str[2], sizeof(gc->castle_name));
safestrncpy(gc->castle_event, str[3], sizeof(gc->castle_event));
- idb_put(castle_db,gc->castle_id,gc);
+ idb_put(guild->castle_db,gc->castle_id,gc);
//intif->guild_castle_info(gc->castle_id);
@@ -186,14 +145,14 @@ static bool guild_read_castledb(char* str[], int columns, int current)
/// lookup: guild id -> guild*
struct guild* guild_search(int guild_id)
{
- return (struct guild*)idb_get(guild_db,guild_id);
+ return (struct guild*)idb_get(guild->db,guild_id);
}
/// lookup: guild name -> guild*
struct guild* guild_searchname(char* str)
{
struct guild* g;
- DBIterator *iter = db_iterator(guild_db);
+ DBIterator *iter = db_iterator(guild->db);
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) )
{
@@ -208,14 +167,14 @@ struct guild* guild_searchname(char* str)
/// lookup: castle id -> castle*
struct guild_castle* guild_castle_search(int gcid)
{
- return (struct guild_castle*)idb_get(castle_db,gcid);
+ return (struct guild_castle*)idb_get(guild->castle_db,gcid);
}
/// lookup: map index -> castle*
struct guild_castle* guild_mapindex2gc(short mapindex)
{
struct guild_castle* gc;
- DBIterator *iter = db_iterator(castle_db);
+ DBIterator *iter = db_iterator(guild->castle_db);
for( gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter) )
{
@@ -303,7 +262,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
(g = guild->search(c->guild_id)) == NULL ||
(i = guild->getindex(g, c->account_id, c->char_id)) < 0
) {
- ers_free(expcache_ers, c);
+ ers_free(guild->expcache_ers, c);
return 0;
}
@@ -316,13 +275,13 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
GMI_EXP,&g->member[i].exp,sizeof(g->member[i].exp));
c->exp=0;
- ers_free(expcache_ers, c);
+ ers_free(guild->expcache_ers, c);
return 0;
}
int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data)
{
- guild_expcache_db->clear(guild_expcache_db,guild_payexp_timer_sub);
+ guild->expcache_db->clear(guild->expcache_db,guild->payexp_timer_sub);
return 0;
}
@@ -355,9 +314,9 @@ int guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
}
//Code from party_send_xy_timer [Skotlex]
-static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
+int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
- guild_db->foreach(guild_db,guild_send_xy_timer_sub,tick);
+ guild->db->foreach(guild->db,guild->send_xy_timer_sub,tick);
return 0;
}
@@ -392,7 +351,7 @@ int guild_create(struct map_session_data *sd, const char *name)
return 0;
}
- guild_makemember(&m,sd);
+ guild->makemember(&m,sd);
m.position=0;
intif->guild_create(name,&m);
return 1;
@@ -440,7 +399,7 @@ int guild_npc_request_info(int guild_id,const char *event)
ev=(struct eventlist *)aCalloc(sizeof(struct eventlist),1);
memcpy(ev->name,event,strlen(event));
//The one in the db (if present) becomes the next event from this.
- if (guild_infoevent_db->put(guild_infoevent_db, DB->i2key(guild_id), DB->ptr2data(ev), &prev))
+ if (guild->infoevent_db->put(guild->infoevent_db, DB->i2key(guild_id), DB->ptr2data(ev), &prev))
ev->next = DB->data2ptr(&prev);
}
@@ -501,12 +460,12 @@ int guild_recv_info(struct guild *sg) {
nullpo_ret(sg);
- if((g = (struct guild*)idb_get(guild_db,sg->guild_id))==NULL) {
+ if((g = (struct guild*)idb_get(guild->db,sg->guild_id))==NULL) {
guild_new = true;
g=(struct guild *)aCalloc(1,sizeof(struct guild));
g->instance = NULL;
g->instances = 0;
- idb_put(guild_db,sg->guild_id,g);
+ idb_put(guild->db,sg->guild_id,g);
if( hChSys.ally ) {
struct hChSysCh *channel;
@@ -554,7 +513,7 @@ int guild_recv_info(struct guild *sg) {
}
before=*sg;
//Perform the check on the user because the first load
- guild_check_member(sg);
+ guild->check_member(sg);
if ((sd = map->nick2sd(sg->master)) != NULL) {
//If the guild master is online the first time the guild_info is received,
//that means he was the first to join, so apply guild skill blocking here.
@@ -583,7 +542,7 @@ int guild_recv_info(struct guild *sg) {
for(i=bm=m=0;i<g->max_member;i++){
if(g->member[i].account_id>0){
- sd = g->member[i].sd = guild_sd_check(g->guild_id, g->member[i].account_id, g->member[i].char_id);
+ sd = g->member[i].sd = guild->sd_check(g->guild_id, g->member[i].account_id, g->member[i].char_id);
if (sd) clif->charnameupdate(sd); // [LuzZza]
m++;
}else
@@ -618,7 +577,7 @@ int guild_recv_info(struct guild *sg) {
}
//Occurrence of an event
- if (guild_infoevent_db->remove(guild_infoevent_db, DB->i2key(sg->guild_id), &data)) {
+ if (guild->infoevent_db->remove(guild->infoevent_db, DB->i2key(sg->guild_id), &data)) {
struct eventlist *ev = DB->data2ptr(&data), *ev2;
while(ev) {
npc->event_do(ev->name);
@@ -731,7 +690,7 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) {
return 0;
}
- guild_makemember(&m,sd);
+ guild->makemember(&m,sd);
intif->guild_addmember(guild_id, &m);
//TODO: send a minimap update to this player
}
@@ -1015,7 +974,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
g->connect_member=om;
//Ensure validity of pointer (ie: player logs in/out, changes map-server)
- g->member[idx].sd = guild_sd_check(guild_id, account_id, char_id);
+ g->member[idx].sd = guild->sd_check(guild_id, account_id, char_id);
if(oldonline!=online)
clif->guild_memberlogin_notice(g, idx, online);
@@ -1095,8 +1054,7 @@ int guild_memberposition_changed(struct guild *g,int idx,int pos)
/*====================================================
* Change guild title or member
*---------------------------------------------------*/
-int guild_change_position(int guild_id,int idx,
- int mode,int exp_mode,const char *name)
+int guild_change_position(int guild_id,int idx,int mode,int exp_mode,const char *name)
{
struct guild_position p;
@@ -1202,7 +1160,7 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
}
}
{// update guardians (mobs)
- DBIterator* iter = db_iterator(castle_db);
+ DBIterator* iter = db_iterator(guild->castle_db);
struct guild_castle* gc;
for( gc = (struct guild_castle*)dbi_first(iter) ; dbi_exists(iter); gc = (struct guild_castle*)dbi_next(iter) )
{
@@ -1228,9 +1186,9 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
dbi_destroy(iter);
}
{// update npcs (flags or other npcs that used flagemblem to attach to this guild)
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->u.scr.guild_id == guild_id ) {
- clif->guild_emblem_area(&guild_flags[i]->bl);
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->u.scr.guild_id == guild_id ) {
+ clif->guild_emblem_area(&guild->flags[i]->bl);
}
}
}
@@ -1240,12 +1198,12 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
/**
* @see DBCreateData
*/
-static DBData create_expcache(DBKey key, va_list args)
+DBData create_expcache(DBKey key, va_list args)
{
struct guild_expcache *c;
struct map_session_data *sd = va_arg(args, struct map_session_data*);
- c = ers_alloc(expcache_ers, struct guild_expcache);
+ c = ers_alloc(guild->expcache_ers, struct guild_expcache);
c->guild_id = sd->status.guild_id;
c->account_id = sd->status.account_id;
c->char_id = sd->status.char_id;
@@ -1276,7 +1234,7 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) {
exp = exp * per / 100;
//Otherwise tax everything.
- c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd));
+ c = DB->data2ptr(guild->expcache_db->ensure(guild->expcache_db, DB->i2key(sd->status.char_id), guild->create_expcache, sd));
if (c->exp > UINT64_MAX - exp)
c->exp = UINT64_MAX;
@@ -1299,7 +1257,7 @@ int guild_getexp(struct map_session_data *sd,int exp)
if (sd->status.guild_id == 0 || sd->guild == NULL)
return 0;
- c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd));
+ c = DB->data2ptr(guild->expcache_db->ensure(guild->expcache_db, DB->i2key(sd->status.char_id), guild->create_expcache, sd));
if (c->exp > UINT64_MAX - exp)
c->exp = UINT64_MAX;
else
@@ -1459,11 +1417,11 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g[0],0) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g[0],0) >= battle_config.max_guild_alliance ) {
clif->guild_allianceack(sd,4);
return 0;
}
- if( guild_get_alliance_count(g[1],0) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g[1],0) >= battle_config.max_guild_alliance ) {
clif->guild_allianceack(sd,3);
return 0;
}
@@ -1511,12 +1469,12 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
g=sd->guild;
tg=tsd->guild;
- if(g==NULL || guild_get_alliance_count(g,0) >= battle_config.max_guild_alliance){
+ if(g==NULL || guild->get_alliance_count(g,0) >= battle_config.max_guild_alliance){
clif->guild_allianceack(sd,4);
clif->guild_allianceack(tsd,3);
return 0;
}
- if(tg==NULL || guild_get_alliance_count(tg,0) >= battle_config.max_guild_alliance){
+ if(tg==NULL || guild->get_alliance_count(tg,0) >= battle_config.max_guild_alliance){
clif->guild_allianceack(sd,3);
clif->guild_allianceack(tsd,4);
return 0;
@@ -1582,7 +1540,7 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g,1) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g,1) >= battle_config.max_guild_alliance ) {
clif->guild_oppositionack(sd,1);
return 0;
}
@@ -1765,15 +1723,15 @@ int guild_broken(int guild_id,int flag)
}
}
- guild_db->foreach(guild_db,guild_broken_sub,guild_id);
- castle_db->foreach(castle_db,castle_guild_broken_sub,guild_id);
+ guild->db->foreach(guild->db,guild->broken_sub,guild_id);
+ guild->castle_db->foreach(guild->castle_db,guild->castle_broken_sub,guild_id);
gstorage->delete(guild_id);
if( hChSys.ally ) {
if( g->channel != NULL ) {
clif->chsys_delete(( struct hChSysCh * )g->channel);
}
}
- idb_remove(guild_db,guild_id);
+ idb_remove(guild->db,guild_id);
return 0;
}
@@ -1911,7 +1869,7 @@ int guild_break(struct map_session_data *sd,char *name) {
void guild_castle_map_init(void)
{
DBIterator* iter = NULL;
- int num = db_size(castle_db);
+ int num = db_size(guild->castle_db);
if (num > 0) {
struct guild_castle* gc = NULL;
@@ -1919,7 +1877,7 @@ void guild_castle_map_init(void)
CREATE(castle_ids, int, num);
cursor = castle_ids;
- iter = db_iterator(castle_db);
+ iter = db_iterator(guild->castle_db);
for (gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter)) {
*(cursor++) = gc->castle_id;
}
@@ -2015,7 +1973,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
static struct linkdb_node *gc_save_pending = NULL;
if (castle_id < 0) { // char-server reconnected
- linkdb_foreach(&gc_save_pending, guild_castle_reconnect_sub);
+ linkdb_foreach(&gc_save_pending, guild->castle_reconnect_sub);
linkdb_final(&gc_save_pending);
} else {
int *data;
@@ -2107,7 +2065,7 @@ int guild_checkcastles(struct guild *g)
{
int nb_cas = 0;
struct guild_castle* gc = NULL;
- DBIterator *iter = db_iterator(castle_db);
+ DBIterator *iter = db_iterator(guild->castle_db);
for (gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter)) {
if (gc->guild_id == g->guild_id) {
@@ -2133,38 +2091,38 @@ void guild_flag_add(struct npc_data *nd) {
int i;
/* check */
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->bl.id == nd->bl.id ) {
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->bl.id == nd->bl.id ) {
return;/* exists, most likely updated the id. */
}
}
- i = guild_flags_count;/* save the current slot */
+ i = guild->flags_count;/* save the current slot */
/* add */
- RECREATE(guild_flags,struct npc_data*,++guild_flags_count);
+ RECREATE(guild->flags,struct npc_data*,++guild->flags_count);
/* save */
- guild_flags[i] = nd;
+ guild->flags[i] = nd;
}
void guild_flag_remove(struct npc_data *nd) {
int i, cursor;
- if( guild_flags_count == 0 )
+ if( guild->flags_count == 0 )
return;
/* find it */
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->bl.id == nd->bl.id ) {/* found */
- guild_flags[i] = NULL;
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->bl.id == nd->bl.id ) {/* found */
+ guild->flags[i] = NULL;
break;
}
}
/* compact list */
- for( i = 0, cursor = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] == NULL )
+ for( i = 0, cursor = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] == NULL )
continue;
if( cursor != i ) {
- memmove(&guild_flags[cursor], &guild_flags[i], sizeof(struct npc_data*));
+ memmove(&guild->flags[cursor], &guild->flags[i], sizeof(struct npc_data*));
}
cursor++;
@@ -2175,7 +2133,7 @@ void guild_flag_remove(struct npc_data *nd) {
/**
* @see DBApply
*/
-static int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
+int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
struct eventlist *next = NULL;
struct eventlist *current = DB->data2ptr(data);
while (current != NULL) {
@@ -2189,15 +2147,15 @@ static int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
/**
* @see DBApply
*/
-static int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
- ers_free(expcache_ers, DB->data2ptr(data));
+int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
+ ers_free(guild->expcache_ers, DB->data2ptr(data));
return 0;
}
/**
* @see DBApply
*/
-static int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
+int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
struct guild_castle* gc = DB->data2ptr(data);
if( gc->temp_guardians )
aFree(gc->temp_guardians);
@@ -2208,36 +2166,33 @@ static int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
/* called when scripts are reloaded/unloaded */
void guild_flags_clear(void) {
int i;
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] )
- guild_flags[i] = NULL;
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] )
+ guild->flags[i] = NULL;
}
- guild_flags_count = 0;
+ guild->flags_count = 0;
}
void do_init_guild(void) {
- guild_db = idb_alloc(DB_OPT_RELEASE_DATA);
- castle_db = idb_alloc(DB_OPT_BASE);
- guild_expcache_db = idb_alloc(DB_OPT_BASE);
- guild_infoevent_db = idb_alloc(DB_OPT_BASE);
- expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE);
-
- guild_flags_count = 0;
-
- sv->readdb(map->db_path, "castle_db.txt", ',', 4, 5, -1, &guild_read_castledb);
+ guild->db = idb_alloc(DB_OPT_RELEASE_DATA);
+ guild->castle_db = idb_alloc(DB_OPT_BASE);
+ guild->expcache_db = idb_alloc(DB_OPT_BASE);
+ guild->infoevent_db = idb_alloc(DB_OPT_BASE);
+ guild->expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE);
+
+ sv->readdb(map->db_path, "castle_db.txt", ',', 4, 5, -1, guild->read_castledb);
- memset(guild_skill_tree,0,sizeof(guild_skill_tree));
- sv->readdb(map->db_path, "guild_skill_tree.txt", ',', 2+MAX_GUILD_SKILL_REQUIRE*2, 2+MAX_GUILD_SKILL_REQUIRE*2, -1, &guild_read_guildskill_tree_db); //guild skill tree [Komurka]
+ sv->readdb(map->db_path, "guild_skill_tree.txt", ',', 2+MAX_GUILD_SKILL_REQUIRE*2, 2+MAX_GUILD_SKILL_REQUIRE*2, -1, guild->read_guildskill_tree_db); //guild skill tree [Komurka]
- timer->add_func_list(guild_payexp_timer,"guild_payexp_timer");
- timer->add_func_list(guild_send_xy_timer, "guild_send_xy_timer");
- timer->add_interval(timer->gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
- timer->add_interval(timer->gettick()+GUILD_SEND_XY_INVERVAL,guild_send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL);
+ timer->add_func_list(guild->payexp_timer,"guild_payexp_timer");
+ timer->add_func_list(guild->send_xy_timer, "guild_send_xy_timer");
+ timer->add_interval(timer->gettick()+GUILD_PAYEXP_INVERVAL,guild->payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
+ timer->add_interval(timer->gettick()+GUILD_SEND_XY_INVERVAL,guild->send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL);
}
void do_final_guild(void) {
- DBIterator *iter = db_iterator(guild_db);
+ DBIterator *iter = db_iterator(guild->db);
struct guild *g;
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) {
@@ -2251,13 +2206,14 @@ void do_final_guild(void) {
dbi_destroy(iter);
- db_destroy(guild_db);
- castle_db->destroy(castle_db,guild_castle_db_final);
- guild_expcache_db->destroy(guild_expcache_db,guild_expcache_db_final);
- guild_infoevent_db->destroy(guild_infoevent_db,eventlist_db_final);
- ers_destroy(expcache_ers);
-
- aFree(guild_flags);/* never empty; created on boot */
+ db_destroy(guild->db);
+ guild->castle_db->destroy(guild->castle_db,guild->castle_db_final);
+ guild->expcache_db->destroy(guild->expcache_db,guild->expcache_db_final);
+ guild->infoevent_db->destroy(guild->infoevent_db,guild->eventlist_db_final);
+ ers_destroy(guild->expcache_ers);
+
+ if( guild->flags )
+ aFree(guild->flags);
}
void guild_defaults(void) {
guild = &guild_s;
@@ -2265,6 +2221,18 @@ void guild_defaults(void) {
guild->init = do_init_guild;
guild->final = do_final_guild;
/* */
+ guild->db = NULL;
+ guild->castle_db = NULL;
+ guild->expcache_db = NULL;
+ guild->infoevent_db = NULL;
+ /* */
+ guild->expcache_ers = NULL;
+ /* */
+ memset(guild->skill_tree, 0, sizeof(guild->skill_tree));
+ /* guild flags cache */
+ guild->flags = NULL;
+ guild->flags_count = 0;
+ /* */
guild->skill_get_max = guild_skill_get_max;
/* */
guild->checkskill = guild_checkskill;
@@ -2341,4 +2309,22 @@ void guild_defaults(void) {
guild->flags_clear = guild_flags_clear;
/* guild aura */
guild->aura_refresh = guild_guildaura_refresh;
+ /* */
+ guild->payexp_timer = guild_payexp_timer;
+ guild->sd_check = guild_sd_check;
+ guild->read_guildskill_tree_db = guild_read_guildskill_tree_db;
+ guild->read_castledb = guild_read_castledb;
+ guild->payexp_timer_sub = guild_payexp_timer_sub;
+ guild->send_xy_timer_sub = guild_send_xy_timer_sub;
+ guild->send_xy_timer = guild_send_xy_timer;
+ guild->create_expcache = create_expcache;
+ guild->eventlist_db_final = eventlist_db_final;
+ guild->expcache_db_final = guild_expcache_db_final;
+ guild->castle_db_final = guild_castle_db_final;
+ guild->broken_sub = guild_broken_sub;
+ guild->castle_broken_sub = castle_guild_broken_sub;
+ guild->makemember = guild_makemember;
+ guild->check_member = guild_check_member;
+ guild->get_alliance_count = guild_get_alliance_count;
+ guild->castle_reconnect_sub = guild_castle_reconnect_sub;
}
diff --git a/src/map/guild.h b/src/map/guild.h
index 1f61df09e..566ca7ce4 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -6,14 +6,32 @@
#define _GUILD_H_
//#include "../common/mmo.h"
+#include "map.h" // NAME_LENGTH
+
+/**
+ * Declarations
+ **/
struct guild;
struct guild_member;
struct guild_position;
struct guild_castle;
-#include "map.h" // NAME_LENGTH
struct map_session_data;
struct mob_data;
+/**
+ * Defines
+ **/
+#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
+#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
+#define MAX_GUILD_SKILL_REQUIRE 5
+
+/**
+ * Structures
+ **/
+struct eventlist {
+ char name[EVENT_NAME_LENGTH];
+ struct eventlist *next;
+};
//For quick linking to a guardian's info. [Skotlex]
struct guardian_data {
int number; //0-MAX_GUARDIANS-1 = Guardians. MAX_GUARDIANS = Emperium.
@@ -23,11 +41,36 @@ struct guardian_data {
char guild_name[NAME_LENGTH];
struct guild_castle* castle;
};
+struct guild_expcache {
+ int guild_id, account_id, char_id;
+ uint64 exp;
+};
+struct s_guild_skill_tree {
+ int id;
+ int max;
+ struct {
+ short id;
+ short lv;
+ } need[MAX_GUILD_SKILL_REQUIRE];
+};
+
struct guild_interface {
void (*init) (void);
void (*final) (void);
/* */
+ DBMap* db; // int guild_id -> struct guild*
+ DBMap* castle_db; // int castle_id -> struct guild_castle*
+ DBMap* expcache_db; // int char_id -> struct guild_expcache*
+ DBMap* infoevent_db; // int guild_id -> struct eventlist*
+ /* */
+ struct eri *expcache_ers; //For handling of guild exp payment.
+ /* */
+ struct s_guild_skill_tree skill_tree[MAX_GUILDSKILL];
+ /* guild flags cache */
+ struct npc_data **flags;
+ unsigned short flags_count;
+ /* */
int (*skill_get_max) (int id);
/* */
int (*checkskill) (struct guild *g,int id);
@@ -104,6 +147,24 @@ struct guild_interface {
void (*flags_clear) (void);
/* guild aura */
void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+ /* */
+ int (*payexp_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id);
+ bool (*read_guildskill_tree_db) (char* split[], int columns, int current);
+ bool (*read_castledb) (char* str[], int columns, int current);
+ int (*payexp_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ DBData (*create_expcache) (DBKey key, va_list args);
+ int (*eventlist_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*expcache_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*castle_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*broken_sub) (DBKey key, DBData *data, va_list ap);
+ int (*castle_broken_sub) (DBKey key, DBData *data, va_list ap);
+ void (*makemember) (struct guild_member *m,struct map_session_data *sd);
+ int (*check_member) (struct guild *g);
+ int (*get_alliance_count) (struct guild *g,int flag);
+ void (*castle_reconnect_sub) (void *key, void *data, va_list ap);
};
struct guild_interface *guild;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index a90faf2e2..9562ed5c3 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -28,8 +28,6 @@ struct s_homunculus_db {
unsigned char element, race, base_size, evo_size;
};
-extern struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS];
-
enum {
HOMUNCULUS_CLASS,
HOMUNCULUS_FOOD
diff --git a/src/map/instance.c b/src/map/instance.c
index 5ef089fae..17b66fa75 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -33,7 +33,7 @@ bool instance_is_valid(int instance_id) {
return false;
}
- if( instances[instance_id].state == INSTANCE_FREE ) {// uninitialized/freed instance slot
+ if( instance->list[instance_id].state == INSTANCE_FREE ) {// uninitialized/freed instance slot
return false;
}
@@ -88,30 +88,30 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
}
if( type != IOT_NONE && *icptr ) {
- ARR_FIND(0, *icptr, i, strcmp(instances[iptr[i]].name,name) == 0 );
+ ARR_FIND(0, *icptr, i, strcmp(instance->list[iptr[i]].name,name) == 0 );
if( i != *icptr )
return -4;/* already got this instance */
}
- ARR_FIND(0, instance->instances, i, instances[i].state == INSTANCE_FREE);
+ ARR_FIND(0, instance->instances, i, instance->list[i].state == INSTANCE_FREE);
if( i == instance->instances )
- RECREATE(instances, struct instance_data, ++instance->instances);
-
- instances[i].state = INSTANCE_IDLE;
- instances[i].id = i;
- instances[i].idle_timer = INVALID_TIMER;
- instances[i].idle_timeout = instances[i].idle_timeoutval = 0;
- instances[i].progress_timer = INVALID_TIMER;
- instances[i].progress_timeout = 0;
- instances[i].users = 0;
- instances[i].map = NULL;
- instances[i].num_map = 0;
- instances[i].owner_id = owner_id;
- instances[i].owner_type = type;
- instances[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
-
- safestrncpy( instances[i].name, name, sizeof(instances[i].name) );
+ RECREATE(instance->list, struct instance_data, ++instance->instances);
+
+ instance->list[i].state = INSTANCE_IDLE;
+ instance->list[i].id = i;
+ instance->list[i].idle_timer = INVALID_TIMER;
+ instance->list[i].idle_timeout = instance->list[i].idle_timeoutval = 0;
+ instance->list[i].progress_timer = INVALID_TIMER;
+ instance->list[i].progress_timeout = 0;
+ instance->list[i].users = 0;
+ instance->list[i].map = NULL;
+ instance->list[i].num_map = 0;
+ instance->list[i].owner_id = owner_id;
+ instance->list[i].owner_type = type;
+ instance->list[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
+
+ safestrncpy( instance->list[i].name, name, sizeof(instance->list[i].name) );
if( type != IOT_NONE ) {
ARR_FIND(0, *icptr, j, iptr[j] == -1);
@@ -244,9 +244,9 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
maplist[im].instance_src_map = m;
maplist[m].flag.src4instance = 1; // Flag this map as a src map for instances
- RECREATE(instances[instance_id].map, unsigned short, ++instances[instance_id].num_map);
+ RECREATE(instance->list[instance_id].map, unsigned short, ++instance->list[instance_id].num_map);
- instances[instance_id].map[instances[instance_id].num_map - 1] = im; // Attach to actual instance
+ instance->list[instance_id].map[instance->list[instance_id].num_map - 1] = im; // Attach to actual instance
map->addmap2db(&maplist[im]);
return im;
@@ -264,9 +264,9 @@ int instance_map2imap(int16 m, int instance_id) {
return -1;
}
- for( i = 0; i < instances[instance_id].num_map; i++ ) {
- if( instances[instance_id].map[i] && maplist[instances[instance_id].map[i]].instance_src_map == m )
- return instances[instance_id].map[i];
+ for( i = 0; i < instance->list[instance_id].num_map; i++ ) {
+ if( instance->list[instance_id].map[i] && maplist[instance->list[instance_id].map[i]].instance_src_map == m )
+ return instance->list[instance_id].map[i];
}
return -1;
}
@@ -313,10 +313,10 @@ void instance_init(int instance_id) {
if( !instance->valid(instance_id) )
return; // nothing to do
- for( i = 0; i < instances[instance_id].num_map; i++ )
- map->foreachinmap(instance_map_npcsub, maplist[instances[instance_id].map[i]].instance_src_map, BL_NPC, instances[instance_id].map[i]);
+ for( i = 0; i < instance->list[instance_id].num_map; i++ )
+ map->foreachinmap(instance_map_npcsub, maplist[instance->list[instance_id].map[i]].instance_src_map, BL_NPC, instance->list[instance_id].map[i]);
- instances[instance_id].state = INSTANCE_BUSY;
+ instance->list[instance_id].state = INSTANCE_BUSY;
}
/*--------------------------------------
@@ -410,18 +410,18 @@ void instance_del_map(int16 m) {
}
// Remove from instance
- for( i = 0; i < instances[maplist[m].instance_id].num_map; i++ ) {
- if( instances[maplist[m].instance_id].map[i] == m ) {
- instances[maplist[m].instance_id].num_map--;
- for( ; i < instances[maplist[m].instance_id].num_map; i++ )
- instances[maplist[m].instance_id].map[i] = instances[maplist[m].instance_id].map[i+1];
+ for( i = 0; i < instance->list[maplist[m].instance_id].num_map; i++ ) {
+ if( instance->list[maplist[m].instance_id].map[i] == m ) {
+ instance->list[maplist[m].instance_id].num_map--;
+ for( ; i < instance->list[maplist[m].instance_id].num_map; i++ )
+ instance->list[maplist[m].instance_id].map[i] = instance->list[maplist[m].instance_id].map[i+1];
i = -1;
break;
}
}
- if( i == instances[maplist[m].instance_id].num_map )
- ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", maplist[m].name, instances[maplist[m].instance_id].name, m);
+ if( i == instance->list[maplist[m].instance_id].num_map )
+ ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", maplist[m].name, instance->list[maplist[m].instance_id].name, m);
if( maplist[m].channel )
clif->chsys_delete(maplist[m].channel);
@@ -456,41 +456,41 @@ void instance_destroy(int instance_id) {
if( !instance->valid(instance_id) )
return; // nothing to do
- if( instances[instance_id].progress_timeout && instances[instance_id].progress_timeout <= now )
+ if( instance->list[instance_id].progress_timeout && instance->list[instance_id].progress_timeout <= now )
type = 1;
- else if( instances[instance_id].idle_timeout && instances[instance_id].idle_timeout <= now )
+ else if( instance->list[instance_id].idle_timeout && instance->list[instance_id].idle_timeout <= now )
type = 2;
else
type = 3;
clif->instance(instance_id, 5, type); // Report users this instance has been destroyed
- switch ( instances[instance_id].owner_type ) {
+ switch ( instance->list[instance_id].owner_type ) {
case IOT_NONE:
break;
case IOT_CHAR:
- if( ( sd = map->id2sd(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( sd = map->id2sd(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = sd->instance;
icptr = &sd->instances;
break;
case IOT_PARTY:
- if( ( p = party->search(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( p = party->search(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = p->instance;
icptr = &p->instances;
break;
case IOT_GUILD:
- if( ( g = guild->search(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( g = guild->search(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = g->instance;
icptr = &g->instances;
break;
default:
- ShowError("instance_destroy: unknown type %d for owner_id %d and name '%s'.\n", instances[instance_id].owner_type,instances[instance_id].owner_id,instances[instance_id].name);
+ ShowError("instance_destroy: unknown type %d for owner_id %d and name '%s'.\n", instance->list[instance_id].owner_type,instance->list[instance_id].owner_id,instance->list[instance_id].name);
break;
}
@@ -500,27 +500,27 @@ void instance_destroy(int instance_id) {
iptr[j] = -1;
}
- while( instances[instance_id].num_map && last != instances[instance_id].map[0] ) { // Remove all maps from instance
- last = instances[instance_id].map[0];
- instance->del_map( instances[instance_id].map[0] );
+ while( instance->list[instance_id].num_map && last != instance->list[instance_id].map[0] ) { // Remove all maps from instance
+ last = instance->list[instance_id].map[0];
+ instance->del_map( instance->list[instance_id].map[0] );
}
- if( instances[instance_id].vars )
- db_destroy(instances[instance_id].vars);
+ if( instance->list[instance_id].vars )
+ db_destroy(instance->list[instance_id].vars);
- if( instances[instance_id].progress_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].progress_timer, instance_destroy_timer);
- if( instances[instance_id].idle_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].idle_timer, instance_destroy_timer);
+ if( instance->list[instance_id].progress_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].progress_timer, instance->destroy_timer);
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].idle_timer, instance->destroy_timer);
- instances[instance_id].vars = NULL;
+ instance->list[instance_id].vars = NULL;
- if( instances[instance_id].map )
- aFree(instances[instance_id].map);
+ if( instance->list[instance_id].map )
+ aFree(instance->list[instance_id].map);
- instances[instance_id].map = NULL;
- instances[instance_id].state = INSTANCE_FREE;
- instances[instance_id].num_map = 0;
+ instance->list[instance_id].map = NULL;
+ instance->list[instance_id].state = INSTANCE_FREE;
+ instance->list[instance_id].num_map = 0;
}
/*--------------------------------------
@@ -530,20 +530,20 @@ void instance_check_idle(int instance_id) {
bool idle = true;
unsigned int now = (unsigned int)time(NULL);
- if( !instance->valid(instance_id) || instances[instance_id].idle_timeoutval == 0 )
+ if( !instance->valid(instance_id) || instance->list[instance_id].idle_timeoutval == 0 )
return;
- if( instances[instance_id].users )
+ if( instance->list[instance_id].users )
idle = false;
- if( instances[instance_id].idle_timer != INVALID_TIMER && !idle ) {
- timer->delete(instances[instance_id].idle_timer, instance_destroy_timer);
- instances[instance_id].idle_timer = INVALID_TIMER;
- instances[instance_id].idle_timeout = 0;
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER && !idle ) {
+ timer->delete(instance->list[instance_id].idle_timer, instance->destroy_timer);
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
+ instance->list[instance_id].idle_timeout = 0;
clif->instance(instance_id, 3, 0); // Notify instance users normal instance expiration
- } else if( instances[instance_id].idle_timer == INVALID_TIMER && idle ) {
- instances[instance_id].idle_timeout = now + instances[instance_id].idle_timeoutval;
- instances[instance_id].idle_timer = timer->add( timer->gettick() + instances[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0);
+ } else if( instance->list[instance_id].idle_timer == INVALID_TIMER && idle ) {
+ instance->list[instance_id].idle_timeout = now + instance->list[instance_id].idle_timeoutval;
+ instance->list[instance_id].idle_timer = timer->add( timer->gettick() + instance->list[instance_id].idle_timeoutval * 1000, instance->destroy_timer, instance_id, 0);
clif->instance(instance_id, 4, 0); // Notify instance users it will be destroyed of no user join it again in "X" time
}
}
@@ -558,30 +558,30 @@ void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsign
if( !instance->valid(instance_id) )
return;
- if( instances[instance_id].progress_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].progress_timer, instance_destroy_timer);
- if( instances[instance_id].idle_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].idle_timer, instance_destroy_timer);
+ if( instance->list[instance_id].progress_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].progress_timer, instance->destroy_timer);
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].idle_timer, instance->destroy_timer);
if( progress_timeout ) {
- instances[instance_id].progress_timeout = now + progress_timeout;
- instances[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0);
+ instance->list[instance_id].progress_timeout = now + progress_timeout;
+ instance->list[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance->destroy_timer, instance_id, 0);
} else {
- instances[instance_id].progress_timeout = 0;
- instances[instance_id].progress_timer = INVALID_TIMER;
+ instance->list[instance_id].progress_timeout = 0;
+ instance->list[instance_id].progress_timer = INVALID_TIMER;
}
if( idle_timeout ) {
- instances[instance_id].idle_timeoutval = idle_timeout;
- instances[instance_id].idle_timer = INVALID_TIMER;
- instance_check_idle(instance_id);
+ instance->list[instance_id].idle_timeoutval = idle_timeout;
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
+ instance->check_idle(instance_id);
} else {
- instances[instance_id].idle_timeoutval = 0;
- instances[instance_id].idle_timeout = 0;
- instances[instance_id].idle_timer = INVALID_TIMER;
+ instance->list[instance_id].idle_timeoutval = 0;
+ instance->list[instance_id].idle_timeout = 0;
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
}
- if( instances[instance_id].idle_timer == INVALID_TIMER && instances[instance_id].progress_timer != INVALID_TIMER )
+ if( instance->list[instance_id].idle_timer == INVALID_TIMER && instance->list[instance_id].progress_timer != INVALID_TIMER )
clif->instance(instance_id, 3, 0);
}
@@ -607,14 +607,15 @@ void do_final_instance(void) {
instance->destroy(i);
}
- if( instances )
- aFree(instances);
+ if( instance->list )
+ aFree(instance->list);
+ instance->list = NULL;
instance->instances = 0;
}
void do_init_instance(void) {
- timer->add_func_list(instance_destroy_timer, "instance_destroy_timer");
+ timer->add_func_list(instance->destroy_timer, "instance_destroy_timer");
}
void instance_defaults(void) {
@@ -627,7 +628,8 @@ void instance_defaults(void) {
instance->start_id = 0;
/* count */
instance->instances = 0;
-
+ /* */
+ instance->list = NULL;
/* */
instance->create = instance_create;
instance->add_map = instance_add_map;
@@ -640,4 +642,5 @@ void instance_defaults(void) {
instance->check_kick = instance_check_kick;
instance->set_timeout = instance_set_timeout;
instance->valid = instance_is_valid;
+ instance->destroy_timer = instance_destroy_timer;
}
diff --git a/src/map/instance.h b/src/map/instance.h
index 164aaf662..ba6d26d59 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -42,14 +42,14 @@ struct instance_data {
unsigned int idle_timeout, idle_timeoutval;
};
-struct instance_data *instances;
-
struct instance_interface {
void (*init) (void);
void (*final) (void);
/* start point */
unsigned short start_id;
- unsigned short instances;
+ unsigned short instances;/* count */
+ /* */
+ struct instance_data *list;/* pointer to a chunk of consecutive memory, access via instance->list[0]..etc */
/* */
int (*create) (int party_id, const char *name, enum instance_owner_type type);
int (*add_map) (const char *name, int instance_id, bool usebasename, const char *map_name);
@@ -62,6 +62,7 @@ struct instance_interface {
void (*check_kick) (struct map_session_data *sd);
void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout);
bool (*valid) (int instance_id);
+ int (*destroy_timer) (int tid, unsigned int tick, int id, intptr_t data);
};
struct instance_interface *instance;
diff --git a/src/map/intif.c b/src/map/intif.c
index 97ff8a681..e42679ec6 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -33,18 +33,7 @@
#include <string.h>
-static const int packet_len_table[]={
- -1,-1,27,-1, -1, 0,37,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
- 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
- 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
- 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
- -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
- -1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus]
- -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
- -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
- 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
- -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
-};
+struct intif_interface intif_s;
#define inter_fd chrif->fd // alias
@@ -850,7 +839,7 @@ int intif_homunculus_requestdelete(int homun_id)
// Packets receive from inter server
// Wisp/Page reception // rewritten by [Yor]
-int intif_parse_WisMessage(int fd) {
+void intif_parse_WisMessage(int fd) {
struct map_session_data* sd;
char *wisp_source;
char name[NAME_LENGTH];
@@ -863,11 +852,11 @@ int intif_parse_WisMessage(int fd) {
if(sd == NULL || strcmp(sd->status.name, name) != 0) {
//Not found
intif_wis_replay(id,1);
- return 0;
+ return;
}
if(sd->state.ignoreAll) {
intif_wis_replay(id, 2);
- return 0;
+ return;
}
wisp_source = (char *) RFIFOP(fd,8); // speed up [Yor]
for(i=0; i < MAX_IGNORE_LIST &&
@@ -878,17 +867,15 @@ int intif_parse_WisMessage(int fd) {
if (i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0')
{ //Ignored
intif_wis_replay(id, 2);
- return 0;
+ return;
}
//Success to send whisper.
clif->wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
intif_wis_replay(id,0); // succes
- return 0;
}
// Wisp/page transmission result reception
-int intif_parse_WisEnd(int fd)
-{
+void intif_parse_WisEnd(int fd) {
struct map_session_data* sd;
if (battle_config.etc_log)
@@ -897,11 +884,10 @@ int intif_parse_WisEnd(int fd)
if (sd != NULL)
clif->wis_end(sd->fd, RFIFOB(fd,26));
- return 0;
+ return;
}
-static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
-{
+int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) {
int permission = va_arg(va, int);
char *wisp_name;
char *message;
@@ -918,7 +904,7 @@ static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
// Received wisp message from map-server via char-server for ALL gm
// 0x3003/0x3803 <packet_len>.w <wispname>.24B <permission>.l <message>.?B
-int mapif_parse_WisToGM(int fd)
+void mapif_parse_WisToGM(int fd)
{
int permission, mes_len;
char Wisp_name[NAME_LENGTH];
@@ -936,11 +922,10 @@ int mapif_parse_WisToGM(int fd)
if (message != mbuf)
aFree(message);
- return 0;
}
// Request player registre
-int intif_parse_Registers(int fd)
+void intif_parse_Registers(int fd)
{
int j,p,len,max, flag;
struct map_session_data *sd;
@@ -955,7 +940,7 @@ int intif_parse_Registers(int fd)
if (sd && RFIFOB(fd,12) == 3 && sd->status.char_id != char_id)
sd = NULL; //Character registry from another character.
}
- if (!sd) return 1;
+ if (!sd) return;
flag = (sd->save_reg.global_num == -1 || sd->save_reg.account_num == -1 || sd->save_reg.account2_num == -1);
@@ -977,7 +962,7 @@ int intif_parse_Registers(int fd)
break;
default:
ShowError("intif_parse_Registers: Unrecognized type %d\n",RFIFOB(fd,12));
- return 0;
+ return;
}
for(j=0,p=13;j<max && p<RFIFOW(fd,2);j++){
sscanf((char*)RFIFOP(fd,p), "%31c%n", reg[j].str,&len);
@@ -991,10 +976,9 @@ int intif_parse_Registers(int fd)
if (flag && sd->save_reg.global_num > -1 && sd->save_reg.account_num > -1 && sd->save_reg.account2_num > -1)
pc->reg_received(sd); //Received all registry values, execute init scripts and what-not. [Skotlex]
- return 1;
}
-int intif_parse_LoadGuildStorage(int fd)
+void intif_parse_LoadGuildStorage(int fd)
{
struct guild_storage *gstor;
struct map_session_data *sd;
@@ -1002,168 +986,143 @@ int intif_parse_LoadGuildStorage(int fd)
guild_id = RFIFOL(fd,8);
if(guild_id <= 0)
- return 1;
+ return;
sd=map->id2sd( RFIFOL(fd,4) );
if(sd==NULL){
ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4));
- return 1;
+ return;
}
gstor=gstorage->id2storage(guild_id);
if(!gstor) {
ShowWarning("intif_parse_LoadGuildStorage: error guild_id %d not exist\n",guild_id);
- return 1;
+ return;
}
if (gstor->storage_status == 1) { // Already open.. lets ignore this update
ShowWarning("intif_parse_LoadGuildStorage: storage received for a client already open (User %d:%d)\n", sd->status.account_id, sd->status.char_id);
- return 1;
+ return;
}
if (gstor->dirty) { // Already have storage, and it has been modified and not saved yet! Exploit! [Skotlex]
ShowWarning("intif_parse_LoadGuildStorage: received storage for an already modified non-saved storage! (User %d:%d)\n", sd->status.account_id, sd->status.char_id);
- return 1;
+ return;
}
if( RFIFOW(fd,2)-12 != sizeof(struct guild_storage) ){
ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-12 , sizeof(struct guild_storage));
gstor->storage_status = 0;
- return 1;
+ return;
}
memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage));
gstorage->open(sd);
- return 0;
}
// ACK guild_storage saved
-int intif_parse_SaveGuildStorage(int fd)
+void intif_parse_SaveGuildStorage(int fd)
{
gstorage->saved(/*RFIFOL(fd,2), */RFIFOL(fd,6));
- return 0;
}
// ACK party creation
-int intif_parse_PartyCreated(int fd)
+void intif_parse_PartyCreated(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party created by account %d\n\n", RFIFOL(fd,2));
party->created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
- return 0;
}
// Receive party info
-int intif_parse_PartyInfo(int fd)
+void intif_parse_PartyInfo(int fd)
{
if( RFIFOW(fd,2) == 12 ){
ShowWarning("intif: party noinfo (char_id=%d party_id=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8));
party->recv_noinfo(RFIFOL(fd,8), RFIFOL(fd,4));
- return 0;
+ return;
}
if( RFIFOW(fd,2) != 8+sizeof(struct party) )
ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party));
party->recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
- return 0;
}
// ACK adding party member
-int intif_parse_PartyMemberAdded(int fd)
+void intif_parse_PartyMemberAdded(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member added Party (%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
party->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
- return 0;
}
// ACK changing party option
-int intif_parse_PartyOptionChanged(int fd)
+void intif_parse_PartyOptionChanged(int fd)
{
party->optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
- return 0;
}
// ACK member leaving party
-int intif_parse_PartyMemberWithdraw(int fd)
+void intif_parse_PartyMemberWithdraw(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member withdraw: Party(%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
party->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- return 0;
}
// ACK party break
-int intif_parse_PartyBroken(int fd)
-{
+void intif_parse_PartyBroken(int fd) {
party->broken(RFIFOL(fd,2));
- return 0;
}
// ACK party on new map
-int intif_parse_PartyMove(int fd)
+void intif_parse_PartyMove(int fd)
{
party->recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
- return 0;
}
// ACK party messages
-int intif_parse_PartyMessage(int fd)
-{
+void intif_parse_PartyMessage(int fd) {
party->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
- return 0;
}
// ACK guild creation
-int intif_parse_GuildCreated(int fd)
-{
+void intif_parse_GuildCreated(int fd) {
guild->created(RFIFOL(fd,2),RFIFOL(fd,6));
- return 0;
}
// ACK guild infos
-int intif_parse_GuildInfo(int fd)
-{
+void intif_parse_GuildInfo(int fd) {
if(RFIFOW(fd,2) == 8) {
ShowWarning("intif: guild noinfo %d\n",RFIFOL(fd,4));
guild->recv_noinfo(RFIFOL(fd,4));
- return 0;
+ return;
}
if( RFIFOW(fd,2)!=sizeof(struct guild)+4 )
ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
guild->recv_info((struct guild *)RFIFOP(fd,4));
- return 0;
}
// ACK adding guild member
-int intif_parse_GuildMemberAdded(int fd)
-{
+void intif_parse_GuildMemberAdded(int fd) {
if(battle_config.etc_log)
ShowInfo("intif: guild member added %d %d %d %d\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
guild->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
- return 0;
}
// ACK member leaving guild
-int intif_parse_GuildMemberWithdraw(int fd)
-{
+void intif_parse_GuildMemberWithdraw(int fd) {
guild->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),(char *)RFIFOP(fd,55),(char *)RFIFOP(fd,15));
- return 0;
}
// ACK guild member basic info
-int intif_parse_GuildMemberInfoShort(int fd)
-{
+void intif_parse_GuildMemberInfoShort(int fd) {
guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17));
- return 0;
}
// ACK guild break
-int intif_parse_GuildBroken(int fd)
-{
+void intif_parse_GuildBroken(int fd) {
guild->broken(RFIFOL(fd,2),RFIFOB(fd,6));
- return 0;
}
// basic guild info change notice
// 0x3839 <packet len>.w <guild id>.l <type>.w <data>.?b
-int intif_parse_GuildBasicInfoChanged(int fd)
-{
+void intif_parse_GuildBasicInfoChanged(int fd) {
//int len = RFIFOW(fd,2) - 10;
int guild_id = RFIFOL(fd,4);
int type = RFIFOW(fd,8);
@@ -1171,21 +1130,18 @@ int intif_parse_GuildBasicInfoChanged(int fd)
struct guild* g = guild->search(guild_id);
if( g == NULL )
- return 0;
+ return;
switch(type) {
- case GBI_EXP: g->exp = RFIFOQ(fd,10); break;
- case GBI_GUILDLV: g->guild_lv = RFIFOW(fd,10); break;
- case GBI_SKILLPOINT: g->skill_point = RFIFOL(fd,10); break;
+ case GBI_EXP: g->exp = RFIFOQ(fd,10); break;
+ case GBI_GUILDLV: g->guild_lv = RFIFOW(fd,10); break;
+ case GBI_SKILLPOINT: g->skill_point = RFIFOL(fd,10); break;
}
-
- return 0;
}
// guild member info change notice
// 0x383a <packet len>.w <guild id>.l <account id>.l <char id>.l <type>.w <data>.?b
-int intif_parse_GuildMemberInfoChanged(int fd)
-{
+void intif_parse_GuildMemberInfoChanged(int fd) {
//int len = RFIFOW(fd,2) - 18;
int guild_id = RFIFOL(fd,4);
int account_id = RFIFOL(fd,8);
@@ -1198,130 +1154,103 @@ int intif_parse_GuildMemberInfoChanged(int fd)
g = guild->search(guild_id);
if( g == NULL )
- return 0;
+ return;
idx = guild->getindex(g,account_id,char_id);
if( idx == -1 )
- return 0;
+ return;
switch( type ) {
- case GMI_POSITION: g->member[idx].position = RFIFOW(fd,18); guild->memberposition_changed(g,idx,RFIFOW(fd,18)); break;
- case GMI_EXP: g->member[idx].exp = RFIFOQ(fd,18); break;
- case GMI_HAIR: g->member[idx].hair = RFIFOW(fd,18); break;
- case GMI_HAIR_COLOR: g->member[idx].hair_color = RFIFOW(fd,18); break;
- case GMI_GENDER: g->member[idx].gender = RFIFOW(fd,18); break;
- case GMI_CLASS: g->member[idx].class_ = RFIFOW(fd,18); break;
- case GMI_LEVEL: g->member[idx].lv = RFIFOW(fd,18); break;
+ case GMI_POSITION: g->member[idx].position = RFIFOW(fd,18); guild->memberposition_changed(g,idx,RFIFOW(fd,18)); break;
+ case GMI_EXP: g->member[idx].exp = RFIFOQ(fd,18); break;
+ case GMI_HAIR: g->member[idx].hair = RFIFOW(fd,18); break;
+ case GMI_HAIR_COLOR: g->member[idx].hair_color = RFIFOW(fd,18); break;
+ case GMI_GENDER: g->member[idx].gender = RFIFOW(fd,18); break;
+ case GMI_CLASS: g->member[idx].class_ = RFIFOW(fd,18); break;
+ case GMI_LEVEL: g->member[idx].lv = RFIFOW(fd,18); break;
}
- return 0;
}
// ACK change of guild title
-int intif_parse_GuildPosition(int fd)
-{
+void intif_parse_GuildPosition(int fd) {
if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 )
ShowError("intif: guild info : data size error\n %d %d %d",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild_position)+12);
guild->position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
- return 0;
}
// ACK change of guild skill update
-int intif_parse_GuildSkillUp(int fd)
-{
+void intif_parse_GuildSkillUp(int fd) {
guild->skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- return 0;
}
// ACK change of guild relationship
-int intif_parse_GuildAlliance(int fd)
-{
+void intif_parse_GuildAlliance(int fd) {
guild->allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
- return 0;
}
// ACK change of guild notice
-int intif_parse_GuildNotice(int fd)
-{
+void intif_parse_GuildNotice(int fd) {
guild->notice_changed(RFIFOL(fd,2),(char *) RFIFOP(fd,6),(char *) RFIFOP(fd,66));
- return 0;
}
// ACK change of guild emblem
-int intif_parse_GuildEmblem(int fd)
-{
+void intif_parse_GuildEmblem(int fd) {
guild->emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8), (char *)RFIFOP(fd,12));
- return 0;
}
// ACK guild message
-int intif_parse_GuildMessage(int fd)
-{
+void intif_parse_GuildMessage(int fd) {
guild->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
- return 0;
}
// Reply guild castle data request
-int intif_parse_GuildCastleDataLoad(int fd)
-{
- return guild->castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
+void intif_parse_GuildCastleDataLoad(int fd) {
+ guild->castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
}
// ACK change of guildmaster
-int intif_parse_GuildMasterChanged(int fd)
-{
- return guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+void intif_parse_GuildMasterChanged(int fd) {
+ guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
}
// Request pet creation
-int intif_parse_CreatePet(int fd)
-{
+void intif_parse_CreatePet(int fd) {
pet->get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
- return 0;
}
// ACK pet data
-int intif_parse_RecvPetData(int fd)
-{
+void intif_parse_RecvPetData(int fd) {
struct s_pet p;
int len;
len=RFIFOW(fd,2);
if(sizeof(struct s_pet)!=len-9) {
if(battle_config.etc_log)
ShowError("intif: pet data: data size error %d %d\n",sizeof(struct s_pet),len-9);
- }
- else{
+ } else {
memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet));
pet->recv_petdata(RFIFOL(fd,4),&p,RFIFOB(fd,8));
}
-
- return 0;
}
-
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
// ACK pet save data
-int intif_parse_SavePetOk(int fd)
-{
+void intif_parse_SavePetOk(int fd) {
if(RFIFOB(fd,6) == 1)
ShowError("pet data save failure\n");
-
- return 0;
}
-
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
// ACK deleting pet
-int intif_parse_DeletePetOk(int fd)
-{
+void intif_parse_DeletePetOk(int fd) {
if(RFIFOB(fd,2) == 1)
ShowError("pet data delete failure\n");
-
- return 0;
}
// ACK changing name resquest, players,pets,hommon
-int intif_parse_ChangeNameOk(int fd)
+void intif_parse_ChangeNameOk(int fd)
{
struct map_session_data *sd = NULL;
if((sd=map->id2sd(RFIFOL(fd,2)))==NULL ||
sd->status.char_id != RFIFOL(fd,6))
- return 0;
+ return;
switch (RFIFOB(fd,10)) {
case 0: //Players [NOT SUPPORTED YET]
@@ -1333,54 +1262,43 @@ int intif_parse_ChangeNameOk(int fd)
homun->change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11));
break;
}
- return 0;
+ return;
}
//----------------------------------------------------------------
// Homunculus recv packets [albator]
-int intif_parse_CreateHomunculus(int fd)
-{
- int len;
- len=RFIFOW(fd,2)-9;
+void intif_parse_CreateHomunculus(int fd) {
+ int len = RFIFOW(fd,2)-9;
if(sizeof(struct s_homunculus)!=len) {
if(battle_config.etc_log)
ShowError("intif: create homun data: data size error %d != %d\n",sizeof(struct s_homunculus),len);
- return 0;
+ return;
}
homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8)) ;
- return 0;
}
-int intif_parse_RecvHomunculusData(int fd)
-{
- int len;
-
- len=RFIFOW(fd,2)-9;
+void intif_parse_RecvHomunculusData(int fd) {
+ int len = RFIFOW(fd,2)-9;
if(sizeof(struct s_homunculus)!=len) {
if(battle_config.etc_log)
ShowError("intif: homun data: data size error %d %d\n",sizeof(struct s_homunculus),len);
- return 0;
+ return;
}
homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8));
- return 0;
}
-int intif_parse_SaveHomunculusOk(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_SaveHomunculusOk(int fd) {
if(RFIFOB(fd,6) != 1)
ShowError("homunculus data save failure for account %d\n", RFIFOL(fd,2));
-
- return 0;
}
-int intif_parse_DeleteHomunculusOk(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_DeleteHomunculusOk(int fd) {
if(RFIFOB(fd,2) != 1)
ShowError("Homunculus data delete failure\n");
-
- return 0;
}
/**************************************
@@ -1398,15 +1316,14 @@ int intif_request_questlog(TBL_PC *sd)
return 0;
}
-int intif_parse_questlog(int fd)
-{
+void intif_parse_QuestLog(int fd) {
int char_id = RFIFOL(fd, 4);
int i;
TBL_PC * sd = map->charid2sd(char_id);
//User not online anymore
if(!sd)
- return -1;
+ return;
sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest);
@@ -1420,7 +1337,7 @@ int intif_parse_questlog(int fd)
if( sd->quest_index[i] < 0 )
{
- ShowError("intif_parse_questlog: quest %d not found in DB.\n",sd->quest_log[i].quest_id);
+ ShowError("intif_parse_QuestLog: quest %d not found in DB.\n",sd->quest_log[i].quest_id);
sd->avail_quests--;
sd->num_quests--;
i--;
@@ -1432,20 +1349,16 @@ int intif_parse_questlog(int fd)
}
quest->pc_login(sd);
-
- return 0;
}
-int intif_parse_questsave(int fd) {
+void intif_parse_QuestSave(int fd) {
int cid = RFIFOL(fd, 2);
TBL_PC *sd = map->id2sd(cid);
if( !RFIFOB(fd, 6) )
- ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", cid);
+ ShowError("intif_parse_QuestSave: Failed to save quest(s) for character %d!\n", cid);
else if( sd )
sd->save_quest = false;
-
- return 0;
}
int intif_quest_save(TBL_PC *sd)
@@ -1491,23 +1404,20 @@ int intif_Mail_requestinbox(int char_id, unsigned char flag)
return 0;
}
-int intif_parse_Mail_inboxreceived(int fd)
-{
+void intif_parse_MailInboxReceived(int fd) {
struct map_session_data *sd;
unsigned char flag = RFIFOB(fd,8);
sd = map->charid2sd(RFIFOL(fd,4));
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_inboxreceived: char not found %d\n",RFIFOL(fd,4));
- return 1;
+ if (sd == NULL) {
+ ShowError("intif_parse_MailInboxReceived: char not found %d\n",RFIFOL(fd,4));
+ return;
}
- if (RFIFOW(fd,2) - 9 != sizeof(struct mail_data))
- {
- ShowError("intif_parse_Mail_inboxreceived: data size error %d %d\n", RFIFOW(fd,2) - 9, sizeof(struct mail_data));
- return 1;
+ if (RFIFOW(fd,2) - 9 != sizeof(struct mail_data)) {
+ ShowError("intif_parse_MailInboxReceived: data size error %d %d\n", RFIFOW(fd,2) - 9, sizeof(struct mail_data));
+ return;
}
//FIXME: this operation is not safe [ultramage]
@@ -1516,13 +1426,11 @@ int intif_parse_Mail_inboxreceived(int fd)
if (flag)
clif->mail_refreshinbox(sd);
- else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) )
- {
+ else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) ) {
char output[128];
sprintf(output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked);
clif->disp_onlyself(sd, output, strlen(output));
}
- return 0;
}
/*------------------------------------------
* Mail Read
@@ -1556,29 +1464,26 @@ int intif_Mail_getattach(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_getattach(int fd) {
+void intif_parse_MailGetAttach(int fd) {
struct map_session_data *sd;
struct item item;
int zeny = RFIFOL(fd,8);
sd = map->charid2sd( RFIFOL(fd,4) );
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_getattach: char not found %d\n",RFIFOL(fd,4));
- return 1;
+ if (sd == NULL) {
+ ShowError("intif_parse_MailGetAttach: char not found %d\n",RFIFOL(fd,4));
+ return;
}
- if (RFIFOW(fd,2) - 12 != sizeof(struct item))
- {
- ShowError("intif_parse_Mail_getattach: data size error %d %d\n", RFIFOW(fd,2) - 16, sizeof(struct item));
- return 1;
+ if (RFIFOW(fd,2) - 12 != sizeof(struct item)) {
+ ShowError("intif_parse_MailGetAttach: data size error %d %d\n", RFIFOW(fd,2) - 16, sizeof(struct item));
+ return;
}
memcpy(&item, RFIFOP(fd,12), sizeof(struct item));
mail->getattachment(sd, zeny, &item);
- return 0;
}
/*------------------------------------------
* Delete Message
@@ -1597,24 +1502,21 @@ int intif_Mail_delete(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_delete(int fd) {
+void intif_parse_MailDelete(int fd) {
+ struct map_session_data *sd;
int char_id = RFIFOL(fd,2);
int mail_id = RFIFOL(fd,6);
bool failed = RFIFOB(fd,10);
-
- struct map_session_data *sd = map->charid2sd(char_id);
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_delete: char not found %d\n", char_id);
- return 1;
+
+ if ( (sd = map->charid2sd(char_id)) == NULL) {
+ ShowError("intif_parse_MailDelete: char not found %d\n", char_id);
+ return;
}
- if (!failed)
- {
+ if (!failed) {
int i;
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
- if( i < MAIL_MAX_INBOX )
- {
+ if( i < MAIL_MAX_INBOX ) {
memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message));
sd->mail.inbox.amount--;
}
@@ -1624,7 +1526,6 @@ int intif_parse_Mail_delete(int fd) {
}
clif->mail_delete(sd->fd, mail_id, failed);
- return 0;
}
/*------------------------------------------
* Return Message
@@ -1643,23 +1544,20 @@ int intif_Mail_return(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_return(int fd) {
+void intif_parse_MailReturn(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int mail_id = RFIFOL(fd,6);
short fail = RFIFOB(fd,10);
- if( sd == NULL )
- {
- ShowError("intif_parse_Mail_return: char not found %d\n",RFIFOL(fd,2));
- return 1;
+ if( sd == NULL ) {
+ ShowError("intif_parse_MailReturn: char not found %d\n",RFIFOL(fd,2));
+ return;
}
- if( !fail )
- {
+ if( !fail ) {
int i;
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
- if( i < MAIL_MAX_INBOX )
- {
+ if( i < MAIL_MAX_INBOX ) {
memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message));
sd->mail.inbox.amount--;
}
@@ -1669,7 +1567,6 @@ int intif_parse_Mail_return(int fd) {
}
clif->mail_return(sd->fd, mail_id, fail);
- return 0;
}
/*------------------------------------------
* Send Mail
@@ -1691,15 +1588,13 @@ int intif_Mail_send(int account_id, struct mail_message *msg)
return 1;
}
-static void intif_parse_Mail_send(int fd)
-{
+void intif_parse_MailSend(int fd) {
struct mail_message msg;
struct map_session_data *sd;
bool fail;
- if( RFIFOW(fd,2) - 4 != sizeof(struct mail_message) )
- {
- ShowError("intif_parse_Mail_send: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
+ if( RFIFOW(fd,2) - 4 != sizeof(struct mail_message) ) {
+ ShowError("intif_parse_MailSend: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
return;
}
@@ -1719,7 +1614,7 @@ static void intif_parse_Mail_send(int fd)
}
}
-static void intif_parse_Mail_new(int fd) {
+void intif_parse_MailNew(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int mail_id = RFIFOL(fd,6);
const char* sender_name = (char*)RFIFOP(fd,10);
@@ -1756,7 +1651,7 @@ int intif_Auction_requestlist(int char_id, short type, int price, const char* se
return 0;
}
-static void intif_parse_Auction_results(int fd) {
+void intif_parse_AuctionResults(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,4));
short count = RFIFOW(fd,8);
short pages = RFIFOW(fd,10);
@@ -1784,12 +1679,12 @@ int intif_Auction_register(struct auction_data *auction)
return 1;
}
-static void intif_parse_Auction_register(int fd) {
+void intif_parse_AuctionRegister(int fd) {
struct map_session_data *sd;
struct auction_data auction;
if( RFIFOW(fd,2) - 4 != sizeof(struct auction_data) ) {
- ShowError("intif_parse_Auction_register: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
+ ShowError("intif_parse_AuctionRegister: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
return;
}
@@ -1801,9 +1696,7 @@ static void intif_parse_Auction_register(int fd) {
clif->auction_message(sd->fd, 1); // Confirmation Packet ??
if( map->save_settings&32 )
chrif->save(sd,0);
- }
- else
- {
+ } else {
int zeny = auction.hours*battle_config.auction_feeperhour;
clif->auction_message(sd->fd, 4);
@@ -1827,7 +1720,7 @@ int intif_Auction_cancel(int char_id, unsigned int auction_id)
return 0;
}
-static void intif_parse_Auction_cancel(int fd) {
+void intif_parse_AuctionCancel(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int result = RFIFOB(fd,6);
@@ -1835,10 +1728,10 @@ static void intif_parse_Auction_cancel(int fd) {
return;
switch( result ) {
- case 0: clif->auction_message(sd->fd, 2); break;
- case 1: clif->auction_close(sd->fd, 2); break;
- case 2: clif->auction_close(sd->fd, 1); break;
- case 3: clif->auction_message(sd->fd, 3); break;
+ case 0: clif->auction_message(sd->fd, 2); break;
+ case 1: clif->auction_close(sd->fd, 2); break;
+ case 2: clif->auction_close(sd->fd, 1); break;
+ case 3: clif->auction_message(sd->fd, 3); break;
}
}
@@ -1856,7 +1749,7 @@ int intif_Auction_close(int char_id, unsigned int auction_id)
return 0;
}
-static void intif_parse_Auction_close(int fd) {
+void intif_parse_AuctionClose(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
unsigned char result = RFIFOB(fd,6);
@@ -1864,8 +1757,7 @@ static void intif_parse_Auction_close(int fd) {
return;
clif->auction_close(sd->fd, result);
- if( result == 0 )
- {
+ if( result == 0 ) {
// FIXME: Leeching off a parse function
clif->pAuction_cancelreg(fd, sd);
intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1);
@@ -1891,7 +1783,7 @@ int intif_Auction_bid(int char_id, const char* name, unsigned int auction_id, in
return 0;
}
-static void intif_parse_Auction_bid(int fd) {
+void intif_parse_AuctionBid(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int bid = RFIFOL(fd,6);
unsigned char result = RFIFOB(fd,10);
@@ -1910,7 +1802,7 @@ static void intif_parse_Auction_bid(int fd) {
}
// Used to send 'You have won the auction' and 'You failed to won the auction' messages
-static void intif_parse_Auction_message(int fd) {
+void intif_parse_AuctionMessage(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
unsigned char result = RFIFOB(fd,6);
@@ -1938,18 +1830,16 @@ int intif_mercenary_create(struct s_mercenary *merc)
return 0;
}
-int intif_parse_mercenary_received(int fd)
-{
+void intif_parse_MercenaryReceived(int fd) {
int len = RFIFOW(fd,2) - 5;
- if( sizeof(struct s_mercenary) != len )
- {
+
+ if( sizeof(struct s_mercenary) != len ) {
if( battle_config.etc_log )
ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_mercenary), len);
- return 0;
+ return;
}
mercenary->data_received((struct s_mercenary*)RFIFOP(fd,5), RFIFOB(fd,4));
- return 0;
}
int intif_mercenary_request(int merc_id, int char_id)
@@ -1976,13 +1866,10 @@ int intif_mercenary_delete(int merc_id)
WFIFOSET(inter_fd,6);
return 0;
}
-
-int intif_parse_mercenary_deleted(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_MercenaryDeleted(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Mercenary data delete failure\n");
-
- return 0;
}
int intif_mercenary_save(struct s_mercenary *merc)
@@ -1999,13 +1886,10 @@ int intif_mercenary_save(struct s_mercenary *merc)
WFIFOSET(inter_fd,size);
return 0;
}
-
-int intif_parse_mercenary_saved(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_MercenarySaved(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Mercenary data save failure\n");
-
- return 0;
}
/*==========================================
@@ -2026,18 +1910,16 @@ int intif_elemental_create(struct s_elemental *ele)
return 0;
}
-int intif_parse_elemental_received(int fd)
-{
+void intif_parse_ElementalReceived(int fd) {
int len = RFIFOW(fd,2) - 5;
- if( sizeof(struct s_elemental) != len )
- {
+
+ if( sizeof(struct s_elemental) != len ) {
if( battle_config.etc_log )
ShowError("intif: create elemental data size error %d != %d\n", sizeof(struct s_elemental), len);
- return 0;
+ return;
}
elemental->data_received((struct s_elemental*)RFIFOP(fd,5), RFIFOB(fd,4));
- return 0;
}
int intif_elemental_request(int ele_id, int char_id)
@@ -2064,13 +1946,10 @@ int intif_elemental_delete(int ele_id)
WFIFOSET(inter_fd,6);
return 0;
}
-
-int intif_parse_elemental_deleted(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_ElementalDeleted(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Elemental data delete failure\n");
-
- return 0;
}
int intif_elemental_save(struct s_elemental *ele)
@@ -2087,13 +1966,10 @@ int intif_elemental_save(struct s_elemental *ele)
WFIFOSET(inter_fd,size);
return 0;
}
-
-int intif_parse_elemental_saved(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_ElementalSaved(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Elemental data save failure\n");
-
- return 0;
}
void intif_request_accinfo( int u_fd, int aid, int group_lv, char* query ) {
@@ -2139,12 +2015,12 @@ int intif_parse(int fd)
int packet_len, cmd;
cmd = RFIFOW(fd,0);
// Verify ID of the packet
- if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
- packet_len_table[cmd-0x3800]==0){
+ if(cmd<0x3800 || cmd>=0x3800+(sizeof(intif->packet_len_table)/sizeof(intif->packet_len_table[0])) ||
+ intif->packet_len_table[cmd-0x3800]==0){
return 0;
}
// Check the length of the packet
- packet_len = packet_len_table[cmd-0x3800];
+ packet_len = intif->packet_len_table[cmd-0x3800];
if(packet_len==-1){
if(RFIFOREST(fd)<4)
return 2;
@@ -2155,81 +2031,81 @@ int intif_parse(int fd)
}
// Processing branch
switch(cmd){
- case 0x3800:
- if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
- clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT);
- else //Color announce.
- clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
- break;
- case 0x3801: intif_parse_WisMessage(fd); break;
- case 0x3802: intif_parse_WisEnd(fd); break;
- case 0x3803: mapif_parse_WisToGM(fd); break;
- case 0x3804: intif_parse_Registers(fd); break;
- case 0x3806: intif_parse_ChangeNameOk(fd); break;
- case 0x3807: intif_parse_MessageToFD(fd); break;
- case 0x3818: intif_parse_LoadGuildStorage(fd); break;
- case 0x3819: intif_parse_SaveGuildStorage(fd); break;
- case 0x3820: intif_parse_PartyCreated(fd); break;
- case 0x3821: intif_parse_PartyInfo(fd); break;
- case 0x3822: intif_parse_PartyMemberAdded(fd); break;
- case 0x3823: intif_parse_PartyOptionChanged(fd); break;
- case 0x3824: intif_parse_PartyMemberWithdraw(fd); break;
- case 0x3825: intif_parse_PartyMove(fd); break;
- case 0x3826: intif_parse_PartyBroken(fd); break;
- case 0x3827: intif_parse_PartyMessage(fd); break;
- case 0x3830: intif_parse_GuildCreated(fd); break;
- case 0x3831: intif_parse_GuildInfo(fd); break;
- case 0x3832: intif_parse_GuildMemberAdded(fd); break;
- case 0x3834: intif_parse_GuildMemberWithdraw(fd); break;
- case 0x3835: intif_parse_GuildMemberInfoShort(fd); break;
- case 0x3836: intif_parse_GuildBroken(fd); break;
- case 0x3837: intif_parse_GuildMessage(fd); break;
- case 0x3839: intif_parse_GuildBasicInfoChanged(fd); break;
- case 0x383a: intif_parse_GuildMemberInfoChanged(fd); break;
- case 0x383b: intif_parse_GuildPosition(fd); break;
- case 0x383c: intif_parse_GuildSkillUp(fd); break;
- case 0x383d: intif_parse_GuildAlliance(fd); break;
- case 0x383e: intif_parse_GuildNotice(fd); break;
- case 0x383f: intif_parse_GuildEmblem(fd); break;
- case 0x3840: intif_parse_GuildCastleDataLoad(fd); break;
- case 0x3843: intif_parse_GuildMasterChanged(fd); break;
-
- //Quest system
- case 0x3860: intif_parse_questlog(fd); break;
- case 0x3861: intif_parse_questsave(fd); break;
-
-// Mail System
- case 0x3848: intif_parse_Mail_inboxreceived(fd); break;
- case 0x3849: intif_parse_Mail_new(fd); break;
- case 0x384a: intif_parse_Mail_getattach(fd); break;
- case 0x384b: intif_parse_Mail_delete(fd); break;
- case 0x384c: intif_parse_Mail_return(fd); break;
- case 0x384d: intif_parse_Mail_send(fd); break;
-// Auction System
- case 0x3850: intif_parse_Auction_results(fd); break;
- case 0x3851: intif_parse_Auction_register(fd); break;
- case 0x3852: intif_parse_Auction_cancel(fd); break;
- case 0x3853: intif_parse_Auction_close(fd); break;
- case 0x3854: intif_parse_Auction_message(fd); break;
- case 0x3855: intif_parse_Auction_bid(fd); break;
-
-// Mercenary System
- case 0x3870: intif_parse_mercenary_received(fd); break;
- case 0x3871: intif_parse_mercenary_deleted(fd); break;
- case 0x3872: intif_parse_mercenary_saved(fd); break;
-// Elemental System
- case 0x387c: intif_parse_elemental_received(fd); break;
- case 0x387d: intif_parse_elemental_deleted(fd); break;
- case 0x387e: intif_parse_elemental_saved(fd); break;
-
- case 0x3880: intif_parse_CreatePet(fd); break;
- case 0x3881: intif_parse_RecvPetData(fd); break;
- case 0x3882: intif_parse_SavePetOk(fd); break;
- case 0x3883: intif_parse_DeletePetOk(fd); break;
- case 0x3890: intif_parse_CreateHomunculus(fd); break;
- case 0x3891: intif_parse_RecvHomunculusData(fd); break;
- case 0x3892: intif_parse_SaveHomunculusOk(fd); break;
- case 0x3893: intif_parse_DeleteHomunculusOk(fd); break;
+ case 0x3800:
+ if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
+ clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT);
+ else //Color announce.
+ clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
+ break;
+ case 0x3801: intif->pWisMessage(fd); break;
+ case 0x3802: intif->pWisEnd(fd); break;
+ case 0x3803: intif->pWisToGM(fd); break;
+ case 0x3804: intif->pRegisters(fd); break;
+ case 0x3806: intif->pChangeNameOk(fd); break;
+ case 0x3807: intif->pMessageToFD(fd); break;
+ case 0x3818: intif->pLoadGuildStorage(fd); break;
+ case 0x3819: intif->pSaveGuildStorage(fd); break;
+ case 0x3820: intif->pPartyCreated(fd); break;
+ case 0x3821: intif->pPartyInfo(fd); break;
+ case 0x3822: intif->pPartyMemberAdded(fd); break;
+ case 0x3823: intif->pPartyOptionChanged(fd); break;
+ case 0x3824: intif->pPartyMemberWithdraw(fd); break;
+ case 0x3825: intif->pPartyMove(fd); break;
+ case 0x3826: intif->pPartyBroken(fd); break;
+ case 0x3827: intif->pPartyMessage(fd); break;
+ case 0x3830: intif->pGuildCreated(fd); break;
+ case 0x3831: intif->pGuildInfo(fd); break;
+ case 0x3832: intif->pGuildMemberAdded(fd); break;
+ case 0x3834: intif->pGuildMemberWithdraw(fd); break;
+ case 0x3835: intif->pGuildMemberInfoShort(fd); break;
+ case 0x3836: intif->pGuildBroken(fd); break;
+ case 0x3837: intif->pGuildMessage(fd); break;
+ case 0x3839: intif->pGuildBasicInfoChanged(fd); break;
+ case 0x383a: intif->pGuildMemberInfoChanged(fd); break;
+ case 0x383b: intif->pGuildPosition(fd); break;
+ case 0x383c: intif->pGuildSkillUp(fd); break;
+ case 0x383d: intif->pGuildAlliance(fd); break;
+ case 0x383e: intif->pGuildNotice(fd); break;
+ case 0x383f: intif->pGuildEmblem(fd); break;
+ case 0x3840: intif->pGuildCastleDataLoad(fd); break;
+ case 0x3843: intif->pGuildMasterChanged(fd); break;
+
+ //Quest system
+ case 0x3860: intif->pQuestLog(fd); break;
+ case 0x3861: intif->pQuestSave(fd); break;
+
+ // Mail System
+ case 0x3848: intif->pMailInboxReceived(fd); break;
+ case 0x3849: intif->pMailNew(fd); break;
+ case 0x384a: intif->pMailGetAttach(fd); break;
+ case 0x384b: intif->pMailDelete(fd); break;
+ case 0x384c: intif->pMailReturn(fd); break;
+ case 0x384d: intif->pMailSend(fd); break;
+ // Auction System
+ case 0x3850: intif->pAuctionResults(fd); break;
+ case 0x3851: intif->pAuctionRegister(fd); break;
+ case 0x3852: intif->pAuctionCancel(fd); break;
+ case 0x3853: intif->pAuctionClose(fd); break;
+ case 0x3854: intif->pAuctionMessage(fd); break;
+ case 0x3855: intif->pAuctionBid(fd); break;
+
+ // Mercenary System
+ case 0x3870: intif->pMercenaryReceived(fd); break;
+ case 0x3871: intif->pMercenaryDeleted(fd); break;
+ case 0x3872: intif->pMercenarySaved(fd); break;
+ // Elemental System
+ case 0x387c: intif->pElementalReceived(fd); break;
+ case 0x387d: intif->pElementalDeleted(fd); break;
+ case 0x387e: intif->pElementalSaved(fd); break;
+
+ case 0x3880: intif->pCreatePet(fd); break;
+ case 0x3881: intif->pRecvPetData(fd); break;
+ case 0x3882: intif->pSavePetOk(fd); break;
+ case 0x3883: intif->pDeletePetOk(fd); break;
+ case 0x3890: intif->pCreateHomunculus(fd); break;
+ case 0x3891: intif->pRecvHomunculusData(fd); break;
+ case 0x3892: intif->pSaveHomunculusOk(fd); break;
+ case 0x3893: intif->pDeleteHomunculusOk(fd); break;
default:
ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0));
return 0;
@@ -2245,30 +2121,38 @@ int intif_parse(int fd)
* created by Susu
*-------------------------------------*/
void intif_defaults(void) {
+ const int packet_len_table [INTIF_PACKET_LEN_TABLE_SIZE] = {
+ -1,-1,27,-1, -1, 0,37,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
+ 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
+ 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
+ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
+ -1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus]
+ -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
+ -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+ -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
+ };
+
intif = &intif_s;
- /* funcs */
+ /* */
+ memcpy(intif->packet_len_table,&packet_len_table,sizeof(intif->packet_len_table));
+ /* funcs */
intif->parse = intif_parse;
-
intif->create_pet = intif_create_pet;
-
intif->broadcast = intif_broadcast;
intif->broadcast2 = intif_broadcast2;
intif->main_message = intif_main_message;
-
intif->wis_message = intif_wis_message;
intif->wis_message_to_gm = intif_wis_message_to_gm;
-
intif->saveregistry = intif_saveregistry;
intif->request_registry = intif_request_registry;
-
intif->request_guild_storage = intif_request_guild_storage;
intif->send_guild_storage = intif_send_guild_storage;
-
intif->create_party = intif_create_party;
intif->request_partyinfo = intif_request_partyinfo;
-
intif->party_addmember = intif_party_addmember;
intif->party_changeoption = intif_party_changeoption;
intif->party_leave = intif_party_leave;
@@ -2276,7 +2160,6 @@ void intif_defaults(void) {
intif->break_party = intif_break_party;
intif->party_message = intif_party_message;
intif->party_leaderchange = intif_party_leaderchange;
-
intif->guild_create = intif_guild_create;
intif->guild_request_info = intif_guild_request_info;
intif->guild_addmember = intif_guild_addmember;
@@ -2330,6 +2213,68 @@ void intif_defaults(void) {
intif->elemental_save = intif_elemental_save;
/* @accinfo */
intif->request_accinfo = intif_request_accinfo;
-
+ /* */
intif->CheckForCharServer = CheckForCharServer;
+ /* */
+ intif->pWisMessage = intif_parse_WisMessage;
+ intif->pWisEnd = intif_parse_WisEnd;
+ intif->pWisToGM_sub = mapif_parse_WisToGM_sub;
+ intif->pWisToGM = mapif_parse_WisToGM;
+ intif->pRegisters = intif_parse_Registers;
+ intif->pChangeNameOk = intif_parse_ChangeNameOk;
+ intif->pMessageToFD = intif_parse_MessageToFD;
+ intif->pLoadGuildStorage = intif_parse_LoadGuildStorage;
+ intif->pSaveGuildStorage = intif_parse_SaveGuildStorage;
+ intif->pPartyCreated = intif_parse_PartyCreated;
+ intif->pPartyInfo = intif_parse_PartyInfo;
+ intif->pPartyMemberAdded = intif_parse_PartyMemberAdded;
+ intif->pPartyOptionChanged = intif_parse_PartyOptionChanged;
+ intif->pPartyMemberWithdraw = intif_parse_PartyMemberWithdraw;
+ intif->pPartyMove = intif_parse_PartyMove;
+ intif->pPartyBroken = intif_parse_PartyBroken;
+ intif->pPartyMessage = intif_parse_PartyMessage;
+ intif->pGuildCreated = intif_parse_GuildCreated;
+ intif->pGuildInfo = intif_parse_GuildInfo;
+ intif->pGuildMemberAdded = intif_parse_GuildMemberAdded;
+ intif->pGuildMemberWithdraw = intif_parse_GuildMemberWithdraw;
+ intif->pGuildMemberInfoShort = intif_parse_GuildMemberInfoShort;
+ intif->pGuildBroken = intif_parse_GuildBroken;
+ intif->pGuildMessage = intif_parse_GuildMessage;
+ intif->pGuildBasicInfoChanged = intif_parse_GuildBasicInfoChanged;
+ intif->pGuildMemberInfoChanged = intif_parse_GuildMemberInfoChanged;
+ intif->pGuildPosition = intif_parse_GuildPosition;
+ intif->pGuildSkillUp = intif_parse_GuildSkillUp;
+ intif->pGuildAlliance = intif_parse_GuildAlliance;
+ intif->pGuildNotice = intif_parse_GuildNotice;
+ intif->pGuildEmblem = intif_parse_GuildEmblem;
+ intif->pGuildCastleDataLoad = intif_parse_GuildCastleDataLoad;
+ intif->pGuildMasterChanged = intif_parse_GuildMasterChanged;
+ intif->pQuestLog = intif_parse_QuestLog;
+ intif->pQuestSave = intif_parse_QuestSave;
+ intif->pMailInboxReceived = intif_parse_MailInboxReceived;
+ intif->pMailNew = intif_parse_MailNew;
+ intif->pMailGetAttach = intif_parse_MailGetAttach;
+ intif->pMailDelete = intif_parse_MailDelete;
+ intif->pMailReturn = intif_parse_MailReturn;
+ intif->pMailSend = intif_parse_MailSend;
+ intif->pAuctionResults = intif_parse_AuctionResults;
+ intif->pAuctionRegister = intif_parse_AuctionRegister;
+ intif->pAuctionCancel = intif_parse_AuctionCancel;
+ intif->pAuctionClose = intif_parse_AuctionClose;
+ intif->pAuctionMessage = intif_parse_AuctionMessage;
+ intif->pAuctionBid = intif_parse_AuctionBid;
+ intif->pMercenaryReceived = intif_parse_MercenaryReceived;
+ intif->pMercenaryDeleted = intif_parse_MercenaryDeleted;
+ intif->pMercenarySaved = intif_parse_MercenarySaved;
+ intif->pElementalReceived = intif_parse_ElementalReceived;
+ intif->pElementalDeleted = intif_parse_ElementalDeleted;
+ intif->pElementalSaved = intif_parse_ElementalSaved;
+ intif->pCreatePet = intif_parse_CreatePet;
+ intif->pRecvPetData = intif_parse_RecvPetData;
+ intif->pSavePetOk = intif_parse_SavePetOk;
+ intif->pDeletePetOk = intif_parse_DeletePetOk;
+ intif->pCreateHomunculus = intif_parse_CreateHomunculus;
+ intif->pRecvHomunculusData = intif_parse_RecvHomunculusData;
+ intif->pSaveHomunculusOk = intif_parse_SaveHomunculusOk;
+ intif->pDeleteHomunculusOk = intif_parse_DeleteHomunculusOk;
}
diff --git a/src/map/intif.h b/src/map/intif.h
index 8abcf819d..768e735de 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -1,8 +1,14 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _INTIF_H_
#define _INFIF_H_
-//#include "../common/mmo.h"
+
+
+/**
+ * Declarations
+ **/
struct party_member;
struct guild_member;
struct guild_position;
@@ -13,17 +19,13 @@ struct s_elemental;
struct mail_message;
struct auction_data;
-
-
-
-
+/**
+ * Defines
+ **/
#define intif_rename_pc(sd, name) intif->rename(sd, 0, name)
#define intif_rename_pet(sd, name) intif->rename(sd, 1, name)
#define intif_rename_hom(sd, name) intif->rename(sd, 2, name)
-
-
-
-
+#define INTIF_PACKET_LEN_TABLE_SIZE 161
/*=====================================
@@ -32,30 +34,23 @@ struct auction_data;
* created by Susu
*-------------------------------------*/
struct intif_interface {
+ /* */
+ int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE];
/* funcs */
-
-
int (*parse) (int fd);
-
int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id,
- short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
-
+ short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
int (*broadcast) (const char* mes, int len, int type);
int (*broadcast2) (const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY);
int (*main_message) (struct map_session_data* sd, const char* message);
-
int (*wis_message) (struct map_session_data *sd,char *nick,char *mes,int mes_len);
int (*wis_message_to_gm) (char *Wisp_name, int permission, char *mes);
-
int (*saveregistry) (struct map_session_data *sd, int type);
int (*request_registry) (struct map_session_data *sd, int flag);
-
int (*request_guild_storage) (int account_id, int guild_id);
int (*send_guild_storage) (int account_id, struct guild_storage *gstor);
-
int (*create_party) (struct party_member *member,char *name,int item,int item2);
int (*request_partyinfo) (int party_id, int char_id);
-
int (*party_addmember) (int party_id,struct party_member *member);
int (*party_changeoption) (int party_id, int account_id, int exp, int item);
int (*party_leave) (int party_id,int account_id, int char_id);
@@ -63,7 +58,6 @@ struct intif_interface {
int (*break_party) (int party_id);
int (*party_message) (int party_id, int account_id, const char *mes,int len);
int (*party_leaderchange) (int party_id,int account_id,int char_id);
-
int (*guild_create) (const char *name, const struct guild_member *master);
int (*guild_request_info) (int guild_id);
int (*guild_addmember) (int guild_id, struct guild_member *m);
@@ -117,9 +111,71 @@ struct intif_interface {
int (*elemental_save) (struct s_elemental *ele);
/* @accinfo */
void (*request_accinfo) (int u_fd, int aid, int group_lv, char* query);
-
+ /* */
int (*CheckForCharServer) (void);
-} intif_s;
+ /* */
+ void (*pWisMessage) (int fd);
+ void (*pWisEnd) (int fd);
+ int (*pWisToGM_sub) (struct map_session_data* sd,va_list va);
+ void (*pWisToGM) (int fd);
+ void (*pRegisters) (int fd);
+ void (*pChangeNameOk) (int fd);
+ void (*pMessageToFD) (int fd);
+ void (*pLoadGuildStorage) (int fd);
+ void (*pSaveGuildStorage) (int fd);
+ void (*pPartyCreated) (int fd);
+ void (*pPartyInfo) (int fd);
+ void (*pPartyMemberAdded) (int fd);
+ void (*pPartyOptionChanged) (int fd);
+ void (*pPartyMemberWithdraw) (int fd);
+ void (*pPartyMove) (int fd);
+ void (*pPartyBroken) (int fd);
+ void (*pPartyMessage) (int fd);
+ void (*pGuildCreated) (int fd);
+ void (*pGuildInfo) (int fd);
+ void (*pGuildMemberAdded) (int fd);
+ void (*pGuildMemberWithdraw) (int fd);
+ void (*pGuildMemberInfoShort) (int fd);
+ void (*pGuildBroken) (int fd);
+ void (*pGuildMessage) (int fd);
+ void (*pGuildBasicInfoChanged) (int fd);
+ void (*pGuildMemberInfoChanged) (int fd);
+ void (*pGuildPosition) (int fd);
+ void (*pGuildSkillUp) (int fd);
+ void (*pGuildAlliance) (int fd);
+ void (*pGuildNotice) (int fd);
+ void (*pGuildEmblem) (int fd);
+ void (*pGuildCastleDataLoad) (int fd);
+ void (*pGuildMasterChanged) (int fd);
+ void (*pQuestLog) (int fd);
+ void (*pQuestSave) (int fd);
+ void (*pMailInboxReceived) (int fd);
+ void (*pMailNew) (int fd);
+ void (*pMailGetAttach) (int fd);
+ void (*pMailDelete) (int fd);
+ void (*pMailReturn) (int fd);
+ void (*pMailSend) (int fd);
+ void (*pAuctionResults) (int fd);
+ void (*pAuctionRegister) (int fd);
+ void (*pAuctionCancel) (int fd);
+ void (*pAuctionClose) (int fd);
+ void (*pAuctionMessage) (int fd);
+ void (*pAuctionBid) (int fd);
+ void (*pMercenaryReceived) (int fd);
+ void (*pMercenaryDeleted) (int fd);
+ void (*pMercenarySaved) (int fd);
+ void (*pElementalReceived) (int fd);
+ void (*pElementalDeleted) (int fd);
+ void (*pElementalSaved) (int fd);
+ void (*pCreatePet) (int fd);
+ void (*pRecvPetData) (int fd);
+ void (*pSavePetOk) (int fd);
+ void (*pDeletePetOk) (int fd);
+ void (*pCreateHomunculus) (int fd);
+ void (*pRecvHomunculusData) (int fd);
+ void (*pSaveHomunculusOk) (int fd);
+ void (*pDeleteHomunculusOk) (int fd);
+};
struct intif_interface *intif;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index ee0eea5ff..f7ee8a884 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -354,7 +354,10 @@ void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
if (jobmask & 1<<23) //Soul Linker
bclass[2] |= 1<<MAPID_TAEKWON;
if (jobmask & 1<<JOB_GUNSLINGER)
+ {//Rebellion job can equip Gunslinger equips. [Rytech]
bclass[0] |= 1<<MAPID_GUNSLINGER;
+ bclass[1] |= 1<<MAPID_GUNSLINGER;
+ }
if (jobmask & 1<<JOB_NINJA)
{bclass[0] |= 1<<MAPID_NINJA;
bclass[1] |= 1<<MAPID_NINJA;}//Kagerou/Oboro jobs can equip Ninja equips. [Rytech]
@@ -366,6 +369,8 @@ void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
bclass[2] |= 1<<MAPID_GANGSI;
if (jobmask & 1<<29) //Kagerou / Oboro
bclass[1] |= 1<<MAPID_NINJA;
+ if (jobmask & 1<<30) //Rebellion
+ bclass[1] |= 1<<MAPID_GUNSLINGER;
}
void create_dummy_data(void)
diff --git a/src/map/log.c b/src/map/log.c
index 929143ba7..5d88e3df4 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -20,36 +20,8 @@
struct log_interface log_s;
-/// filters for item logging
-typedef enum e_log_filter {
- LOG_FILTER_NONE = 0x000,
- LOG_FILTER_ALL = 0x001,
- // bits
- LOG_FILTER_HEALING = 0x002, // Healing items (0)
- LOG_FILTER_ETC_AMMO = 0x004, // Etc Items(3) + Arrows (10)
- LOG_FILTER_USABLE = 0x008, // Usable Items(2) + Scrolls, Lures(11) + Usable Cash Items(18)
- LOG_FILTER_WEAPON = 0x010, // Weapons(4)
- LOG_FILTER_ARMOR = 0x020, // Shields, Armors, Headgears, Accessories, Garments and Shoes(5)
- LOG_FILTER_CARD = 0x040, // Cards(6)
- LOG_FILTER_PETITEM = 0x080, // Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
- LOG_FILTER_PRICE = 0x100, // Log expensive items ( >= price_log )
- LOG_FILTER_AMOUNT = 0x200, // Log large amount of items ( >= amount_log )
- LOG_FILTER_REFINE = 0x400, // Log refined items ( refine >= refine_log ) [not implemented]
- LOG_FILTER_CHANCE = 0x800, // Log rare items and Emperium ( drop chance <= rare_log )
-}
-e_log_filter;
-
-#ifdef SQL_INNODB
-// database is using an InnoDB engine so do not use DELAYED
-#define LOG_QUERY "INSERT"
-#else
-// database is using a MyISAM engine so use DELAYED
-#define LOG_QUERY "INSERT DELAYED"
-#endif
-
-
/// obtain log type character for item/zeny logs
-static char log_picktype2char(e_log_pick_type type) {
+char log_picktype2char(e_log_pick_type type) {
switch( type ) {
case LOG_TYPE_TRADE: return 'T'; // (T)rade
case LOG_TYPE_VENDING: return 'V'; // (V)ending
@@ -78,7 +50,7 @@ static char log_picktype2char(e_log_pick_type type) {
/// obtain log type character for chat logs
-static char log_chattype2char(e_log_chat_type type) {
+char log_chattype2char(e_log_chat_type type) {
switch( type ) {
case LOG_CHAT_GLOBAL: return 'O'; // Gl(O)bal
case LOG_CHAT_WHISPER: return 'W'; // (W)hisper
@@ -94,7 +66,7 @@ static char log_chattype2char(e_log_chat_type type) {
/// check if this item should be logged according the settings
-static bool should_log_item(int nameid, int amount, int refine, struct item_data *id) {
+bool should_log_item(int nameid, int amount, int refine, struct item_data *id) {
int filter = logs->config.filter;
if( id == NULL )
@@ -156,7 +128,7 @@ void log_pick_sub_sql(int id, int16 m, e_log_pick_type type, int amount, struct
if( SQL_ERROR == SQL->Query(logmysql_handle,
LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `unique_id`) "
"VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
- logs->config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
+ logs->config.log_pick, id, logs->picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
maplist[m].name?maplist[m].name:"", itm->unique_id)
) {
Sql_ShowDebug(logmysql_handle);
@@ -173,7 +145,7 @@ void log_pick_sub_txt(int id, int16 m, e_log_pick_type type, int amount, struct
time(&curtime);
strftime(timestring, sizeof(timestring), "%m/%d/%Y %H:%M:%S", localtime(&curtime));
fprintf(logfp,"%s - %d\t%c\t%d,%d,%d,%d,%d,%d,%d,%s,'%"PRIu64"'\n",
- timestring, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
+ timestring, id, logs->picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
maplist[m].name?maplist[m].name:"", itm->unique_id);
fclose(logfp);
}
@@ -184,7 +156,7 @@ void log_pick(int id, int16 m, e_log_pick_type type, int amount, struct item* it
return;
}
- if( !should_log_item(itm->nameid, amount, itm->refine, data) )
+ if( !logs->should_log_item(itm->nameid, amount, itm->refine, data) )
return; //we skip logging this item set - it doesn't meet our logging conditions [Lupus]
logs->pick_sub(id,m,type,amount,itm,data);
@@ -204,7 +176,7 @@ void log_pick_mob(struct mob_data* md, e_log_pick_type type, int amount, struct
}
void log_zeny_sub_sql(struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount) {
if( SQL_ERROR == SQL->Query(logmysql_handle, LOG_QUERY " INTO `%s` (`time`, `char_id`, `src_id`, `type`, `amount`, `map`) VALUES (NOW(), '%d', '%d', '%c', '%d', '%s')",
- logs->config.log_zeny, sd->status.char_id, src_sd->status.char_id, log_picktype2char(type), amount, mapindex_id2name(sd->mapindex)) )
+ logs->config.log_zeny, sd->status.char_id, src_sd->status.char_id, logs->picktype2char(type), amount, mapindex_id2name(sd->mapindex)) )
{
Sql_ShowDebug(logmysql_handle);
return;
@@ -343,7 +315,7 @@ void log_chat_sub_sql(e_log_chat_type type, int type_id, int src_charid, int src
SqlStmt* stmt;
stmt = SQL->StmtMalloc(logmysql_handle);
- if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%c', '%d', '%d', '%d', '%s', '%d', '%d', ?, ?)", logs->config.log_chat, log_chattype2char(type), type_id, src_charid, src_accid, mapname, x, y)
+ if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%c', '%d', '%d', '%d', '%s', '%d', '%d', ?, ?)", logs->config.log_chat, logs->chattype2char(type), type_id, src_charid, src_accid, mapname, x, y)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, (char*)dst_charname, safestrnlen(dst_charname, NAME_LENGTH))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, CHAT_SIZE_MAX))
|| SQL_SUCCESS != SQL->StmtExecute(stmt)
@@ -363,7 +335,7 @@ void log_chat_sub_txt(e_log_chat_type type, int type_id, int src_charid, int src
return;
time(&curtime);
strftime(timestring, sizeof(timestring), "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp, "%s - %c,%d,%d,%d,%s,%d,%d,%s,%s\n", timestring, log_chattype2char(type), type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
+ fprintf(logfp, "%s - %c,%d,%d,%d,%s,%d,%d,%s,%s\n", timestring, logs->chattype2char(type), type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
fclose(logfp);
}
@@ -530,4 +502,7 @@ void log_defaults(void) {
logs->config_read = log_config_read;
logs->config_done = log_config_complete;
+ logs->picktype2char = log_picktype2char;
+ logs->chattype2char = log_chattype2char;
+ logs->should_log_item = should_log_item;
}
diff --git a/src/map/log.h b/src/map/log.h
index 1da1696ab..caf9ce0c5 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -5,13 +5,32 @@
#ifndef _LOG_H_
#define _LOG_H_
+#include "../common/cbasetypes.h"
+#include "../common/sql.h"
+
+/**
+ * Declarations
+ **/
struct block_list;
struct map_session_data;
struct mob_data;
struct item;
struct item_data;
+/**
+ * Defines
+ **/
+#ifdef SQL_INNODB
+// database is using an InnoDB engine so do not use DELAYED
+ #define LOG_QUERY "INSERT"
+#else
+// database is using a MyISAM engine so use DELAYED
+ #define LOG_QUERY "INSERT DELAYED"
+#endif
+/**
+ * Enumerations
+ **/
typedef enum e_log_chat_type {
LOG_CHAT_GLOBAL = 0x01,
LOG_CHAT_WHISPER = 0x02,
@@ -22,7 +41,6 @@ typedef enum e_log_chat_type {
LOG_CHAT_ALL = 0xFF,
} e_log_chat_type;
-
typedef enum e_log_pick_type {
LOG_TYPE_NONE = 0,
LOG_TYPE_TRADE = 0x00001,
@@ -48,6 +66,24 @@ typedef enum e_log_pick_type {
LOG_TYPE_ALL = 0xFFFFF,
} e_log_pick_type;
+/// filters for item logging
+typedef enum e_log_filter {
+ LOG_FILTER_NONE = 0x000,
+ LOG_FILTER_ALL = 0x001,
+ // bits
+ LOG_FILTER_HEALING = 0x002, // Healing items (0)
+ LOG_FILTER_ETC_AMMO = 0x004, // Etc Items(3) + Arrows (10)
+ LOG_FILTER_USABLE = 0x008, // Usable Items(2) + Scrolls, Lures(11) + Usable Cash Items(18)
+ LOG_FILTER_WEAPON = 0x010, // Weapons(4)
+ LOG_FILTER_ARMOR = 0x020, // Shields, Armors, Headgears, Accessories, Garments and Shoes(5)
+ LOG_FILTER_CARD = 0x040, // Cards(6)
+ LOG_FILTER_PETITEM = 0x080, // Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
+ LOG_FILTER_PRICE = 0x100, // Log expensive items ( >= price_log )
+ LOG_FILTER_AMOUNT = 0x200, // Log large amount of items ( >= amount_log )
+ LOG_FILTER_REFINE = 0x400, // Log refined items ( refine >= refine_log ) [not implemented]
+ LOG_FILTER_CHANCE = 0x800, // Log rare items and Emperium ( drop chance <= rare_log )
+} e_log_filter;
+
struct log_interface {
struct {
e_log_pick_type enable_logs;
@@ -78,6 +114,10 @@ struct log_interface {
int (*config_read) (const char* cfgName);
void (*config_done) (void);
+
+ char (*picktype2char) (e_log_pick_type type);
+ char (*chattype2char) (e_log_chat_type type);
+ bool (*should_log_item) (int nameid, int amount, int refine, struct item_data *id);
};
struct log_interface *logs;
diff --git a/src/map/map.c b/src/map/map.c
index e121f0d55..ea05208a6 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -624,8 +624,8 @@ int map_foreachininstance(int (*func)(struct block_list*, va_list), int16 instan
int i;
int returnCount = 0;
- for (i = 0; i < instances[instance_id].num_map; i++) {
- int m = instances[instance_id].map[i];
+ for (i = 0; i < instance->list[instance_id].num_map; i++) {
+ int m = instance->list[instance_id].map[i];
va_list ap;
va_start(ap, type);
returnCount += map_vforeachinmap(func, m, type, ap);
@@ -4905,9 +4905,9 @@ void do_final(void)
script->final();
itemdb->final();
instance->final();
- storage->final();
+ gstorage->final();
guild->final();
- party->do_final_party();
+ party->final();
pc->do_final_pc();
pet->final();
mob->final();
@@ -4918,7 +4918,7 @@ void do_final(void)
unit->final();
bg->final();
duel->final();
- elemental->do_final_elemental();
+ elemental->final();
do_final_maps();
vending->final();
@@ -5387,13 +5387,13 @@ int do_init(int argc, char *argv[])
mob->init();
pc->do_init_pc();
status->init();
- party->do_init_party();
+ party->init();
guild->init();
- storage->init();
+ gstorage->init();
pet->init();
homun->init();
mercenary->init();
- elemental->do_init_elemental();
+ elemental->init();
quest->init();
npc->init();
unit->init();
diff --git a/src/map/map.h b/src/map/map.h
index 4b06a065b..f3a74ed2e 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -99,6 +99,7 @@ enum {
MAPID_BLACKSMITH,
MAPID_ASSASSIN,
MAPID_STAR_GLADIATOR,
+ MAPID_REBELLION = JOBL_2_1|0x09,
MAPID_KAGEROUOBORO = JOBL_2_1|0x0A,
MAPID_DEATH_KNIGHT = JOBL_2_1|0x0E,
//2-2 Jobs
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index a1e2986b2..8b8353f46 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -50,12 +50,12 @@ int merc_search_index(int class_)
bool merc_class(int class_)
{
- return (bool)(merc_search_index(class_) > -1);
+ return (bool)(mercenary->search_index(class_) > -1);
}
struct view_data * merc_get_viewdata(int class_)
{
- int i = merc_search_index(class_);
+ int i = mercenary->search_index(class_);
if( i < 0 )
return 0;
@@ -69,7 +69,7 @@ int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime)
int i;
nullpo_retr(0,sd);
- if( (i = merc_search_index(class_)) < 0 )
+ if( (i = mercenary->search_index(class_)) < 0 )
return 0;
db = &mercenary->db[i];
@@ -217,7 +217,7 @@ int mercenary_save(struct mercenary_data *md)
return 1;
}
-static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data) {
+int merc_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
struct mercenary_data *md;
@@ -228,7 +228,7 @@ static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data)
if( md->contract_timer != tid )
{
- ShowError("merc_contract_end %d != %d.\n", md->contract_timer, tid);
+ ShowError("merc_contract_end_timer %d != %d.\n", md->contract_timer, tid);
return 0;
}
@@ -268,14 +268,14 @@ void merc_contract_stop(struct mercenary_data *md)
{
nullpo_retv(md);
if( md->contract_timer != INVALID_TIMER )
- timer->delete(md->contract_timer, merc_contract_end);
+ timer->delete(md->contract_timer, mercenary->contract_end_timer);
md->contract_timer = INVALID_TIMER;
}
void merc_contract_init(struct mercenary_data *md)
{
if( md->contract_timer == INVALID_TIMER )
- md->contract_timer = timer->add(timer->gettick() + md->mercenary.life_time, merc_contract_end, md->master->bl.id, 0);
+ md->contract_timer = timer->add(timer->gettick() + md->mercenary.life_time, mercenary->contract_end_timer, md->master->bl.id, 0);
md->regen.state.block = 0;
}
@@ -284,7 +284,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag) {
struct map_session_data *sd;
struct mercenary_data *md;
struct s_mercenary_db *db;
- int i = merc_search_index(merc->class_);
+ int i = mercenary->search_index(merc->class_);
if( (sd = map->charid2sd(merc->char_id)) == NULL )
return 0;
@@ -372,7 +372,7 @@ int mercenary_kills(struct mercenary_data *md)
if( (md->mercenary.kill_count % 50) == 0 )
{
mercenary->set_faith(md, 1);
- mercenary_killbonus(md);
+ mercenary->killbonus(md);
}
if( md->master )
@@ -393,7 +393,7 @@ int mercenary_checkskill(struct mercenary_data *md, uint16 skill_id)
return 0;
}
-static bool read_mercenarydb_sub(char* str[], int columns, int current) {
+bool read_mercenarydb_sub(char* str[], int columns, int current) {
int ele;
struct s_mercenary_db *db;
struct status_data *mstatus;
@@ -448,12 +448,12 @@ static bool read_mercenarydb_sub(char* str[], int columns, int current) {
int read_mercenarydb(void) {
memset(mercenary->db,0,sizeof(mercenary->db));
- sv->readdb(map->db_path, "mercenary_db.txt", ',', 26, 26, MAX_MERCENARY_CLASS, &read_mercenarydb_sub);
+ sv->readdb(map->db_path, "mercenary_db.txt", ',', 26, 26, MAX_MERCENARY_CLASS, mercenary->read_db_sub);
return 0;
}
-static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
+bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
{// <merc id>,<skill id>,<skill level>
struct s_mercenary_db *db;
int i, class_;
@@ -485,22 +485,18 @@ static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
}
int read_mercenary_skilldb(void) {
- sv->readdb(map->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, &read_mercenary_skilldb_sub);
+ sv->readdb(map->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, mercenary->read_skill_db_sub);
return 0;
}
-int do_init_mercenary(void)
-{
+void do_init_mercenary(void) {
mercenary->read_db();
mercenary->read_skilldb();
- //add_timer_func_list(mercenary_contract, "mercenary_contract");
- return 0;
+ timer->add_func_list(mercenary->contract_end_timer, "merc_contract_end_timer");
}
-int do_final_mercenary(void);
-
/*=====================================
* Default Functions : mercenary.h
* Generated by HerculesInterfaceMaker
@@ -539,5 +535,12 @@ void mercenary_defaults(void) {
mercenary->checkskill = mercenary_checkskill;
mercenary->read_db = read_mercenarydb;
- mercenary->read_skilldb = read_mercenary_skilldb;
+ mercenary->read_skilldb = read_mercenary_skilldb;
+
+ mercenary->killbonus = mercenary_killbonus;
+ mercenary->search_index = merc_search_index;
+
+ mercenary->contract_end_timer = merc_contract_end_timer;
+ mercenary->read_db_sub = read_mercenarydb_sub;
+ mercenary->read_skill_db_sub = read_mercenary_skilldb_sub;
}
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index b59a1c808..47f37ac66 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _MERCENARY_H_
#define _MERCENARY_H_
@@ -58,7 +59,7 @@ struct mercenary_interface {
/* funcs */
- int (*init) (void);
+ void (*init) (void);
bool (*class) (int class_);
struct view_data * (*get_viewdata) (int class_);
@@ -83,7 +84,14 @@ struct mercenary_interface {
int (*checkskill) (struct mercenary_data *md, uint16 skill_id);
int (*read_db) (void);
- int (*read_skilldb) (void);
+ int (*read_skilldb) (void);
+
+ int (*killbonus) (struct mercenary_data *md);
+ int (*search_index) (int class_);
+
+ int (*contract_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ bool (*read_db_sub) (char* str[], int columns, int current);
+ bool (*read_skill_db_sub) (char* str[], int columns, int current);
};
struct mercenary_interface *mercenary;
diff --git a/src/map/packets.h b/src/map/packets.h
index 8fcc6c863..326d436a8 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2369,6 +2369,38 @@ packet(0x020d,-1);
packet(0x097C,4,clif->pRanklist);
#endif
+//2013-08-07Ragexe (Shakto)
+#if PACKETVER >= 20130807
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0202,5,clif->pChangeDir,2,4);
+ packet(0x07E4,6,clif->pTakeItem,2);
+ packet(0x0362,6,clif->pDropItem,2,4);
+ packet(0x07EC,8,clif->pMoveToKafra,2,4);
+ packet(0x0364,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x0365,41,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0802,26,clif->pPartyInvite2,2);
+ // packet(0x0436,4); // CZ_GANGSI_RANK
+ packet(0x023B,26,clif->pFriendsListAdd,2);
+ packet(0x0361,5,clif->pHomMenu,2,4);
+ packet(0x0887,36,clif->pStoragePassword,0);
+#endif
/* PacketKeys: http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */
#if PACKETVER >= 20110817
@@ -2559,5 +2591,8 @@ packet(0x020d,-1);
packetKeys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA); /* Thanks to Shakto */
#endif
+#if PACKETVER >= 20130807
+ packetKeys(0x7E241DE0,0x5E805580,0x3D807D80); /* Thanks to Shakto */
+#endif
#endif /* _PACKETS_H_ */
diff --git a/src/map/party.c b/src/map/party.c
index a4eb38629..29ab5044c 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/cbasetypes.h"
#include "../common/timer.h"
@@ -29,20 +30,13 @@
#include <string.h>
-static DBMap* party_db; // int party_id -> struct party_data* (releases data)
-static DBMap* party_booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
-static unsigned long party_booking_nextid = 1;
-
struct party_interface party_s;
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
/*==========================================
* Fills the given party_member structure according to the sd provided.
* Used when creating/adding people to a party. [Skotlex]
*------------------------------------------*/
-static void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader)
-{
+void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader) {
member->account_id = sd->status.account_id;
member->char_id = sd->status.char_id;
safestrncpy(member->name, sd->status.name, NAME_LENGTH);
@@ -54,8 +48,7 @@ static void party_fill_member(struct party_member* member, struct map_session_da
}
/// Get the member_id of a party member.
/// Return -1 if not in party.
-int party_getmemberid(struct party_data* p, struct map_session_data* sd)
-{
+int party_getmemberid(struct party_data* p, struct map_session_data* sd) {
int member_id;
nullpo_retr(-1, p);
if( sd == NULL )
@@ -68,7 +61,6 @@ int party_getmemberid(struct party_data* p, struct map_session_data* sd)
return member_id;
}
-
/*==========================================
* Request an available sd of this party
*------------------------------------------*/
@@ -83,8 +75,7 @@ struct map_session_data* party_getavailablesd(struct party_data *p)
/*==========================================
* Retrieves and validates the sd pointer for this party member [Skotlex]
*------------------------------------------*/
-
-static TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
+TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
TBL_PC* sd = map->id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
@@ -108,30 +99,12 @@ int party_db_final(DBKey key, DBData *data, va_list ap) {
return 0;
}
-/*==========================================
- * Destructor
- * Called in map shutdown, cleanup var
- *------------------------------------------*/
-void do_final_party(void)
-{
- party_db->destroy(party_db,party_db_final);
- party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
-}
-// Constructor, init vars
-void do_init_party(void)
-{
- party_db = idb_alloc(DB_OPT_RELEASE_DATA);
- party_booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
- timer->add_func_list(party_send_xy_timer, "party_send_xy_timer");
- timer->add_interval(timer->gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval);
-}
-
/// Party data lookup using party id.
struct party_data* party_search(int party_id)
{
if(!party_id)
return NULL;
- return (struct party_data*)idb_get(party_db,party_id);
+ return (struct party_data*)idb_get(party->db,party_id);
}
/// Party data lookup using party name.
@@ -139,7 +112,7 @@ struct party_data* party_searchname(const char* str)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
if( strncmpi(p->party.name,str,NAME_LENGTH) == 0 )
@@ -171,7 +144,7 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
sd->party_creating = true;
- party_fill_member(&leader, sd, 1);
+ party->fill_member(&leader, sd, 1);
intif->create_party(&leader,name,item,item2);
return 0;
@@ -219,29 +192,27 @@ int party_recv_noinfo(int party_id, int char_id) {
return 0;
}
-static void party_check_state(struct party_data *p)
-{
+void party_check_state(struct party_data *p) {
int i;
memset(&p->state, 0, sizeof(p->state));
- for (i = 0; i < MAX_PARTY; i ++)
- {
+ for (i = 0; i < MAX_PARTY; i ++) {
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
switch (p->party.member[i].class_) {
- case JOB_MONK:
- case JOB_BABY_MONK:
- case JOB_CHAMPION:
- p->state.monk = 1;
- break;
- case JOB_STAR_GLADIATOR:
- p->state.sg = 1;
- break;
- case JOB_SUPER_NOVICE:
- case JOB_SUPER_BABY:
- p->state.snovice = 1;
- break;
- case JOB_TAEKWON:
- p->state.tk = 1;
- break;
+ case JOB_MONK:
+ case JOB_BABY_MONK:
+ case JOB_CHAMPION:
+ p->state.monk = 1;
+ break;
+ case JOB_STAR_GLADIATOR:
+ p->state.sg = 1;
+ break;
+ case JOB_SUPER_NOVICE:
+ case JOB_SUPER_BABY:
+ p->state.snovice = 1;
+ break;
+ case JOB_TAEKWON:
+ p->state.tk = 1;
+ break;
}
}
}
@@ -260,7 +231,7 @@ int party_recv_info(struct party* sp, int char_id)
nullpo_ret(sp);
- p = (struct party_data*)idb_get(party_db, sp->party_id);
+ p = (struct party_data*)idb_get(party->db, sp->party_id);
if( p != NULL ) {// diff members
for( member_id = 0; member_id < MAX_PARTY; ++member_id ) {
member = &p->party.member[member_id];
@@ -289,7 +260,7 @@ int party_recv_info(struct party* sp, int char_id)
CREATE(p, struct party_data, 1);
p->instance = NULL;
p->instances = 0;
- idb_put(party_db, sp->party_id, p);
+ idb_put(party->db, sp->party_id, p);
}
while( removed_count > 0 ) {// no longer in party
member_id = removed[--removed_count];
@@ -305,9 +276,9 @@ int party_recv_info(struct party* sp, int char_id)
member = &p->party.member[member_id];
if ( member->char_id == 0 )
continue;// empty
- p->data[member_id].sd = party_sd_check(sp->party_id, member->account_id, member->char_id);
+ p->data[member_id].sd = party->sd_check(sp->party_id, member->account_id, member->char_id);
}
- party_check_state(p);
+ party->check_state(p);
while( added_count > 0 ) { // new in party
member_id = added[--added_count];
sd = p->data[member_id].sd;
@@ -319,7 +290,7 @@ int party_recv_info(struct party* sp, int char_id)
clif->party_info(p,NULL);
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -412,7 +383,7 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag) {
if( flag == 1 && !sd->party_creating && !sd->party_joining )
{// accepted and allowed
sd->party_joining = true;
- party_fill_member(&member, sd, 0);
+ party->fill_member(&member, sd, 0);
intif->party_addmember(sd->party_invite, &member);
}
else
@@ -442,7 +413,7 @@ void party_member_joined(struct map_session_data *sd)
p->data[i].sd = sd;
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -504,7 +475,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) {
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -571,7 +542,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
memset(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
- party_check_state(p);
+ party->check_state(p);
}
}
@@ -604,7 +575,7 @@ int party_broken(int party_id)
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
instance->destroy( p->instance[j] );
- instances[p->instance[j]].owner_id = 0;
+ instance->list[p->instance[j]].owner_id = 0;
}
}
@@ -615,7 +586,7 @@ int party_broken(int party_id)
}
}
- idb_remove(party_db,party_id);
+ idb_remove(party->db,party_id);
return 0;
}
@@ -722,7 +693,7 @@ int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short m
m->online = online;
m->lv = lv;
//Check if they still exist on this map server
- p->data[i].sd = party_sd_check(party_id, account_id, char_id);
+ p->data[i].sd = party->sd_check(party_id, account_id, char_id);
clif->party_info(p,NULL);
return 0;
@@ -864,7 +835,7 @@ int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
// for each existing party,
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
@@ -1111,11 +1082,10 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
* Party Booking in KRO [Spiria]
*------------------------------------------*/
-static struct party_booking_ad_info* create_party_booking_data(void)
-{
+struct party_booking_ad_info* create_party_booking_data(void) {
struct party_booking_ad_info *pb_ad;
CREATE(pb_ad, struct party_booking_ad_info, 1);
- pb_ad->index = party_booking_nextid++;
+ pb_ad->index = party->booking_nextid++;
return pb_ad;
}
@@ -1130,12 +1100,12 @@ void party_booking_register(struct map_session_data *sd, short level, const char
int i;
#endif
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
{
- pb_ad = create_party_booking_data();
- idb_put(party_booking_db, sd->status.char_id, pb_ad);
+ pb_ad = party->create_booking_data();
+ idb_put(party->booking_db, sd->status.char_id, pb_ad);
}
else
{// already registered
@@ -1172,7 +1142,7 @@ void party_booking_update(struct map_session_data *sd, const char *notice)
#endif
struct party_booking_ad_info *pb_ad;
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
return;
@@ -1206,7 +1176,7 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
int count = 0;
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
- DBIterator* iter = db_iterator(party_booking_db);
+ DBIterator* iter = db_iterator(party->booking_db);
memset(result_list, 0, sizeof(result_list));
@@ -1250,14 +1220,24 @@ bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
- if((pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id))!=NULL)
+ if((pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id))!=NULL)
{
clif->PartyBookingDeleteNotify(sd, pb_ad->index);
- idb_remove(party_booking_db,sd->status.char_id);
+ idb_remove(party->booking_db,sd->status.char_id);
}
return true;
}
-
+void do_final_party(void) {
+ party->db->destroy(party->db,party->db_final);
+ db_destroy(party->booking_db); // Party Booking [Spiria]
+}
+// Constructor, init vars
+void do_init_party(void) {
+ party->db = idb_alloc(DB_OPT_RELEASE_DATA);
+ party->booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
+ timer->add_func_list(party->send_xy_timer, "party_send_xy_timer");
+ timer->add_interval(timer->gettick()+battle_config.party_update_interval, party->send_xy_timer, 0, 0, battle_config.party_update_interval);
+}
/*=====================================
* Default Functions : party.h
* Generated by HerculesInterfaceMaker
@@ -1266,10 +1246,14 @@ bool party_booking_delete(struct map_session_data *sd)
void party_defaults(void) {
party = &party_s;
+ /* */
+ party->db = NULL;
+ party->booking_db = NULL;
+ party->booking_nextid = 1;
/* funcs */
-
- party->do_init_party = do_init_party;
- party->do_final_party = do_final_party;
+ party->init = do_init_party;
+ party->final = do_final_party;
+ /* */
party->search = party_search;
party->searchname = party_searchname;
party->getmemberid = party_getmemberid;
@@ -1307,4 +1291,11 @@ void party_defaults(void) {
party->booking_update = party_booking_update;
party->booking_search = party_booking_search;
party->booking_delete = party_booking_delete;
+ party->foreachsamemap = party_foreachsamemap;
+ party->send_xy_timer = party_send_xy_timer;
+ party->fill_member = party_fill_member;
+ party->sd_check = party_sd_check;
+ party->check_state = party_check_state;
+ party->create_booking_data = create_party_booking_data;
+ party->db_final = party_db_final;
}
diff --git a/src/map/party.h b/src/map/party.h
index 7ade6b841..c2c13cc4f 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -1,16 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _PARTY_H_
#define _PARTY_H_
+
#include "../common/mmo.h" // struct party
#include "../config/core.h"
-struct block_list;
-struct map_session_data;
-struct party;
-struct item;
-
#include <stdarg.h>
+#include "map.h"
+
#define PARTY_BOOKING_JOBS 6
#define PARTY_BOOKING_RESULTS 10
@@ -47,7 +47,7 @@ struct party_booking_ad_info {
long expiretime;
struct party_booking_detail p_detail;
};
-#else
+#else /* PARTY_RECRUIT */
#define PB_NOTICE_LENGTH (36 + 1)
struct party_booking_detail {
short level;
@@ -60,14 +60,7 @@ struct party_booking_ad_info {
char charname[NAME_LENGTH];
struct party_booking_detail p_detail;
};
-#endif
-
-
-int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
-
-/*==========================================
- * Party Booking in KRO [Spiria]
- *------------------------------------------*/
+#endif /* PARTY_RECRUIT */
/*=====================================
* Interface : party.h
@@ -75,11 +68,13 @@ int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_ses
* created by Susu
*-------------------------------------*/
struct party_interface {
-
+ DBMap* db; // int party_id -> struct party_data* (releases data)
+ DBMap* booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
+ unsigned long booking_nextid;
/* funcs */
-
- void (*do_init_party) (void);
- void (*do_final_party) (void);
+ void (*init) (void);
+ void (*final) (void);
+ /* */
struct party_data* (*search) (int party_id);
struct party_data* (*searchname) (const char* str);
int (*getmemberid) (struct party_data* p, struct map_session_data* sd);
@@ -113,16 +108,27 @@ struct party_interface {
int (*share_loot) (struct party_data* p, struct map_session_data* sd, struct item* item_data, int first_charid);
int (*send_dot_remove) (struct map_session_data *sd);
int (*sub_count) (struct block_list *bl, va_list ap);
+ /*==========================================
+ * Party Booking in KRO [Spiria]
+ *------------------------------------------*/
#ifndef PARTY_RECRUIT
void (*booking_register) (struct map_session_data *sd, short level, short mapid, short* job);
void (*booking_update) (struct map_session_data *sd, short* job);
void (*booking_search) (struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
-#else
+#else /* PARTY_RECRUIT */
void (*booking_register) (struct map_session_data *sd, short level, const char *notice);
void (*booking_update) (struct map_session_data *sd, const char *notice);
void (*booking_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount);
#endif
bool (*booking_delete) (struct map_session_data *sd);
+ /* */
+ int (*foreachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*fill_member) (struct party_member* member, struct map_session_data* sd, unsigned int leader);
+ TBL_PC* (*sd_check) (int party_id, int account_id, int char_id);
+ void (*check_state) (struct party_data *p);
+ struct party_booking_ad_info* (*create_booking_data) (void);
+ int (*db_final) (DBKey key, DBData *data, va_list ap);
};
struct party_interface *party;
diff --git a/src/map/pc.c b/src/map/pc.c
index d11eb7e75..362ee0873 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -337,7 +337,7 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) {
c = 0;
memset(b_sd, 0, sizeof(b_sd));
- i = party_foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
+ i = party->foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
if( c < 1 ) {
//just recalc status no need to recalc hp
@@ -4714,7 +4714,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
}
if(battle_config.show_steal_in_same_party)
- party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
+ party->foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
//Logs items, Stolen from mobs [Lupus]
logs->pick_mob(md, LOG_TYPE_STEAL, -1, &tmp_item, data);
@@ -4791,13 +4791,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if( sd->instances ) {
for( i = 0; i < sd->instances; i++ ) {
if( sd->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->instance[i]].num_map, j, maplist[instances[sd->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->instance[i]].map[j]].custom_name);
- if( j != instances[sd->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, maplist[instance->list[sd->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[sd->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->instance[i]].num_map )
break;
}
}
if( i != sd->instances ) {
- m = instances[sd->instance[i]].map[j];
+ m = instance->list[sd->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4805,13 +4805,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
if( p->instance[i] >= 0 ) {
- ARR_FIND(0, instances[p->instance[i]].num_map, j, maplist[instances[p->instance[i]].map[j]].instance_src_map == m && !maplist[instances[p->instance[i]].map[j]].custom_name);
- if( j != instances[p->instance[i]].num_map )
+ ARR_FIND(0, instance->list[p->instance[i]].num_map, j, maplist[instance->list[p->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[p->instance[i]].map[j]].custom_name);
+ if( j != instance->list[p->instance[i]].num_map )
break;
}
}
if( i != p->instances ) {
- m = instances[p->instance[i]].map[j];
+ m = instance->list[p->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4819,13 +4819,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.guild_id && sd->guild && sd->guild->instances ) {
for( i = 0; i < sd->guild->instances; i++ ) {
if( sd->guild->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, maplist[instances[sd->guild->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->guild->instance[i]].map[j]].custom_name);
- if( j != instances[sd->guild->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, maplist[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[sd->guild->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->guild->instance[i]].num_map )
break;
}
}
if( i != sd->guild->instances ) {
- m = instances[sd->guild->instance[i]].map[j];
+ m = instance->list[sd->guild->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -5207,6 +5207,7 @@ int pc_jobid2mapid(unsigned short b_class)
case JOB_STAR_GLADIATOR: return MAPID_STAR_GLADIATOR;
case JOB_KAGEROU:
case JOB_OBORO: return MAPID_KAGEROUOBORO;
+ case JOB_REBELLION: return MAPID_REBELLION;
case JOB_DEATH_KNIGHT: return MAPID_DEATH_KNIGHT;
//2-2 Jobs
case JOB_CRUSADER: return MAPID_CRUSADER;
@@ -5347,6 +5348,7 @@ int pc_mapid2jobid(unsigned short class_, int sex)
case MAPID_ASSASSIN: return JOB_ASSASSIN;
case MAPID_STAR_GLADIATOR: return JOB_STAR_GLADIATOR;
case MAPID_KAGEROUOBORO: return sex?JOB_KAGEROU:JOB_OBORO;
+ case MAPID_REBELLION: return JOB_REBELLION;
case MAPID_DEATH_KNIGHT: return JOB_DEATH_KNIGHT;
//2-2 Jobs
case MAPID_CRUSADER: return JOB_CRUSADER;
@@ -5663,6 +5665,8 @@ const char* job_name(int class_)
case JOB_KAGEROU:
case JOB_OBORO:
return msg_txt(653 - JOB_KAGEROU+class_);
+ case JOB_REBELLION:
+ return msg_txt(694);
default:
return msg_txt(655);
@@ -9711,6 +9715,7 @@ void pc_read_skill_tree(void) {
{ "Expanded_Super_Baby", JOB_SUPER_BABY_E },
{ "Kagerou", JOB_KAGEROU },
{ "Oboro", JOB_OBORO },
+ { "Rebellion", JOB_REBELLION },
};
if (conf_read_file(&skill_tree_conf, config_filename)) {
diff --git a/src/map/pc.h b/src/map/pc.h
index d384e0145..69bcdea8d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -634,7 +634,7 @@ enum equip_pos {
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
+#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
/**
* Ranger
**/
@@ -660,7 +660,8 @@ enum equip_pos {
|| ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_T2 ) \
|| ( (class_) >= JOB_BABY_RUNE && (class_) <= JOB_BABY_MECHANIC2 ) \
|| ( (class_) >= JOB_SUPER_NOVICE_E && (class_) <= JOB_SUPER_BABY_E ) \
-|| ( (class_) >= JOB_KAGEROU && (class_) < JOB_MAX ) \
+|| ( (class_) >= JOB_KAGEROU && (class_) <= JOB_OBORO ) \
+|| ( (class_) >= JOB_REBELLION && (class_) < JOB_MAX ) \
)
#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)class_)
diff --git a/src/map/script.c b/src/map/script.c
index 06c97bbe6..59af8d2b7 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2361,7 +2361,7 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '\'':
if ( st->instance_id >= 0 ) {
- data->u.str = (char*)idb_get(instances[st->instance_id].vars,reference_getuid(data));
+ data->u.str = (char*)idb_get(instance->list[st->instance_id].vars,reference_getuid(data));
} else {
ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to \"\"\n", name);
data->u.str = NULL;
@@ -2416,7 +2416,7 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '\'':
if( st->instance_id >= 0 )
- data->u.num = (int)idb_iget(instances[st->instance_id].vars,reference_getuid(data));
+ data->u.num = (int)idb_iget(instance->list[st->instance_id].vars,reference_getuid(data));
else {
ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to 0\n", name);
data->u.num = 0;
@@ -2474,8 +2474,8 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
return 1;
case '\'':
if( st->instance_id >= 0 ) {
- idb_remove(instances[st->instance_id].vars, num);
- if( str[0] ) idb_put(instances[st->instance_id].vars, num, aStrdup(str));
+ idb_remove(instance->list[st->instance_id].vars, num);
+ if( str[0] ) idb_put(instance->list[st->instance_id].vars, num, aStrdup(str));
}
return 1;
default:
@@ -2522,9 +2522,9 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
return 1;
case '\'':
if( st->instance_id >= 0 ) {
- idb_remove(instances[st->instance_id].vars, num);
+ idb_remove(instance->list[st->instance_id].vars, num);
if( val != 0 )
- idb_iput(instances[st->instance_id].vars, num, val);
+ idb_iput(instance->list[st->instance_id].vars, num, val);
}
return 1;
default:
@@ -15930,7 +15930,7 @@ BUILDIN(instance_init) {
return true;
}
- if( instances[instance_id].state != INSTANCE_IDLE ) {
+ if( instance->list[instance_id].state != INSTANCE_IDLE ) {
ShowError("instance_init: instance already initialized.\n");
return true;
}
@@ -15961,8 +15961,8 @@ BUILDIN(instance_announce) {
if( !instance->valid(instance_id) )
return true;
- for( i = 0; i < instances[instance_id].num_map; i++ )
- map->foreachinmap(buildin_announce_sub, instances[instance_id].map[i], BL_PC,
+ for( i = 0; i < instance->list[instance_id].num_map; i++ )
+ map->foreachinmap(buildin_announce_sub, instance->list[instance_id].map[i], BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
@@ -16015,8 +16015,8 @@ BUILDIN(has_instance) {
if( sd->instances ) {
for( i = 0; i < sd->instances; i++ ) {
if( sd->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->instance[i]].num_map, j, maplist[instances[sd->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[sd->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, maplist[instance->list[sd->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[sd->instance[i]].num_map )
break;
}
}
@@ -16026,8 +16026,8 @@ BUILDIN(has_instance) {
if( instance_id == -1 && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
if( p->instance[i] >= 0 ) {
- ARR_FIND(0, instances[p->instance[i]].num_map, j, maplist[instances[p->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[p->instance[i]].num_map )
+ ARR_FIND(0, instance->list[p->instance[i]].num_map, j, maplist[instance->list[p->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[p->instance[i]].num_map )
break;
}
}
@@ -16037,8 +16037,8 @@ BUILDIN(has_instance) {
if( instance_id == -1 && sd->guild && sd->guild->instances ) {
for( i = 0; i < sd->guild->instances; i++ ) {
if( sd->guild->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, maplist[instances[sd->guild->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[sd->guild->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, maplist[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[sd->guild->instance[i]].num_map )
break;
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 5c4dddc6f..506a13ea8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5035,7 +5035,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
}
skill->area_temp[0] = 0;
- party_foreachsamemap(skill->area_sub,
+ party->foreachsamemap(skill->area_sub,
sd,skill->get_splash(skill_id, skill_lv),
src,skill_id,skill_lv,tick, flag|BCT_PARTY|1,
skill->castend_nodamage_id);
@@ -5743,7 +5743,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case MO_KITRANSLATION:
- if(dstsd && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER) {
+ if(dstsd && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION)) {
pc->addspiritball(dstsd,skill->get_time(skill_id,skill_lv),5);
}
break;
@@ -5758,7 +5758,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case MO_ABSORBSPIRITS:
i = 0;
- if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER)
+ if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION))
{ // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
i = dstsd->spiritball * 7;
pc->delspiritball(dstsd,dstsd->spiritball,0);
@@ -5893,14 +5893,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || (flag & 1) )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case MER_MAGNIFICAT:
if( mer != NULL )
{
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
if( mer->master && mer->master->status.party_id != 0 && !(flag&1) )
- party_foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
else if( mer->master && !(flag&1) )
clif->skill_nodamage(src, &mer->master->bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
}
@@ -5914,7 +5914,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl,bl,skill_id,skill_lv,
sc_start2(bl,type,100,skill_lv,(src == bl)? 1:0,skill->get_time(skill_id,skill_lv)));
} else if (sd) {
- party_foreachsamemap(skill->area_sub,
+ party->foreachsamemap(skill->area_sub,
sd,skill->get_splash(skill_id, skill_lv),
src,skill_id,skill_lv,tick, flag|BCT_PARTY|1,
skill->castend_nodamage_id);
@@ -7639,7 +7639,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
else
clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
@@ -7719,9 +7719,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(bl,type,100,skill->area_temp[5]/4,skill->get_time(skill_id,skill_lv));
} else if( sd ) {
if( sd->status.party_id ) {
- i = party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
+ i = party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
skill->area_temp[5] = 7 * i; // ATK
- party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
} else
sc_start2(bl,type,100,7,5,skill->get_time(skill_id,skill_lv));
}
@@ -7785,7 +7785,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
skill->area_temp[5] |= 0x200;
}
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
/**
@@ -7887,7 +7887,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( !i )
clif->skill_fail(sd,skill_id,USESKILL_FAIL,0);
else
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -7895,7 +7895,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || flag&1 )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start4(bl, type, 100, skill_lv, 0, 0, 1, skill->get_time(skill_id, skill_lv)));
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case AB_CHEAL:
@@ -7913,7 +7913,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
}
}
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case AB_ORATIO:
@@ -7942,7 +7942,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
@@ -7959,7 +7959,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
@@ -8564,7 +8564,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -8575,7 +8575,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start4(bl,type,100,skill_lv,6*skill_lv,(sd?pc->checkskill(sd,WM_LESSON):0),(sd?sd->status.job_level:0),skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -8667,7 +8667,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
uint16 lv = skill_lv;
int count = skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1);
if( sc_start2(bl,type,100,skill_lv,count,skill->get_time(skill_id,skill_lv)) )
- party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
}
@@ -8883,7 +8883,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd->status.party_id == 0 || flag&1 )
skill->unitsetting(src,MG_SAFETYWALL,skill_lv,bl->x,bl->y,0);
else
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case GN_CHANGEMATERIAL:
@@ -12187,7 +12187,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16
c = 0;
memset (p_sd, 0, sizeof(p_sd));
if( is_chorus )
- i = party_foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
+ i = party->foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
else
i = map->foreachinrange(skill->check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id);
diff --git a/src/map/skill.h b/src/map/skill.h
index 1609802f9..d2546c706 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1247,6 +1247,31 @@ enum e_skill {
ALL_RAY_OF_PROTECTION,
MC_CARTDECORATE,
+ RL_GLITTERING_GREED = 2551,
+ RL_RICHS_COIN,
+ RL_MASS_SPIRAL,
+ RL_BANISHING_BUSTER,
+ RL_B_TRAP,
+ RL_FLICKER,
+ RL_S_STORM,
+ RL_E_CHAIN,
+ RL_QD_SHOT,
+ RL_C_MARKER,
+ RL_FIREDANCE,
+ RL_H_MINE,
+ RL_P_ALTER,
+ RL_FALLEN_ANGEL,
+ RL_R_TRIP,
+ RL_D_TAIL,
+ RL_FIRE_RAIN,
+ RL_HEAT_BARREL,
+ RL_AM_BLAST,
+ RL_SLUGSHOT,
+ RL_HAMMER_OF_GOD,
+ RL_R_TRIP_PLUSATK,
+ RL_B_FLICKER_ATK,
+ RL_GLITTERING_GREED_ATK,
+
KO_YAMIKUMO = 3001,
KO_RIGHT,
KO_LEFT,
diff --git a/src/map/status.c b/src/map/status.c
index d8356264c..0b69ae2ef 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2278,7 +2278,7 @@ static unsigned int status_base_pc_maxhp(struct map_session_data *sd, struct sta
uint64 val = pc->class2idx(sd->status.class_);
val = 35 + sd->status.base_level*(int64)hp_coefficient2[val]/100 + hp_sigma_val[val][sd->status.base_level];
- if((sd->class_&MAPID_UPPERMASK) == MAPID_NINJA || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER)
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_NINJA || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER || (sd->class_&MAPID_UPPERMASK) == MAPID_REBELLION)
val += 100; //Since their HP can't be approximated well enough without this.
if((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON))
val *= 3; //Triple max HP for top ranking Taekwons over level 90.
diff --git a/src/map/storage.c b/src/map/storage.c
index 041c2cd72..91515dfe1 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -30,7 +30,7 @@ struct guild_storage_interface gstorage_s;
/*==========================================
* Sort items in the warehouse
*------------------------------------------*/
-static int storage_comp_item(const void *_i1, const void *_i2)
+int storage_comp_item(const void *_i1, const void *_i2)
{
struct item *i1 = (struct item *)_i1;
struct item *i2 = (struct item *)_i2;
@@ -45,33 +45,21 @@ static int storage_comp_item(const void *_i1, const void *_i2)
}
//Sort item by storage_comp_item (nameid)
-static void storage_sortitem(struct item* items, unsigned int size)
+void storage_sortitem(struct item* items, unsigned int size)
{
nullpo_retv(items);
if( battle_config.client_sort_storage )
{
- qsort(items, size, sizeof(struct item), storage_comp_item);
+ qsort(items, size, sizeof(struct item), storage->comp_item);
}
}
-/*==========================================
- * Init/Terminate
- *------------------------------------------*/
-/* ##TODO not really init_storage but init_gstorage, should rename/move */
-int do_init_storage(void) { // Called from map.c::do_init()
- gstorage->db = idb_alloc(DB_OPT_RELEASE_DATA);
- return 1;
-}
-void do_final_storage(void) { // by [MC Cameri]
- gstorage->db->destroy(gstorage->db,NULL);
-}
-
/**
* Parses storage and saves 'dirty' ones upon reconnect. [Skotlex]
* @see DBApply
*/
-static int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
+int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
{
struct guild_storage *stor = DB->data2ptr(data);
if (stor->dirty && stor->storage_status == 0) //Save closed storages.
@@ -82,7 +70,7 @@ static int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
//Function to be invoked upon server reconnection to char. To save all 'dirty' storages [Skotlex]
void do_reconnect_storage(void) {
- gstorage->db->foreach(gstorage->db, storage_reconnect_sub);
+ gstorage->db->foreach(gstorage->db, storage->reconnect_sub);
}
/*==========================================
@@ -104,7 +92,7 @@ int storage_storageopen(struct map_session_data *sd)
}
sd->state.storage_flag = 1;
- storage_sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ storage->sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif->storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif->updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE);
return 0;
@@ -347,7 +335,7 @@ void storage_storage_quit(struct map_session_data* sd, int flag) {
/**
* @see DBCreateData
*/
-static DBData create_guildstorage(DBKey key, va_list args)
+DBData create_guildstorage(DBKey key, va_list args)
{
struct guild_storage *gs = NULL;
gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1);
@@ -359,7 +347,7 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(guild->search(guild_id) != NULL)
- gs = idb_ensure(gstorage->db,guild_id,create_guildstorage);
+ gs = idb_ensure(gstorage->db,guild_id,gstorage->create);
return gs;
}
@@ -409,7 +397,7 @@ int storage_guild_storageopen(struct map_session_data* sd)
gstor->storage_status = 1;
sd->state.storage_flag = 2;
- storage_sortitem(gstor->items, ARRAYLENGTH(gstor->items));
+ storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items));
clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE);
return 0;
@@ -728,13 +716,16 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) {
return 0;
}
+void do_init_gstorage(void) {
+ gstorage->db = idb_alloc(DB_OPT_RELEASE_DATA);
+}
+void do_final_gstorage(void) {
+ db_destroy(gstorage->db);
+}
void storage_defaults(void) {
storage = &storage_s;
/* */
- storage->init = do_init_storage;
- storage->final = do_final_storage;
- /* */
storage->reconnect = do_reconnect_storage;
/* */
storage->delitem = storage_delitem;
@@ -746,10 +737,17 @@ void storage_defaults(void) {
storage->gettocart = storage_storagegettocart;
storage->close = storage_storageclose;
storage->pc_quit = storage_storage_quit;
+ storage->comp_item = storage_comp_item;
+ storage->sortitem = storage_sortitem;
+ storage->reconnect_sub = storage_reconnect_sub;
}
void gstorage_defaults(void) {
gstorage = &gstorage_s;
+ /* */
+ gstorage->init = do_init_gstorage;
+ gstorage->final = do_final_gstorage;
+ /* */
gstorage->id2storage = guild2storage;
gstorage->id2storage2 = guild2storage2;
gstorage->delete = guild_storage_delete;
@@ -764,4 +762,5 @@ void gstorage_defaults(void) {
gstorage->pc_quit = storage_guild_storage_quit;
gstorage->save = storage_guild_storagesave;
gstorage->saved = storage_guild_storagesaved;
+ gstorage->create = create_guildstorage;
}
diff --git a/src/map/storage.h b/src/map/storage.h
index 83243a622..9258e0265 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -12,8 +12,6 @@ struct map_session_data;
struct DBMap;
struct storage_interface {
- int (*init) (void);
- void (*final) (void);
/* */
void (*reconnect) (void);
/* */
@@ -26,6 +24,9 @@ struct storage_interface {
int (*gettocart) (struct map_session_data *sd,int index,int amount);
void (*close) (struct map_session_data *sd);
void (*pc_quit) (struct map_session_data *sd, int flag);
+ int (*comp_item) (const void *_i1, const void *_i2);
+ void (*sortitem) (struct item* items, unsigned int size);
+ int (*reconnect_sub) (DBKey key, DBData *data, va_list ap);
};
struct storage_interface *storage;
@@ -34,6 +35,10 @@ struct guild_storage_interface {
/* */
struct guild_storage *(*id2storage) (int guild_id);
struct guild_storage *(*id2storage2) (int guild_id);
+ /* */
+ void (*init) (void);
+ void (*final) (void);
+ /* */
int (*delete) (int guild_id);
int (*open) (struct map_session_data *sd);
int (*additem) (struct map_session_data *sd,struct guild_storage *stor,struct item *item_data,int amount);
@@ -46,6 +51,7 @@ struct guild_storage_interface {
int (*pc_quit) (struct map_session_data *sd,int flag);
int (*save) (int account_id, int guild_id, int flag);
int (*saved) (int guild_id); //Ack from char server that guild store was saved.
+ DBData (*create) (DBKey key, va_list args);
};
struct guild_storage_interface *gstorage;
diff --git a/src/map/unit.c b/src/map/unit.c
index 9d6f107e3..488a210bf 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2197,7 +2197,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
--maplist[bl->m].users_pvp;
}
if( maplist[bl->m].instance_id >= 0 ) {
- instances[maplist[bl->m].instance_id].users--;
+ instance->list[maplist[bl->m].instance_id].users--;
instance->check_idle(maplist[bl->m].instance_id);
}
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]