Skip to content

Commit

Permalink
=General
Browse files Browse the repository at this point in the history
*Increased MAX_MAP_PER_SERVER to 2000
+Because their's nearly 1000 maps in the cache, instance maps will likely generate
-in the ID range for Extra/Custom maps. The 500 increase will give headspace for
-more official maps and instances. This also shifts the ID ranges for Extra/Custom
-maps by 500. Be sure to rebuild your map cache if your using custom maps.

*Added support for the extended refine system.
+This is a customized system for supporting +20 equippment refines.
-The system is off by default but can be enabled in the source.
-Check the db/refine_db_extended.txt file for more info.

*Disabled warnings about possible packet encryption when the server receives a
-unknown packet. 2018 clients have encryption disabled by default and people by
-now should know how to resolve possible issues like this.

*Important monster ID's are now set in a enum table.

*Player clone ID range reduced to 200 clones max.
+This will be increased back in the future once the 2nd monster ID range is
-supported.



=Database
*Renamed the monster KO_ZANZOU to KO_KAGE.
+Its the actural official name.



=Jobs
*Mechanic
+Can now use all Merchant, Blacksmith, and Whitesmith skills while in a Mado.



=Skills
*RK_CRUSHSTRIKE
*LG_SHIELDSPELL
+Updated damage, effect, and duration formula's to work properly for +10 and +20
-refine settings.


*LG_SHIELDPRESS
+Updated stun duration to official.
-Once again the 2011 iRO document is wrong.
+Updated damage, effect, and duration formula's to work properly for +10 and +20
-refine settings.

git-svn-id: svn://svn.code.sf.net/p/v1-3ceam/code/trunk@870 cad27aaa-dce3-4a30-a00a-e4fd67c11881
  • Loading branch information
rytech16 committed Nov 20, 2018
1 parent ee3d10f commit 53efe13
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 29 deletions.
5 changes: 3 additions & 2 deletions rewrite/conf/battle/skill.conf
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ player_camouflage_check_type: 1
metallicsound_spburn_rate: 100

// Can Mechanic's use Merchant, Blacksmith, and Whitesmith skills while mounted in a mado?
// Default: no
mado_skill_limit: no
// Default: yes
// Used to be no, but that changed in official on November 2018.
mado_skill_limit: yes

// Can the following skills be casted on players mounted in a mado?
// Skills: Heal / Increase AGI / Decrease AGI / Renovatio / Highness Heal
Expand Down
4 changes: 2 additions & 2 deletions rewrite/db/map_index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ star_in
//======================================================================================
// - Other/Extra maps -
//======================================================================================
//rwc01 1000
//rwc01 1500
//rwc02
//rwc03
//2009rwc_f01
Expand Down Expand Up @@ -1098,5 +1098,5 @@ star_in
//======================================================================================
//Example:
//
//mymap 1250
//mymap 1750
//mymap-2
2 changes: 1 addition & 1 deletion rewrite/db/mob_db_3ceam.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
2160,S_LUCIOLA_VESPA,Luciola Vespa,Luciola Vespa,130,16466,0,0,0,1,154,677,11,31,88,89,55,32,119,59,10,12,1,4,24,0x7795,110,1000,864,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

// Kagerou/Oboro Zanzou - Settings Are Not Official.
2308,KO_ZANZOU,Shadow Clone,Shadow Clone,100,18000,0,0,0,1,0,0,0,0,1,1,1,1,1,1,10,12,1,0,27,0x0,150,1003,1152,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2308,KO_KAGE,Shadow Clone,Shadow Clone,100,18000,0,0,0,1,0,0,0,0,1,1,1,1,1,1,10,12,1,0,27,0x0,150,1003,1152,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
20 changes: 20 additions & 0 deletions rewrite/db/refine_db_extended.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Database for upgrading items. (+20 version for 3CeAM)
// Stats per level for safe upgrade, Stats per level after safe limit, Safe level limit, Lv.1 %, Lv 2 %, Lv.3%, ect...
// Armor defense is done in percentage (ie 70 = .7 def)
// Weapons are whole numbers (ie 3 = 3 atk)
//
// 3CeAM Extended Refine System Info
// When enabled, the system will increase the max refine level to 20.
// The system will give bonus DEF on armor equips for refine levels 1 to 10, but
// will not give any additional DEF on refine levels 11 to 20 for balance reasons.
// Weapons will get bonus ATK on all refine levels.
// Item scripts affected by refine level will be affected by all levels.
//
// Note: To load this file, go into the src/map/status.h file and change the MAX_REFINE setting to 20 and recompile.
// The system will switch to loading this file instead of the refine_db.txt one automatically.

