summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 09:15:53 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 09:15:53 +0000
commit1110c8cadd71863155a84bbf961803ad7601ef58 (patch)
tree85a01b69566c76ae924439a4dd3ab4b577ca0d05
parent4055cb0cb12cab48da433489982a96a8dea0ef82 (diff)
downloadhercules-1110c8cadd71863155a84bbf961803ad7601ef58.tar.gz
hercules-1110c8cadd71863155a84bbf961803ad7601ef58.tar.bz2
hercules-1110c8cadd71863155a84bbf961803ad7601ef58.tar.xz
hercules-1110c8cadd71863155a84bbf961803ad7601ef58.zip
Partially reverted the fail from r13966.
Added support for empty lines between individual attr_fix.txt blocks, fixes crash at startup (bugreport:3426). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13968 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/attr_fix.txt90
-rw-r--r--src/map/pc.c3
2 files changed, 51 insertions, 42 deletions
diff --git a/db/attr_fix.txt b/db/attr_fix.txt
index f9d6da1a8..134eec5cd 100644
--- a/db/attr_fix.txt
+++ b/db/attr_fix.txt
@@ -1,50 +1,56 @@
-//Neutral,Water,Earth,Fire,Wind,Poison,Holy,Shadow,Ghost,Undead
-// Row: Monster's Attribute // Column: Attack's Attribute
+// Elemental attribute damage adjustment tables
+//
+// Row: target's defense element
+// Column: attacker's weapon element
1,10 // lv1 Attribute table
-100,100,100,100,100,100,100,100,25,100, // Neutral
-100,25,100,150,50,100,75,100,100,100, // Water
-100,100,100,50,150,100,75,100,100,100, // Earth
-100,50,150,25,100,100,75,100,100,125, // Fire
-100,175,50,100,25,100,75,100,100,100, // Wind
-100,100,125,125,125,0,75,50,100,-25, // Poison
-100,100,100,100,100,100,0,125,100,150, // Holy
-100,100,100,100,100,50,125,0,100,-25, // Shadow
-25,100,100,100,100,100,75,75,125,100, // Ghost
-100,100,100,100,100,50,100,0,100,0, // Undead
+//Neut Watr Erth Fire Wind Pois Holy Shdw Gho Und
+ 100, 100, 100, 100, 100, 100, 100, 100, 25, 100, // Neutral
+ 100, 25, 100, 150, 50, 100, 75, 100, 100, 100, // Water
+ 100, 100, 100, 50, 150, 100, 75, 100, 100, 100, // Earth
+ 100, 50, 150, 25, 100, 100, 75, 100, 100, 125, // Fire
+ 100, 175, 50, 100, 25, 100, 75, 100, 100, 100, // Wind
+ 100, 100, 125, 125, 125, 0, 75, 50, 100, -25, // Poison
+ 100, 100, 100, 100, 100, 100, 0, 125, 100, 150, // Holy
+ 100, 100, 100, 100, 100, 50, 125, 0, 100, -25, // Shadow
+ 25, 100, 100, 100, 100, 100, 75, 75, 125, 100, // Ghost
+ 100, 100, 100, 100, 100, 50, 100, 0, 100, 0, // Undead
2,10 // lv2 Attribute table
-100,100,100,100,100,100,100,100,25,100, // Neutral
-100,0,100,175,25,100,50,75,100,100, // Water
-100,100,50,25,175,100,50,75,100,100, // Earth
-100,25,175,0,100,100,50,75,100,150, // Fire
-100,175,25,100,0,100,50,75,100,100, // Wind
-100,75,125,125,125,0,50,25,75,-50, // Poison
-100,100,100,100,100,100,-25,150,100,175,// Holy
-100,100,100,100,100,25,150,-25,100,-50, // Shadow
-0,75,75,75,75,75,50,50,150,125, // Ghost
-100,75,75,75,75,25,125,0,100,0, // Undead
+//Neut Watr Erth Fire Wind Pois Holy Shdw Gho Und
+ 100, 100, 100, 100, 100, 100, 100, 100, 25, 100, // Neutral
+ 100, 0, 100, 175, 25, 100, 50, 75, 100, 100, // Water
+ 100, 100, 50, 25, 175, 100, 50, 75, 100, 100, // Earth
+ 100, 25, 175, 0, 100, 100, 50, 75, 100, 150, // Fire
+ 100, 175, 25, 100, 0, 100, 50, 75, 100, 100, // Wind
+ 100, 75, 125, 125, 125, 0, 50, 25, 75, -50, // Poison
+ 100, 100, 100, 100, 100, 100, -25, 150, 100, 175, // Holy
+ 100, 100, 100, 100, 100, 25, 150, -25, 100, -50, // Shadow
+ 0, 75, 75, 75, 75, 75, 50, 50, 150, 125, // Ghost
+ 100, 75, 75, 75, 75, 25, 125, 0, 100, 0, // Undead
3,10 // lv3 Attribute table
-100,100,100,100,100,100,100,100,0,100, // Neutral
-100,-25,100,200,0,100,25,50,100,125, // Water
-100,100,0,0,200,100,25,50,100,75, // Earth
-100,0,200,-25,100,100,25,50,100,175, // Fire
-100,200,0,100,-25,100,25,50,100,100, // Wind
-100,50,100,100,100,0,25,0,50,-75, // Poison
-100,100,100,100,100,125,-50,175,100,200,// Holy
-100,100,100,100,100,0,175,-50,100,-75, // Shadow
-0,50,50,50,50,50,25,25,175,150, // Ghost
-100,50,50,50,50,0,150,0,100,0, // Undead
+//Neut Watr Erth Fire Wind Pois Holy Shdw Gho Und
+ 100, 100, 100, 100, 100, 100, 100, 100, 0, 100, // Neutral
+ 100, -25, 100, 200, 0, 100, 25, 50, 100, 125, // Water
+ 100, 100, 0, 0, 200, 100, 25, 50, 100, 75, // Earth
+ 100, 0, 200, -25, 100, 100, 25, 50, 100, 175, // Fire
+ 100, 200, 0, 100, -25, 100, 25, 50, 100, 100, // Wind
+ 100, 50, 100, 100, 100, 0, 25, 0, 50, -75, // Poison
+ 100, 100, 100, 100, 100, 125, -50, 175, 100, 200, // Holy
+ 100, 100, 100, 100, 100, 0, 175, -50, 100, -75, // Shadow
+ 0, 50, 50, 50, 50, 50, 25, 25, 175, 150, // Ghost
+ 100, 50, 50, 50, 50, 0, 150, 0, 100, 0, // Undead
4,10 // lv4 Attribute table
-100,100,100,100,100,100,100,100,0,100, // Neutral
-100,-50,100,200,0,75,0,25,100,150, // Water
-100,100,-25,0,200,75,0,25,100,50, // Earth
-100,0,200,-50,100,75,0,25,100,200, // Fire
-100,200,0,100,-50,75,0,25,100,100, // Wind
-100,25,75,75,75,0,0,-25,25,-100, // Poison
-100,75,75,75,75,125,-100,200,100,200, // Holy
-100,75,75,75,75,-25,200,-100,100,-100, // Shadow
-0,25,25,25,25,25,0,0,200,175, // Ghost
-100,25,25,25,25,-25,175,0,100,0, // Undead \ No newline at end of file
+//Neut Watr Erth Fire Wind Pois Holy Shdw Gho Und
+ 100, 100, 100, 100, 100, 100, 100, 100, 0, 100, // Neutral
+ 100, -50, 100, 200, 0, 75, 0, 25, 100, 150, // Water
+ 100, 100, -25, 0, 200, 75, 0, 25, 100, 50, // Earth
+ 100, 0, 200, -50, 100, 75, 0, 25, 100, 200, // Fire
+ 100, 200, 0, 100, -50, 75, 0, 25, 100, 100, // Wind
+ 100, 25, 75, 75, 75, 0, 0, -25, 25,-100, // Poison
+ 100, 75, 75, 75, 75, 125,-100, 200, 100, 200, // Holy
+ 100, 75, 75, 75, 75, -25, 200,-100, 100,-100, // Shadow
+ 0, 25, 25, 25, 25, 25, 0, 0, 200, 175, // Ghost
+ 100, 25, 25, 25, 25, -25, 175, 0, 100, 0, // Undead
diff --git a/src/map/pc.c b/src/map/pc.c
index 199602cbc..25bfaa9e9 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7861,6 +7861,9 @@ int pc_readdb(void)
p=strchr(p,',');
if(p) *p++=0;
}
+ if( j < 2 )
+ continue;
+
lv=atoi(split[0]);
n=atoi(split[1]);