- Modified the equip_job field in the item_db to be a hexadecimal value for easier handling.
- Updated item_db.sql to this new file format (even though it's equip_jobs field is still a integer) - Added upgrade_svn5951.sql for those who would like to convert their existing items. - Added doc/item_db.txt to explain each of the fields in db/item_db.txt git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5951 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
5e837a9caa
commit
7015c8578f
@ -3,6 +3,14 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
|
2006/04/07
|
||||||
|
* The map-server can now read the equip_job column of the item_db as both
|
||||||
|
decimal and hexadecimal values. [Skotlex]
|
||||||
|
* Updated item_db.sql current item_db.txt [Skotlex]
|
||||||
|
* Added upgrade_svn5951.sql for those who would like to convert their
|
||||||
|
existing items. (it converts the equip_jobs fields to the new values used)
|
||||||
|
- See db/Changelog for further info regarding the equip_job fields change.
|
||||||
|
[Skotlex]
|
||||||
2006/04/07
|
2006/04/07
|
||||||
* Moved the Fusion HP penalty to battle_calc_weapon_attack [Skotlex]
|
* Moved the Fusion HP penalty to battle_calc_weapon_attack [Skotlex]
|
||||||
* Some cleaning to use battle_heal/damage rather than pc_heal/damage where
|
* Some cleaning to use battle_heal/damage rather than pc_heal/damage where
|
||||||
|
@ -27,6 +27,12 @@
|
|||||||
|
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
04/07
|
||||||
|
* Modified the equip_job field in the item_db to be a hexadecimal value for
|
||||||
|
easier handling. [Skotlex]
|
||||||
|
* Modified/optimized the distribution of the values for jobs in the
|
||||||
|
job_equip field; added doc/item_db.txt to explain each of the fields in
|
||||||
|
db/item_db.txt as well as the possible values for them. [Skotlex]
|
||||||
04/06
|
04/06
|
||||||
* Added some Landarma's new items plugs [Lupus]
|
* Added some Landarma's new items plugs [Lupus]
|
||||||
* Lowered min zeny amount that give Red Envelopes, thanks to kyoki [Lupus]
|
* Lowered min zeny amount that give Red Envelopes, thanks to kyoki [Lupus]
|
||||||
|
2481
db/item_db.txt
2481
db/item_db.txt
File diff suppressed because it is too large
Load Diff
125
doc/item_db.txt
Normal file
125
doc/item_db.txt
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
(FIXME: Someone give this file better formatting)
|
||||||
|
|
||||||
|
- Explanation of the item_db.txt file and structure.
|
||||||
|
|
||||||
|
ID: Item id
|
||||||
|
JName: Server name to reference the item in scripts and lookups, should use no
|
||||||
|
spaces.
|
||||||
|
|
||||||
|
Name: Name in english for displaying as output for @ and script commands.
|
||||||
|
|
||||||
|
Type:
|
||||||
|
0 Healing item.
|
||||||
|
2 Usable item.
|
||||||
|
3 Etc item
|
||||||
|
4 Weapon
|
||||||
|
5 Armor/Garment/Boots/Headgear
|
||||||
|
6 Card
|
||||||
|
7 Pet egg
|
||||||
|
8 Pet equipment
|
||||||
|
10 Ammo (Arrows/Bullets/etc)
|
||||||
|
11 Usable with delayed consumption (item is lost from inventory after
|
||||||
|
selecting a target, for use with skills and pet lures)
|
||||||
|
|
||||||
|
Price: Default buying price. When not specified, becomes double the sell price.
|
||||||
|
Sell: Default buying price. When not specified, becomes half the buy price.
|
||||||
|
|
||||||
|
Weight: Item's weight. Each 10 is 1 weight.
|
||||||
|
|
||||||
|
ATK: Weapon's attack
|
||||||
|
DEF: Armor's defense
|
||||||
|
Range: Weapon's attack range
|
||||||
|
Slot: Amount of slots item possesses.
|
||||||
|
|
||||||
|
Job: Equippable jobs. Uses the following bitmask table:
|
||||||
|
|
||||||
|
(S.) Novice (2^00): 0x00000001
|
||||||
|
Swordman (2^01): 0x00000002
|
||||||
|
Mage (2^02): 0x00000004
|
||||||
|
Archer (2^03): 0x00000008
|
||||||
|
Acolyte (2^04): 0x00000010
|
||||||
|
Merchant (2^05): 0x00000020
|
||||||
|
Thief (2^06): 0x00000040
|
||||||
|
Knight (2^07): 0x00000080
|
||||||
|
Priest (2^08): 0x00000100
|
||||||
|
Wizard (2^09): 0x00000200
|
||||||
|
Blacksmith (2^10): 0x00000400
|
||||||
|
Hunter (2^11): 0x00000800
|
||||||
|
Assassin (2^12): 0x00001000
|
||||||
|
Unused (2^13): 0x00002000
|
||||||
|
Crusader (2^14): 0x00004000
|
||||||
|
Monk (2^15): 0x00008000
|
||||||
|
Sage (2^16): 0x00010000
|
||||||
|
Rogue (2^17): 0x00020000
|
||||||
|
Alchemist (2^18): 0x00040000
|
||||||
|
Bard/Dancer (2^19): 0x00080000
|
||||||
|
Unused (2^20): 0x00100000
|
||||||
|
Taekwon (2^21): 0x00200000
|
||||||
|
StarGladi (2^22): 0x00400000
|
||||||
|
Soul Linker (2^23): 0x00800000
|
||||||
|
Gunslinger (2^24): 0x01000000
|
||||||
|
Ninja (2^25): 0x02000000
|
||||||
|
|
||||||
|
Upper: Equippable upper-types. Uses the following bitmasks:
|
||||||
|
1: Normal jobs
|
||||||
|
2: Upper jobs
|
||||||
|
4: Baby jobs
|
||||||
|
|
||||||
|
Gender: Gender restriction. 0 is female, 1 is male, 2 for both.
|
||||||
|
|
||||||
|
Loc: Equipment's placement. Values are:
|
||||||
|
|
||||||
|
2^0 001 = Lower Head
|
||||||
|
2^9 512 = Middle Head
|
||||||
|
2^8 256 = Top head
|
||||||
|
2^1 002 = Right hand
|
||||||
|
2^5 032 = Left hand
|
||||||
|
2^2 004 = mantle
|
||||||
|
2^4 016 = armor
|
||||||
|
2^6 064 = boots
|
||||||
|
2^3 008 = Acc 1
|
||||||
|
2^7 128 = Acc 2
|
||||||
|
|
||||||
|
wLV: Weapon level.
|
||||||
|
eLV: Base level required to be able to equip.
|
||||||
|
Refineable: 1 if the item can be refined, 0 otherwise.
|
||||||
|
|
||||||
|
View: For normal items, defines a replacement view-sprite for the item (eg:
|
||||||
|
Making apples look like apple juice). The special case are weapons and ammo
|
||||||
|
where this value indicates the weapon-class of the item.
|
||||||
|
|
||||||
|
For weapons, the types are:
|
||||||
|
0: bare fist
|
||||||
|
1: Daggers
|
||||||
|
2: One-handed swords
|
||||||
|
3: Two-handed swords
|
||||||
|
4: One-handed spears
|
||||||
|
5: Two-handed spears
|
||||||
|
6: One-handed axes
|
||||||
|
7: Two-handed axes
|
||||||
|
8: Maces
|
||||||
|
9: Unused
|
||||||
|
10: Staves
|
||||||
|
11: Bows
|
||||||
|
12: Knuckles
|
||||||
|
13: Musical Instruments
|
||||||
|
14: Whips
|
||||||
|
15: Books
|
||||||
|
16: Katars
|
||||||
|
17: Revolvers
|
||||||
|
18: Rifles
|
||||||
|
19: Shotguns
|
||||||
|
20: Gatling guns
|
||||||
|
21: Grenade launchers
|
||||||
|
22: Huuma
|
||||||
|
|
||||||
|
For ammo, the types are:
|
||||||
|
1: Arrows
|
||||||
|
2: Throwable daggers
|
||||||
|
3: Bullets
|
||||||
|
4: Shells
|
||||||
|
5: Grenades
|
||||||
|
6: Shurikens
|
||||||
|
7: Kunais
|
||||||
|
|
||||||
|
Script: Script to execute when the item is used/equipped.
|
File diff suppressed because it is too large
Load Diff
28
sql-files/upgrade_svn5951.sql
Normal file
28
sql-files/upgrade_svn5951.sql
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#Delete 2^13 (Peco Knight)
|
||||||
|
update item_db set equip_jobs = equip_jobs&~0x2000 where equip_jobs&0x2000;
|
||||||
|
#Move 2^20 -> 2^19 (Dancer -> Bard)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x80000)&~0x100000 where equip_jobs&0x100000;
|
||||||
|
#Remove 2^21 (Peco Crusader)
|
||||||
|
update item_db set equip_jobs = equip_jobs&~0x200000 where equip_jobs&0x200000;
|
||||||
|
#Remove 2^22 (Wedding)
|
||||||
|
update item_db set equip_jobs = equip_jobs&~0x400000 where equip_jobs&0x400000;
|
||||||
|
#Remove 2^23 (S. Novice)
|
||||||
|
update item_db set equip_jobs = equip_jobs&~0x800000 where equip_jobs&0x800000;
|
||||||
|
#Move 2^24 -> 2^21 (TK)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x200000)&~0x1000000 where equip_jobs&0x1000000;
|
||||||
|
#Move 2^25 -> 2^22 (SG)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x400000)&~0x2000000 where equip_jobs&0x2000000;
|
||||||
|
#Move 2^26 -> 2^23 (SL)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x800000)&~0x8000000 where equip_jobs&0x8000000;
|
||||||
|
#Move 2^28 -> 2^24 (GS)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x1000000)&~0x4000000 where equip_jobs&0x4000000;
|
||||||
|
#Move 2^27 -> 2^25 (NJ)
|
||||||
|
update item_db set equip_jobs = (equip_jobs|0x2000000)&~0x10000000 where equip_jobs&0x10000000;
|
||||||
|
#Make items usable by everyone into 0xFFFFFFFF
|
||||||
|
update item_db set equip_jobs = 0xFFFFFFFF where equip_jobs = 0x3EFDFFF;
|
||||||
|
#Make items usable by everyone but novice into 0xFFFFFFFE
|
||||||
|
update item_db set equip_jobs = 0xFFFFFFFE where equip_jobs = 0x0EFDFFE;
|
||||||
|
#Update items usable by everyone except acolyte/priest/monk/gunslinger
|
||||||
|
update item_db set equip_jobs = 0xDFFF7EEF where equip_jobs = 0x28F5EEF;
|
||||||
|
|
||||||
|
|
@ -194,12 +194,17 @@ struct item_data* itemdb_exists(int nameid)
|
|||||||
* to the format used by the map server. [Skotlex]
|
* to the format used by the map server. [Skotlex]
|
||||||
*------------------------------------------
|
*------------------------------------------
|
||||||
*/
|
*/
|
||||||
static void itemdb_jobid2mapid(unsigned int *bclass, int jobmask)
|
static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
bclass[0]= bclass[1]= bclass[2]= 0;
|
bclass[0]= bclass[1]= bclass[2]= 0;
|
||||||
//Base classes
|
//Base classes
|
||||||
for (i = JOB_NOVICE; i <= JOB_THIEF; i++)
|
if (jobmask & 1<<JOB_NOVICE)
|
||||||
|
{ //Both Novice/Super-Novice are counted with the same ID
|
||||||
|
bclass[0] |= 1<<MAPID_NOVICE;
|
||||||
|
bclass[1] |= 1<<MAPID_NOVICE;
|
||||||
|
}
|
||||||
|
for (i = JOB_NOVICE+1; i <= JOB_THIEF; i++)
|
||||||
{
|
{
|
||||||
if (jobmask & 1<<i)
|
if (jobmask & 1<<i)
|
||||||
bclass[0] |= 1<<(MAPID_NOVICE+i);
|
bclass[0] |= 1<<(MAPID_NOVICE+i);
|
||||||
@ -233,17 +238,15 @@ static void itemdb_jobid2mapid(unsigned int *bclass, int jobmask)
|
|||||||
if (jobmask & 1<<JOB_ROGUE)
|
if (jobmask & 1<<JOB_ROGUE)
|
||||||
bclass[2] |= 1<<MAPID_THIEF;
|
bclass[2] |= 1<<MAPID_THIEF;
|
||||||
//Special classes that don't fit above.
|
//Special classes that don't fit above.
|
||||||
if (jobmask & 1<<JOB_SUPER_NOVICE)
|
if (jobmask & 1<<21) //Taekwon boy
|
||||||
bclass[1] |= 1<<MAPID_NOVICE;
|
|
||||||
if (jobmask & 1<<24) //Taekwon boy
|
|
||||||
bclass[0] |= 1<<MAPID_TAEKWON;
|
bclass[0] |= 1<<MAPID_TAEKWON;
|
||||||
if (jobmask & 1<<25) //Star Gladiator
|
if (jobmask & 1<<22) //Star Gladiator
|
||||||
bclass[1] |= 1<<MAPID_TAEKWON;
|
bclass[1] |= 1<<MAPID_TAEKWON;
|
||||||
if (jobmask & 1<<26) //Soul Linker
|
if (jobmask & 1<<23) //Soul Linker
|
||||||
bclass[2] |= 1<<MAPID_TAEKWON;
|
bclass[2] |= 1<<MAPID_TAEKWON;
|
||||||
if (jobmask & 1<<27) //Gunslinger
|
if (jobmask & 1<<JOB_GUNSLINGER)
|
||||||
bclass[0] |= 1<<MAPID_GUNSLINGER;
|
bclass[0] |= 1<<MAPID_GUNSLINGER;
|
||||||
if (jobmask & 1<<28) //Ninja
|
if (jobmask & 1<<JOB_NINJA)
|
||||||
bclass[0] |= 1<<MAPID_NINJA;
|
bclass[0] |= 1<<MAPID_NINJA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,7 +914,7 @@ static int itemdb_read_sqldb(void)
|
|||||||
ShowWarning("itemdb_read_sqldb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
|
ShowWarning("itemdb_read_sqldb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
|
||||||
id->slot = MAX_SLOTS;
|
id->slot = MAX_SLOTS;
|
||||||
}
|
}
|
||||||
itemdb_jobid2mapid(id->class_base, (sql_row[11] != NULL) ? atoi(sql_row[11]) : 0);
|
itemdb_jobid2mapid(id->class_base, (sql_row[11] != NULL) ? (unsigned int)strtol(sql_row[11], NULL, 0) : 0);
|
||||||
id->class_upper= (sql_row[12] != NULL) ? atoi(sql_row[12]) : 0;
|
id->class_upper= (sql_row[12] != NULL) ? atoi(sql_row[12]) : 0;
|
||||||
id->sex = (sql_row[13] != NULL) ? atoi(sql_row[13]) : 0;
|
id->sex = (sql_row[13] != NULL) ? atoi(sql_row[13]) : 0;
|
||||||
id->equip = (sql_row[14] != NULL) ? atoi(sql_row[14]) : 0;
|
id->equip = (sql_row[14] != NULL) ? atoi(sql_row[14]) : 0;
|
||||||
@ -1054,7 +1057,7 @@ static int itemdb_readdb(void)
|
|||||||
ShowWarning("itemdb_readdb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
|
ShowWarning("itemdb_readdb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
|
||||||
id->slot = MAX_SLOTS;
|
id->slot = MAX_SLOTS;
|
||||||
}
|
}
|
||||||
itemdb_jobid2mapid(id->class_base, atoi(str[11]));
|
itemdb_jobid2mapid(id->class_base, (unsigned int)strtol(str[11],NULL,0));
|
||||||
id->class_upper = atoi(str[12]);
|
id->class_upper = atoi(str[12]);
|
||||||
id->sex = atoi(str[13]);
|
id->sex = atoi(str[13]);
|
||||||
if(id->equip != atoi(str[14])){
|
if(id->equip != atoi(str[14])){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user