70, 4,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, 8, 8, 8, 8, 7, 7, 7, 7, 5, 5, // Armor
2, 3,7, 100,100,100,100,100,100,100, 60, 40, 20, 18, 18, 18, 18, 18, 17, 17, 17, 15, 15, // Lv.1 Weapons
3, 5,6, 100,100,100,100,100,100, 60, 40, 20, 20, 18, 18, 18, 18, 18, 17, 17, 17, 15, 15, // Lv.2 Weapons
5, 8,5, 100,100,100,100,100, 60, 50, 20, 20, 20, 18, 18, 18, 18, 18, 17, 17, 17, 15, 15, // Lv.3 Weapons
7,13,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, 8, 8, 8, 8, 7, 7, 7, 7, 5, 5, // Lv.4 Weapons
2 changes: 1 addition & 1 deletion rewrite/db/skill_renewal_cast_db.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
//-- LG_TRAMPLE
2309,0,0,1000,0,0,0,0
//-- LG_SHIELDPRESS
2310,0,0,0,2000,0,3500:4000:4500:5000:5500,0
2310,0,0,0,2000,0,5500:6000:6500:7000:7500,0
//-- LG_REFLECTDAMAGE
2311,0,0,0,0,0,300000,0
//-- LG_PINPOINTATTACK //Duration 1 used for bleeding.
Expand Down
2 changes: 1 addition & 1 deletion rewrite/sql-files/mob_db_3ceam.sql
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ REPLACE INTO `mob_db_3ceam` VALUES (2158,'S_HORNET','Hornet','Hornet',95,5000,0,
REPLACE INTO `mob_db_3ceam` VALUES (2159,'S_GIANT_HORNET','Giant Hornet','Giant Hornet',110,11960,0,0,0,1,123,456,15,27,117,65,67,72,77,34,10,12,0,4,24,0x3795,155,1292,792,340,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
REPLACE INTO `mob_db_3ceam` VALUES (2160,'S_LUCIOLA_VESPA','Luciola Vespa','Luciola Vespa',130,16466,0,0,0,1,154,677,11,31,88,89,55,32,119,59,10,12,1,4,24,0x7795,110,1000,864,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
# Kagerou/Oboro Zanzou - Settings Are Not Official.
REPLACE INTO `mob_db_3ceam` VALUES (2308,'KO_ZANZOU','Shadow Clone','Shadow Clone',100,18000,0,0,0,1,0,0,0,0,1,1,1,1,1,1,10,12,1,0,27,0x0,150,1003,1152,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
REPLACE INTO `mob_db_3ceam` VALUES (2308,'KO_KAGE','Shadow Clone','Shadow Clone',100,18000,0,0,0,1,0,0,0,0,1,1,1,1,1,1,10,12,1,0,27,0x0,150,1003,1152,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

2 changes: 1 addition & 1 deletion rewrite/src/common/mmo.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#define MAX_HOTKEYS 38
#endif

#define MAX_MAP_PER_SERVER 1500 // Increased to allow creation of Instance Maps
#define MAX_MAP_PER_SERVER 2000 // Increased to allow creation of Instance Maps
#define MAX_INVENTORY 100

//Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.
Expand Down
20 changes: 18 additions & 2 deletions rewrite/src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,9 +2353,17 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
case RK_CRUSHSTRIKE:
if( sd )
{
signed char refinebonus = 0;
short index = sd->equip_index[EQI_HAND_R];
if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
skillratio = sd->inventory_data[index]->wlv * (sd->status.inventory[index].refine + 6) * 100 + sd->inventory_data[index]->atk - 100 + sd->inventory_data[index]->weight / 10;
{
if ( MAX_REFINE > 10 )// +20 Refine Limit
refinebonus = sd->status.inventory[index].refine;
else// +10 Refine Limit
refinebonus = 2 * sd->status.inventory[index].refine;

skillratio = sd->inventory_data[index]->wlv * (refinebonus + 6) * 100 + sd->inventory_data[index]->atk - 100 + sd->inventory_data[index]->weight / 10;
}
}
break;
case RK_STORMBLAST:
Expand Down Expand Up @@ -3113,9 +3121,17 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
case LG_SHIELDPRESS:
if( sd )
{
signed char refinebonus = 0;
short index = sd->equip_index[EQI_HAND_L];
if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_ARMOR )
ATK_ADD(sstatus->vit * sd->status.inventory[index].refine);
{
if ( MAX_REFINE > 10 )// +20 Refine Limit
refinebonus = sd->status.inventory[index].refine;
else// +10 Refine Limit
refinebonus = 2 * sd->status.inventory[index].refine;

ATK_ADD(sstatus->vit * refinebonus);
}
}
break;
//case LG_RAYOFGENESIS:
Expand Down
4 changes: 2 additions & 2 deletions rewrite/src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -17471,7 +17471,7 @@ int clif_parse(int fd)
*/
err == 6 ? ", possibly for having an invalid sex." :
". ERROR invalid error code"));
ShowInfo("Did you apply the "CL_RED"Disable Packet Encryption"CL_RESET" patch in Nemo?\n");
//ShowInfo("Did you apply the "CL_RED"Disable Packet Encryption"CL_RESET" patch in Nemo?\n");
WFIFOHEAD(fd,packet_len(0x6a));
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // Rejected from Server
Expand All @@ -17488,7 +17488,7 @@ int clif_parse(int fd)
// filter out invalid / unsupported packets
if (cmd > MAX_PACKET_DB || packet_db[packet_ver][cmd].len == 0) {
ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x, %d bytes received), disconnecting session #%d.\n", cmd, RFIFOREST(fd), fd);
ShowInfo("Did you apply the "CL_RED"Disable Packet Encryption"CL_RESET" patch in Nemo?\n");
//ShowInfo("Did you apply the "CL_RED"Disable Packet Encryption"CL_RESET" patch in Nemo?\n");
#ifdef DUMP_INVALID_PACKET
ShowDump(RFIFOP(fd,0), RFIFOREST(fd));
#endif
Expand Down
20 changes: 13 additions & 7 deletions rewrite/src/map/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,31 @@ struct item_data;
#define MAX_IGNORE_LIST 20 // official is 14
#define MAX_VENDING 12
#define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo]
#define MOBID_EMPERIUM 1288
// Added definitions for WoESE objects. [L0ne_W0lf]
#define MOBID_BARRICADE1 1905
#define MOBID_BARRICADE2 1906
#define MOBID_GUARIDAN_STONE1 1907
#define MOBID_GUARIDAN_STONE2 1908

enum monster_mobid {
// WoE Emperium
MOBID_EMPERIUM = 1288,

// WoE Second Edition
MOBID_BARRICADE1 = 1905,
MOBID_BARRICADE2,
MOBID_GUARIDAN_STONE1,
MOBID_GUARIDAN_STONE2,

// Mechanic FAW's
MOBID_SILVERSNIPER = 2042,
MOBID_MAGICDECOY_FIRE,
MOBID_MAGICDECOY_WATER,
MOBID_MAGICDECOY_EARTH,
MOBID_MAGICDECOY_WIND,

// Sera's Summon Legion
MOBID_S_HORNET = 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,

MOBID_KO_ZANZOU = 2308,
// Kagerou/Oboro Zanzou
MOBID_KO_KAGE = 2308,
};

//The following system marks a different job ID system used by the map server,
Expand Down
6 changes: 3 additions & 3 deletions rewrite/src/map/mob.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#define MAX_RANDOMMONSTER 4

// Change this to increase the table size in your mob_db to accomodate a larger mob database.
// Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
// Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000
// Be sure to note that IDs 4001 to 4244 are reserved for advanced/baby/expanded classes.
// Notice that the last 200 entries are used for player clones, so always set this to desired value +200
#define MAX_MOB_DB 4000

//The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from.
Expand All @@ -31,7 +31,7 @@
#define MOB_SLAVEDISTANCE 2

// These define the range of available IDs for clones. [Valaris]
#define MOB_CLONE_START (MAX_MOB_DB-999)
#define MOB_CLONE_START (MAX_MOB_DB-199)
#define MOB_CLONE_END MAX_MOB_DB

//Used to determine default enemy type of mobs (for use in eachinrange calls)
Expand Down
19 changes: 13 additions & 6 deletions rewrite/src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -9897,6 +9897,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case LG_SHIELDSPELL:
if (sd)
{
signed char refinebonus = 0;
short effect_number = rand()%3 + 1;// Effect Number. Each level has 3 unique effects thats randomly picked from.
short shield_bonus = 0;// Shield Stats. DEF/MDEF/Refine is taken from shield and ran through a formula.
short splash_range = 0;// Splash AoE. Used for splash AoE ATK/MATK and Lex Divina.
Expand All @@ -9910,6 +9911,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
}

// Set how the bonus from the shield's refine will be handled.
if ( MAX_REFINE > 10 )// +20 Refine Limit
refinebonus = shield->refine;
else// +10 Refine Limit
refinebonus = 2 * shield->refine;

switch( skilllv )
{
case 1:
Expand Down Expand Up @@ -9985,16 +9992,16 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
switch( effect_number )
{
case 1://Status Resistance Increase. This is for common status's.
shield_bonus = 2 * shield->refine + sstatus->luk / 10;
sc_start2(bl,SC_SHIELDSPELL_REF,100,effect_number,shield_bonus,shield->refine * 30000);
shield_bonus = 2 * refinebonus + sstatus->luk / 10;
sc_start2(bl,SC_SHIELDSPELL_REF,100,effect_number,shield_bonus,refinebonus * 30000);
break;
case 2://DEF Increase / Using Converted DEF Increase Formula For Pre-renewal Mechanics.
shield_bonus = shield->refine;
sc_start2(bl,SC_SHIELDSPELL_REF,100,effect_number,shield_bonus,shield->refine * 20000);
shield_bonus = refinebonus / 2;// Half the increase amount.
sc_start2(bl,SC_SHIELDSPELL_REF,100,effect_number,shield_bonus,refinebonus * 20000);
break;
case 3://HP Recovery
sc_start(bl,SC_SHIELDSPELL_REF,100,effect_number,-1);
shield_bonus = sstatus->max_hp * (status_get_base_lv_effect(src) / 10 + shield->refine) / 100;
shield_bonus = sstatus->max_hp * (status_get_base_lv_effect(src) / 10 + refinebonus) / 100;
status_heal(bl, shield_bonus, 0, 2);
status_change_end(bl,SC_SHIELDSPELL_REF,-1);
break;
Expand Down Expand Up @@ -10614,7 +10621,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
{
struct mob_data *md;

md = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), MOBID_KO_ZANZOU, "");
md = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), MOBID_KO_KAGE, "");
if( md )
{
md->master_id = src->id;
Expand Down
11 changes: 10 additions & 1 deletion rewrite/src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -2666,7 +2666,12 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
{
if (!((battle_config.costume_refine_def != 1 && i >= EQI_COSTUME_HEAD_LOW && i <= EQI_COSTUME_FLOOR) ||
(battle_config.shadow_refine_def != 1 && i >= EQI_SHADOW_ARMOR && i <= EQI_SHADOW_ACC_L)))
refinedef += sd->status.inventory[index].refine * refinebonus[0][0];
{// Don't allow DEF bonus's from refine levels 11 to 20 for balance reasons since this is pre-re.
if ( sd->status.inventory[index].refine > 10 )
refinedef += 10 * refinebonus[0][0];
else
refinedef += sd->status.inventory[index].refine * refinebonus[0][0];
}
if( sd->inventory_data[index]->script )
{
if( i == EQI_HAND_L ) //Shield
Expand Down Expand Up @@ -12068,7 +12073,11 @@ int status_readdb(void)
sv_readdb(db_path, "job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, &status_readdb_job1);
sv_readdb(db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2);
sv_readdb(db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix);
#if MAX_REFINE > 10
sv_readdb(db_path, "refine_db_extended.txt", ',', 3+MAX_REFINE+1, 3+MAX_REFINE+1, ARRAYLENGTH(percentrefinery), &status_readdb_refine);
#else
sv_readdb(db_path, "refine_db.txt", ',', 3+MAX_REFINE+1, 3+MAX_REFINE+1, ARRAYLENGTH(percentrefinery), &status_readdb_refine);
#endif

return 0;
}
Expand Down
4 changes: 4 additions & 0 deletions rewrite/src/map/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ struct homun_data;
struct status_change;

//Use this to refer the max refinery level [Skotlex]
//
// 3CeAM Extended Refine System
// Setting of 10 or 20 allowed for MAX_REFINE. 10 is the default for pre-re era behavior.
// Check the refine_db_extended.txt file in the database folder for more info on what this does. [Rytech]
#define MAX_REFINE 10
#define MAX_REFINE_BONUS 5

Expand Down

0 comments on commit 53efe13

Please sign in to comment.