diff options
author | Mysterious <mysteriousragnarok@hotmail.com> | 2013-02-05 17:08:29 -0800 |
---|---|---|
committer | Mysterious <mysteriousragnarok@hotmail.com> | 2013-02-05 17:08:29 -0800 |
commit | 5e76d9a1a0ab36af5d8ad072ea4dcbf6122b0ae9 (patch) | |
tree | a938a98c1d3b856dd37cc989ac0d39d2de58abe1 | |
parent | 9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9 (diff) | |
parent | 2eb3e450d53a450d2493fae0ede3632802de6dd6 (diff) | |
download | hercules-5e76d9a1a0ab36af5d8ad072ea4dcbf6122b0ae9.tar.gz hercules-5e76d9a1a0ab36af5d8ad072ea4dcbf6122b0ae9.tar.bz2 hercules-5e76d9a1a0ab36af5d8ad072ea4dcbf6122b0ae9.tar.xz hercules-5e76d9a1a0ab36af5d8ad072ea4dcbf6122b0ae9.zip |
Merge pull request #2 from HerculesWS/master
Merging Hercules Commits from Feb 3 - 5 2013.
-rw-r--r-- | .gitignore | 49 | ||||
-rw-r--r-- | conf/battle/client.conf | 4 | ||||
-rw-r--r-- | conf/char-server.conf | 5 | ||||
-rw-r--r-- | db/castle_db.txt | 20 | ||||
-rw-r--r-- | db/const.txt | 3 | ||||
-rw-r--r-- | db/packet_db.txt | 26 | ||||
-rw-r--r-- | db/pre-re/item_combo_db.txt | 4 | ||||
-rw-r--r-- | db/pre-re/item_db.txt | 2 | ||||
-rw-r--r-- | db/re/item_combo_db.txt | 8 | ||||
-rw-r--r-- | db/re/item_trade.txt | 28 | ||||
-rw-r--r-- | doc/item_bonus.txt | 7 | ||||
-rw-r--r-- | npc/guild/agit_main.txt | 5 | ||||
-rw-r--r-- | npc/guild2/agit_main_se.txt | 19 | ||||
-rw-r--r-- | npc/instances/EndlessTower.txt | 2 | ||||
-rw-r--r-- | npc/jobs/2-1/hunter.txt | 1 | ||||
-rw-r--r-- | sql-files/item_db.sql | 2 | ||||
-rw-r--r-- | sql-files/item_db_re.sql | 2 | ||||
-rw-r--r-- | sql-files/main.sql | 16 | ||||
-rw-r--r-- | src/char/char.c | 9 | ||||
-rw-r--r-- | src/char/int_guild.c | 4 | ||||
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 9 | ||||
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/clif.h | 4 | ||||
-rw-r--r-- | src/map/map.h | 7 | ||||
-rw-r--r-- | src/map/mob.c | 2 | ||||
-rw-r--r-- | src/map/npc.c | 27 | ||||
-rw-r--r-- | src/map/pc.c | 49 | ||||
-rw-r--r-- | src/map/pc.h | 3 | ||||
-rw-r--r-- | src/map/script.c | 6 | ||||
-rw-r--r-- | src/map/skill.c | 10 | ||||
-rw-r--r-- | src/map/status.c | 3 | ||||
-rw-r--r-- | src/map/unit.c | 12 |
33 files changed, 230 insertions, 123 deletions
diff --git a/.gitignore b/.gitignore index 5eb3969ca..447365f22 100644 --- a/.gitignore +++ b/.gitignore @@ -23,9 +23,6 @@ /Makefile.cache /map-server_sql /mapcache -/rAthena - -# /3rdparty/cmake/ # /3rdparty/libconfig/ /3rdparty/libconfig/Makefile @@ -42,35 +39,6 @@ /log/*.log /log/map-server_sql.leaks -# /npc/airports/ - -# /npc/cities/ - -# /npc/jobs/ - -# /npc/kafras/ - -# /npc/merchants/ - -# /npc/mobs/ - -# /npc/other/ - -# /npc/quests/ - -# /npc/re/quests/eden/ -/npc/re/quests/eden/55-70.txt - -# /npc/warps/ - -# /npc/warps/cities/ - -# /npc/warps/dungeons/ - -# /npc/warps/fields/ - -# /npc/warps/other/ - # /src/char/ /src/char/Makefile /src/char/obj_sql @@ -86,16 +54,12 @@ /src/login/obj_txt /src/login/obj_sql -# /src/login/sql/ - # /src/map/ /src/map/Makefile /src/map/obj_sql /src/map/obj_txt /src/map/pcre.h -# /src/map/sql/ - # /src/test/ /src/test/Makefile /src/test/obj @@ -111,13 +75,18 @@ /tools/*.ilk /tools/*.pdb +# /vcproj-12/ +/vcproj-12/char-server_sql +/vcproj-12/login-server_sql +/vcproj-12/mapcache +/vcproj-12/map-server_sql +/vcproj-12/*.user + # /vcproj-10/ /vcproj-10/char-server_sql /vcproj-10/login-server_sql /vcproj-10/mapcache /vcproj-10/map-server_sql -/vcproj-10/txt-converter-char -/vcproj-10/txt-converter-login /vcproj-10/*.user # /vcproj-9/ @@ -126,7 +95,3 @@ /vcproj-9/login-server_sql /vcproj-9/map-server_sql /vcproj-9/mapcache -/vcproj-9/plugin-console -/vcproj-9/plugin-pid -/vcproj-9/txt-converter-char -/vcproj-9/txt-converter-login diff --git a/conf/battle/client.conf b/conf/battle/client.conf index eaf233a5d..17a10dde5 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -61,6 +61,10 @@ pet_hair_style: 100 // Visible area size (how many squares away from a player can they see) area_size: 14 +// Maximum walk path (how many cells a player can walk going to cursor) +// default: 17(official) +max_walk_path: 17 + // Maximum allowed 'level' value that can be sent in unit packets. // Use together with the aura_lv setting to tell when exactly to show the aura. // NOTE: You also need to adjust the client if you want this to work. diff --git a/conf/char-server.conf b/conf/char-server.conf index 929bad5d0..4ed7c1a26 100644 --- a/conf/char-server.conf +++ b/conf/char-server.conf @@ -79,8 +79,9 @@ char_new: 1 // Display (New) in the server list. char_new_display: 0 -// Maximum users able to connect to the server. Set to 0 for unlimited. -max_connect_user: 0 +// Maximum users able to connect to the server. +// Set to 0 to disable users to log-in. (-1 means unlimited) +max_connect_user: -1 // Group ID that is allowed to bypass the server limit of users. // Default: -1 = nobody (there are no groups with ID < 0) diff --git a/db/castle_db.txt b/db/castle_db.txt index a77b5de7b..4e0f2e880 100644 --- a/db/castle_db.txt +++ b/db/castle_db.txt @@ -34,13 +34,13 @@ 21,nguild_gef,Air,Agit_N02,2 22,nguild_pay,Water,Agit_N03,2 23,nguild_prt,Fire,Agit_N04,2 -24,schg_cas01,Himinn,Agit_Sc01,1 // kRO : Himinn -25,schg_cas02,Andlangr,Agit_Sc02,1 // kRO : Andlangr -26,schg_cas03,Viblainn,Agit_Sc03,1 // kRO : Viblainn -27,schg_cas04,Hljod,Agit_Sc04,1 // kRO : Hljod -28,schg_cas05,Skidbladnir,Agit_Sc05,1 // kRO : Skidbladnir -29,arug_cas01,Mardol,Agit_Ar01,1 // kRO : Mardol -30,arug_cas02,Cyr,Agit_Ar02,1 // kRO : Cyr -31,arug_cas03,Horn,Agit_Ar03,1 // kRO : Horn -32,arug_cas04,Gefn,Agit_Ar04,1 // kRO : Gefn -33,arug_cas05,Bandis,Agit_Ar05,1 // kRO : Bandis +24,schg_cas01,Himinn,Manager#schg_cas01,1 // kRO : Himinn +25,schg_cas02,Andlangr,Manager#schg_cas02,1 // kRO : Andlangr +26,schg_cas03,Viblainn,Manager#schg_cas03,1 // kRO : Viblainn +27,schg_cas04,Hljod,Manager#schg_cas04,1 // kRO : Hljod +28,schg_cas05,Skidbladnir,Manager#schg_cas05,1 // kRO : Skidbladnir +29,arug_cas01,Mardol,Manager#arug_cas01,1 // kRO : Mardol +30,arug_cas02,Cyr,Manager#arug_cas02,1 // kRO : Cyr +31,arug_cas03,Horn,Manager#arug_cas03,1 // kRO : Horn +32,arug_cas04,Gefn,Manager#arug_cas04,1 // kRO : Gefn +33,arug_cas05,Bandis,Manager#arug_cas05,1 // kRO : Bandis diff --git a/db/const.txt b/db/const.txt index 09b1c64c7..b4fa39366 100644 --- a/db/const.txt +++ b/db/const.txt @@ -588,6 +588,9 @@ bFixedCastrate 2053 bVariableCastrate 2054 bSkillUseSP 2055 bMagicAtkEle 2056 +bFixedCast 2057 + +bVariableCast 2058 EQI_HEAD_TOP 1 EQI_ARMOR 2 diff --git a/db/packet_db.txt b/db/packet_db.txt index f54690bd3..776fd3279 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -34,7 +34,7 @@ // Client detection is faster when all clients use this version. // Version 23 is the latest Sakexe (above versions are for Renewal clients) //packet_db_ver: 25 -packet_db_ver: default +packet_db_ver: 30 packet_ver: 5 0x0064,55 @@ -1758,7 +1758,7 @@ packet_ver: 30 0x0977,14 //Monster HP Bar //2012-04-18aRagexeRE [Special Thanks to Judas!] -packet_ver:31 +packet_ver: 31 0x023B,26,friendslistadd,2 0x0361,5,hommenu,2:4 0x08A8,36,storagepassword,0 @@ -1776,5 +1776,25 @@ packet_ver:31 0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections 0x08d2,10 -//Add new packets here +// ========== WARNING ============= +// - 2012-07-02 is NOT STABLE. +// - The packets are kept here for reference, DONT USE THEM. +//2012-07-02aRagexeRE //packet_ver: 32 +//0x0363,19,wanttoconnection,2:6:10:14:18 +//0x0364,6,ticksend,2 +//0x085a,7,actionrequest,2:6 +//0x0861,8,movefromkafra,2:4 +//0x0862,10,useskilltoid,2:4:6 +//0x0863,10,useskilltopos,2:4:6:8 +//0x0886,6,solvecharname,2 +//0x0889,90,useskilltoposinfo,2:4:6:8:10 +//0x089e,6,dropitem,2:4 +//0x089f,6,takeitem,2 +//0x08a0,8,movetokafra,2:4 +//0x094a,6,getcharnamerequest,2 +//0x0953,5,walktoxy,2 +//0x0960,5,changedir,2:4 + +//Add new packets here +//packet_ver: 33 diff --git a/db/pre-re/item_combo_db.txt b/db/pre-re/item_combo_db.txt index 3b8985fb0..c1eb3c039 100644 --- a/db/pre-re/item_combo_db.txt +++ b/db/pre-re/item_combo_db.txt @@ -21,7 +21,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -29,7 +29,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1723:2718,{ bonus bDex,1; bonus bMaxSP,50; bonus bSPrecovRate,10; } 1730:1752,{ bonus bLongAtkRate,25; } 1731:1754,{ bonus bLongAtkRate,25; } diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index 391954fab..35763c257 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -1777,7 +1777,7 @@ 4149,Gargoyle_Card,Gargoyle Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12028,RC_Insect,100; },{},{} 4150,Goat_Card,Goat Card,6,20,,10,,,,,,,,16,,,,,{ if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; } },{},{} 4151,Gajomart_Card,Gajomart Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10; },{},{} -4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300; },{},{} +4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300; },{},{} 4153,Crab_Card,Crab Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; },{},{} 4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100; },{},{} 4155,Goblin_Leader_Card,Goblin Leader Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,1,30; },{},{} diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 81acb7f0d..f6bd7dc01 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -24,7 +24,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -32,7 +32,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1657:2471:2569:15029,{ bonus bHealPower,25; } 1660:2471:2569:15029,{ bonus bHealPower,45; bonus3 bAutoSpellWhenHit,"AB_SILENTIUM",1,10; } 1718:1774,{ bonus bLongAtkRate,50; } @@ -117,7 +117,7 @@ 2475:2574:2883:15036,{ bonus bMaxHPRate,14; bonus2 bSkillAtk,"RK_HUNDREDSPEAR",50; skill "CR_AUTOGUARD",1; } 2476:2575:2884:15037,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bSkillAtk,"RK_SONICWAVE",100; bonus2 bSkillAtk,"RK_WINDCUTTER",100; autobonus "{ sc_start SC_CONCENTRATION,10000,getskilllv(\"LK_CONCENTRATION\")?getskilllv(\"LK_CONCENTRATION\"):1; bonus bAspd,2; }",1,10000,BF_WEAPON,"{}"; } 2477:2577:2886:15038,{ bonus bCritical,15; bonus bFlee,10; bonus bCritAtkRate,40; bonus2 bSkillAtk,"GC_CROSSIMPACT",20; } -2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; /* bonus bEquipmentMatk,10; */ if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } +2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatk,10; if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } 2479:2580:2890:15042,{ bonus bAspd,2; bonus bLongAtkRate,30; bonus3 bAutoSpell,"AC_DOUBLE",3,10; bonus2 bSkillAtk,"RA_ARROWSTORM",50; } 2480:2581:2891:15043,{ bonus bMaxHPRate,15; bonus2 bSkillAtk,"RA_CLUSTERBOMB",20; bonus bFlee2,20; bonus bLongAtkRate,-30; bonus bAspd,-7; } 2483:2586:15046,{ bonus2 bSubRace,RC_DemiHuman,15; } @@ -147,7 +147,7 @@ 2725:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } 2726:2727,{ bonus bUseSPrate,-25; } 2733:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } -2747:13061,{ bonus bHit,5; /* bonus bEquipmentMatk,5; */ } +2747:13061,{ bonus bHit,5; bonus bMatk,5; } 2777:2778:5479,{ bonus bMaxHP,300; bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,5; } 2779:2780:5482,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } 2779:2780:5577,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index c8f518c12..abc6909c2 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -1870,3 +1870,31 @@ 13425,499,100 // Tourist Sword 15007,467,100 // Time Keeper Robe 16006,499,100 // Tourist Mace + +// Sealed Cards +4489,457,100 // Sealed Pharaoh Card +4490,457,100 // Sealed Moonlight Flower Card +4491,457,100 // Sealed Sniper Card +4492,457,100 // Sealed Orc Hero Card +4493,457,100 // Sealed Tao Gunka Card +4494,457,100 // Sealed Turtle General Card +4495,457,100 // Sealed Amon Ra Card +4496,457,100 // Sealed Drake Card +4497,457,100 // Sealed Stormy Knight Card +4498,457,100 // Sealed Lady Tanee Card +4499,457,100 // Sealed Samurai Spector Card +4500,457,100 // Sealed Orc Lord Card +4501,457,100 // Sealed High Priest Card +4502,457,100 // Sealed MasterSmith Card +4503,457,100 // Sealed Vesper Card +4504,457,100 // Sealed Eddga Card +4535,457,100 // Sealed Randgris Card +4536,457,100 // Sealed Atroce Card +4537,457,100 // Sealed Phreeoni Card +4538,457,100 // Sealed White Lady Card +4539,457,100 // Sealed Fallen Bishop Hibram Card +4540,457,100 // Sealed Lord of The Dead Card +4541,457,100 // Sealed High Wizard Card +4542,457,100 // Sealed Detale Card +4543,457,100 // Sealed Hatii Card +4544,457,100 // Sealed Evil Snake Lord Card diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index e331dbf7b..559e49414 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -409,8 +409,11 @@ bonus2 bSkillUseSPrate,s,x; Reduces SP consumption of skill s by x%. (supports bonus2 bSkillUseSP,s,x; Reduces SP consumption of skill s by x. (supports skill names.) bonus2 bSkillCooldown,s,x; Increases cooldown of skill s by x milliseconds. (supports skill names.) -bonus bFixedCastrate,x; Increases fixed cast time of skills by x%. -bonus bVariableCastrate,x; Increases variable cast time of skills by x%. +bonus bFixedCastrate,x; Increases fixed cast time of all skills by x%. +bonus bVariableCastrate,x; Increases variable cast time of all skills by x%. +bonus bFixedCast,x; Increases fixed cast time of all skills by x milliseconds; +bonus bVariableCast,x; Increases variable cast time of all skills by x milliseconds; bonus2 bSkillFixedCast,s,x; Increases fixed cast time of skill s by x milliseconds. (supports skill names.) bonus2 bSkillVariableCast,s,x; Increases variable cast time of skill s by x milliseconds. (supports skill names.) bonus2 bVariableCastrate,s,x; Increases variable cast time of skill s by x%. (supports skill names.) +bonus2 bFixedCastrate,s,x; Increases fixed cast time of skill s by x%. (supports skill names.)
\ No newline at end of file diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index 115238bfb..5253fbe16 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.9 +//= 1.9a //===== Description: ========================================= //= [ Aegis Conversion] //= ---------------------------------------------------------- @@ -49,6 +49,7 @@ //= and added extended anouncement format for mapannounce. //= 1.8 Fixed a possible exploit in guild castle investment. [Brian] //= 1.9 Partially rewrote Script. [Masao] +//= 1.9a Fixed incorrect setcastledata parameter. [Euphy] //============================================================ // WoE : Main Functions @@ -156,7 +157,7 @@ OnGuildBreak: // Kill guardians, disable the Kafra, and set owner to 0. killmonster strnpcinfo(2),"Guardian#"+strnpcinfo(2)+"::OnGuardianDied"; disablenpc "Kafra Staff#"+strnpcinfo(2); - SetCastleData strnpcinfo(2),0,0; + SetCastleData strnpcinfo(2),1,0; // Wait before refreshing guild information. sleep 7000; Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0; diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt index 0c15e3a70..45c847d5d 100644 --- a/npc/guild2/agit_main_se.txt +++ b/npc/guild2/agit_main_se.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Description: ========================================= //= Like agit_main, this file is required //= for SE castles to function. @@ -13,6 +13,7 @@ //= 1.1 Fixed an incorrect label execution. [Euphy] //= 1.2 Hopefully fixed a processing error. [Euphy] //= 1.3 Fixed barricade issue in schg_cas02. [Cookie] +//= 1.4 Added OnGuildBreak event and a spawn check. [Euphy] //============================================================ // Core, triggers all other events @@ -64,6 +65,17 @@ OnAgitEnd2: } end; +OnGuildBreak: + if (strnpcinfo(2) == "template") end; + killmonster strnpcinfo(2),"gard1#"+strnpcinfo(2)+"::OnGuardianDied"; + killmonster strnpcinfo(2),"gard2#"+strnpcinfo(2)+"::OnGuardianDied"; + disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + setcastledata strnpcinfo(2),1,0; + sleep 7000; + announce "Guild Base ["+getcastlename(strnpcinfo(2))+"] has been abandoned.",0; + donpcevent strnpcinfo(0)+"::OnRecvCastle2"; + end; + OnStart: // $agit_ar0x[] - $agit_sc0x[] // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians @@ -76,7 +88,10 @@ OnStart: for(set .@i,0; .@i<4; set .@i,.@i+1) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; } + OnEmpSpawn: + set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + if (mobcount(strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena")) end; if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219; else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],89,256; @@ -87,7 +102,7 @@ OnEmpSpawn: else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202; else setarray .@i[0],120,272; // Castles 1,4,5 are identical. } - monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"::OnStartArena"; + monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena"; end; OnReset: diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt index ba6508353..1242facb0 100644 --- a/npc/instances/EndlessTower.txt +++ b/npc/instances/EndlessTower.txt @@ -642,7 +642,7 @@ OnInstanceInit: OnEnable: enablenpc instance_npcname("4FGate102tower", instance_id()); areamonster "1@tower",352,351,362,387,"Golden Thief Bug",1086,1,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; - areamonster "1@tower",352,351,362,387,"Theif Bug Male",1054,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; + areamonster "1@tower",352,351,362,387,"Thief Bug Male",1054,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "1@tower",352,351,362,387,"Thief Bug Female",1053,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "1@tower",352,351,362,387,"Thief Bug",1051,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "1@tower",352,351,362,387,"Thief Bug Egg",1048,5,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead"; diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt index 96874f73e..2777e0a43 100644 --- a/npc/jobs/2-1/hunter.txt +++ b/npc/jobs/2-1/hunter.txt @@ -534,6 +534,7 @@ hu_in01,382,382,4 script Guild Receptionist#hnt 732,{ close; } else if (HNTR_Q >= 3 && HNTR_Q <= 9) { + if(checkre(0)) set .@i,1; switch(HNTR_Q) { //Insect_Feeler/Claw_Of_Desert_Wolf, Wooden_Block, White_Herb case 3: setarray .@items[0], (.@i?928:7030),5, 1019,5, 509,3, 10; break; diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index bdef46fa7..9b0c8fff4 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -1808,7 +1808,7 @@ REPLACE INTO `item_db` VALUES (4148,'Pharaoh_Card','Pharaoh Card',6,20,NULL,10,N REPLACE INTO `item_db` VALUES (4149,'Gargoyle_Card','Gargoyle Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12028,RC_Insect,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4150,'Goat_Card','Goat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; }',NULL,NULL); REPLACE INTO `item_db` VALUES (4151,'Gajomart_Card','Gajomart Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;',NULL,NULL); -REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300;',NULL,NULL); +REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300;',NULL,NULL); REPLACE INTO `item_db` VALUES (4153,'Crab_Card','Crab Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30;',NULL,NULL); REPLACE INTO `item_db` VALUES (4154,'Rice_Cake_Boy_Card','Dumpling Child Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4155,'Goblin_Leader_Card','Goblin Leader Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,1,30;',NULL,NULL); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index e9ddd31ca..a3fd574f7 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -7363,4 +7363,4 @@ REPLACE INTO `item_db_re` VALUES (19529,'Costume_Angel_Wing','Costume Angel Wing REPLACE INTO `item_db_re` VALUES (19530,'Costume_Wild_Rose','Costume Wild Rose',5,20,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,1024,NULL,'1',NULL,541,NULL,NULL,NULL); # More 2-Handed Swords REPLACE INTO `item_db_re` VALUES (21001,'Bellum_Claymore','Bellum Claymore',4,20,NULL,3500,'260',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bAddRace,RC_DemiHuman,80; bonus2 bIgnoreDefRate,RC_DemiHuman,30; if(getrefine()>=6) { bonus2 bAddRace,RC_DemiHuman,40; } if(getrefine()>=9) { autobonus2 "{bonus bShortWeaponDamageReturn,20; bonus bMagicDamageReturn,20;}",200,1000,BF_WEAPON,"{specialeffect2 EF_REFLECTSHIELD;}"; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL);
\ No newline at end of file +REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL); diff --git a/sql-files/main.sql b/sql-files/main.sql index f159260f1..e69279710 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -111,7 +111,6 @@ CREATE TABLE IF NOT EXISTS `char` ( KEY `account_id` (`account_id`), KEY `party_id` (`party_id`), KEY `guild_id` (`guild_id`), - KEY `name` (`name`), KEY `online` (`online`) ) ENGINE=MyISAM AUTO_INCREMENT=150000; @@ -181,8 +180,7 @@ CREATE TABLE IF NOT EXISTS `hotkey` ( `type` TINYINT(1) unsigned NOT NULL default '0', `itemskill_id` INT(11) unsigned NOT NULL default '0', `skill_lvl` TINYINT(4) unsigned NOT NULL default '0', - PRIMARY KEY (`char_id`,`hotkey`), - INDEX (`char_id`) + PRIMARY KEY (`char_id`,`hotkey`) ) ENGINE=MyISAM; -- @@ -196,8 +194,7 @@ CREATE TABLE IF NOT EXISTS `global_reg_value` ( `type` tinyint(1) NOT NULL default '3', `account_id` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`,`str`,`account_id`), - KEY `account_id` (`account_id`), - KEY `char_id` (`char_id`) + KEY `account_id` (`account_id`) ) ENGINE=MyISAM; -- @@ -310,8 +307,7 @@ CREATE TABLE IF NOT EXISTS `guild_position` ( `name` varchar(24) NOT NULL default '', `mode` tinyint(11) unsigned NOT NULL default '0', `exp_mode` tinyint(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guild_id`,`position`), - KEY `guild_id` (`guild_id`) + PRIMARY KEY (`guild_id`,`position`) ) ENGINE=MyISAM; -- @@ -622,8 +618,7 @@ CREATE TABLE IF NOT EXISTS `skill` ( `char_id` int(11) unsigned NOT NULL default '0', `id` smallint(11) unsigned NOT NULL default '0', `lv` tinyint(4) unsigned NOT NULL default '0', - PRIMARY KEY (`char_id`,`id`), - KEY `char_id` (`char_id`) + PRIMARY KEY (`char_id`,`id`) ) ENGINE=MyISAM; -- @@ -634,8 +629,7 @@ CREATE TABLE IF NOT EXISTS `skill_homunculus` ( `homun_id` int(11) NOT NULL, `id` int(11) NOT NULL, `lv` smallint(6) NOT NULL, - PRIMARY KEY (`homun_id`,`id`), - KEY `homun_id` (`homun_id`) + PRIMARY KEY (`homun_id`,`id`) ) ENGINE=MyISAM; -- diff --git a/src/char/char.c b/src/char/char.c index d454e8bd0..1b5c7898d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -133,7 +133,7 @@ struct char_session_data { char birthdate[10+1]; // YYYY-MM-DD }; -int max_connect_user = 0; +int max_connect_user = -1; int gm_allow_group = -1; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int start_zeny = 0; @@ -2154,7 +2154,8 @@ int parse_fromlogin(int fd) { ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map[0] ); // continued from char_auth_ok... if( server_id == ARRAYLENGTH(server) || //server not online, bugreport:2359 - ( max_connect_user && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { + (max_connect_user == 0 && sd->group_id != gm_allow_group) || + ( max_connect_user > 0 && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { // refuse connection (over populated) WFIFOHEAD(i,3); WFIFOW(i,0) = 0x6c; @@ -4588,8 +4589,8 @@ int char_config_read(const char* cfgName) char_new_display = atoi(w2); } else if (strcmpi(w1, "max_connect_user") == 0) { max_connect_user = atoi(w2); - if (max_connect_user < 0) - max_connect_user = 0; // unlimited online players + if (max_connect_user < -1) + max_connect_user = -1; // unlimited online players } else if(strcmpi(w1, "gm_allow_group") == 0) { gm_allow_group = atoi(w2); } else if (strcmpi(w1, "autosave_time") == 0) { diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 9cb17dca8..b3a907b1a 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -602,9 +602,9 @@ static struct guild_castle* inter_guildcastle_fromsql(int castle_id) // Read exp_guild.txt static bool exp_guild_parse_row(char* split[], int column, int current) { - int exp = atoi(split[0]); + unsigned int exp = atoll(split[0]); - if (exp < 0 || exp >= INT_MAX) { + if (exp < 0 || exp >= UINT_MAX) { ShowError("exp_guild: Invalid exp %d at line %d\n", exp, current); return false; } diff --git a/src/map/battle.c b/src/map/battle.c index 0506f2fe9..f9748833f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5868,6 +5868,7 @@ static const struct _battle_data { **/ { "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, }, { "item_restricted_consumption_type", &battle_config.item_restricted_consumption_type,1, 0, 1, }, + { "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index c5ca19b90..1354da78a 100644 --- a/src/map/battle.h +++ b/src/map/battle.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 team #ifndef _BATTLE_H_ #define _BATTLE_H_ @@ -483,8 +484,12 @@ extern struct Battle_Config int atcommand_mobinfo_type; int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] + + /** Hercules **/ int skill_trap_type; int item_restricted_consumption_type; + int max_walk_path; + } battle_config; void do_init_battle(void); diff --git a/src/map/clif.c b/src/map/clif.c index e04941336..8d5090c2c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5344,6 +5344,9 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id /// Notifies clients of a status change. /// 0196 <index>.W <id>.L <state>.B (ZC_MSG_STATE_CHANGE) [used for ending status changes and starting them on non-pc units (when needed)] /// 043f <index>.W <id>.L <state>.B <remain msec>.L { <val>.L }*3 (ZC_MSG_STATE_CHANGE2) [used exclusively for starting statuses on pcs] +/// 08ff <id>.L <index>.W <remain msec>.L { <val>.L }*3 (PACKETVER >= 20111108) +/// 0983 <index>.W <id>.L <state>.B <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618) +/// 0984 <id>.L <index>.W <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618) void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3) { unsigned char buf[32]; @@ -17111,7 +17114,6 @@ int do_init_clif(void) { clif_config.packet_db_ver = -1; // the main packet version of the DB memset(clif_config.connect_cmd, 0, sizeof(clif_config.connect_cmd)); //The default connect command will be determined after reading the packet_db [Skotlex] - memset(packet_db,0,sizeof(packet_db)); //Using the packet_db file is the only way to set up packets now [Skotlex] packetdb_readdb(); diff --git a/src/map/clif.h b/src/map/clif.h index 45e2fd4f0..8e0fc6629 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -31,8 +31,8 @@ struct party_booking_ad_info; enum {// packet DB - MAX_PACKET_DB = 0xA00, - MAX_PACKET_VER = 31, + MAX_PACKET_DB = 0xF00, + MAX_PACKET_VER = 32, MAX_PACKET_POS = 20, }; diff --git a/src/map/map.h b/src/map/map.h index 86d936972..06995024f 100644 --- a/src/map/map.h +++ b/src/map/map.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 team #ifndef _MAP_H_ #define _MAP_H_ @@ -406,7 +407,7 @@ enum _sp { SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045 SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049 SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054 - SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE //2055-2056 + SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST //2055-2058 }; enum _look { diff --git a/src/map/mob.c b/src/map/mob.c index 6550d9b0e..aceebc506 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1537,7 +1537,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) // Scan area for targets if (!tbl && mode&MD_LOOTER && md->lootitem && DIFF_TICK(tick, md->ud.canact_tick) > 0 && (md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1)) - { // Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items. + { // Scan area for items to loot, avoid trying to loot if the mob is full and can't consume the items. map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl, view_range, BL_ITEM, md, &tbl); } diff --git a/src/map/npc.c b/src/map/npc.c index 3aabeaf98..383cd031a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2884,24 +2884,23 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL); // split atcmd parameters based on spaces - i = 0; - j = 0; - temp = (char*)aMalloc(strlen(message) + 1); - while( message[i] != '\0' ) { - if( message[i] == ' ' && k < 127 ) { - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - j = 0; - ++i; - } else - temp[j++] = message[i++]; + for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) { + if( message[i] == ' ' || message[i] == '\0' ) { + if( message[ ( i - 1 ) ] == ' ' ) { + continue; // To prevent "@atcmd [space][space][space]..." + } + temp[k] = '\0'; + k = 0; + setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL ); + } else { + temp[k] = message[i]; + k++; + } } - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)&k, NULL); + setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPRTSIZE(j), NULL); aFree(temp); run_script_main(st); diff --git a/src/map/pc.c b/src/map/pc.c index 6f608cd49..6e24d7d49 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2591,11 +2591,22 @@ int pc_bonus(struct map_session_data *sd,int type,int val) if(sd->state.lr_flag != 2) sd->bonus.fixcastrate -= val; break; + case SP_ADD_FIXEDCAST: + if(sd->state.lr_flag != 2) + sd->bonus.add_fixcast += val; + + break; #ifdef RENEWAL_CAST case SP_VARCASTRATE: if(sd->state.lr_flag != 2) sd->bonus.varcastrate -= val; break; + case SP_ADD_VARIABLECAST: + if(sd->state.lr_flag != 2) + + sd->bonus.add_varcast += val; + + break; #endif default: ShowWarning("pc_bonus: unknown type %d %d !\n",type,val); @@ -2953,7 +2964,15 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2); if (i == ARRAYLENGTH(sd->skillcast)) { //Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bCastRate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillcast), type2, val); + ShowDebug("run_script: bonus2 %s reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", + +#ifndef RENEWAL_CAST + "bCastRate", +#else + "bVariableCastrate", +#endif + + ARRAYLENGTH(sd->skillcast), type2, val); break; } if(sd->skillcast[i].id == type2) @@ -2964,6 +2983,30 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) } break; + case SP_FIXCASTRATE: + if(sd->state.lr_flag == 2) + break; + + ARR_FIND(0, ARRAYLENGTH(sd->skillfixcastrate), i, sd->skillfixcastrate[i].id == 0 || sd->skillfixcastrate[i].id == type2); + + if (i == ARRAYLENGTH(sd->skillfixcastrate)) + + { + + ShowDebug("run_script: bonus2 bFixedCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillfixcastrate), type2, val); + break; + } + + if(sd->skillfixcastrate[i].id == type2) + sd->skillfixcastrate[i].val += val; + + else { + sd->skillfixcastrate[i].id = type2; + sd->skillfixcastrate[i].val = val; + } + + break; + case SP_HP_LOSS_RATE: if(sd->state.lr_flag != 2) { sd->hp_loss.value = type2; @@ -8194,6 +8237,10 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) { cursor++; } + + /* check if combo requirements still fit */ + if( pc_checkcombo( sd, data ) ) + continue; /* it's empty, we can clear all the memory */ if( (sd->combos.count = cursor) == 0 ) { diff --git a/src/map/pc.h b/src/map/pc.h index 870945d73..ac1950a69 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -263,7 +263,7 @@ struct map_session_data { struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills. unsigned short id; short val; - } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS]; + } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS]; struct { short value; int rate; @@ -320,6 +320,7 @@ struct map_session_data { unsigned short unbreakable_equip; //100% break resistance on certain equipment unsigned short unstripable_equip; int fixcastrate,varcastrate; + int add_fixcast,add_varcast; int ematk; // matk bonus from equipment // int eatk; // atk bonus from equipment } bonus; diff --git a/src/map/script.c b/src/map/script.c index 60a61654a..b4f0a5d9b 100644 --- a/src/map/script.c +++ b/src/map/script.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 team //#define DEBUG_DISP //#define DEBUG_DISASM @@ -7860,6 +7861,7 @@ BUILDIN_FUNC(bonus) case SP_SKILL_FIXEDCAST: case SP_SKILL_VARIABLECAST: case SP_VARCASTRATE: + case SP_FIXCASTRATE: case SP_SKILL_USE_SP: // these bonuses support skill names val1 = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); diff --git a/src/map/skill.c b/src/map/skill.c index 9c07390f3..2cc3ed1ab 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13819,6 +13819,10 @@ int skill_vfcastfix (struct block_list *bl, double time, uint16 skill_id, uint16 if(sd && !(skill_get_castnodex(skill_id, skill_lv)&4) ){ // Increases/Decreases fixed/variable cast time of a skill by item/card bonuses. if( sd->bonus.varcastrate < 0 ) VARCAST_REDUCTION(sd->bonus.varcastrate); + if( sd->bonus.add_varcast != 0 ) // bonus bVariableCast + time += sd->bonus.add_varcast; + if( sd->bonus.add_fixcast != 0 ) // bonus bFixedCast + fixed += sd->bonus.add_fixcast; for (i = 0; i < ARRAYLENGTH(sd->skillfixcast) && sd->skillfixcast[i].id; i++) if (sd->skillfixcast[i].id == skill_id){ // bonus2 bSkillFixedCast fixed += sd->skillfixcast[i].val; @@ -13835,6 +13839,12 @@ int skill_vfcastfix (struct block_list *bl, double time, uint16 skill_id, uint16 VARCAST_REDUCTION(i); break; } + for( i = 0; i < ARRAYLENGTH(sd->skillfixcastrate) && sd->skillfixcastrate[i].id; i++ ) + + if( sd->skillfixcastrate[i].id == skill_id ){ // bonus2 bFixedCastrate + fixcast_r = sd->skillfixcastrate[i].val; // just speculation + break; + } } if (sc && sc->count && !(skill_get_castnodex(skill_id, skill_lv)&2) ) { diff --git a/src/map/status.c b/src/map/status.c index 7840a7a7f..8fd48aefc 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena dev team @@ -2416,6 +2416,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) + sizeof(sd->skillcooldown) + sizeof(sd->skillfixcast) + sizeof(sd->skillvarcast) + + sizeof(sd->skillfixcastrate) ); memset (&sd->bonus, 0,sizeof(sd->bonus)); diff --git a/src/map/unit.c b/src/map/unit.c index e901d3138..45aca7d41 100644 --- a/src/map/unit.c +++ b/src/map/unit.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 team #include "../common/showmsg.h" #include "../common/timer.h" @@ -315,21 +316,22 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) { struct unit_data* ud = NULL; struct status_change* sc = NULL; -#ifdef OFFICIAL_WALKPATH struct walkpath_data wpd; -#endif + nullpo_ret(bl); ud = unit_bl2ud(bl); if( ud == NULL) return 0; -#ifdef OFFICIAL_WALKPATH path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS); // Count walk path cells +#ifdef OFFICIAL_WALKPATH if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) // Check if there is an obstacle between && wpd.path_len > 14 ) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] return 0; #endif + if( battle_config.max_walk_path < wpd.path_len ) + return 0; if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 && DIFF_TICK(ud->canmove_tick, gettick()) < 2000) |