From 0f7c29113d7d898150108d66d1358f15bb018e0a Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 20 Jun 2013 16:32:47 -0300 Subject: Hercules Renewal Phase One: storage.c 2 new interfaces: - storage - gstorage http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind --- src/map/storage.c | 76 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 20 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/storage.c b/src/map/storage.c index ea30f6c0f..49cb18cbe 100644 --- a/src/map/storage.c +++ b/src/map/storage.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/db.h" @@ -75,14 +76,13 @@ static 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. - storage_guild_storagesave(0, stor->guild_id,0); + gstorage->save(0, stor->guild_id,0); return 0; } //Function to be invoked upon server reconnection to char. To save all 'dirty' storages [Skotlex] -void do_reconnect_storage(void) -{ +void do_reconnect_storage(void) { guild_storage_db->foreach(guild_storage_db, storage_reconnect_sub); } @@ -253,7 +253,7 @@ int storage_storageget(struct map_session_data* sd, int index, int amount) return 0; if( (flag = pc->additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 ) - storage_delitem(sd,index,amount); + storage->delitem(sd,index,amount); else clif->additem(sd,0,0,flag); @@ -310,7 +310,7 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount) return 0; if( pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE) == 0 ) - storage_delitem(sd,index,amount); + storage->delitem(sd,index,amount); return 1; } @@ -399,7 +399,7 @@ int storage_guild_storageopen(struct map_session_data* sd) return 1; } - if((gstor = guild2storage2(sd->status.guild_id)) == NULL) { + if((gstor = gstorage->id2storage2(sd->status.guild_id)) == NULL) { intif_request_guild_storage(sd->status.account_id,sd->status.guild_id); return 0; } @@ -512,7 +512,7 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) struct guild_storage *stor; nullpo_ret(sd); - nullpo_ret(stor=guild2storage2(sd->status.guild_id)); + nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id)); if( !stor->storage_status || stor->storage_amount > MAX_GUILD_STORAGE ) return 0; @@ -527,11 +527,11 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) return 0; if( stor->lock ) { - storage_guild_storageclose(sd); + gstorage->close(sd); return 0; } - if(guild_storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) + if(gstorage->additem(sd,stor,&sd->status.inventory[index],amount)==0) pc->delitem(sd,index,amount,0,4,LOG_TYPE_GSTORAGE); return 1; @@ -565,12 +565,12 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) return 0; if( stor->lock ) { - storage_guild_storageclose(sd); + gstorage->close(sd); return 0; } if((flag = pc->additem(sd,&stor->items[index],amount,LOG_TYPE_GSTORAGE)) == 0) - guild_storage_delitem(sd,stor,index,amount); + gstorage->delitem(sd,stor,index,amount); else //inform fail clif->additem(sd,0,0,flag); // log_fromstorage(sd, index, 1); @@ -604,7 +604,7 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int if( amount < 1 || amount > sd->status.cart[index].amount ) return 0; - if(guild_storage_additem(sd,stor,&sd->status.cart[index],amount)==0) + if(gstorage->additem(sd,stor,&sd->status.cart[index],amount)==0) pc->cart_delitem(sd,index,amount,0,LOG_TYPE_GSTORAGE); return 1; @@ -637,7 +637,7 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a return 0; if(pc->cart_additem(sd,&stor->items[index],amount,LOG_TYPE_GSTORAGE)==0) - guild_storage_delitem(sd,stor,index,amount); + gstorage->delitem(sd,stor,index,amount); return 1; } @@ -673,7 +673,7 @@ int storage_guild_storagesaved(int guild_id) { struct guild_storage *stor; - if((stor=guild2storage2(guild_id)) != NULL) { + if((stor=gstorage->id2storage2(guild_id)) != NULL) { if (stor->dirty && stor->storage_status == 0) { //Storage has been correctly saved. stor->dirty = 0; @@ -689,7 +689,7 @@ int storage_guild_storageclose(struct map_session_data* sd) struct guild_storage *stor; nullpo_ret(sd); - nullpo_ret(stor=guild2storage2(sd->status.guild_id)); + nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id)); clif->storageclose(sd); if (stor->storage_status) @@ -697,7 +697,7 @@ int storage_guild_storageclose(struct map_session_data* sd) if (iMap->save_settings&4) chrif_save(sd, 0); //This one also saves the storage. [Skotlex] else - storage_guild_storagesave(sd->status.account_id, sd->status.guild_id,0); + gstorage->save(sd->status.account_id, sd->status.guild_id,0); stor->storage_status=0; } sd->state.storage_flag = 0; @@ -710,7 +710,7 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) struct guild_storage *stor; nullpo_ret(sd); - nullpo_ret(stor=guild2storage2(sd->status.guild_id)); + nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id)); if(flag) { //Only during a guild break flag is 1 (don't save storage) @@ -726,10 +726,46 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) if (iMap->save_settings&4) chrif_save(sd,0); else - storage_guild_storagesave(sd->status.account_id,sd->status.guild_id,1); + gstorage->save(sd->status.account_id,sd->status.guild_id,1); } sd->state.storage_flag = 0; stor->storage_status = 0; return 0; } +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; + storage->open = storage_storageopen; + storage->add = storage_storageadd; + storage->get = storage_storageget; + storage->addfromcart = storage_storageaddfromcart; + storage->gettocart = storage_storagegettocart; + storage->close = storage_storageclose; + storage->pc_quit = storage_storage_quit; +} +void gstorage_defaults(void) { + gstorage = &gstorage_s; + + gstorage->id2storage = guild2storage; + gstorage->id2storage2 = guild2storage2; + gstorage->delete = guild_storage_delete; + gstorage->open = storage_guild_storageopen; + gstorage->additem = guild_storage_additem; + gstorage->delitem = guild_storage_delitem; + gstorage->add = storage_guild_storageadd; + gstorage->get = storage_guild_storageget; + gstorage->addfromcart = storage_guild_storageaddfromcart; + gstorage->gettocart = storage_guild_storagegettocart; + gstorage->close = storage_guild_storageclose; + gstorage->pc_quit = storage_guild_storage_quit; + gstorage->save = storage_guild_storagesave; + gstorage->saved = storage_guild_storagesaved; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From fcba8a2161a392369db99ab9a516a24470c54796 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 23 Jun 2013 16:35:42 -0300 Subject: Official Item Group/Package/Chain http://hercules.ws/board/topic/1244-official-item-grouppackagechain/ Also Further implemented itemdb.c/storage.c interfaces, and a minor update to db2sql plugin. Signed-off-by: shennetsind --- 3rdparty/libconfig/libconfig.c | 6 +- conf/battle/drops.conf | 3 - db/const.txt | 65 +- db/item_findingore.txt | 25 - db/pre-re/item_bluebox.txt | 1027 ---- db/pre-re/item_cardalbum.txt | 399 -- db/pre-re/item_chain.conf | 95 + db/pre-re/item_combo_db.txt | 2 +- db/pre-re/item_db.txt | 96 +- db/pre-re/item_giftbox.txt | 629 --- db/pre-re/item_group.conf | 3380 ++++++++++++ db/pre-re/item_group_db.txt | 6 - db/pre-re/item_misc.txt | 559 -- db/pre-re/item_packages.conf | 6116 ++++++++++++++++++++++ db/pre-re/item_violetbox.txt | 928 ---- db/re/item_bluebox.txt | 1027 ---- db/re/item_cardalbum.txt | 446 -- db/re/item_chain.conf | 95 + db/re/item_combo_db.txt | 2 +- db/re/item_db.txt | 151 +- db/re/item_giftbox.txt | 629 --- db/re/item_group.conf | 3974 ++++++++++++++ db/re/item_group_db.txt | 6 - db/re/item_misc.txt | 808 --- db/re/item_packages.conf | 10789 +++++++++++++++++++++++++++++++++++++++ db/re/item_violetbox.txt | 928 ---- sql-files/item_db.sql | 172 +- sql-files/item_db_re.sql | 268 +- src/map/atcommand.c | 42 +- src/map/battle.c | 1 - src/map/battle.h | 1 - src/map/buyingstore.c | 2 +- src/map/clif.c | 51 +- src/map/clif.h | 1 + src/map/itemdb.c | 627 ++- src/map/itemdb.h | 180 +- src/map/log.c | 4 +- src/map/map.c | 10 +- src/map/map.h | 2 +- src/map/mob.c | 23 +- src/map/npc.c | 32 +- src/map/packets_struct.h | 10 + src/map/pc.c | 1345 +++-- src/map/pc.h | 3 +- src/map/pet.c | 2 +- src/map/script.c | 260 +- src/map/script.h | 10 +- src/map/searchstore.c | 4 +- src/map/skill.c | 17 +- src/map/status.c | 1181 +++-- src/map/storage.c | 40 +- src/map/storage.h | 4 + src/map/trade.c | 4 +- src/plugins/db2sql.c | 7 +- 54 files changed, 27026 insertions(+), 9468 deletions(-) delete mode 100644 db/item_findingore.txt delete mode 100644 db/pre-re/item_bluebox.txt delete mode 100644 db/pre-re/item_cardalbum.txt create mode 100644 db/pre-re/item_chain.conf delete mode 100644 db/pre-re/item_giftbox.txt create mode 100644 db/pre-re/item_group.conf delete mode 100644 db/pre-re/item_group_db.txt delete mode 100644 db/pre-re/item_misc.txt create mode 100644 db/pre-re/item_packages.conf delete mode 100644 db/pre-re/item_violetbox.txt delete mode 100644 db/re/item_bluebox.txt delete mode 100644 db/re/item_cardalbum.txt create mode 100644 db/re/item_chain.conf delete mode 100644 db/re/item_giftbox.txt create mode 100644 db/re/item_group.conf delete mode 100644 db/re/item_group_db.txt delete mode 100644 db/re/item_misc.txt create mode 100644 db/re/item_packages.conf delete mode 100644 db/re/item_violetbox.txt (limited to 'src/map/storage.c') diff --git a/3rdparty/libconfig/libconfig.c b/3rdparty/libconfig/libconfig.c index 2e90315c6..4cc272c9f 100644 --- a/3rdparty/libconfig/libconfig.c +++ b/3rdparty/libconfig/libconfig.c @@ -1531,15 +1531,11 @@ config_setting_t *config_setting_add(config_setting_t *parent, if((parent->type == CONFIG_TYPE_ARRAY) || (parent->type == CONFIG_TYPE_LIST)) name = NULL; - if(name) - { + if(name) { if(! __config_validate_name(name)) return(NULL); } - if(config_setting_get_member(parent, name) != NULL) - return(NULL); /* already exists */ - return(config_setting_create(parent, name, type)); } diff --git a/conf/battle/drops.conf b/conf/battle/drops.conf index 9006cfeb1..424c46f5b 100644 --- a/conf/battle/drops.conf +++ b/conf/battle/drops.conf @@ -117,9 +117,6 @@ drops_by_luk: 0 // (So at 100 luk, everything will have double chance of dropping). drops_by_luk2: 0 -// The rate of monsters dropping ores by the skill Ore Discovery (Default is 100) -finding_ore_rate: 100 - // Whether or not Marine Spheres and Floras summoned by Alchemist drop items? // This setting has three available values: // 0: Nothing drops. diff --git a/db/const.txt b/db/const.txt index a5e52cb38..d0c3bf729 100644 --- a/db/const.txt +++ b/db/const.txt @@ -569,7 +569,7 @@ bUnstripableArmor 2035 bUnstripableHelm 2036 bUnstripableShield 2037 bIntravision 2038 -bAddMonsterDropItemGroup 2039 +bAddMonsterDropChainItem 2039 bSPLossRate 2040 bAddSkillBlow 2041 bSPVanishRate 2042 @@ -682,69 +682,6 @@ ATF_MAGIC 0x20 ATF_MISC 0x40 ATF_SKILL 0x60 -IG_BlueBox 1 -IG_VioletBox 2 -IG_CardAlbum 3 -IG_GiftBox 4 -IG_ScrollBox 5 -IG_FingingOre 6 -IG_CookieBag 7 -IG_FirstAid 8 -IG_Herb 9 -IG_Fruit 10 -IG_Meat 11 -IG_Candy 12 -IG_Juice 13 -IG_Fish 14 -IG_Box 15 -IG_Gemstone 16 -IG_Resist 17 -IG_Ore 18 -IG_Food 19 -IG_Recovery 20 -IG_Mineral 21 -IG_Taming 22 -IG_Scroll 23 -IG_Quiver 24 -IG_Mask 25 -IG_Accesory 26 -IG_Jewel 27 -IG_GiftBox_1 28 -IG_GiftBox_2 29 -IG_GiftBox_3 30 -IG_GiftBox_4 31 -IG_EggBoy 32 -IG_EggGirl 33 -IG_GiftBoxChina 34 -IG_LottoBox 35 -IG_FoodBag 36 -IG_Potion 37 -IG_RedBox_2 38 -IG_BleuBox 39 -IG_RedBox 40 -IG_GreenBox 41 -IG_YellowBox 42 -IG_OldGiftBox 43 -IG_MagicCardAlbum 44 -IG_HometownGift 45 -IG_Masquerade 46 -IG_Tresure_Box_WoE 47 -IG_Masquerade_2 48 -IG_Easter_Scroll 49 -IG_Pierre_Treasurebox 50 -IG_Cherish_Box 51 -IG_Cherish_Box_Ori 52 -IG_Louise_Costume_Box 53 -IG_Xmas_Gift 54 -IG_Fruit_Basket 55 -IG_Improved_Coin_Bag 56 -IG_Intermediate_Coin_Bag 57 -IG_Minor_Coin_Bag 58 -IG_S_Grade_Coin_Bag 59 -IG_A_Grade_Coin_Bag 60 -IG_Advanced_Weapons_Box 61 -IG_Splendid_Box 62 - SC_ALL -1 SC_STONE 0 SC_FREEZE 1 diff --git a/db/item_findingore.txt b/db/item_findingore.txt deleted file mode 100644 index 5b62bf75c..000000000 --- a/db/item_findingore.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Ore Discovery Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -6,714,3 //Emperium -6,756,20 //Rough Oridecon -6,757,20 //Rough Elunium -6,969,2 //Gold -6,984,10 //Oridecon -6,985,10 //Elunium -6,990,30 //Red Blood -6,991,30 //Crystal Blue -6,992,30 //Wind of Verdure -6,993,30 //Green Live -6,994,15 //Flame Heart -6,995,15 //Mystic Frozen -6,996,15 //Rough Wind -6,997,15 //Great Nature -6,998,80 //Iron -6,999,50 //Steel -6,1002,100 //Iron Ore -6,1003,60 //Coal -6,1010,95 //Phracon -6,1011,55 //Emveretarcon diff --git a/db/pre-re/item_bluebox.txt b/db/pre-re/item_bluebox.txt deleted file mode 100644 index 7a4ff7086..000000000 --- a/db/pre-re/item_bluebox.txt +++ /dev/null @@ -1,1027 +0,0 @@ -// Old Blue Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -1,501,12 // Red Potion -1,502,12 // Orange Potion -1,503,12 // Yellow Potion -1,504,12 // White Potion -1,505,12 // Blue Potion -1,506,12 // Green Potion -1,507,12 // Red Herb -1,508,12 // Yellow Herb -1,509,12 // White Herb -1,510,12 // Blue Herb -1,511,12 // Green Herb -1,512,12 // Apple -1,513,12 // Banana -1,514,12 // Grape -1,515,12 // Carrot -1,516,12 // Potato -1,517,12 // Meat -1,518,12 // Honey -1,519,12 // Milk -1,520,12 // Hinalle Leaflet -1,521,12 // Aloe Leaflet -1,522,12 // Mastela Fruit -1,523,12 // Holy Water -1,525,12 // Panacea -1,526,12 // Royal Jelly -1,528,12 // Monster Food -1,529,12 // Candy -1,530,12 // Candy Cane -1,531,12 // Apple Juice -1,532,12 // Banana Juice -1,533,12 // Grape Juice -1,534,12 // Carrot Juice -1,535,12 // Pumpkin -1,536,12 // Ice Cream -1,537,12 // Pet Food -1,538,12 // Well-baked Cookie -1,539,12 // Piece of Cake -1,544,12 // Raw Fish -1,545,12 // Condensed Red Potion -1,546,12 // Condensed Yellow Potion -1,547,12 // Condensed White Potion -1,548,12 // Cheese -1,549,12 // Yam -1,550,12 // Rice Cake -1,551,12 // Sushi -1,553,12 // Bao -1,555,12 // Traditional Rice Cake -1,558,12 // Chocolate -1,561,12 // White Chocolate -1,601,12 // Fly Wing -1,602,12 // Butterfly Wing -1,604,512 // Dead Branch -1,605,12 // Anodyne -1,606,12 // Aloevera -1,607,12 // Yggdrasil Berry -1,608,12 // Yggdrasil Seed -1,609,12 // Amulet -1,610,12 // Yggdrasil Leaf -1,611,12 // Magnifier -1,612,12 // Mini Furnace -1,613,12 // Iron Hammer -1,614,12 // Golden Hammer -1,615,12 // Oridecon Hammer -1,618,12 // Worn Out Scroll -1,619,12 // Unripe Apple -1,620,12 // Orange Juice -1,621,12 // Bitter Herb -1,622,12 // Rainbow Carrot -1,623,12 // Earthworm the Dude -1,624,12 // Rotten Fish -1,625,12 // Rusty Iron -1,626,12 // Monster Juice -1,627,12 // Sweet Milk -1,628,12 // Well-Dried Bone -1,629,12 // Singing Flower -1,630,12 // Dew Laden Moss -1,631,12 // Deadly Noxious Herb -1,632,12 // Fatty Chubby Earthworm -1,633,12 // Sweet Potato -1,634,12 // Tropical Banana -1,635,12 // Orc Trophy -1,636,12 // No Recipient -1,637,12 // Old Broom -1,638,12 // Silver Knife of Chastity -1,639,12 // Armlet of Obedience -1,640,12 // Shining Stone -1,641,12 // Contracts in Shadow -1,642,12 // Book of the Devil -1,643,12 // Pet Incubator -1,644,312 // Gift Box -1,645,12 // Concentration Potion -1,656,12 // Awakening Potion -1,657,12 // Berserk Potion -1,659,12 // Her Heart -1,663,12 // Songpyun -1,664,12 // Gift Box -1,665,12 // Gift Box -1,666,12 // Gift Box -1,667,12 // Gift Box -1,668,12 // Red_Envelope -1,678,12 // Poison Bottle -1,679,12 // Pilule -1,701,12 // Ora Ora -1,702,12 // Animal Gore -1,703,12 // Hinalle -1,704,12 // Aloe -1,705,12 // Clover -1,706,12 // Four Leaf Clover -1,707,12 // Singing Plant -1,708,12 // Ment -1,710,12 // Illusion Flower -1,711,12 // Shoot -1,712,12 // Flower -1,713,12 // Empty Bottle -1,715,12 // Yellow Gemstone -1,716,12 // Red Gemstone -1,717,12 // Blue Gemstone -1,718,12 // Garnet -1,719,12 // Amethyst -1,720,12 // Aquamarine -1,721,12 // Emerald -1,722,12 // Pearl -1,723,12 // Ruby -1,724,12 // Cursed Ruby -1,725,12 // Sardonyx -1,726,12 // Sapphire -1,727,12 // Opal -1,728,12 // Topaz -1,729,12 // Zircon -1,730,12 // 1carat Diamond -1,731,12 // 2carat Diamond -1,732,12 // 3carat Diamond -1,733,12 // Cracked Diamond -1,734,12 // Red Frame -1,735,12 // Chung Jah -1,736,12 // China -1,737,12 // Black Ladle -1,738,12 // Pencil Case -1,739,12 // Rouge -1,740,12 // Puppet -1,741,12 // Poring Doll -1,742,12 // Chonchon Doll -1,743,12 // Spore Doll -1,744,12 // Bouquet -1,745,12 // Wedding Bouquet -1,746,12 // Glass Bead -1,747,12 // Crystal Mirror -1,748,12 // Witherless Rose -1,749,12 // Frozen Rose -1,750,12 // Baphomet Doll -1,751,12 // Osiris Doll -1,752,12 // Grasshopper Doll -1,753,12 // Yoyo Doll -1,754,12 // Raccoon Doll -1,901,12 // Danggie -1,902,12 // Tree Root -1,903,12 // Reptile Tongue -1,904,12 // Scorpion Tail -1,905,12 // Stem -1,906,12 // Pointed Scale -1,907,12 // Resin -1,908,12 // Spawn -1,909,12 // Jellopy -1,910,12 // Garlet -1,911,12 // Scell -1,912,12 // Zargon -1,913,12 // Tooth of Bat -1,914,12 // Fluff -1,915,12 // Chrysalis -1,916,12 // Feather of Birds -1,917,12 // Talon -1,918,12 // Sticky Webfoot -1,919,12 // Animal Skin -1,920,12 // Wolf Claw -1,921,12 // Mushroom Spore -1,922,12 // Orc's Fang -1,923,12 // Evil Horn -1,924,12 // Powder of Butterfly -1,925,12 // Bill of Birds -1,926,12 // Snake Scale -1,928,12 // Insect Feeler -1,929,12 // Immortal Heart -1,930,12 // Rotten Bandage -1,931,12 // Orcish Voucher -1,932,12 // Skel-Bone -1,934,12 // Memento -1,935,12 // Shell -1,936,12 // Scale Shell -1,937,12 // Venom Canine -1,938,12 // Sticky Mucus -1,939,12 // Bee Sting -1,940,12 // Grasshopper's Leg -1,941,12 // Nose Ring -1,942,12 // Yoyo Tail -1,943,12 // Solid Shell -1,944,12 // Horseshoe -1,945,12 // Raccoon Leaf -1,946,12 // Snail's Shell -1,947,12 // Horn -1,948,12 // Bear's Footskin -1,949,12 // Feather -1,950,12 // Heart of Mermaid -1,951,12 // Fin -1,952,12 // Cactus Needle -1,953,12 // Stone Heart -1,954,12 // Shining Scale -1,955,12 // Worm Peeling -1,956,12 // Gill -1,957,12 // Decayed Nail -1,958,12 // Horrendous Mouth -1,959,12 // Stinky Scale -1,960,12 // Nipper -1,961,12 // Conch -1,962,12 // Tentacle -1,963,12 // Sharp Scale -1,964,12 // Crab Shell -1,965,12 // Clam Shell -1,966,12 // Clam Flesh -1,967,12 // Turtle Shell -1,968,12 // Heroic Emblem -1,969,12 // Gold -1,971,12 // Detrimindexta -1,972,12 // Karvodailnirol -1,973,12 // Counteragent -1,974,12 // Mixture -1,975,12 // Scarlet Dyestuff -1,976,12 // Lemon Dyestuff -1,978,12 // Cobaltblue Dyestuff -1,979,12 // Darkgreen Dyestuff -1,980,12 // Orange Dyestuff -1,981,12 // Violet Dyestuff -1,982,12 // White Dyestuff -1,983,12 // Black Dyestuff -1,986,12 // Anvil -1,987,12 // Oridecon Anvil -1,988,12 // Golden Anvil -1,989,12 // Emperium Anvil -1,990,12 // Red Blood -1,991,12 // Crystal Blue -1,992,12 // Wind of Verdure -1,993,12 // Green Live -1,994,12 // Flame Heart -1,995,12 // Mystic Frozen -1,996,12 // Rough Wind -1,997,12 // Great Nature -1,998,12 // Iron -1,999,12 // Steel -1,1000,12 // Star Crumb -1,1001,12 // Star Dust -1,1002,12 // Iron Ore -1,1003,12 // Coal -1,1004,12 // Chivalry Emblem -1,1005,12 // Hammer of Blacksmith -1,1006,12 // Old Magicbook -1,1007,12 // Necklace of Wisdom -1,1008,12 // Necklace of Oblivion -1,1009,12 // Hand of God -1,1010,12 // Phracon -1,1011,12 // Emveretarcon -1,1012,12 // Frill -1,1013,12 // Rainbow Shell -1,1014,12 // Ant Jaw -1,1015,12 // Tongue -1,1016,12 // Rat Tail -1,1017,12 // Mole Whiskers -1,1018,12 // Mole Claw -1,1019,12 // Trunk -1,1020,12 // Black Hair -1,1021,12 // Dokebi Horn -1,1022,12 // Nine Tails -1,1023,12 // Fish Tail -1,1024,12 // Squid Ink -1,1025,12 // Cobweb -1,1026,12 // Acorn -1,1027,12 // Porcupine Quill -1,1028,12 // Mane -1,1029,12 // Tiger Skin -1,1031,12 // Mantis Scythe -1,1032,12 // Maneater Blossom -1,1033,12 // Maneater Root -1,1034,12 // Blue Hair -1,1035,12 // Dragon Canine -1,1036,12 // Dragon Scale -1,1037,12 // Dragon Tail -1,1038,12 // Little Evil Horn -1,1039,12 // Little Evil Wing -1,1040,12 // Elder Pixie's Moustache -1,1041,12 // Lantern -1,1042,12 // Bug Leg -1,1043,12 // Orc Claw -1,1044,12 // Zenorc's Fang -1,1045,12 // Cultish Masque -1,1046,12 // Scorpion Nipper -1,1047,12 // Dead Medusa -1,1048,12 // Horrendous Hair -1,1049,12 // Skirt of Virgin -1,1050,12 // Tendon -1,1051,12 // Detonator -1,1052,12 // Single Cell -1,1053,12 // Ancient Tooth -1,1054,12 // Ancient Lips -1,1055,12 // Earthworm Peeling -1,1056,12 // Grit -1,1057,12 // Moth Dust -1,1058,12 // Moth Wings -1,1059,12 // Fabric -1,1060,12 // Golden Hair -1,1061,12 // Witched Starsand -1,1062,12 // Jack o' Pumpkin -1,1063,12 // Fang -1,1064,12 // Reins -1,1065,12 // Trap -1,1066,12 // Fine-grained Trunk -1,1067,12 // Solid Trunk -1,1068,12 // Barren Trunk -1,1088,12 // Morocc Solution -1,1089,12 // Payon Solution -1,1092,12 // Empty Test Tube -1,1093,12 // Empty Potion Bottle -1,1094,12 // Short Daenggie -1,1095,12 // Clock Hand -1,1096,12 // Round Shell -1,1097,12 // Worn Out Page -1,1098,12 // Manacles -1,1099,12 // Worn-out Prison Uniform -1,1101,6 // Sword -1,1102,6 // Sword -1,1104,6 // Falchion -1,1105,6 // Falchion -1,1107,6 // Blade -1,1108,6 // Blade -1,1110,6 // Rapier -1,1111,6 // Rapier -1,1113,6 // Scimitar -1,1114,6 // Scimitar -1,1116,3 // Katana -1,1117,3 // Katana -1,1119,6 // Tsurugi -1,1120,6 // Tsurugi -1,1122,6 // Ring Pommel Saber -1,1123,6 // Haedonggum -1,1124,6 // Orcish sword -1,1125,6 // Ring Pommel Saber -1,1126,6 // Saber -1,1127,6 // Saber -1,1128,6 // Haedonggum -1,1129,6 // Flamberge -1,1146,1 // Town Sword -1,1147,1 // Town Sword -1,1148,1 // Star Dust Blade -1,1151,3 // Slayer -1,1152,3 // Slayer -1,1154,3 // Bastard Sword -1,1155,3 // Bastard Sword -1,1157,3 // Two-Handed Sword -1,1158,3 // Two-Handed Sword -1,1160,3 // Broad Sword -1,1162,3 // Broad Sword -1,1163,3 // Claymore -1,1201,3 // Knife -1,1202,3 // Knife -1,1204,3 // Cutter -1,1205,3 // Cutter -1,1207,3 // Main Gauche -1,1208,3 // Main Gauche -1,1210,3 // Dirk -1,1211,3 // Dirk -1,1213,3 // Dagger -1,1214,3 // Dagger -1,1216,3 // Stiletto -1,1217,3 // Stiletto -1,1219,3 // Gladius -1,1220,3 // Gladius -1,1222,3 // Damascus -1,1226,3 // Damascus -1,1243,3 // Novice Main Gauche -1,1245,1 // Cinquedea -1,1247,1 // Kindle Dagger -1,1248,1 // Obsidian Dagger -1,1249,1 // Fisherman's Dagger -1,1250,3 // Jur -1,1251,3 // Jur -1,1252,3 // Katar -1,1253,3 // Katar -1,1254,3 // Jamadhar -1,1255,3 // Jamadhar -1,1256,3 // Katar of Frozen Icicle -1,1257,3 // Katar of Quaking -1,1258,3 // Katar of Raging Blaze -1,1259,3 // Katar of Piercing Wind -1,1262,1 // Loki's Nail -1,1263,1 // Unholy Touch -1,1264,2 // Specialty Jur -1,1265,1 // Bloody Roar -1,1269,1 // Inverse Scale -1,1271,1 // Blood Tears -1,1301,3 // Axe -1,1302,3 // Axe -1,1304,3 // Orcish Axe -1,1307,1 // Windhawk -1,1351,3 // Battle Axe -1,1352,3 // Battle Axe -1,1354,3 // Hammer -1,1355,3 // Hammer -1,1357,3 // Buster -1,1358,3 // Buster -1,1360,3 // Two-Handed Axe -1,1361,3 // Two-Handed Axe -1,1370,1 // Doom Slayer -1,1376,1 // Heart Breaker -1,1377,1 // Hurricane Fury -1,1401,9 // Javelin -1,1402,9 // Javelin -1,1404,9 // Spear -1,1405,9 // Spear -1,1407,9 // Pike -1,1408,9 // Pike -1,1410,3 // Lance -1,1411,3 // Lance -1,1451,3 // Guisarme -1,1452,3 // Guisarme -1,1454,3 // Glaive -1,1455,3 // Glaive -1,1457,3 // Partizan -1,1458,3 // Partizan -1,1460,3 // Trident -1,1461,3 // Trident -1,1463,3 // Halberd -1,1464,3 // Halberd -1,1472,3 // Soul Staff -1,1474,1 // Gae Bolg -1,1478,1 // Ahlspiess -1,1501,6 // Club -1,1502,6 // Club -1,1504,6 // Mace -1,1505,6 // Mace -1,1507,6 // Smasher -1,1508,6 // Smasher -1,1510,6 // Flail -1,1511,6 // Flail -1,1513,6 // Morning Star -1,1514,6 // Morning Star -1,1516,6 // Sword Mace -1,1517,6 // Sword Mace -1,1519,6 // Chain -1,1520,6 // Chain -1,1522,6 // Stunner -1,1550,3 // Book -1,1551,3 // Bible -1,1552,3 // Tablet -1,1553,3 // Book of Billows -1,1554,3 // Book of Mother Earth -1,1555,3 // Book of the Blazing Sun -1,1556,3 // Book of Gust of Wind -1,1558,3 // Girl's Diary -1,1559,1 // Legacy of Dragon -1,1560,1 // Sage's Diary -1,1561,1 // Hardcover Book -1,1601,3 // Rod -1,1602,3 // Rod -1,1604,3 // Wand -1,1605,3 // Wand -1,1607,3 // Staff -1,1608,3 // Staff -1,1610,3 // Arc Wand -1,1611,3 // Arc Wand -1,1613,3 // Mighty Staff -1,1614,3 // Wand of Occult -1,1615,3 // Evil Bone Wand -1,1616,1 // Wing Staff -1,1617,1 // Survivor's Rod -1,1618,1 // Survivor's Rod -1,1619,1 // Survivor's Rod -1,1620,1 // Survivor's Rod -1,1621,1 // Hypnotist's Staff -1,1622,1 // Hypnotist's Staff -1,1701,3 // Bow -1,1702,3 // Bow -1,1704,3 // Composite Bow -1,1705,3 // Composite Bow -1,1707,3 // Great Bow -1,1708,3 // Great Bow -1,1710,3 // Crossbow -1,1711,3 // Crossbow -1,1713,3 // Arbalest -1,1714,3 // Gakkung Bow -1,1715,3 // Arbalest -1,1716,3 // Gakkung Bow -1,1718,3 // Hunter Bow -1,1723,1 // Luna Bow -1,1724,1 // Dragon Wing -1,1730,1 // Burning Bow -1,1731,1 // Frozen Bow -1,1732,1 // Earth Bow -1,1733,1 // Gust Bow -1,1750,12 // Arrow -1,1751,12 // Silver Arrow -1,1752,12 // Fire Arrow -1,1753,12 // Steel Arrow -1,1754,12 // Crystal Arrow -1,1755,12 // Arrow of Wind -1,1756,12 // Stone Arrow -1,1757,12 // Immaterial Arrow -1,1758,12 // Stun Arrow -1,1759,12 // Frozen Arrow -1,1760,12 // Flash Arrow -1,1761,12 // Cursed Arrow -1,1762,12 // Rusty Arrow -1,1763,12 // Poison Arrow -1,1764,12 // Sharp Arrow -1,1765,12 // Oridecon Arrow -1,1767,12 // Shadow Arrow -1,1768,12 // Sleep Arrow -1,1769,12 // Mute Arrow -1,1770,12 // Iron Arrow -1,1801,3 // Waghnak -1,1802,3 // Waghnak -1,1803,3 // Knuckle Duster -1,1804,3 // Knuckle Duster -1,1805,3 // Studded Knuckles -1,1806,3 // Studded Knuckles -1,1807,3 // Fist -1,1808,3 // Fist -1,1809,3 // Claw -1,1810,3 // Claw -1,1811,3 // Finger -1,1812,3 // Finger -1,1815,1 // Hatii Claw -1,1818,1 // Magma Fist -1,1819,1 // Icicle Fist -1,1820,1 // Electric Fist -1,1821,1 // Seismic Fist -1,1822,1 // Combo Battle Glove -1,1901,3 // Violin -1,1902,3 // Violin -1,1903,3 // Mandolin -1,1904,3 // Mandolin -1,1905,3 // Lute -1,1906,3 // Lute -1,1907,3 // Guitar -1,1908,3 // Guitar -1,1909,3 // Harp -1,1910,3 // Harp -1,1911,3 // Gumoongoh -1,1912,3 // Gumoongoh -1,1914,1 // Burning Passion Guitar -1,1915,1 // Loner's Guitar -1,1916,1 // Green Acre Guitar -1,1917,1 // Gentle Breeze Guitar -1,1918,1 // Oriental Lute -1,1919,1 // Base Guitar -1,1950,3 // Rope -1,1951,3 // Rope -1,1952,3 // Whip -1,1953,3 // Whip -1,1954,3 // Wire Whip -1,1955,3 // Wire Whip -1,1956,3 // Rante Whip -1,1957,3 // Rante Whip -1,1958,3 // Tail Whip -1,1959,3 // Tail Whip -1,1960,3 // Whip -1,1961,3 // Whip -1,1965,1 // Red Flame Whip -1,1966,1 // Icicle Whip -1,1967,1 // Gaia Whip -1,1968,1 // Skipping Rope -1,1969,1 // Blade Whip -1,1970,1 // Queen's Whip -1,1971,1 // Electric Wire -1,1972,1 // Electric Eel -1,1973,1 // Sea Witch's Foot -1,1974,1 // Carrot Whip -1,2101,3 // Guard -1,2102,3 // Guard -1,2103,3 // Buckler -1,2104,3 // Buckler -1,2105,3 // Shield -1,2106,3 // Shield -1,2107,3 // Mirror Shield -1,2108,3 // Mirror Shield -1,2109,3 // Memory Book -1,2112,3 // Novice Guard -1,2113,1 // Novice Shield -1,2123,1 // Orleans's Server -1,2124,1 // Thorny Buckler -1,2125,1 // Strong Shield -1,2201,3 // Sunglasses -1,2203,3 // Glasses -1,2205,3 // Diver Goggles -1,2206,3 // Wedding Veil -1,2207,3 // Fancy Flower -1,2208,3 // Ribbon -1,2209,3 // Ribbon -1,2210,3 // Hair Band -1,2211,3 // Bandana -1,2212,3 // Eye Patch -1,2213,3 // Kitty Band -1,2214,3 // Bunny Band -1,2215,3 // Flower Band -1,2216,3 // Biretta -1,2217,3 // Biretta -1,2218,3 // Flu Mask -1,2220,3 // Hat -1,2221,3 // Hat -1,2222,3 // Turban -1,2223,3 // Turban -1,2224,3 // Goggles -1,2225,3 // Goggles -1,2226,3 // Cap -1,2227,3 // Cap -1,2228,3 // Helm -1,2229,3 // Helm -1,2230,3 // Gemmed Sallet -1,2231,3 // Gemmed Sallet -1,2232,3 // Circlet -1,2233,3 // Circlet -1,2236,3 // Santa Hat -1,2239,3 // Monocle -1,2241,3 // Grandpa Beard -1,2242,3 // Purple Glasses -1,2243,3 // Geek Glasses -1,2244,3 // Big Ribbon -1,2245,3 // Sweet Gent -1,2246,3 // Golden Gear -1,2247,3 // Romantic Gent -1,2248,3 // Western Grace -1,2249,1 // Coronet -1,2250,3 // Cute Ribbon -1,2251,3 // Monk Hat -1,2252,3 // Wizard Hat -1,2253,3 // Sunflower -1,2254,1 // Angel Wing -1,2255,1 // Evil Wing -1,2257,3 // Unicorn Horn -1,2258,1 // Spiky Band -1,2259,3 // Mini Propeller -1,2260,3 // Mini Glasses -1,2261,3 // Army Cap -1,2262,3 // Clown Nose -1,2263,3 // Zorro Masque -1,2265,3 // Gangster Mask -1,2266,3 // Iron Cain -1,2267,3 // Cigarette -1,2268,3 // Pipe -1,2269,3 // Romantic Flower -1,2270,3 // Romantic Leaf -1,2271,3 // Jack be Dandy -1,2274,1 // Ghost Bandana -1,2275,3 // Red Bandana -1,2276,3 // Angled Glasses -1,2277,3 // Nurse Cap -1,2278,3 // Mr. Smile -1,2279,3 // Bomb Wick -1,2282,3 // Halo -1,2285,3 // Apple of Archer -1,2287,3 // Pirate Bandana -1,2288,3 // Mr. Scream -1,2289,3 // Poo Poo Hat -1,2290,3 // Funeral Hat -1,2291,3 // Masquerade -1,2294,3 // Stellar -1,2295,3 // Blinker -1,2297,3 // Goblin Mask -1,2298,3 // Green Feeler -1,2299,3 // Orc Helm -1,2301,3 // Cotton Shirt -1,2302,3 // Cotton Shirt -1,2303,3 // Jacket -1,2304,3 // Jacket -1,2305,3 // Adventurer's Suit -1,2306,3 // Adventurer's Suit -1,2307,3 // Mantle -1,2308,3 // Mantle -1,2309,3 // Coat -1,2310,3 // Coat -1,2311,3 // Mink Coat -1,2312,3 // Padded Armor -1,2313,3 // Padded Armor -1,2314,3 // Chain Mail -1,2315,3 // Chain Mail -1,2316,3 // Full Plate -1,2317,3 // Full Plate -1,2318,3 // Lord's Clothes -1,2320,3 // Formal Suit -1,2321,3 // Silk Robe -1,2322,3 // Silk Robe -1,2323,3 // Scapulare -1,2324,3 // Scapulare -1,2325,3 // Saint's Robe -1,2326,3 // Saint's Robe -1,2328,3 // Wooden Mail -1,2329,3 // Wooden Mail -1,2330,3 // Tights -1,2331,3 // Tights -1,2332,3 // Silver Robe -1,2333,3 // Silver Robe -1,2335,3 // Thief Clothes -1,2336,3 // Thief Clothes -1,2337,3 // Ninja Suit -1,2339,3 // Pantie -1,2340,3 // Novice Breastplate -1,2341,3 // Legion Plate Armor -1,2352,3 // Tattered Novice Ninja Suit -1,2365,1 // Orleans's Gown -1,2401,3 // Sandals -1,2402,3 // Sandals -1,2403,3 // Shoes -1,2404,3 // Shoes -1,2405,3 // Boots -1,2406,3 // Boots -1,2407,3 // Crystal Pumps -1,2408,3 // Shackles -1,2409,3 // High Heels -1,2411,3 // Greaves -1,2414,3 // Novice Slippers -1,2416,1 // Novice Shoes -1,2420,1 // Angel's Reincarnation -1,2501,3 // Hood -1,2502,3 // Hood -1,2503,3 // Muffler -1,2504,3 // Muffler -1,2505,3 // Manteau -1,2506,3 // Manteau -1,2507,3 // Ancient Cape -1,2508,3 // Ragamuffin Manteau -1,2510,3 // Somber Novice Hood -1,2512,1 // Novice Manteau -1,2513,1 // Heavenly Maiden Robe -1,2514,1 // Pauldron -1,2515,1 // Eagle Wing -1,2601,3 // Ring -1,2602,3 // Earring -1,2603,3 // Necklace -1,2604,3 // Glove -1,2605,3 // Brooch -1,2607,3 // Clip -1,2608,3 // Rosary -1,2609,3 // Skull Ring -1,2610,3 // Gold Ring -1,2611,3 // Silver Ring -1,2612,3 // Flower Ring -1,2613,3 // Diamond Ring -1,2617,3 // Celebrant's Mitten -1,2618,3 // Matyr's Leash -1,2621,1 // Ring -1,2622,1 // Earring -1,2623,1 // Necklace -1,2624,1 // Glove -1,2625,1 // Brooch -1,2626,1 // Rosary -1,2627,3 // Belt -1,2628,3 // Novice Armlet -1,2652,1 // Goddess of Fortune's Cursed Brooch -1,2654,1 // Shinobi Sash -1,2656,1 // Armor Charm -1,5002,1 // Jewel Crown -1,5003,3 // Joker Jester -1,5005,3 // Gas Mask -1,5006,3 // Machoman's Glasses -1,5009,3 // Safety Helmet -1,5010,3 // Indian Fillet -1,5011,3 // Aerial -1,5014,3 // Fin Helm -1,5015,3 // Egg Shell -1,5030,3 // Panda Hat -1,5035,3 // Poring Hat -1,5037,3 // Nutshell -1,5055,3 // Novice False Eggshell -1,5085,1 // Small Ribbons -1,5088,3 // Surprised Mask -1,5089,3 // Annoyed Mask -1,5090,3 // Goblin Leader Mask -1,5111,1 // Galapago Cap -1,5112,1 // Super Novice Hat -1,5113,1 // Angry Snarl -1,5114,1 // Bucket Hat -1,5116,1 // Banana Hat -1,5118,1 // Puppy Headband -1,5119,1 // Super Novice Hat -1,5120,1 // Bucket Hat -1,5122,1 // Magni's Cap -1,5175,1 // Censor Bar -1,7001,12 // Mould Powder -1,7002,12 // Ogre Tooth -1,7003,12 // Anolian Skin -1,7004,12 // Mud Lump -1,7005,12 // Skull -1,7006,12 // Wing of Red Bat -1,7007,12 // Claw of Rat -1,7008,12 // Stiff Horn -1,7009,12 // Glitter Shell -1,7010,12 // Tail of Steel Scorpion -1,7011,12 // Claw of Monkey -1,7012,12 // Tough Scalelike Stem -1,7013,12 // Coral Reef -1,7014,12 // Old Portrait -1,7015,12 // Memory Bookmark -1,7016,12 // Bent Spoon -1,7026,12 // Key of the Clock Tower -1,7027,12 // Key of the Underground -1,7030,12 // Claw of Desert Wolf -1,7031,12 // Old Frying Pan -1,7032,12 // Piece of Egg Shell -1,7033,12 // Poison Spore -1,7034,12 // Red Stocking -1,7035,12 // Matchstick -1,7036,12 // Fang of Garm -1,7038,12 // Yarn -1,7041,12 // Fine Grit -1,7047,12 // Alice's Apron -1,7048,12 // Talon of Griffon -1,7049,12 // Stone -1,7053,12 // Cyfar -1,7054,12 // Brigan -1,7059,12 // Free Ticket for Kafra Storage -1,7060,12 // Free Ticket for Kafra Transportation -1,7061,12 // Free Ticket for the Cart Service -1,7063,12 // Soft Feather -1,7064,12 // Wing of Dragonfly -1,7065,12 // Sea-Otter Fur -1,7066,12 // Ice Cubic -1,7067,12 // Stone Fragment -1,7068,12 // Burnt Tree -1,7069,12 // Destroyed Armor -1,7070,12 // Broken Shell -1,7071,12 // Tattered Clothes -1,7072,12 // Old Shuriken -1,7093,12 // Cogwheel -1,7094,12 // Fragment -1,7095,12 // Metal Fragment -1,7096,12 // Lava -1,7097,12 // Burning Heart -1,7098,12 // Live Coal -1,7099,12 // Worn-out Magic Scroll -1,7100,12 // Sharp Leaf -1,7101,12 // Peco Peco Feather -1,7106,12 // Antelope Horn -1,7107,12 // Antelope Skin -1,7108,12 // Piece of Shield -1,7109,12 // Shining Spear Blade -1,7110,12 // Broken Sword -1,7111,12 // Slick Paper -1,7112,12 // Sharp Paper -1,7113,12 // Broken Pharaoh Emblem -1,7114,12 // Masque of Tutankhamen -1,7115,12 // Harpy Feather -1,7116,12 // Harpy Talon -1,7117,12 // Torn Magic Book -1,7118,12 // Torn Scroll -1,7119,12 // Bacillus -1,7120,12 // Burning Horseshoe -1,7121,12 // Honey Pot -1,7122,12 // Burning Hair -1,7123,12 // Dragon Skin -1,7124,12 // Sand Clump -1,7125,12 // Scorpion Claw -1,7126,12 // Large Jellopy -1,7134,12 // Medicine Bowl -1,7135,12 // Fire Bottle -1,7136,12 // Acid Bottle -1,7137,12 // Plant Bottle -1,7138,12 // Marine Sphere Bottle -1,7139,12 // Glistening Coat -1,7149,12 // Yellow Plate -1,7150,12 // Piece of Bamboo -1,7151,12 // Oil Paper -1,7152,12 // Glossy Hair -1,7153,12 // Worn-out Kimono -1,7154,12 // Poisonous Powder -1,7155,12 // Poisonous Toad Skin -1,7156,12 // Broken Shuriken -1,7157,12 // Dark Mask -1,7158,12 // Broken Liquor Jar -1,7159,12 // Tengu Nose -1,7161,12 // Black Bear Skin -1,7162,12 // Cloud Crumb -1,7163,12 // Hard Feeler -1,7164,12 // Solid_Peach -1,7165,12 // Transparent Celestial Robe -1,7166,12 // Soft Silk -1,7167,12 // Strange Steel Piece -1,7168,12 // Giant Butterfly Wing -1,7169,12 // Ba_Gua -1,7171,12 // Leopard Skin -1,7172,12 // Leopard Claw -1,7174,12 // Wrapping Lace -1,7175,12 // Wrapping Paper -1,7182,12 // Cacao -1,7186,12 // Thin Trunk -1,7187,12 // Festival Mask -1,7188,12 // Brown_Root -1,7189,12 // Wooden Heart -1,7190,12 // Solid Husk -1,7191,12 // Lamp -1,7192,12 // Vane -1,7193,12 // Sprout -1,7194,12 // Soft Blade of Grass -1,7195,12 // Slingshot -1,7196,12 // Shoulder Protector -1,7197,12 // Tough Vines -1,7198,12 // Huge Leaf -1,7200,12 // Elastic Band -1,7201,12 // Log -1,7202,12 // Pincher of Beetle -1,7203,12 // Strong Branch -1,7205,12 // Piece of Black Cloth -1,7206,12 // Black Cat Doll -1,7207,12 // Old Manteau -1,7208,12 // Rusty Kitchen Knife -1,7209,12 // Helm of Dullahan -1,7210,12 // Armor Piece of Dullahan -1,7211,12 // Fragment of Rossata Stone -1,7212,12 // Hung Doll -1,7213,12 // Needle Packet -1,7214,12 // Bat Cage -1,7215,12 // Broken Needle -1,7216,12 // Red Muffler -1,7217,12 // Spool -1,7218,12 // Decomposed Rope -1,7219,12 // Striped Sock -1,7220,12 // Ectoplasm -1,7221,12 // Tangled Chains -1,7222,12 // Wooden Gnarl -1,7223,12 // Contorted Self-Portrait -1,7225,12 // Pumpkin Lantern -1,7262,12 // Folding Fan of Cat Ghost -1,7263,12 // Cat's Eye -1,7264,12 // Dry Sand -1,7265,12 // Dragon Horn -1,7266,12 // Denture from Dragon Mask -1,7267,12 // Tiger Panty -1,7268,12 // Little Ghost Doll -1,7269,12 // Pinafore -1,7270,12 // Nursing_Bottle -1,7315,1 // Dark Crystal Fragment -1,7316,1 // Insect Leg -1,7317,1 // Rusty Screw -1,7318,1 // Old Pick -1,7319,1 // Used Iron Plate -1,7320,1 // Dust Pollutant -1,7321,1 // Crystal Fragment -1,7322,1 // Toxic Gas -1,7323,1 // Battered Kettle -1,7325,1 // Flexible Tube -1,7326,1 // Fluorescent Liquid -1,7327,1 // Flashlight -1,7440,1 // Red Feather -1,7441,1 // Blue Feather -1,7442,1 // Cursed Seal -1,7443,1 // Three-Headed Dragon's Head -1,7444,1 // Treasure Box -1,7445,1 // Green Bijou -1,7446,1 // Blue Bijou -1,7447,1 // Red Bijou -1,7448,1 // Yellow Bijou -1,7449,1 // Bloody Page -1,7450,1 // Skeletal Armor Piece -1,7451,1 // Fire Dragon Scale -1,7452,1 // Yellow Spice -1,7453,1 // Sweet Sauce -1,7454,1 // Savory Sauce -1,7455,1 // Spicy Sauce -1,7456,1 // Red Spice -1,7457,1 // Cooking Oil -1,7472,1 // Level 1 Cookbook -1,7473,1 // Level 2 Cookbook -1,7474,1 // Level 3 Cookbook -1,7475,1 // Level 4 Cookbook -1,7476,1 // Level 5 Cookbook -1,7482,1 // Pot -1,7512,1 // Burnt Part -1,7513,1 // Pocket Watch -1,7561,15 // Glacial Heart -1,7562,15 // Ice Scale -1,7563,15 // Bloody Rune -1,7564,15 // Rotten Meat -1,7565,15 // Sticky Poison -1,7567,1 // Suspicious Hat -1,7568,1 // White Mask -1,7751,34 // Old White Cloth -1,7752,32 // Clattering Skull -1,7753,34 // Broken Farming Utensil -1,10001,3 // Skull Helm -1,10002,3 // Monster Oxygen Mask -1,10003,3 // Transparent Headgear -1,10004,3 // Pacifier -1,10005,3 // Wig -1,10006,3 // Queen's Hair Ornament -1,10007,3 // Silk Ribbon -1,10008,3 // Punisher -1,10009,3 // Wild Flower -1,10010,3 // Battered Pot -1,10011,3 // Stellar Hairpin -1,10012,3 // Tiny Egg Shell -1,10013,3 // Backpack -1,10014,3 // Rocker Glasses -1,10015,3 // Green Lace -1,10016,3 // Golden Bell -1,10017,3 // Bark Shorts -1,10018,3 // Monkey Circlet -1,10019,3 // Red Scarf -1,10020,3 // Grave Keeper's Sword -1,13000,1 // Jujube Dagger -1,13001,1 // Dragon Killer -1,13002,1 // Ginnungagap -1,13003,1 // Cowardice Blade -1,13004,1 // Cowardice Blade -1,13163,1 // Long Barrel -1,13164,1 // Long Barrel -1,13167,1 // Gate Keeper-DD -1,13168,1 // Thunder P -1,13170,2 // Lever Action Rifle -1,13200,1 // Bullet -1,13201,1 // Silver Bullet -1,13202,1 // Bloody Shell -1,13203,1 // Flare Sphere -1,13204,1 // Lightning Sphere -1,13205,1 // Poison Sphere -1,13206,1 // Blind Sphere -1,13207,1 // Freezing Sphere -1,13304,1 // Huuma Calm Mind diff --git a/db/pre-re/item_cardalbum.txt b/db/pre-re/item_cardalbum.txt deleted file mode 100644 index da1ea48de..000000000 --- a/db/pre-re/item_cardalbum.txt +++ /dev/null @@ -1,399 +0,0 @@ -// Old Card Album Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -3,4001,10 // Poring Card -3,4002,10 // Fabre Card -3,4003,6 // Pupa Card -3,4004,11 // Drops Card -3,4005,1 // Santa Poring Card -3,4006,7 // Lunatic Card -3,4007,4 // Peco Peco Egg Card -3,4008,10 // Picky Card -3,4009,10 // Chonchon Card -3,4010,10 // Willow Card -3,4011,10 // Picky Egg Card -3,4012,8 // Thief Bug Egg Card -3,4013,7 // Andre Egg Card -3,4014,5 // Roda Frog Card -3,4015,7 // Condor Card -3,4016,7 // Thief Bug Card -3,4017,5 // Savage Babe Card -3,4019,5 // Hornet Card -3,4020,5 // Farmiliar Card -3,4021,5 // Rocker Card -3,4022,5 // Spore Card -3,4023,5 // Baby Desert Wolf Card -3,4024,5 // Plankton Card -3,4025,5 // Skeleton Card -3,4026,3 // Female Thief Bug Card -3,4027,3 // Kukre Card -3,4028,3 // Tarou Card -3,4029,3 // Wolf Card -3,4030,3 // Mandragora Card -3,4031,3 // Peco Peco Card -3,4032,3 // Ambernite Card -3,4033,3 // Poporing Card -3,4034,3 // Wormtail Card -3,4035,3 // Hydra Card -3,4036,3 // Muka Card -3,4037,3 // Snake Card -3,4038,3 // Zombie Card -3,4039,3 // Stainer Card -3,4041,3 // Coco Card -3,4042,3 // Steel Chonchon Card -3,4043,3 // Andre Card -3,4044,3 // Smokie Card -3,4045,3 // Horn Card -3,4046,3 // Martin Card -3,4048,3 // Poison Spore Card -3,4049,3 // Vadon Card -3,4050,3 // Male Thief Bug Card -3,4051,3 // Yoyo Card -3,4052,3 // Elder Willow Card -3,4053,1 // Vitata Card -3,4055,3 // Marina Card -3,4056,3 // Dustiness Card -3,4057,2 // Metaller Card -3,4058,2 // Thara Frog Card -3,4060,2 // Goblin Card -3,4061,2 // Cornutus Card -3,4062,2 // Anacondaq Card -3,4063,2 // Caramel Card -3,4064,2 // Zerom Card -3,4065,2 // Kaho Card -3,4066,2 // Orc Warrior Card -3,4067,2 // Megalodon Card -3,4068,2 // Scorpion Card -3,4069,2 // Drainliar Card -3,4070,2 // Eggyra Card -3,4071,2 // Orc Zombie Card -3,4072,2 // Golem Card -3,4073,2 // Pirate Skeleton Card -3,4074,2 // Bigfoot Card -3,4075,2 // Argos Card -3,4076,2 // Magnolia Card -3,4077,2 // Phen Card -3,4078,2 // Savage Card -3,4079,2 // Mantis Card -3,4080,2 // Flora Card -3,4081,2 // Hode Card -3,4082,1 // Desert Wolf Card -3,4083,1 // Rafflesia Card -3,4084,1 // Marine Sphere Card -3,4085,1 // Orc Skeleton Card -3,4086,1 // Soldier Skeleton Card -3,4087,1 // Giearth Card -3,4088,1 // Frilldora Card -3,4089,1 // Swordfish Card -3,4090,1 // Munak Card -3,4091,1 // Kobold Card -3,4092,1 // Skeleton Worker Card -3,4093,1 // Obeaune Card -3,4094,1 // Archer Skeleton Card -3,4095,1 // Marse Card -3,4096,1 // Zenorc Card -3,4097,1 // Matyr Card -3,4098,1 // Dokebi Card -3,4099,1 // Pasana Card -3,4100,1 // Sohee Card -3,4101,1 // Sandman Card -3,4102,1 // Whisper Card -3,4103,1 // Horong Card -3,4104,1 // Requiem Card -3,4105,1 // Marc Card -3,4106,1 // Mummy Card -3,4107,1 // Verit Card -3,4108,1 // Myst Card -3,4109,1 // Jakk Card -3,4110,1 // Ghoul Card -3,4111,1 // Strouf Card -3,4112,1 // Marduk Card -3,4113,1 // Marionette Card -3,4114,1 // Argiope Card -3,4115,1 // Hunter Fly Card -3,4116,1 // Isis Card -3,4117,1 // Sidewinder Card -3,4118,1 // Earth Petite Card -3,4119,1 // Bathory Card -3,4120,1 // Sky Petite Card -3,4122,1 // Deviruchi Card -3,4125,1 // Deviace Card -3,4127,1 // Nightmare Card -3,4129,1 // Bapho Jr. Card -3,4133,1 // Raydric Card -3,4136,1 // Khalitzburg Card -3,4141,1 // Evil Druid Card -3,4149,1 // Gargoyle Card -3,4150,1 // Goat Card -3,4151,1 // Gajomart Card -3,4152,1 // Galapago Card -3,4153,1 // Crab Card -3,4154,1 // Dumpling Child Card -3,4156,1 // Goblin Steamrider Card -3,4157,1 // Goblin Archer Card -3,4158,1 // Sky Deleter Card -3,4159,1 // Nine Tail Card -3,4160,1 // Firelock Soldier Card -3,4161,1 // Grand Peco Card -3,4162,1 // Grizzly Card -3,4164,1 // Gullinbursti Card -3,4165,1 // Gig Card -3,4166,1 // Nightmare Terror Card -3,4167,1 // Neraid Card -3,4170,1 // Dark Frame Card -3,4172,1 // The Paper Card -3,4173,1 // Demon Pungus Card -3,4175,1 // Poisonous Toad Card -3,4176,1 // Dullahan Card -3,4177,1 // Dryad Card -3,4178,1 // Dragon Tail Card -3,4180,1 // Driller Card -3,4181,1 // Disguise Card -3,4182,1 // Diabolic Card -3,4184,1 // Lava Golem Card -3,4185,1 // Rideword Card -3,4186,1 // Raggler Card -3,4187,1 // Raydric Archer Card -3,4188,1 // Leib Olmai Card -3,4189,1 // Wraith Dead Card -3,4190,1 // Wraith Card -3,4191,1 // Loli Ruri Card -3,4192,1 // Rotar Zairo Card -3,4193,1 // Lude Card -3,4194,1 // Rybio Card -3,4195,1 // Leaf Cat Card -3,4196,1 // Marin Card -3,4199,1 // Merman Card -3,4200,1 // Megalith Card -3,4201,1 // Majoruros Card -3,4202,1 // Civil Servant Card -3,4204,1 // Mini Demon Card -3,4205,1 // Mimic Card -3,4206,1 // Myst Case Card -3,4208,1 // Miyabi Doll Card -3,4209,1 // Violy Card -3,4210,1 // Wanderer Card -3,4212,1 // Bongun Card -3,4213,1 // Brilight Card -3,4214,1 // Bloody Murderer Card -3,4215,1 // Blazer Card -3,4216,1 // Sasquatch Card -3,4217,1 // Enchanted Peach Tree Card -3,4218,1 // Succubus Card -3,4219,1 // Sage Worm Card -3,4220,1 // Solider Card -3,4221,1 // Skeleton General Card -3,4222,1 // Skeleton Prisoner Card -3,4223,1 // Stalactic Golem Card -3,4224,1 // Stem Worm Card -3,4225,1 // Stone Shooter Card -3,4226,1 // Sting Card -3,4227,1 // Spring Rabbit Card -3,4228,1 // Sleeper Card -3,4229,1 // Clock Tower Manager Card -3,4230,1 // Shinobi Card -3,4231,1 // Increase Soil Card -3,4232,1 // Hermit Plant Card -3,4233,1 // Baby Leopard Card -3,4234,1 // Anolian Card -3,4235,1 // Christmas Cookie Card -3,4237,1 // Owl Duke Card -3,4238,1 // Owl Baron Card -3,4239,1 // Iron Fist Card -3,4240,1 // Arclouze Card -3,4242,1 // Apocalipse Card -3,4243,1 // Antonio Card -3,4244,1 // Alarm Card -3,4245,1 // Am Mut Card -3,4246,1 // Assaulter Card -3,4247,1 // Aster Card -3,4248,1 // Ancient Mummy Card -3,4249,1 // Ancient Worm Card -3,4251,1 // Elder Card -3,4252,1 // Alligator Card -3,4253,1 // Alice Card -3,4255,1 // Orc Lady Card -3,4256,1 // Orc Archer Card -3,4257,1 // Wild Rose Card -3,4258,1 // Evil Nymph Card -3,4259,1 // Wooden Golem Card -3,4260,1 // Wootan Shooter Card -3,4261,1 // Wootan Fighter Card -3,4262,1 // Cloud Hermit Card -3,4264,1 // Wind Ghost Card -3,4265,1 // Li Me Mang Ryang Card -3,4267,1 // Explosion Card -3,4268,1 // Injustice Card -3,4269,1 // Incubus Card -3,4270,1 // Giant Spider Card -3,4271,1 // Giant Hornet Card -3,4272,1 // Dancing Dragon Card -3,4273,1 // Shell Fish Card -3,4274,1 // Zombie Master Card -3,4275,1 // Zombie Prisoner Card -3,4277,1 // Zherlthsh Card -3,4278,1 // Gibbet Card -3,4279,1 // Earth Deleter Card -3,4280,1 // Geographer Card -3,4281,1 // Zipper Bear Card -3,4282,1 // Tengu Card -3,4283,1 // Greatest General Card -3,4284,1 // Chepet Card -3,4285,1 // Choco Card -3,4286,1 // Karakasa Card -3,4287,1 // Kapha Card -3,4288,1 // Carat Card -3,4289,1 // Caterpillar Card -3,4290,1 // Cat O' Nine Tails Card -3,4292,1 // Kobold Archer Card -3,4293,1 // Cookie Card -3,4294,1 // Quve Card -3,4295,1 // Kraben Card -3,4296,1 // Cramp Card -3,4297,1 // Cruiser Card -3,4298,1 // Creamy Fear Card -3,4299,1 // Clock Card -3,4300,1 // Chimera Card -3,4301,1 // Killer Mantis Card -3,4304,1 // Tamruan Card -3,4307,1 // Beetle King Card -3,4308,1 // Tri Joint Card -3,4309,1 // Parasite Card -3,4310,1 // Panzer Goblin Card -3,4311,1 // Permeter Card -3,4312,1 // Seal Card -3,4313,1 // Punk Card -3,4314,1 // Penomena Card -3,4315,1 // Pest Card -3,4316,1 // False Angel Card -3,4319,1 // Freezer Card -3,4321,1 // Hylozoist Card -3,4322,1 // High Orc Card -3,4323,1 // Garm Baby Card -3,4325,1 // Harpy Card -3,4326,1 // Sea-Otter Card -3,4327,1 // Bloody Butterfly Card -3,4328,1 // Hyegun Card -3,4329,1 // Phendark Card -3,4331,1 // Heater Card -3,4332,1 // Waste Stove Card -3,4333,3 // Venomous Card -3,4334,1 // Noxious Card -3,4335,3 // Pitman Card -3,4336,1 // Ungoliant Card -3,4337,1 // Porcellio Card -3,4338,1 // Obsidian Card -3,4339,1 // Mineral Card -3,4340,1 // Teddy Bear Card -3,4341,1 // Metaling Card -3,4343,1 // Holden Card -3,4344,3 // Anopheles Card -3,4345,3 // Hill Wind Card -3,4346,1 // Egnigem Cenia Card -3,4347,3 // Armeyer Dinze Card -3,4348,1 // Wikebine Tres Card -3,4349,1 // Errende Ebecee Card -3,4350,3 // Laurell Weinder Card -3,4351,1 // Kavach Icarus Card -3,4353,1 // Remover Card -3,4354,1 // Gemini-S58 Card -3,4355,3 // Gremlin Card -3,4356,1 // Beholder Card -3,4358,1 // Seyren Windsor Card -3,4360,3 // Eremes Guile Card -3,4362,1 // Howard Alt-Eisen Card -3,4366,1 // Kathryne Keyron Card -3,4368,1 // Cecil Damon Card -3,4369,1 // Venatu Card -3,4370,1 // Dimik Card -3,4371,1 // Archdam Card -3,4373,1 // Chung E Card -3,4375,1 // Orc Baby Card -3,4377,3 // Green Iguana Card -3,4378,1 // Gold Acidus Card -3,4379,1 // Blue Acidus Card -3,4380,3 // Red Ferus Card -3,4381,1 // Green Ferus Card -3,4382,1 // Yellow Novus Card -3,4383,3 // Red Novus Card -3,4384,1 // Hydro Card -3,4385,3 // Dragon Egg Card -3,4387,1 // Ancient Mimic Card -3,4388,3 // Deathword Card -3,4389,1 // Plasma Card -3,4390,1 // Breeze Card -3,4391,3 // Retribution Card -3,4392,1 // Observation Card -3,4393,1 // Shelter Card -3,4394,1 // Solace Card -3,4395,1 // Thanatos Maero Card -3,4396,1 // Thanatos Odium Card -3,4397,1 // Thanatos Despero Card -3,4400,1 // Aliza Card -3,4401,1 // Alicel Card -3,4402,1 // Aliot Card -3,4404,1 // Skogul Card -3,4405,1 // Frus Card -3,4409,1 // Agav Card -3,4410,1 // Echio Card -3,4411,1 // Vanberk Card -3,4412,1 // Isilla Card -3,4413,1 // Hodremlin Card -3,4414,1 // Seeker Card -3,4415,2 // Snowier Card -3,4416,1 // Siroma Card -3,4417,1 // Ice Titan Card -3,4418,1 // Gazeti Card -3,4420,1 // Muscipular Card -3,4421,2 // Drosera Card -3,4422,1 // Roween Card -3,4423,1 // Galion Card -3,4424,3 // Stapo Card -3,4426,1 // Byorgue Card -3,4427,1 // Sword Guardian Card -3,4428,1 // Bow Guardian Card -3,4429,1 // Salamander Card -3,4431,1 // Kasa Card -3,4432,2 // Magmaring Card -3,4433,1 // Imp Card -3,4434,1 // Knocker Card -3,4435,1 // Zombie Slaughter Card -3,4436,2 // Ragged Zombie Card -3,4437,2 // Hell Poodle Card -3,4438,2 // Banshee Card -3,4439,1 // Flame Skull Card -3,4440,1 // Necromancer Card -// Magic Card Album -44,4047,1 // Ghostring Card -44,4054,1 // Angeling Card -44,4163,1 // Gryphon Card -44,4169,1 // Dark Illusion Card -44,4174,1 // Deviling Card -44,4179,10 // Dragon Fly Card -44,4183,10 // Vagabond Wolf Card -44,4197,10 // Mastering Card -44,4198,1 // Maya Purple Card -44,4203,10 // Mutant Dragonoid Card -44,4207,1 // Mysteltainn Card -44,4211,1 // Vocal card -44,4237,5 // Owl Duke Card -44,4238,5 // Owl Baron Card -44,4241,1 // Arc Angeling Card -44,4250,1 // Executioner Card -44,4254,1 // Tirfing Card -44,4266,10 // Eclipse Card -44,4284,10 // Chepet Card -44,4285,10 // Choco Card -44,4290,5 // Cat O' Nine Tails Card -44,4291,10 // Kobold Leader Card -44,4300,10 // Chimera Card -44,4306,10 // Toad Card -44,4320,1 // Bloody Knight Card -44,4336,1 // Ungoliant Card -44,4354,1 // Gemini-S58 Card -44,4384,1 // Hydro Card -44,4395,3 // Thanatos Maero Card -44,4396,3 // Thanatos Odium Card -44,4397,3 // Thanatos Despero Card diff --git a/db/pre-re/item_chain.conf b/db/pre-re/item_chain.conf new file mode 100644 index 000000000..795c2f700 --- /dev/null +++ b/db/pre-re/item_chain.conf @@ -0,0 +1,95 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +ITMCHAIN_ORE: { + Iron_Ore: 600 + Iron: 380 + Yellow_Live: 100 + Coal: 80 + Wind_Of_Verdure: 100 + Phracon: 600 + Crystal_Blue: 100 + Boody_Red: 100 + Steel: 50 + Emveretarcon: 380 + Elunium_Stone: 70 + Oridecon_Stone: 80 + Great_Nature: 40 + Rough_Wind: 40 + Mistic_Frozen: 40 + Flame_Heart: 40 + Elunium: 20 + Oridecon: 20 + Gold: 10 + Emperium: 5 +} + +ITMCHAIN_GEM: { + Dark_Red_Jewel: 80 + Violet_Jewel: 30 + Skyblue_Jewel: 40 + Azure_Jewel: 130 + Scarlet_Jewel: 70 + Cardinal_Jewel: 190 + Cardinal_Jewel_: 50 + Red_Jewel: 130 + Blue_Jewel: 140 + White_Jewel: 80 + Golden_Jewel: 150 + Bluish_Green_Jewel: 150 + Crystal_Jewel: 150 + Crystal_Jewel_: 80 + Crystal_Jewel__: 50 + Crystal_Jewel___: 30 +} + +ITMCHAIN_HEAL: { + Fruit_Of_Mastela: 5 + Leaflet_Of_Aloe: 5 + Leaflet_Of_Hinal: 10 + Red_Slim_Potion: 10 + Resist_Earth: 10 + Yellow_Herb: 20 + Red_Potion: 20 + Green_Herb: 30 + Red_Herb: 30 + Novice_Potion: 50 + Nice_Sweet_Potato: 50 + Candy: 100 + ID528: 200 //Monster's_Feed + Popped_Rice: 600 +} + +ITMCHAIN_FOOD: { + Royal_Jelly: 5 + Str_Dish02: 10 + Agi_Dish02: 10 + Vit_Dish03: 10 + Dex_Dish02: 10 + Luk_Dish03: 10 + Int_Dish02: 10 + Apple_Juice: 30 + Banana_Juice: 30 + Grape_Juice: 30 + Carrot_Juice: 30 + Well_Baked_Cookie: 30 + Ice_Cream: 50 + Fish_Slice: 50 + Cheese: 50 + Shusi: 50 + Bun: 50 + Mojji: 50 + Pumpkin: 50 + Sweet_Potato: 100 + Banana: 100 + Apple: 600 +} \ No newline at end of file diff --git a/db/pre-re/item_combo_db.txt b/db/pre-re/item_combo_db.txt index f745d25b7..47197bdb4 100644 --- a/db/pre-re/item_combo_db.txt +++ b/db/pre-re/item_combo_db.txt @@ -144,7 +144,7 @@ 4193:4294,{ bonus bMaxHP,300; bonus bMaxSP,60; } 4208:4258:4325:4327:4382,{ bonus bInt,3; bonus2 bSkillAtk,"WZ_HEAVENDRIVE",10; bonus2 bSkillAtk,"MG_THUNDERSTORM",10; if(BaseJob==Job_Sage) { bonus bMagicDamageReturn,20; bonus2 bAddMonsterDropItem,716,100; bonus2 bAddMonsterDropItem,715,100; bonus bCastrate,-20; } } 4218:4269,{ bonus bHPrecovRate,30; bonus bSPrecovRate,30; bonus bVit,4; bonus bInt,4; } -4220:4246:4311:4319:4331,{ bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus3 bAutoSpell,"BS_WEAPONPERFECT",1,3; bonus2 bAddMonsterDropItem,501,500; if(BaseClass==Job_Swordman) bonus2 bAddItemHealRate,IG_Potion,50; } +4220:4246:4311:4319:4331,{ bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus3 bAutoSpell,"BS_WEAPONPERFECT",1,3; bonus2 bAddMonsterDropItem,501,500; if(BaseClass==Job_Swordman) { bonus2 bAddItemHealRate,Red_Potion,50; bonus2 bAddItemHealRate,Yellow_Potion,50; bonus2 bAddItemHealRate,Orange_Potion,50; bonus2 bAddItemHealRate,White_Potion,50; } } 4229:4244:4299:4313,{ bonus bDef,3; bonus bMdef,3; } 4237:4238,{ bonus3 bAutoSpell,"MG_LIGHTNINGBOLT",5,20; } 4268:4277,{ bonus bBaseAtk,20; bonus bLuk,3; } diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index 31a57ed6f..c45bd0175 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -106,7 +106,7 @@ //=================================================================== 601,Wing_Of_Fly,Fly Wing,11,60,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AL_TELEPORT",1; },{},{} 602,Wing_Of_Butterfly,Butterfly Wing,11,300,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AL_TELEPORT",3; },{},{} -603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BlueBox),1; },{},{} +603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 603,1; },{},{} 604,Branch_Of_Dead_Tree,Dead Branch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-1,1,""; },{},{} 605,Anodyne,Anodyne,11,2000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_ENDURE",1; },{},{} 606,Aloebera,Aloevera,11,1500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_SELFPROVOKE",1; },{},{} @@ -119,9 +119,9 @@ 613,Iron_Hammer,Iron Hammer,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 1; },{},{} 614,Golden_Hammer,Golden Hammer,2,3000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 2; },{},{} 615,Oridecon_Hammer,Oridecon Hammer,2,5000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 3; },{},{} -616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_CardAlbum),1; },{},{} -617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_VioletBox),1; },{},{} -618,Worn_Out_Scroll,Worn Out Scroll,2,50,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_ScrollBox),1; },{},{} +616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 616,1; },{},{} +617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 617,1; },{},{} +618,Worn_Out_Scroll,Worn Out Scroll,2,50,,20,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 619,Unripe_Apple,Unripe Apple,2,1000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1002; },{},{} 620,Orange_Juice,Orange Juice,2,1500,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1113; },{},{} 621,Bitter_Herb,Bitter Herb,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1031; },{},{} @@ -147,7 +147,7 @@ 641,Contracts_In_Shadow,Contract in Shadow,2,100,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1109; },{},{} 642,Book_Of_Devil,Book of the Devil,2,1800,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1101; },{},{} 643,Pet_Incubator,Pet Incubator,2,3000,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ bpet; },{},{} -644,Gift_Box,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox),1; },{},{} +644,Gift_Box,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 644,1; },{},{} 645,Center_Potion,Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATTHASTE_POTION1,1800000,0; },{},{} 656,Awakening_Potion,Awakening Potion,2,1500,,150,,,,,0xFFF7FEEF,7,2,,,40,,,{ sc_start SC_ATTHASTE_POTION2,1800000,0; },{},{} 657,Berserk_Potion,Berserk Potion,2,3000,,200,,,,,0x01E646A6,7,2,,,85,,,{ sc_start SC_ATTHASTE_POTION3,1800000,0; },{},{} @@ -157,10 +157,10 @@ 661,Sway_Apron,Soft Apron,2,20000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1275; },{},{} 662,Inspector_Certificate,Authoritative Badge,2,1450,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MOVHASTE_HORSE,180000,0; },{},{} 663,Korea_Rice_Cake,Korean Rice Cake,0,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 10,0; },{},{} -664,Gift_Box_1,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_1),1; },{},{} -665,Gift_Box_2,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_2),1; },{},{} -666,Gift_Box_3,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_3),1; },{},{} -667,Gift_Box_4,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_4),1; },{},{} +664,Gift_Box_1,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 664,1; },{},{} +665,Gift_Box_2,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 665,1; },{},{} +666,Gift_Box_3,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 666,1; },{},{} +667,Gift_Box_4,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 667,1; },{},{} 668,Handsei,Red Envelope,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ set Zeny,Zeny+rand(1000,10000); },{},{} 669,Rice_Cake_Soup,Tempting Rice-Cake Soup,0,500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal -100,-100; },{},{} 670,Gold_Coin_Moneybag,Bag of Gold Coins,3,100000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -492,8 +492,8 @@ 1139,Tale_Fing_,Tirfing,4,20,,1000,200,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000; },{},{} 1140,Byeorrun_Gum,Byeollungum,4,20,,900,150,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,50; bonus bAllStats,2; },{},{} 1141,Immaterial_Sword,Immaterial Sword,4,20,,900,140,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Ghost; bonus2 bSPVanishRate,30,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0; },{},{} -1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Jewel,100; },{},{} -1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Ore,30; },{},{} +1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus bAddMonsterDropChainItem,ITMCHAIN_GEM; },{},{} +1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus bAddMonsterDropChainItem,ITMCHAIN_ORE; },{},{} 1144,Sasimi,Sashimi,4,20,,1400,75,,1,0,0x000654E2,7,2,2,3,48,1,2,{ bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,RC_Fish,4000; },{},{} 1145,Holy_Avenger,Holy Avenger,4,450000,,1350,125,,1,0,0x00004000,7,2,2,3,75,1,2,{ bonus bAtkEle,Ele_Holy; bonus bVit,2; },{},{} 1146,Town_Sword,Town Sword,4,42000,,800,100,,1,1,0x00000001,7,2,2,3,30,1,2,{},{},{} @@ -1328,7 +1328,7 @@ 2414,Novice_Boots,Novice Slippers,5,1,,1,,2,,0,0x00000001,7,2,64,,0,0,0,{},{},{} 2415,Slipper,Bunny Slipper,5,34000,,300,,3,,1,0xFFFFFFFE,7,0,64,,30,1,0,{ bonus bLuk,3; bonus bMdef,3; },{},{} 2416,Novice_Shoes,Novice Shoes,5,35000,,500,,2,,1,0x00000001,7,2,64,,40,1,0,{ bonus bMaxHPrate,5; },{},{} -2417,Fricco_Shoes,Fricco's Shoes,5,30000,,500,,3,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bAgi,2; bonus2 bAddItemHealRate,IG_Potion,20; },{},{} +2417,Fricco_Shoes,Fricco's Shoes,5,30000,,500,,3,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20; },{},{} 2418,Vidar's_Boots,Vidar's Boots,5,30000,,650,,4,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bMaxHPrate,9; bonus bMaxSPrate,9; },{},{} 2419,Goibne's_Combat_Boots,Goibne's Greaves,5,30000,,700,,4,,0,0xFFFFFFFE,7,2,64,,54,1,0,{ bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5; },{},{} 2420,Angel's_Arrival,Angel's Reincarnation,5,10000,,300,,2,,1,0x00000001,7,2,64,,25,1,0,{ bonus bMaxHP,100; },{},{} @@ -1777,9 +1777,9 @@ 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,534,RC_Insect,300; },{},{} +4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Apple_Juice,50; bonus2 bAddItemHealRate,Banana_Juice,50; bonus2 bAddItemHealRate,Carrot_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; },{},{} +4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Candy,50; bonus2 bAddItemHealRate,Candy_Striper,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; },{},{} 4156,Steam_Goblin_Card,Goblin Steamrider Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7; },{},{} 4157,Goblin_Archer_Card,Goblin Archer Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7; },{},{} @@ -1840,7 +1840,7 @@ 4212,Bon_Gun_Card,Bongun Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"SM_BASH",1,20; bonus2 bAddSkillBlow,"SM_BASH",5; bonus2 bAddDefClass,1026,-100; },{},{} 4213,Brilight_Card,Brilight Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Silence,600; },{},{} 4214,Bloody_Murderer_Card,Bloody Murderer Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7; },{},{} -4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Food,600; },{},{} +4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAddMonsterDropChainItem,ITMCHAIN_FOOD; },{},{} 4216,Sasquatch_Card,Sasquatch Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,600; },{},{} 4217,Live_Peach_Tree_Card,Enchanted Peach Tree Card,6,20,,10,,,,,,,,32,,,,,{ bonus3 bAutoSpell,"AL_HEAL",1+9*(getskilllv("AL_HEAL")==10),20; },{},{} 4218,Succubus_Card,Succubus Card,6,20,,10,,,,,,,,16,,,,,{ bonus bVit,-3; bonus bHPrecovRate,-20; bonus bMaxHP,1000; },{},{} @@ -1852,12 +1852,12 @@ 4224,Stem_Worm_Card,Stem Worm Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12032,RC_Brute,100; },{},{} 4225,Stone_Shooter_Card,Stone Shooter Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,10; bonus bHit,10; },{},{} 4226,Sting_Card,Sting Card,6,20,,10,,,,,,,,32,,,,,{ bonus bDef,2; if(getrefine()>8) bonus bMdef,5; },{},{} -4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItem,517,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200; },{},{} +4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Meat,50; bonus2 bAddItemHealRate,528,50; bonus3 bAddMonsterDropItem,Meat,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200; },{},{} 4228,Sleeper_Card,Sleeper Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12031,RC_Fish,100; },{},{} 4229,C_Tower_Manager_Card,Tower Keeper Card,6,20,,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus bCastrate,-5; },{},{} 4230,Shinobi_Card,Shinobi Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAgi,1; bonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100; },{},{} 4231,Increase_Soil_Card,Mi Gao Card,6,20,,10,,,,,,,,32,,,,,{ bonus2 bSubRace2,5,50; },{},{} -4232,Wild_Ginseng_Card,Hermit Plant Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100; },{},{} +4232,Wild_Ginseng_Card,Hermit Plant Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Red_Herb,50; bonus2 bAddItemHealRate,Yellow_Herb,50; bonus2 bAddItemHealRate,White_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100; },{},{} 4233,Baby_Leopard_Card,Baby Leopard Card,6,20,,10,,,,,,,,16,,,,,{ bonus bLuk,3; if(BaseClass==Job_Merchant) bonus bUnbreakableArmor,0; },{},{} 4234,Anolian_Card,Anolian Card,6,20,,10,,,,,,,,16,,,,,{ bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION")==10),30; },{},{} 4235,Cookie_XMAS_Card,Christmas Cookie Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10; },{},{} @@ -1907,7 +1907,7 @@ 4279,Deleter_Card,Earth Deleter Card,6,20,,10,,,,,,,,16,,,,,{ bonus bSPrecovRate,-100; bonus bSPGainValue,10; },{},{ heal 0,-100; } 4280,Geographer_Card,Geographer Card,6,20,,10,,,,,,,,16,,,,,{ bonus3 bAutoSpellWhenHit,"AL_BLESSING",2+8*(getskilllv("AL_BLESSING")==10),30; },{},{} 4281,Zipper_Bear_Card,Zipper Bear Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass==Job_Merchant) bonus bUnbreakableWeapon,0; },{},{} -4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Recovery,600; },{},{} +4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAddMonsterDropChainItem,ITMCHAIN_HEAL; },{},{} 4283,Greatest_General_Card,Greatest General Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"MO_CALLSPIRITS",5,2+18*(BaseClass==Job_Acolyte); },{},{} 4284,Chepet_Card,Chepet Card,6,20,,10,,,,,,,,2,,,,,{ bonus4 bAutoSpell,"AL_HEAL",5,50,1; },{},{} 4285,Choco_Card,Choco Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee2,5; bonus bFlee,10; },{},{} @@ -1951,7 +1951,7 @@ 4323,Garm_Baby_Card,Hatii Babe Card,6,20,,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,"MG_FROSTDIVER",3,50; },{},{} 4324,Garm_Card,Hatii Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,5000; },{},{} 4325,Harpy_Card,Harpy Card,6,20,,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",5; },{},{} -4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300; },{},{} +4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Sushi,50; bonus2 bAddItemHealRate,Fish_Slice,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300; },{},{} 4327,Blood_Butterfly_Card,Bloody Butterfly Card,6,20,,10,,,,,,,,136,,,,,{ bonus bCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,"MG_FIREWALL",5; },{},{} 4328,Hyegun_Card,Yao Jun Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee,15; bonus bCritical,1; },{},{} 4329,Phendark_Card,Phendark Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_DemiHuman,5; },{},{ heal 0,-5; } @@ -4567,10 +4567,10 @@ 12020,Water_Of_Darkness,Cursed Water,11,2,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",8; },{},{} 12021,Pork_Belly,Pork,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,99),0; },{},{} 12022,Spareribs,Galbi,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,99),0; },{},{} -12023,Giftbox_China,Wrapped Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBoxChina),1; },{},{} +12023,Giftbox_China,Wrapped Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12023,1; },{},{} 12024,Red_Pouch_Of_Surprise,Red Pouch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-4,1,""; },{},{} -12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggBoy),1; },{},{} -12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggGirl),1; },{},{} +12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12025,1; },{},{} +12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12026,1; },{},{} 12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0; },{},{} 12028,Box_Of_Thunder,Box of Thunder,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MOVHASTE_HORSE,20000,0; },{},{} 12029,Gloomy_Box,Box of Gloom,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AC_CONCENTRATION",1; },{},{} @@ -4582,7 +4582,7 @@ 12035,Lotto_Box01,Lotto Box 01,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7361,7370),1; },{},{} 12036,Lotto_Box02,Lotto Box 02,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7371,7380),1; },{},{} 12037,Lotto_Box03,Lotto Box 03,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7381,7390),1; },{},{} -12038,Lotto_Box04,Lotto Box 04,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_LottoBox),1; },{},{} +12038,Lotto_Box04,Lotto Box 04,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12038,1; },{},{} 12039,Lotto_Box05,Lotto Box 05,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7542,7546),1; },{},{} 12040,Stone_Of_Intelligence_,Stone of Sage,2,100000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ homevolution; },{},{} 12041,Str_Dish01,Fried Grasshopper Legs,0,2000,,60,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_STR,1200000,1; percentheal 5,0; },{},{} @@ -4648,14 +4648,14 @@ 12101,Citron,Citron,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12102,Meat_Skewer,Grilled Skewer,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12103,Bloody_Dead_Branch,Bloody Branch,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-3,1,""; },{},{} -12104,Random_Quiver,Random Quiver,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Quiver),1; },{},{} -12105,Set_Of_Taiming_Item,Taming Gift Set,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; },{},{} -12106,Accessory_Box,Jewelry Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Accesory),1; },{},{} -12107,Wrapped_Mask,Wrapped Mask,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Mask),1; },{},{} -12108,Bundle_Of_Magic_Scroll,Scroll Package,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; },{},{} +12104,Random_Quiver,Random Quiver,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12104,1; },{},{} +12105,Set_Of_Taiming_Item,Taming Gift Set,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12105,1; getrandgroupitem 12105,1; getrandgroupitem 12105,1; },{},{} +12106,Accessory_Box,Jewelry Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12106,1; },{},{} +12107,Wrapped_Mask,Wrapped Mask,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12107,1; },{},{} +12108,Bundle_Of_Magic_Scroll,Scroll Package,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; },{},{} 12109,Poring_Box,Poring Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-2,1,""; },{},{} -12110,First_Aid_Kit,First Aid Kit,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; },{},{} -12111,Food_Package,Bundle of Food,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; },{},{} +12110,First_Aid_Kit,First Aid Kit,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; },{},{} +12111,Food_Package,Bundle of Food,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1; },{},{} 12112,Tropical_Sograt,Tropical Sograt,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Curse,10000,1; },{},{} 12113,Vermilion_The_Beach,Vermilion on the Beach,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Stun,10000,1; },{},{} 12114,Elemental_Fire,Elemental Converter,11,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",4; },{},{} @@ -4674,7 +4674,7 @@ 12127,High_end_Cooking_Kits,Professional Cooking Kit,2,2000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 13; },{},{} 12128,Imperial_Cooking_Kits,Royal Cooking Kit,2,5000,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 14; },{},{} 12129,Fantastic_Cooking_Kits,Fantastic Cooking Kit,2,10000,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 15; },{},{} -12130,Cookie_Bag,Cookie Bag,2,2,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; },{},{} +12130,Cookie_Bag,Cookie Bag,2,2,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12130,1; getrandgroupitem 12130,1; getrandgroupitem 12130,1; },{},{} 12131,Lucky_Potion,Lucky Potion,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12132,Red_Bag,Santa's Bag,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Xmas,600000,0; },{},{} 12133,Ice_Cream_,McDonald's Ice Cone,0,0,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; } },{},{} @@ -4730,15 +4730,15 @@ 12183,Holy_Arrow_Quiver,Holy Arrow Quiver,2,2,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1772,500; },{},{} 12184,Mercenary_Red_Potion,Mercenary Red Potion,2,500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 1000,0; },{},{} 12185,Mercenary_Blue_Potion,Mercenary Blue Potion,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 0,100; },{},{} -12186,Red_Box,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_RedBox),1; },{},{} -12187,Green_Box,Old Green Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GreenBox),1; },{},{} +12186,Red_Box,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12186,1; },{},{} +12187,Green_Box,Old Green Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12187,1; },{},{} 12188,Magical_Moon_Cake,Grace Moon Cake,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; },{},{} -12189,Red_Box_,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_RedBox_2),1; },{},{} +12189,Red_Box_,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12189,1; },{},{} 12190,Moon_Cake,Moon Cake,2,2,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12191,Special_Moon_Cake,Special Moon Cake,2,2,,500,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12192,Pumpkin_Pie,Pumpkin Pie,0,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,5; },{},{} 12193,Brezel,Pretzel,2,20,,20,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12194,Hometown_Gift,Hometown Gift,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; },{},{} +12194,Hometown_Gift,Hometown Gift,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12194,1; getrandgroupitem 12194,1; getrandgroupitem 12194,1; },{},{} 12195,Plain_Rice_Cake,Plain Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{} 12196,Hearty_Rice_Cake,Hearty Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,0; },{},{} 12197,Salty_Rice_Cake,Salty Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 10,10; },{},{} @@ -4782,15 +4782,15 @@ 12237,Choco_Lump,Junky Chocolate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_BLOODING,18000,0; },{},{} 12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{} 12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{} -12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_YellowBox),1; },{},{} +12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12240,1; },{},{} 12241,M_Center_Potion,Mercenary Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION1,1800000,0; },{},{} 12242,M_Awakening_Potion,Mercenary Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION2,1800000,0; },{},{} 12243,M_Berserk_Potion,Mercenary Berserk Potion,2,3000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION3,1800000,0; },{},{} -12244,Old_Gift_Box,Old Gift Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_OldGiftBox),1; },{},{} +12244,Old_Gift_Box,Old Gift Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12244,1; },{},{} 12245,Green_Ale_US,Green Ale,0,5000,,500,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,0; },{},{} -12246,Magic_Card_Album,Mystical Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_MagicCardAlbum),1; },{},{} +12246,Magic_Card_Album,Mystical Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12246,1; },{},{} 12247,Halohalo,Halo-Halo,2,2,,100,,,,,0xFFFFFFFF,7,2,,,20,,,{ sc_start SC_INCALLSTATUS,600000,3; },{},{} -12248,Masquerade_Ball_Box,Fancy Ball Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Masquerade),1; },{},{} +12248,Masquerade_Ball_Box,Fancy Ball Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12248,1; },{},{} 12249,Payroll_Of_Kafra_,Payment Statement for Kafra Employee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12250,Str_Dish10_M,Steamed Tongue,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_STR,3600000,10; percentheal 20,20; },{},{} 12251,Agi_Dish10_M,Steamed Desert Scorpions,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_AGI,3600000,10; percentheal 15,5; },{},{} @@ -4823,12 +4823,12 @@ 12278,Alice_Scroll,Alice Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 2060,1800000; },{},{} 12279,Undead_Element_Scroll,Undead Elemental Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; },{},{} 12280,Holy_Element_Scroll,Holy Elemental Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_BENEDICTIO; sc_start SC_BENEDICTIO,300000,1; },{},{} -12281,Tresure_Box_WoE,Event Treasure Box,2,20,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Tresure_Box_WoE),1; },{},{} +12281,Tresure_Box_WoE,Event Treasure Box,2,20,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12281,1; },{},{} 12282,Internet_Cafe1,Internet Cafe1,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCALLSTATUS,5400000,3; sc_start SC_PLUSATTACKPOWER,5400000,15; sc_start SC_PLUSMAGICPOWER,5400000,15; },{},{} 12283,Internet_Cafe2,Internet Cafe2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCSTR,5400000,8; sc_start SC_INCDEX,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,32; sc_start SC_INCFLEE,5400000,5; },{},{} 12284,Internet_Cafe3,Internet Cafe3,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_PLUSMAGICPOWER,5400000,40; },{},{} 12285,Internet_Cafe4,Internet Cafe4,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,24; sc_start SC_PLUSMAGICPOWER,5400000,24; },{},{} -12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Masquerade_2),1; },{},{} +12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12286,1; },{},{} 12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 1; },{},{} 12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 2; },{},{} 12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 3; },{},{} @@ -4876,12 +4876,12 @@ 12331,Ginseng,Ginseng,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 6,0; },{},{} 12332,Fruit_Juice,Fruit Juice,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,6; },{},{} 12333,Ansila,Ancilla,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,15; },{},{} -12334,Cherish_Box,Treasure Edition Helm Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Cherish_Box),1; },{},{} +12334,Cherish_Box,Treasure Edition Helm Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12334,1; },{},{} 12335,Yummy_Skewered_Dish,Grilled Delicious Skewer,0,1000,,350,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 60,60; },{},{} 12336,Baked_Mushroom,Grilled Mushroom,0,500,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 30,30; },{},{} 12337,Grilled_Sausage,Grilled Sausages,0,300,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,20; },{},{} 12338,Grilled_Corn,Grilled Corn,2,100,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCSTR,180000,2; sc_start SC_INCINT,180000,2; sc_start SC_INCAGI,180000,2; },{},{} -12339,Cherish_Box_Ori,Treasure Edition Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Cherish_Box_Ori),1; },{},{} +12339,Cherish_Box_Ori,Treasure Edition Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12339,1; },{},{} 12340,Mysterious_Rice_Powder,Chewy Rice Powder,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1815; },{},{} 12341,Special_Alloy_Trap_Box,Special Alloy Trap Box,2,30000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7940,100; },{},{} 12342,Manuk's_Opportunity,Manuk's Opportunity,2,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_POTION_BERSERK; sc_start SC_MANU_ATK,600000,10; },{},{} @@ -4897,8 +4897,8 @@ 12352,Dun_Tele_Scroll3,Dungeon Teleport Scroll 3,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12353,Tiny_Waterbottle,Small Bottle,2,800,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PROPERTYWATER,90000,1; },{},{} 12354,Buche_De_Noel,Buche De Noel,2,2,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7; },{},{} -12355,Xmas_Gift,Xmas Gift,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Xmas_Gift),1; },{},{} -12356,Louise_Costume_Box,Louise Costume Box,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Louise_Costume_Box),1; },{},{} +12355,Xmas_Gift,Xmas Gift,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12355,1; },{},{} +12356,Louise_Costume_Box,Louise Costume Box,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12356,1; },{},{} 12357,Shiny_Wing_Gown,Shiny Wing Gown,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1630; },{},{} 12358,Fan_Of_Wind,Fan Of Wind,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1513; },{},{} 12359,Very_Soft_Plant,Very Soft Plant,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1586; },{},{} @@ -5124,7 +5124,7 @@ 12581,Vending_Search_Scroll2,Universal Catalog Gold,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{} 12591,Vending_Search_Scroll3,Universal Catalog Bronze,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{} 12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BleuBox),1; getrandgroupitem(IG_BleuBox),1; },{},{} +12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12702,1; getrandgroupitem 12702,1; },{},{} 12703,Holy_Egg_2,Holy Egg,11,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12704,Elixir_Of_Life,Elixir of Life,0,0,,10,,,,,0xFFFFFFFF,7,2,,,85,,,{ percentheal 100,0; },{},{} 12705,Noble_Nameplate,Noble Nameplate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,90,,,{ sc_start SC_CASH_PLUSEXP,1800000,100; },{},{} @@ -5136,7 +5136,7 @@ 12711,Pretzel,Pretzel,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,90),0; },{},{} 12712,Green_Beer,Green Beer,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12713,Monster_Extract,Monster Extract,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12714,Easter_Scroll,Easter Scroll,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Easter_Scroll),1; },{},{} +12714,Easter_Scroll,Easter Scroll,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12714,1; },{},{} 12715,Black_Treasure_Box,Black Treasure Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12716,Indian_Rice_Cake,Indian Rice Cake,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} // Guillotine Cross Poisons @@ -6408,7 +6408,7 @@ 14593,Magic_Power_Scroll,Mystical Amplification Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "HW_MAGICPOWER",10; },{},{} 14594,Quagmire_Scroll,Quagmire Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_QUAGMIRE",5; },{},{} 14595,Unsealed_Magic_Spell,Unsealed Magic Spell,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "yuno_fild09",255,127; },{},{} -14596,Pierre_Treasurebox,Pierre's Treasure Box,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; },{},{} +14596,Pierre_Treasurebox,Pierre's Treasure Box,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; },{},{} 14597,PhreeoniS,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4121; },{},{} 14598,GhostringS,Ghostring Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,60000,4047; },{},{} 14599,Greed_Scroll_C,Greed Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/db/pre-re/item_giftbox.txt b/db/pre-re/item_giftbox.txt deleted file mode 100644 index e90951bff..000000000 --- a/db/pre-re/item_giftbox.txt +++ /dev/null @@ -1,629 +0,0 @@ -// Gift Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -// GiftBox -4,501,1 // Red Potion -4,502,1 // Orange Potion -4,503,1 // Yellow Potion -4,504,1 // White Potion -4,505,1 // Blue Potion -4,506,1 // Green Potion -4,526,1 // Royal Jelly -4,529,1 // Candy -4,530,1 // Candy Cane -4,537,1 // Pet Food -4,538,1 // Well-baked Cookie -4,539,1 // Piece of Cake -4,617,1 // Old Purple Box -4,644,19 // Gift Box -4,706,1 // Four Leaf Clover -4,718,1 // Garnet -4,719,1 // Amethyst -4,720,1 // Aquamarine -4,721,1 // Emerald -4,722,1 // Pearl -4,723,1 // Ruby -4,724,1 // Cursed Ruby -4,725,1 // Sardonyx -4,726,1 // Sapphire -4,727,1 // Opal -4,728,1 // Topaz -4,729,1 // Zircon -4,730,1 // 1carat Diamond -4,731,1 // 2carat Diamond -4,732,1 // 3carat Diamond -4,733,1 // Cracked Diamond -4,734,1 // Red Frame -4,735,1 // Chung Jah -4,736,1 // China -4,737,1 // Black Ladle -4,738,1 // Pencil Case -4,739,1 // Rouge -4,740,1 // Puppet -4,741,1 // Poring Doll -4,742,1 // Chonchon Doll -4,743,1 // Spore Doll -4,744,1 // Bouquet -4,745,1 // Wedding Bouquet -4,746,1 // Glass Bead -4,747,1 // Crystal Mirror -4,748,1 // Witherless Rose -4,749,1 // Frozen Rose -4,750,1 // Baphomet Doll -4,751,1 // Osiris Doll -4,752,1 // Grasshopper Doll -4,753,1 // Yoyo Doll -4,754,1 // Raccoon Doll -4,969,1 // Gold -4,975,1 // Scarlet Dyestuff -4,976,1 // Lemon Dyestuff -4,978,1 // Cobaltblue Dyestuff -4,979,1 // Darkgreen Dyestuff -4,980,1 // Orange Dyestuff -4,981,1 // Violet Dyestuff -4,982,1 // White Dyestuff -4,983,1 // Black Dyestuff -4,994,1 // Flame Heart -4,995,1 // Mystic Frozen -4,996,1 // Rough Wind -4,997,1 // Great Nature -4,999,1 // Steel -4,1000,1 // Star Crumb -4,1558,1 // Girl's Diary -4,4005,1 // Santa Poring Card -4,7034,1 // Red Stocking -// GiftBox_1 -28,501,1 // Red Potion -28,502,1 // Orange Potion -28,503,1 // Yellow Potion -28,504,1 // White Potion -28,505,1 // Blue Potion -28,506,1 // Green Potion -28,526,1 // Royal Jelly -28,529,1 // Candy -28,530,1 // Candy Cane -28,537,1 // Pet Food -28,538,1 // Well-baked Cookie -28,539,1 // Piece of Cake -28,617,1 // Old Purple Box -28,644,19 // Gift Box -28,706,1 // Four Leaf Clover -28,718,1 // Garnet -28,719,1 // Amethyst -28,720,1 // Aquamarine -28,721,1 // Emerald -28,722,1 // Pearl -28,723,1 // Ruby -28,724,1 // Cursed Ruby -28,725,1 // Sardonyx -28,726,1 // Sapphire -28,727,1 // Opal -28,728,1 // Topaz -28,729,1 // Zircon -28,730,1 // 1carat Diamond -28,731,1 // 2carat Diamond -28,732,1 // 3carat Diamond -28,733,1 // Cracked Diamond -28,734,1 // Red Frame -28,735,1 // Chung Jah -28,736,1 // China -28,737,1 // Black Ladle -28,738,1 // Pencil Case -28,739,1 // Rouge -28,740,1 // Puppet -28,741,1 // Poring Doll -28,742,1 // Chonchon Doll -28,743,1 // Spore Doll -28,744,1 // Bouquet -28,745,1 // Wedding Bouquet -28,746,1 // Glass Bead -28,747,1 // Crystal Mirror -28,748,1 // Witherless Rose -28,749,1 // Frozen Rose -28,750,1 // Baphomet Doll -28,751,1 // Osiris Doll -28,752,1 // Grasshopper Doll -28,753,1 // Yoyo Doll -28,754,1 // Raccoon Doll -28,969,1 // Gold -28,975,1 // Scarlet Dyestuff -28,976,1 // Lemon Dyestuff -28,978,1 // Cobaltblue Dyestuff -28,979,1 // Darkgreen Dyestuff -28,980,1 // Orange Dyestuff -28,981,1 // Violet Dyestuff -28,982,1 // White Dyestuff -28,983,1 // Black Dyestuff -28,994,1 // Flame Heart -28,995,1 // Mystic Frozen -28,996,1 // Rough Wind -28,997,1 // Great Nature -28,999,1 // Steel -28,1000,1 // Star Crumb -28,1558,1 // Girl's Diary -28,4005,1 // Santa Poring Card -28,7034,1 // Red Stocking -// GiftBox_2 -29,501,1 // Red Potion -29,502,1 // Orange Potion -29,503,1 // Yellow Potion -29,504,1 // White Potion -29,505,1 // Blue Potion -29,506,1 // Green Potion -29,526,1 // Royal Jelly -29,529,1 // Candy -29,530,1 // Candy Cane -29,537,1 // Pet Food -29,538,1 // Well-baked Cookie -29,539,1 // Piece of Cake -29,617,1 // Old Purple Box -29,644,19 // Gift Box -29,706,1 // Four Leaf Clover -29,718,1 // Garnet -29,719,1 // Amethyst -29,720,1 // Aquamarine -29,721,1 // Emerald -29,722,1 // Pearl -29,723,1 // Ruby -29,724,1 // Cursed Ruby -29,725,1 // Sardonyx -29,726,1 // Sapphire -29,727,1 // Opal -29,728,1 // Topaz -29,729,1 // Zircon -29,730,1 // 1carat Diamond -29,731,1 // 2carat Diamond -29,732,1 // 3carat Diamond -29,733,1 // Cracked Diamond -29,734,1 // Red Frame -29,735,1 // Chung Jah -29,736,1 // China -29,737,1 // Black Ladle -29,738,1 // Pencil Case -29,739,1 // Rouge -29,740,1 // Puppet -29,741,1 // Poring Doll -29,742,1 // Chonchon Doll -29,743,1 // Spore Doll -29,744,1 // Bouquet -29,745,1 // Wedding Bouquet -29,746,1 // Glass Bead -29,747,1 // Crystal Mirror -29,748,1 // Witherless Rose -29,749,1 // Frozen Rose -29,750,1 // Baphomet Doll -29,751,1 // Osiris Doll -29,752,1 // Grasshopper Doll -29,753,1 // Yoyo Doll -29,754,1 // Raccoon Doll -29,969,1 // Gold -29,975,1 // Scarlet Dyestuff -29,976,1 // Lemon Dyestuff -29,978,1 // Cobaltblue Dyestuff -29,979,1 // Darkgreen Dyestuff -29,980,1 // Orange Dyestuff -29,981,1 // Violet Dyestuff -29,982,1 // White Dyestuff -29,983,1 // Black Dyestuff -29,994,1 // Flame Heart -29,995,1 // Mystic Frozen -29,996,1 // Rough Wind -29,997,1 // Great Nature -29,999,1 // Steel -29,1000,1 // Star Crumb -29,1558,1 // Girl's Diary -29,4005,1 // Santa Poring Card -29,7034,1 // Red Stocking -// Gift_Box3 -30,501,1 // Red Potion -30,502,1 // Orange Potion -30,503,1 // Yellow Potion -30,504,1 // White Potion -30,505,1 // Blue Potion -30,506,1 // Green Potion -30,526,1 // Royal Jelly -30,529,1 // Candy -30,530,1 // Candy Cane -30,537,1 // Pet Food -30,538,1 // Well-baked Cookie -30,539,1 // Piece of Cake -30,617,1 // Old Purple Box -30,644,19 // Gift Box -30,706,1 // Four Leaf Clover -30,718,1 // Garnet -30,719,1 // Amethyst -30,720,1 // Aquamarine -30,721,1 // Emerald -30,722,1 // Pearl -30,723,1 // Ruby -30,724,1 // Cursed Ruby -30,725,1 // Sardonyx -30,726,1 // Sapphire -30,727,1 // Opal -30,728,1 // Topaz -30,729,1 // Zircon -30,730,1 // 1carat Diamond -30,731,1 // 2carat Diamond -30,732,1 // 3carat Diamond -30,733,1 // Cracked Diamond -30,734,1 // Red Frame -30,735,1 // Chung Jah -30,736,1 // China -30,737,1 // Black Ladle -30,738,1 // Pencil Case -30,739,1 // Rouge -30,740,1 // Puppet -30,741,1 // Poring Doll -30,742,1 // Chonchon Doll -30,743,1 // Spore Doll -30,744,1 // Bouquet -30,745,1 // Wedding Bouquet -30,746,1 // Glass Bead -30,747,1 // Crystal Mirror -30,748,1 // Witherless Rose -30,749,1 // Frozen Rose -30,750,1 // Baphomet Doll -30,751,1 // Osiris Doll -30,752,1 // Grasshopper Doll -30,753,1 // Yoyo Doll -30,754,1 // Raccoon Doll -30,969,1 // Gold -30,975,1 // Scarlet Dyestuff -30,976,1 // Lemon Dyestuff -30,978,1 // Cobaltblue Dyestuff -30,979,1 // Darkgreen Dyestuff -30,980,1 // Orange Dyestuff -30,981,1 // Violet Dyestuff -30,982,1 // White Dyestuff -30,983,1 // Black Dyestuff -30,994,1 // Flame Heart -30,995,1 // Mystic Frozen -30,996,1 // Rough Wind -30,997,1 // Great Nature -30,999,1 // Steel -30,1000,1 // Star Crumb -30,1558,1 // Girl's Diary -30,4005,1 // Santa Poring Card -30,7034,1 // Red Stocking -// GiftBox_4 -31,501,1 // Red Potion -31,502,1 // Orange Potion -31,503,1 // Yellow Potion -31,504,1 // White Potion -31,505,1 // Blue Potion -31,506,1 // Green Potion -31,526,1 // Royal Jelly -31,529,1 // Candy -31,530,1 // Candy Cane -31,537,1 // Pet Food -31,538,1 // Well-baked Cookie -31,539,1 // Piece of Cake -31,617,1 // Old Purple Box -31,644,19 // Gift Box -31,706,1 // Four Leaf Clover -31,718,1 // Garnet -31,719,1 // Amethyst -31,720,1 // Aquamarine -31,721,1 // Emerald -31,722,1 // Pearl -31,723,1 // Ruby -31,724,1 // Cursed Ruby -31,725,1 // Sardonyx -31,726,1 // Sapphire -31,727,1 // Opal -31,728,1 // Topaz -31,729,1 // Zircon -31,730,1 // 1carat Diamond -31,731,1 // 2carat Diamond -31,732,1 // 3carat Diamond -31,733,1 // Cracked Diamond -31,734,1 // Red Frame -31,735,1 // Chung Jah -31,736,1 // China -31,737,1 // Black Ladle -31,738,1 // Pencil Case -31,739,1 // Rouge -31,740,1 // Puppet -31,741,1 // Poring Doll -31,742,1 // Chonchon Doll -31,743,1 // Spore Doll -31,744,1 // Bouquet -31,745,1 // Wedding Bouquet -31,746,1 // Glass Bead -31,747,1 // Crystal Mirror -31,748,1 // Witherless Rose -31,749,1 // Frozen Rose -31,750,1 // Baphomet Doll -31,751,1 // Osiris Doll -31,752,1 // Grasshopper Doll -31,753,1 // Yoyo Doll -31,754,1 // Raccoon Doll -31,969,1 // Gold -31,975,1 // Scarlet Dyestuff -31,976,1 // Lemon Dyestuff -31,978,1 // Cobaltblue Dyestuff -31,979,1 // Darkgreen Dyestuff -31,980,1 // Orange Dyestuff -31,981,1 // Violet Dyestuff -31,982,1 // White Dyestuff -31,983,1 // Black Dyestuff -31,994,1 // Flame Heart -31,995,1 // Mystic Frozen -31,996,1 // Rough Wind -31,997,1 // Great Nature -31,999,1 // Steel -31,1000,1 // Star Crumb -31,1558,1 // Girl's Diary -31,4005,1 // Santa Poring Card -31,7034,1 // Red Stocking -// GiftBox_China -34,501,1 // Red Potion -34,502,1 // Orange Potion -34,503,1 // Yellow Potion -34,504,1 // White Potion -34,505,1 // Blue Potion -34,506,1 // Green Potion -34,518,1 // Honey -34,520,1 // Hinalle Leaflet -34,521,2 // Aloe Leaflet -34,525,1 // Panacea -34,526,1 // Royal Jelly -34,529,1 // Candy -34,530,1 // Candy Cane -34,603,40 // Old Blue Box -34,604,9 // Dead Branch -34,605,1 // Anodyne -34,606,1 // Aloevera -34,607,1 // Yggdrasil Berry -34,608,1 // Yggdrasil Seed -34,610,1 // Yggdrasil Leaf -34,612,5 // Mini Furnace -34,613,1 // Iron Hammer -34,614,1 // Golden Hammer -34,615,1 // Oridecon Hammer -34,701,1 // Ora Ora -34,702,1 // Animal Gore -34,703,1 // Hinalle -34,704,1 // Aloe -34,706,1 // Four Leaf Clover -34,707,1 // Singing Plant -34,708,1 // Ment -34,710,1 // Illusion Flower -34,715,1 // Yellow Gemstone -34,716,1 // Red Gemstone -34,717,1 // Blue Gemstone -34,718,1 // Garnet -34,719,1 // Amethyst -34,720,1 // Aquamarine -34,721,1 // Emerald -34,722,1 // Pearl -34,723,1 // Ruby -34,724,1 // Cursed Ruby -34,725,1 // Sardonyx -34,726,1 // Sapphire -34,727,1 // Opal -34,728,1 // Topaz -34,729,1 // Zircon -34,730,1 // 1carat Diamond -34,731,1 // 2carat Diamond -34,732,1 // 3carat Diamond -34,733,1 // Cracked Diamond -34,734,1 // Red Frame -34,735,1 // Chung Jah -34,736,1 // China -34,737,1 // Black Ladle -34,738,1 // Pencil Case -34,740,1 // Puppet -34,741,1 // Poring Doll -34,742,1 // Chonchon Doll -34,743,1 // Spore Doll -34,745,1 // Wedding Bouquet -34,747,1 // Crystal Mirror -34,748,1 // Witherless Rose -34,749,1 // Frozen Rose -34,752,1 // Grasshopper Doll -34,753,1 // Yoyo Doll -34,754,1 // Raccoon Doll -34,909,1 // Jellopy -34,910,1 // Garlet -34,911,1 // Scell -34,912,1 // Zargon -34,931,1 // Orcish Voucher -34,934,1 // Memento -34,968,1 // Heroic Emblem -34,969,1 // Gold -34,971,1 // Detrimindexta -34,972,1 // Karvodailnirol -34,973,1 // Counteragent -34,974,1 // Mixture -34,975,1 // Scarlet Dyestuff -34,976,1 // Lemon Dyestuff -34,978,1 // Cobaltblue Dyestuff -34,979,1 // Darkgreen Dyestuff -34,980,1 // Orange Dyestuff -34,981,1 // Violet Dyestuff -34,982,1 // White Dyestuff -34,983,1 // Black Dyestuff -34,986,1 // Anvil -34,987,1 // Oridecon Anvil -34,988,1 // Golden Anvil -34,989,1 // Emperium Anvil -34,990,1 // Red Blood -34,991,1 // Crystal Blue -34,992,1 // Wind of Verdure -34,993,1 // Green Live -34,994,1 // Flame Heart -34,995,1 // Mystic Frozen -34,996,1 // Rough Wind -34,997,1 // Great Nature -34,998,1 // Iron -34,999,1 // Steel -34,1000,1 // Star Crumb -34,1001,1 // Star Dust -34,1002,1 // Iron Ore -34,1003,1 // Coal -34,1004,1 // Chivalry Emblem -34,1005,1 // Hammer of Blacksmith -34,1006,1 // Old Magicbook -34,1007,1 // Necklace of Wisdom -34,1008,1 // Necklace of Oblivion -34,1009,1 // Hand of God -34,1010,1 // Phracon -34,1011,1 // Emveretarcon -34,1065,1 // Trap -34,1102,1 // Sword -34,1105,1 // Falchion -34,1108,1 // Blade -34,1111,1 // Rapier -34,1114,1 // Scimitar -34,1117,1 // Katana -34,1120,1 // Tsurugi -34,1125,1 // Ring Pommel Saber -34,1127,1 // Saber -34,1128,1 // Haedonggum -34,1129,1 // Flamberge -34,1152,1 // Slayer -34,1155,1 // Bastard Sword -34,1158,1 // Two-Handed Sword -34,1162,1 // Broad Sword -34,1163,1 // Claymore -34,1202,1 // Knife -34,1205,1 // Cutter -34,1208,1 // Main Gauche -34,1211,1 // Dirk -34,1214,1 // Dagger -34,1217,1 // Stiletto -34,1220,1 // Gladius -34,1226,1 // Damascus -34,1251,1 // Jur -34,1253,1 // Katar -34,1255,1 // Jamadhar -34,1302,1 // Axe -34,1352,1 // Battle Axe -34,1355,1 // Hammer -34,1358,1 // Buster -34,1361,1 // Two-Handed Axe -34,1402,1 // Javelin -34,1405,1 // Spear -34,1408,1 // Pike -34,1410,1 // Lance -34,1452,1 // Guisarme -34,1455,1 // Glaive -34,1458,1 // Partizan -34,1461,1 // Trident -34,1464,1 // Halberd -34,1502,1 // Club -34,1505,1 // Mace -34,1508,1 // Smasher -34,1511,1 // Flail -34,1514,1 // Morning Star -34,1517,1 // Sword Mace -34,1520,1 // Chain -34,1550,1 // Book -34,1551,1 // Bible -34,1602,1 // Rod -34,1605,1 // Wand -34,1608,1 // Staff -34,1611,1 // Arc Wand -34,1613,1 // Mighty Staff -34,1702,1 // Bow -34,1705,1 // Composite Bow -34,1711,1 // Crossbow -34,1713,1 // Arbalest -34,1714,1 // Gakkung Bow -34,1718,1 // Hunter Bow -34,1719,1 // Roguemaster's Bow -34,2102,1 // Guard -34,2104,1 // Buckler -34,2106,1 // Shield -34,2108,1 // Mirror Shield -34,2207,1 // Fancy Flower -34,2209,1 // Ribbon -34,2213,1 // Kitty Band -34,2215,1 // Flower Band -34,2217,1 // Biretta -34,2221,1 // Hat -34,2223,1 // Turban -34,2225,1 // Goggles -34,2227,1 // Cap -34,2229,1 // Helm -34,2231,1 // Gemmed Sallet -34,2233,1 // Circlet -34,2236,1 // Santa Hat -34,2244,1 // Big Ribbon -34,2249,1 // Coronet -34,2250,1 // Cute Ribbon -34,2257,1 // Unicorn Horn -34,2258,1 // Spiky Band -34,2262,1 // Clown Nose -34,2263,1 // Zorro Masque -34,2265,1 // Gangster Mask -34,2269,1 // Romantic Flower -34,2270,1 // Romantic Leaf -34,2271,1 // Jack be Dandy -34,2272,1 // Stop Post -34,2273,1 // Doctor Band -34,2275,1 // Red Bandana -34,2276,1 // Angled Glasses -34,2279,1 // Bomb Wick -34,2284,1 // Antlers -34,2287,1 // Pirate Bandana -34,2289,1 // Poo Poo Hat -34,2290,1 // Funeral Hat -34,2291,1 // Masquerade -34,2293,1 // Pretend Murdered -34,2294,1 // Stellar -34,2295,1 // Blinker -34,2296,1 // Binoculars -34,2298,1 // Green Feeler -34,2299,1 // Orc Helm -34,2302,1 // Cotton Shirt -34,2304,1 // Jacket -34,2306,1 // Adventurer's Suit -34,2308,1 // Mantle -34,2310,1 // Coat -34,2311,1 // Mink Coat -34,2313,1 // Padded Armor -34,2315,1 // Chain Mail -34,2317,1 // Full Plate -34,2322,1 // Silk Robe -34,2324,1 // Scapulare -34,2326,1 // Saint's Robe -34,2329,1 // Wooden Mail -34,2331,1 // Tights -34,2333,1 // Silver Robe -34,2336,1 // Thief Clothes -34,2337,1 // Ninja Suit -34,2339,1 // Pantie -34,2402,1 // Sandals -34,2404,1 // Shoes -34,2407,1 // Crystal Pumps -34,2408,1 // Shackles -34,2409,1 // High Heels -34,2502,1 // Hood -34,2504,1 // Muffler -34,2506,1 // Manteau -34,2507,1 // Ancient Cape -34,2508,1 // Ragamuffin Manteau -34,2601,1 // Ring -34,2602,1 // Earring -34,2603,1 // Necklace -34,2604,1 // Glove -34,2605,1 // Brooch -34,2607,1 // Clip -34,2608,1 // Rosary -34,2609,1 // Skull Ring -34,2610,1 // Gold Ring -34,2611,1 // Silver Ring -34,2612,1 // Flower Ring -34,2613,1 // Diamond Ring -34,5009,1 // Safety Helmet -34,5010,1 // Indian Fillet -34,5014,1 // Fin Helm -34,5015,2 // Egg Shell -// Old Gift Box -43,5270,45 // Happy Wig -43,5271,15 // Phoenix Crown -43,5272,40 // Smiling Mask diff --git a/db/pre-re/item_group.conf b/db/pre-re/item_group.conf new file mode 100644 index 000000000..533e2f0ae --- /dev/null +++ b/db/pre-re/item_group.conf @@ -0,0 +1,3380 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +// : ( <...> "Item_Name" or ("Item_Name",Repeat_Count) ) +Old_Card_Album: ( + ("Poring_Card",8), + ("Fabre_Card",10), + ("Pupa_Card",6), + ("Drops_Card",11), + "Poring__Card", + ("Lunatic_Card",7), + ("Pecopeco_Egg_Card",4), + ("Picky_Card",10), + ("Chonchon_Card",10), + ("Wilow_Card",10), + ("Picky__Card",10), + ("Thief_Bug_Egg_Card",8), + ("Andre_Egg_Card",7), + ("Roda_Frog_Card",5), + ("Condor_Card",7), + ("Thief_Bug_Card",7), + ("Savage_Babe_Card",5), + ("Hornet_Card",5), + ("Farmiliar_Card",5), + ("Rocker_Card",5), + ("Spore_Card",5), + ("Desert_Wolf_Babe_Card",5), + ("Plankton_Card",5), + ("Skeleton_Card",5), + ("Thief_Bug_Female_Card",3), + ("Kukre_Card",3), + ("Tarou_Card",3), + ("Wolf_Card",3), + ("Mandragora_Card",3), + ("Pecopeco_Card",3), + ("Ambernite_Card",3), + ("Poporing_Card",3), + ("Worm_Tail_Card",3), + ("Hydra_Card",3), + ("Muka_Card",3), + ("Snake_Card",3), + ("Zombie_Card",3), + ("Stainer_Card",3), + ("Coco_Card",3), + ("Steel_Chonchon_Card",3), + ("Andre_Card",3), + ("Smokie_Card",3), + ("Horn_Card",3), + ("Martin_Card",3), + ("Poison_Spore_Card",3), + ("Vadon_Card",3), + ("Thief_Bug_Male_Card",3), + ("Yoyo_Card",3), + ("Elder_Wilow_Card",3), + "Vitata_Card", + ("Marina_Card",3), + ("Dustiness_Card",3), + ("Metaller_Card",2), + ("Thara_Frog_Card",2), + ("Goblin_Card",2), + ("Cornutus_Card",2), + ("Anacondaq_Card",2), + ("Caramel_Card",2), + ("Zerom_Card",2), + ("Kaho_Card",2), + ("Orc_Warrior_Card",2), + ("Megalodon_Card",2), + ("Scorpion_Card",2), + ("Drainliar_Card",2), + ("Eggyra_Card",2), + ("Orc_Zombie_Card",2), + ("Golem_Card",2), + ("Pirate_Skel_Card",2), + ("BigFoot_Card",2), + ("Argos_Card",2), + ("Magnolia_Card",2), + ("Phen_Card",2), + ("Savage_Card",2), + ("Mantis_Card",2), + ("Flora_Card",2), + ("Hode_Card",2), + "Desert_Wolf_Card", + "Rafflesia_Card", + "Marine_Sphere_Card", + "Orc_Skeleton_Card", + "Soldier_Skeleton_Card", + "Giearth_Card", + "Frilldora_Card", + "Sword_Fish_Card", + "Munak_Card", + "Kobold_Card", + "Skel_Worker_Card", + "Obeaune_Card", + "Archer_Skeleton_Card", + "Marse_Card", + "Zenorc_Card", + "Matyr_Card", + "Dokebi_Card", + "Pasana_Card", + "Sohee_Card", + "Sand_Man_Card", + "Whisper_Card", + "Horong_Card", + "Requiem_Card", + "Marc_Card", + "Mummy_Card", + "Verit_Card", + "Myst_Card", + "Jakk_Card", + "Ghoul_Card", + "Strouf_Card", + "Marduk_Card", + "Marionette_Card", + "Argiope_Card", + "Hunter_Fly_Card", + "Isis_Card", + "Side_Winder_Card", + "Petit_Card", + "Bathory_Card", + "Petit__Card", + "Deviruchi_Card", + "Deviace_Card", + "Nightmare_Card", + "Baphomet__Card", + "Daydric_Card", + "Khalitzburg_Card", + "Joker_Card", + "Evil_Druid_Card", + "Gargoyle_Card", + "Goat_Card", + "Gajomart_Card", + "Galapago_Card", + "Crab_Card", + "Rice_Cake_Boy_Card", + "Steam_Goblin_Card", + "Goblin_Archer_Card", + "Flying_Deleter_Card", + "Nine_Tail_Card", + "Antique_Firelock_Card", + "Grand_Peco_Card", + "Grizzly_Card", + "Gullinbursti_Card", + "Gig_Card", + "Nightmare_Terror_Card", + "Neraid_Card", + "Dark_Frame_Card", + "The_Paper_Card", + "Demon_Pungus_Card", + "Poison_Toad_Card", + "Dullahan_Card", + "Dryad_Card", + "Dragon_Tail_Card", + "Driller_Card", + "Disguise_Card", + "Diabolic_Card", + "Lava_Golem_Card", + "Rideword_Card", + "Raggler_Card", + "Raydric_Archer_Card", + "Leib_Olmai_Card", + "Wraith_Dead_Card", + "Wraith_Card", + "Loli_Ruri_Card", + "Rotar_Zairo_Card", + "Lude_Card", + "Rybio_Card", + "Leaf_Cat_Card", + "Marin_Card", + "Merman_Card", + "Megalith_Card", + "Majoruros_Card", + "Civil_Servant_Card", + "Mini_Demon_Card", + "Mimic_Card", + "Mystcase_Card", + "Miyabi_Ningyo_Card", + "Violy_Card", + "Bon_Gun_Card", + "Brilight_Card", + "Bloody_Murderer_Card", + "Blazzer_Card", + "Sasquatch_Card", + "Live_Peach_Tree_Card", + "Succubus_Card", + "Sageworm_Card", + "Solider_Card", + "Skeleton_General_Card", + "Skel_Prisoner_Card", + "Stalactic_Golem_Card", + "Stem_Worm_Card", + "Stone_Shooter_Card", + "Sting_Card", + "Spring_Rabbit_Card", + "Sleeper_Card", + "Shinobi_Card", + "Increase_Soil_Card", + "Wild_Ginseng_Card", + "Baby_Leopard_Card", + "Anolian_Card", + "Cookie_XMAS_Card", + "Owl_Duke_Card", + "Owl_Baron_Card", + "Iron_Fist_Card", + "Arclouse_Card", + "Apocalips_Card", + "Alarm_Card", + "Am_Mut_Card", + "Assulter_Card", + "Aster_Card", + "Ancient_Mummy_Card", + "Ancient_Worm_Card", + "Elder_Card", + "Alligator_Card", + "Alice_Card", + "Orc_Lady_Card", + "Orc_Archer_Card", + "Wild_Rose_Card", + "Wicked_Nymph_Card", + "Wooden_Golem_Card", + "Wootan_Shooter_Card", + "Wootan_Fighter_Card", + "Evil_Cloud_Hermit_Card", + "Wind_Ghost_Card", + "Li_Me_Mang_Ryang_Card", + "Explosion_Card", + "Injustice_Card", + "Incubus_Card", + "Giant_Spider_Card", + "Giant_Honet_Card", + "Dancing_Dragon_Card", + "Shellfish_Card", + "Zombie_Master_Card", + "Zombie_Prisoner_Card", + "Zherlthsh_Card", + "Gibbet_Card", + "Deleter_Card", + "Geographer_Card", + "Zipper_Bear_Card", + "Tengu_Card", + "Greatest_General_Card", + "Chepet_Card", + "Choco_Card", + "Karakasa_Card", + "Kapha_Card", + "Carat_Card", + "Caterpillar_Card", + "Cat_O_Nine_Tail_Card", + "Kobold_Archer_Card", + "Cookie_Card", + "Quve_Card", + "Kraben_Card", + "Cramp_Card", + "Cruiser_Card", + "Cremy_Fear_Card", + "Clock_Card", + "Chimera_Card", + "Killer_Mantis_Card", + "Tamruan_Card", + "C_Tower_Manager_Card", + "Kind_Of_Beetle_Card", + "Tri_Joint_Card", + "Parasite_Card", + "Panzer_Goblin_Card", + "Permeter_Card", + "Fur_Seal_Card", + "Punk_Card", + "Penomena_Card", + "Pest_Card", + "Fake_Angel_Card", + "Freezer_Card", + "Hylozoist_Card", + "High_Orc_Card", + "Garm_Baby_Card", + "Harpy_Card", + "See_Otter_Card", + "Blood_Butterfly_Card", + "Hyegun_Card", + "Phendark_Card", + "Heater_Card", + "Agav_Card", + "Echio_Card", + "Vanberk_Card", + "Isilla_Card", + "Hodremlin_Card", + "Seeker_Card", + ("Snowier_Card",2), + "Siroma_Card", + "Ice_Titan_Card", + "Gazeti_Card", + "Muscipular_Card", + ("Drosera_Card",2), + "Roween_Card", + "Galion_Card", + ("Stapo_Card",3), + "Byorgue_Card", + "Sword_Guardian_Card", + "Bow_Guardian_Card", + "Salamander_Card", + "Kasa_Card", + ("Magmaring_Card",2), + "Imp_Card", + "Knocker_Card", + "Zombie_Slaughter_Card", + ("Ragged_Zombie_Card",2), + ("Hell_Poodle_Card",2), + ("Banshee_Card",2), + "Flame_Skull_Card", + "Necromancer_Card" +) +Gift_Box: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_1: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_2: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_3: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_4: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Old_Blue_Box: ( + ("Guard_",3), + ("Buckler",3), + ("Buckler_",3), + ("Shield",3), + ("Shield_",3), + ("Mirror_Shield",3), + ("Mirror_Shield_",3), + ("Memorize_Book",3), + ("Novice_Guard",3), + ("Cotton_Shirt",3), + ("Cotton_Shirt_",3), + ("Leather_Jacket",3), + ("Leather_Jacket_",3), + ("Adventure_Suit",3), + ("Adventurere's_Suit_",3), + ("Mantle",3), + ("Mantle_",3), + ("Coat",3), + ("Coat_",3), + ("Mink_Coat",3), + ("Padded_Armor",3), + ("Padded_Armor_",3), + ("Chain_Mail",3), + ("Chain_Mail_",3), + ("Plate_Armor",3), + ("Plate_Armor_",3), + ("Clothes_Of_The_Lord",3), + ("Formal_Suit",3), + ("Silk_Robe",3), + ("Silk_Robe_",3), + ("Scapulare",3), + ("Scapulare_",3), + ("Saint_Robe",3), + ("Saint_Robe_",3), + ("Wooden_Mail",3), + ("Wooden_Mail_",3), + ("Tights",3), + ("Tights_",3), + ("Silver_Robe",3), + ("Silver_Robe_",3), + ("Thief_Clothes",3), + ("Thief_Clothes_",3), + ("Ninja_Suit",3), + ("Wedding_Dress",3), + ("G_Strings",3), + ("Novice_Breast",3), + ("Full_Plate_Armor",3), + ("Novice_Plate",3), + ("Sandals",3), + ("Sandals_",3), + ("Shoes",3), + ("Shoes_",3), + ("Boots",3), + ("Boots_",3), + ("Chrystal_Pumps",3), + ("Cuffs",3), + ("Spiky_Heel",3), + ("Grave",3), + ("Novice_Boots",3), + ("Hood",3), + ("Hood_",3), + ("Muffler",3), + ("Muffler_",3), + ("Manteau",3), + ("Manteau_",3), + ("Cape_Of_Ancient_Lord",3), + ("Ragamuffin_Cape",3), + ("Novice_Hood",3), + ("Ring",3), + ("Earring",3), + ("Necklace",3), + ("Glove",3), + ("Brooch",3), + ("Clip",3), + ("Rosary",3), + ("Skul_Ring",3), + ("Gold_Ring",3), + ("Silver_Ring",3), + ("Flower_Ring",3), + ("Diamond_Ring",3), + ("Mitten_Of_Presbyter",3), + ("Matyr's_Flea_Guard",3), + ("Belt",3), + ("Novice_Armlet",3), + ("Katana",3), + ("Katana_",3), + ("Slayer",3), + ("Slayer_",3), + ("Bastard_Sword",3), + ("Bastard_Sword_",3), + ("Two_Hand_Sword",3), + ("Two_Hand_Sword_",3), + ("Broad_Sword",3), + ("Broad_Sword_",3), + ("Claymore",3), + ("Jur",3), + ("Jur_",3), + ("Katar",3), + ("Katar_",3), + ("Jamadhar",3), + ("Jamadhar_",3), + ("Katar_Of_Cold_Icicle",3), + ("Katar_Of_Thornbush",3), + ("Katar_Of_Raging_Blaze",3), + ("Katar_Of_Piercing_Wind",3), + ("Battle_Axe",3), + ("Battle_Axe_",3), + ("Hammer",3), + ("Hammer_",3), + ("Buster",3), + ("Buster_",3), + ("Two_Handed_Axe",3), + ("Two_Handed_Axe_",3), + ("Lance",3), + ("Lance_",3), + ("Guisarme",3), + ("Guisarme_",3), + ("Glaive",3), + ("Glaive_",3), + ("Partizan",3), + ("Partizan_",3), + ("Trident",3), + ("Trident_",3), + ("Halberd",3), + ("Halberd_",3), + ("Staff_Of_Soul",3), + ("Bow",3), + ("Bow_",3), + ("Composite_Bow",3), + ("Composite_Bow_",3), + ("Great_Bow",3), + ("Great_Bow_",3), + ("CrossBow",3), + ("CrossBow_",3), + ("Arbalest",3), + ("Kakkung",3), + ("Arbalest_",3), + ("Kakkung_",3), + ("Hunter_Bow",3), + ("Sword",6), + ("Sword_",6), + ("Falchion",6), + ("Falchion_",6), + ("Blade",6), + ("Blade_",6), + ("Lapier",6), + ("Lapier_",6), + ("Scimiter",6), + ("Scimiter_",6), + ("Tsurugi",6), + ("Tsurugi_",6), + ("Ring_Pommel_Saber",6), + ("Haedonggum",6), + ("Orcish_Sword",6), + ("Ring_Pommel_Saber_",6), + ("Saber",6), + ("Saber_",6), + ("Hae_Dong_Gum_",6), + ("Flamberge",6), + ("Knife",3), + ("Knife_",3), + ("Cutter",3), + ("Cutter_",3), + ("Main_Gauche",3), + ("Main_Gauche_",3), + ("Dirk",3), + ("Dirk_",3), + ("Dagger",3), + ("Dagger_",3), + ("Stiletto",3), + ("Stiletto_",3), + ("Gladius",3), + ("Gladius_",3), + ("Damascus",3), + ("Damascus_",3), + ("Novice_Knife",3), + ("Axe",3), + ("Axe_",3), + ("Orcish_Axe",3), + ("Javelin",9), + ("Javelin_",9), + ("Spear",9), + ("Spear_",9), + ("Pike",9), + ("Pike_",9), + ("Club",6), + ("Club_",6), + ("Mace",6), + ("Mace_",6), + ("Smasher",6), + ("Smasher_",6), + ("Flail",6), + ("Flail_",6), + ("Morning_Star",6), + ("Morning_Star_",6), + ("Sword_Mace",6), + ("Sword_Mace_",6), + ("Chain",6), + ("Chain_",6), + ("Stunner",6), + ("Book",3), + ("Bible",3), + ("Tablet",3), + ("Book_Of_Billows",3), + ("Book_Of_Mother_Earth",3), + ("Book_Of_Blazing_Sun",3), + ("Book_Of_Gust_Of_Wind",3), + ("Girl's_Diary",3), + ("Rod",3), + ("Rod_",3), + ("Wand",3), + ("Wand_",3), + ("Staff",3), + ("Staff_",3), + ("Arc_Wand",3), + ("Arc_Wand_",3), + ("Mighty_Staff",3), + ("Blessed_Wand",3), + ("Bone_Wand",3), + ("Waghnakh",3), + ("Waghnakh_",3), + ("Knuckle_Duster",3), + ("Knuckle_Duster_",3), + ("Hora",3), + ("Hora_",3), + ("Fist",3), + ("Fist_",3), + ("Claw",3), + ("Claw_",3), + ("Finger",3), + ("Finger_",3), + ("Violin",3), + ("Violin_",3), + ("Mandolin",3), + ("Mandolin_",3), + ("Lute",3), + ("Lute_",3), + ("Guitar",3), + ("Guitar_",3), + ("Harp",3), + ("Harp_",3), + ("Guh_Moon_Goh",3), + ("Guh_Moon_Goh_",3), + ("Rope",3), + ("Rope_",3), + ("Line",3), + ("Line_",3), + ("Wire",3), + ("Wire_",3), + ("Rante",3), + ("Rante_",3), + ("Tail",3), + ("Tail_",3), + ("Whip",3), + ("Whip_",3), + ("Sunglasses",3), + ("Glasses",3), + ("Diver's_Goggles",3), + ("Wedding_Veil",3), + ("Fancy_Flower",3), + ("Ribbon",3), + ("Ribbon_",3), + ("Hair_Band",3), + ("Bandana",3), + ("Eye_Bandage",3), + ("Cat_Hairband",3), + ("Bunny_Band",3), + ("Flower_Hairband",3), + ("Biretta",3), + ("Biretta_",3), + ("Flu_Mask",3), + ("Hat",3), + ("Hat_",3), + ("Turban",3), + ("Turban_",3), + ("Cap",3), + ("Cap_",3), + ("Helm",3), + ("Helm_",3), + ("Gemmed_Sallet",3), + ("Gemmed_Sallet_",3), + ("Circlet",3), + ("Circlet_",3), + ("Santa's_Hat",3), + ("One_Eyed_Glass",3), + ("Granpa_Beard",3), + ("Luxury_Sunglasses",3), + ("Spinning_Eyes",3), + ("Big_Sis'_Ribbon",3), + ("Sweet_Gents",3), + ("Golden_Gear",3), + ("Oldman's_Romance",3), + ("Western_Grace",3), + ("Fillet",3), + ("Holy_Bonnet",3), + ("Star_Sparkling",3), + ("Sunflower",3), + ("Snowy_Horn",3), + ("Mini_Propeller",3), + ("Mini_Glasses",3), + ("Pierrot_Nose",3), + ("Gangster_Patch",3), + ("Ganster_Mask",3), + ("Iron_Cane",3), + ("Cigar",3), + ("Smoking_Pipe",3), + ("Centimental_Flower",3), + ("Centimental_Leaf",3), + ("Jack_A_Dandy",3), + ("Red_Bandana",3), + ("Eagle_Eyes",3), + ("Nurse_Cap",3), + ("Bomb_Wick",3), + ("Spirit_Chain",3), + ("Apple_Of_Archer",3), + ("Pirate_Bandana",3), + ("Poo_Poo_Hat",3), + ("Funeral_Costume",3), + ("Masquerade",3), + ("Star_Dust",3), + ("Blinker",3), + ("Green_Feeler",3), + ("Viking_Helm",3), + ("Joker_Jester",3), + ("Machoman_Glasses",3), + ("Puppy_Love",3), + ("Safety_Helmet",3), + ("Indian_Hair_Piece",3), + ("Antenna",3), + ("Fin_Helm",3), + ("Egg_Shell",3), + ("Panda_Cap",3), + ("Poring_Hat",3), + ("Fruit_Shell",3), + ("Novice_Egg_Cap",3), + ("Mr_Smile",3), + ("Mr_Scream",3), + ("Goblini_Mask",3), + ("Gas_Mask",3), + ("Goblin_Mask_02",3), + ("Goblin_Mask_03",3), + ("Goblin_Mask_04",3), + ("Goggle",3), + ("Goggle_",3), + ("Skull_Helm",3), + ("Monster_Oxygen_Mask",3), + ("Transparent_Headgear",3), + ("Pacifier",3), + ("Wig",3), + ("Queen's_Hair_Ornament",3), + ("Silk_Ribbon",3), + ("Punisher",3), + ("Wild_Flower",3), + ("Battered_Pot",3), + ("Stellar_Hairpin",3), + ("Tiny_Egg_Shell",3), + ("Backpack",3), + ("Rocker_Glasses",3), + ("Green_Lace",3), + ("Golden_Bell",3), + ("Bark_Shorts",3), + ("Monkey_Circlet",3), + ("Red_Muffler",3), + ("Sword_Of_Grave_Keeper",3), + ("Ora_Ora",12), + ("Animal_Blood",12), + ("Hinalle",12), + ("Aloe",12), + ("Clover",12), + ("Four_Leaf_Clover",12), + ("Singing_Plant",12), + ("Ment",12), + ("Illusion_Flower",12), + ("Shoot",12), + ("Flower",12), + ("Emperium",12), + ("Yellow_Gemstone",12), + ("Red_Gemstone",12), + ("Blue_Gemstone",12), + ("Dark_Red_Jewel",12), + ("Violet_Jewel",12), + ("Skyblue_Jewel",12), + ("Azure_Jewel",12), + ("Scarlet_Jewel",12), + ("Cardinal_Jewel",12), + ("Cardinal_Jewel_",12), + ("Red_Jewel",12), + ("Blue_Jewel",12), + ("White_Jewel",12), + ("Golden_Jewel",12), + ("Bluish_Green_Jewel",12), + ("Crystal_Jewel",12), + ("Crystal_Jewel_",12), + ("Crystal_Jewel__",12), + ("Crystal_Jewel___",12), + ("Red_Frame",12), + ("Blue_Porcelain",12), + ("White_Platter",12), + ("Black_Ladle",12), + ("Pencil_Case",12), + ("Rouge",12), + ("Stuffed_Doll",12), + ("Poring_Doll",12), + ("Chonchon_Doll",12), + ("Spore_Doll",12), + ("Bunch_Of_Flowers",12), + ("Wedding_Bouquet",12), + ("Glass_Bead",12), + ("Crystal_Mirror",12), + ("Witherless_Rose",12), + ("Frozen_Rose",12), + ("Baphomet_Doll",12), + ("Osiris_Doll",12), + ("Grasshopper_Doll",12), + ("Monkey_Doll",12), + ("Raccoondog_Doll",12), + ("Oridecon_Stone",12), + ("Elunium_Stone",12), + ("Danggie",12), + ("Tree_Root",12), + ("Reptile_Tongue",12), + ("Scorpion's_Tail",12), + ("Stem",12), + ("Pointed_Scale",12), + ("Resin",12), + ("Spawn",12), + ("Jellopy",12), + ("Garlet",12), + ("Scell",12), + ("Zargon",12), + ("Tooth_Of_Bat",12), + ("Fluff",12), + ("Chrysalis",12), + ("Feather_Of_Birds",12), + ("Talon",12), + ("Sticky_Webfoot",12), + ("Animal's_Skin",12), + ("Claw_Of_Wolves",12), + ("Mushroom_Spore",12), + ("Orcish_Cuspid",12), + ("Evil_Horn",12), + ("Powder_Of_Butterfly",12), + ("Bill_Of_Birds",12), + ("Scale_Of_Snakes",12), + ("Insect_Feeler",12), + ("Immortal_Heart",12), + ("Rotten_Bandage",12), + ("Orcish_Voucher",12), + ("Skel_Bone",12), + ("Mementos",12), + ("Shell",12), + ("Scales_Shell",12), + ("Posionous_Canine",12), + ("Sticky_Mucus",12), + ("Bee_Sting",12), + ("Grasshopper's_Leg",12), + ("Nose_Ring",12), + ("Yoyo_Tail",12), + ("Solid_Shell",12), + ("Horseshoe",12), + ("Raccoon_Leaf",12), + ("Snail's_Shell",12), + ("Horn",12), + ("Bear's_Foot",12), + ("Feather",12), + ("Heart_Of_Mermaid",12), + ("Fin",12), + ("Cactus_Needle",12), + ("Stone_Heart",12), + ("Shining_Scales",12), + ("Worm_Peelings",12), + ("Gill",12), + ("Decayed_Nail",12), + ("Horrendous_Mouth",12), + ("Rotten_Scale",12), + ("Nipper",12), + ("Conch",12), + ("Tentacle",12), + ("Sharp_Scale",12), + ("Crap_Shell",12), + ("Clam_Shell",12), + ("Flesh_Of_Clam",12), + ("Turtle_Shell",12), + ("Voucher_Of_Orcish_Hero",12), + ("Gold",12), + ("Alchol",12), + ("Detrimindexta",12), + ("Karvodailnirol",12), + ("Counteragent",12), + ("Mixture",12), + ("Scarlet_Dyestuffs",12), + ("Lemon_Dyestuffs",12), + ("Cobaltblue_Dyestuffs",12), + ("Darkgreen_Dyestuffs",12), + ("Orange_Dyestuffs",12), + ("Violet_Dyestuffs",12), + ("White_Dyestuffs",12), + ("Black_Dyestuffs",12), + ("Oridecon",12), + ("Elunium",12), + ("Anvil",12), + ("Oridecon_Anvil",12), + ("Golden_Anvil",12), + ("Emperium_Anvil",12), + ("Boody_Red",12), + ("Crystal_Blue",12), + ("Wind_Of_Verdure",12), + ("Yellow_Live",12), + ("Flame_Heart",12), + ("Mistic_Frozen",12), + ("Rough_Wind",12), + ("Great_Nature",12), + ("Iron",12), + ("Steel",12), + ("Star_Crumb",12), + ("Sparkling_Dust",12), + ("Iron_Ore",12), + ("Coal",12), + ("Patriotism_Marks",12), + ("Hammer_Of_Blacksmith",12), + ("Old_Magic_Book",12), + ("Penetration",12), + ("Frozen_Heart",12), + ("Sacred_Marks",12), + ("Phracon",12), + ("Emveretarcon",12), + ("Lizard_Scruff",12), + ("Colorful_Shell",12), + ("Jaws_Of_Ant",12), + ("Thin_N'_Long_Tongue",12), + ("Rat_Tail",12), + ("Moustache_Of_Mole",12), + ("Nail_Of_Mole",12), + ("Wooden_Block",12), + ("Long_Hair",12), + ("Dokkaebi_Horn",12), + ("Fox_Tail",12), + ("Fish_Tail",12), + ("Chinese_Ink",12), + ("Spiderweb",12), + ("Acorn",12), + ("Porcupine_Spike",12), + ("Wild_Boar's_Mane",12), + ("Tiger's_Skin",12), + ("Tiger_Footskin",12), + ("Limb_Of_Mantis",12), + ("Blossom_Of_Maneater",12), + ("Root_Of_Maneater",12), + ("Cobold_Hair",12), + ("Dragon_Canine",12), + ("Dragon_Scale",12), + ("Dragon_Train",12), + ("Petite_DiablOfs_Horn",12), + ("Petite_DiablOfs_Wing",12), + ("Elder_Pixie's_Beard",12), + ("Lantern",12), + ("Short_Leg",12), + ("Nail_Of_Orc",12), + ("Tooth_Of_",12), + ("Sacred_Masque",12), + ("Tweezer",12), + ("Head_Of_Medusa",12), + ("Slender_Snake",12), + ("Skirt_Of_Virgin",12), + ("Tendon",12), + ("Detonator",12), + ("Single_Cell",12), + ("Tooth_Of_Ancient_Fish",12), + ("Lip_Of_Ancient_Fish",12), + ("Earthworm_Peeling",12), + ("Grit",12), + ("Moth_Dust",12), + ("Wing_Of_Moth",12), + ("Transparent_Cloth",12), + ("Golden_Hair",12), + ("Starsand_Of_Witch",12), + ("Pumpkin_Head",12), + ("Sharpened_Cuspid",12), + ("Reins",12), + ("Booby_Trap",12), + ("Tree_Of_Archer_1",12), + ("Tree_Of_Archer_2",12), + ("Tree_Of_Archer_3",12), + ("Morocc_Potion",12), + ("Payon_Potion",12), + ("Empty_Cylinder",12), + ("Empty_Potion",12), + ("Short_Daenggie",12), + ("Needle_Of_Alarm",12), + ("Round_Shell",12), + ("Worn_Out_Page",12), + ("Manacles",12), + ("Worn_Out_Prison_Uniform",12), + ("Mould_Powder",12), + ("Ogre_Tooth",12), + ("Anolian_Skin",12), + ("Mud_Lump",12), + ("Skull",12), + ("Wing_Of_Red_Bat",12), + ("Claw_Of_Rat",12), + ("Stiff_Horn",12), + ("Glitter_Shell",12), + ("Tail_Of_Steel_Scorpion",12), + ("Claw_Of_Monkey",12), + ("Tough_Scalelike_Stem",12), + ("Coral_Reef",12), + ("Old_Portrait",12), + ("Bookclip_In_Memory",12), + ("Spoon_Stub",12), + ("Key_Of_Clock_Tower",12), + ("Underground_Key",12), + ("Claw_Of_Desert_Wolf",12), + ("Old_Frying_Pan",12), + ("Piece_Of_Egg_Shell",12), + ("Poison_Spore",12), + ("Red_Socks_With_Holes",12), + ("Matchstick",12), + ("Fang_Of_Garm",12), + ("Yarn",12), + ("Fine_Grit",12), + ("Alice's_Apron",12), + ("Talon_Of_Griffin",12), + ("Stone",12), + ("Cyfar",12), + ("Brigan",12), + ("Cargo_Free_Ticket",12), + ("Warp_Free_Ticket",12), + ("Cart_Free_Ticket",12), + ("Soft_Feather",12), + ("Dragon_Fly_Wing",12), + ("Sea_Otter_Leather",12), + ("Ice_Piece",12), + ("Stone_Piece",12), + ("Burn_Tree",12), + ("Broken_Armor_Piece",12), + ("Broken_Shell",12), + ("Tatters_Clothes",12), + ("Rust_Suriken",12), + ("Wheel",12), + ("Mystery_Piece",12), + ("Broken_Steel_Piece",12), + ("Cold_Magma",12), + ("Burning_Heart",12), + ("Live_Coal",12), + ("Old_Magic_Circle",12), + ("Sharp_Leaf",12), + ("Peco_Wing_Feather",12), + ("Goat's_Horn",12), + ("Gaoat's_Skin",12), + ("Boroken_Shiled_Piece",12), + ("Shine_Spear_Blade",12), + ("Vroken_Sword",12), + ("Smooth_Paper",12), + ("Fright_Paper_Blade",12), + ("Broken_Pharaoh_Symbol",12), + ("Tutankhamen's_Mask",12), + ("Harpy's_Feather",12), + ("Harpy's_Claw",12), + ("Rent_Spell_Book",12), + ("Rent_Scroll",12), + ("Spawns",12), + ("Burning_Horse_Shoe",12), + ("Honey_Jar",12), + ("Hot_Hair",12), + ("Dragon's_Skin",12), + ("Sand_Lump",12), + ("Scropion's_Nipper",12), + ("Large_Jellopy",12), + ("Medicine_Bowl",12), + ("Fire_Bottle",12), + ("Acid_Bottle",12), + ("MenEater_Plant_Bottle",12), + ("Mini_Bottle",12), + ("Coating_Bottle",12), + ("Yellow_Plate",12), + ("Bamboo_Cut",12), + ("Oil_Paper",12), + ("Glossy_Hair",12), + ("Old_Japaness_Clothes",12), + ("Poison_Powder",12), + ("Poison_Toad's_Skin",12), + ("Broken_Shuriken",12), + ("Black_Mask",12), + ("Broken_Wine_Vessel",12), + ("Tengu's_Nose",12), + ("Black_Bear's_Skin",12), + ("Cloud_Piece",12), + ("Sharp_Feeler",12), + ("Hard_Peach",12), + ("Limpid_Celestial_Robe",12), + ("Soft_Silk_Cloth",12), + ("Mystery_Iron_Bit",12), + ("Great_Wing",12), + ("Taegeuk_Plate",12), + ("Tuxedo",12), + ("Leopard_Skin",12), + ("Leopard_Talon",12), + ("Packing_Ribbon",12), + ("Packing_Paper",12), + ("Cacao",12), + ("Thin_Stem",12), + ("Festival_Mask",12), + ("Browny_Root",12), + ("Heart_Of_Tree",12), + ("Solid_Peeling",12), + ("Lamplight",12), + ("Blade_Of_Pinwheel",12), + ("Germinating_Sprout",12), + ("Soft_Leaf",12), + ("Air_Rifle",12), + ("Shoulder_Protection",12), + ("Tough_Vines",12), + ("Great_Leaf",12), + ("Flexible_String",12), + ("Log",12), + ("Beetle_Nipper",12), + ("Solid_Twig",12), + ("Piece_Of_Black_Cloth",12), + ("Black_Kitty_Doll",12), + ("Old_Manteau",12), + ("Rusty_Cleaver",12), + ("Dullahan's_Helm",12), + ("Dullahan_Armor",12), + ("Rojerta_Piece",12), + ("Hanging_Doll",12), + ("Needle_Pouch",12), + ("Bat_Cage",12), + ("Broken_Needle",12), + ("Red_Scarf",12), + ("Spool",12), + ("Rotten_Rope",12), + ("Striped_Socks",12), + ("Ectoplasm",12), + ("Tangled_Chain",12), + ("Tree_Knot",12), + ("Distorted_Portrait",12), + ("Pumpkin_Bucket",12), + ("Fan",12), + ("Cat_Eyed_Stone",12), + ("Dried_Sand",12), + ("Dragon_Horn",12), + ("Dragon_Fang",12), + ("Tiger_Skin_Panties",12), + ("Little_Blacky_Ghost",12), + ("Bib",12), + ("Milk_Bottle",12), + ("Arrow",12), + ("Silver_Arrow",12), + ("Fire_Arrow",12), + ("Steel_Arrow",12), + ("Crystal_Arrow",12), + ("Arrow_Of_Wind",12), + ("Stone_Arrow",12), + ("Immatrial_Arrow",12), + ("Stun_Arrow",12), + ("Freezing_Arrow",12), + ("Flash_Arrow",12), + ("Curse_Arrow",12), + ("Rusty_Arrow",12), + ("Poison_Arrow",12), + ("Incisive_Arrow",12), + ("Oridecon_Arrow",12), + ("Arrow_Of_Shadow",12), + ("Sleep_Arrow",12), + ("Silence_Arrow",12), + ("Iron_Arrow",12), + ("Red_Potion",12), + ("Orange_Potion",12), + ("Yellow_Potion",12), + ("Green_Potion",11), + ("Red_Herb",12), + ("Yellow_Herb",12), + ("White_Herb",12), + ("Blue_Herb",12), + ("Green_Herb",12), + ("Apple",12), + ("Banana",12), + ("Grape",12), + ("Carrot",12), + ("Sweet_Potato",12), + ("Meat",12), + ("Honey",12), + ("Milk",12), + ("Leaflet_Of_Hinal",12), + ("Leaflet_Of_Aloe",12), + ("Fruit_Of_Mastela",12), + ("Holy_Water",12), + ("Panacea",12), + ("Monster's_Feed",12), + ("Candy",12), + ("Candy_Striper",12), + ("Apple_Juice",12), + ("Banana_Juice",12), + ("Grape_Juice",12), + ("Carrot_Juice",12), + ("Pumpkin",12), + ("Ice_Cream",12), + ("Pet_Food",12), + ("Well_Baked_Cookie",12), + ("Piece_Of_Cake",12), + ("Fish_Slice",12), + ("Red_Slim_Potion",12), + ("Yellow_Slim_Potion",12), + ("White_Slim_Potion",12), + ("Cheese",12), + ("Nice_Sweet_Potato",12), + ("Popped_Rice",12), + ("Shusi",12), + ("Bun",12), + ("Rice_Cake",12), + ("Chocolate",12), + ("White_Chocolate",12), + "Wing_Of_Butterfly", + ("Old_Blue_Box",1173), + ("Anodyne",12), + ("Aloebera",12), + ("Yggdrasilberry",12), + ("Seed_Of_Yggdrasil",12), + ("Amulet",12), + ("Leaf_Of_Yggdrasil",12), + ("Spectacles",12), + ("Portable_Furnace",12), + ("Iron_Hammer",12), + ("Golden_Hammer",12), + ("Oridecon_Hammer",12), + ("Worn_Out_Scroll",12), + ("Unripe_Apple",12), + ("Orange_Juice",12), + ("Bitter_Herb",12), + ("Rainbow_Carrot",12), + ("Earthworm_The_Dude",12), + ("Rotten_Fish",12), + ("Lusty_Iron",12), + ("Monster_Juice",12), + ("Sweet_Milk",12), + ("Well_Dried_Bone",12), + ("Singing_Flower",12), + ("Dew_Laden_Moss",12), + ("Deadly_Noxious_Herb",12), + ("Fatty_Chubby_Earthworm",12), + ("Baked_Yam",12), + ("Tropical_Banana",12), + ("Horror_Of_Tribe",12), + ("No_Recipient",12), + ("Old_Broom",12), + ("Silver_Knife_Of_Chaste",12), + ("Armlet_Of_Obedience",12), + ("Shining_Stone",12), + ("Contracts_In_Shadow",12), + ("Book_Of_Devil",12), + ("Pet_Incubator",12), + ("Gift_Box",312), + ("Center_Potion",12), + ("Awakening_Potion",12), + ("Berserk_Potion",12), + ("Heart_Of_Her",12), + ("Korea_Rice_Cake",12), + ("Gift_Box_1",12), + ("Gift_Box_2",12), + ("Gift_Box_3",12), + ("Gift_Box_4",12), + ("Handsei",12), + ("Poison_Bottle",12), + ("Gold_Pill",12), + ("Guard",2), + "Coronet", + "Angelic_Chain", + "Satanic_Chain", + "Sharp_Gear", + "Ring_", + "Earring_", + "Necklace_", + "Glove_", + "Brooch_", + "Rosary_", + "Gemmed_Crown", + "Pair_Of_Red_Ribbon", + "Cinquedea", + "Kindling_Dagger", + "Obsidian_Dagger", + "Fisherman's_Dagger", + "Jujube_Dagger", + "Dragon_Killer", + "Ginnungagap", + "Town_Sword", + "Town_Sword_", + "Star_Dust_Blade", + "Gae_Bolg", + ("Various_Jur",2), + "Nail_Of_Loki", + "Bloody_Roar", + "Unholy_Touch", + "Hypnotist's_Staff", + "Hypnotist's_Staff_", + "Staff_Of_Wing", + "Luna_Bow", + "Dragon_Wing", + "Electric_Wire", + "Whip_Of_Red_Flame", + "Whip_Of_Ice_Piece", + "Whip_Of_Earth", + "Jump_Rope", + "Bladed_Whip", + "Guitar_Of_Passion", + "Guitar_Of_Blue_Solo", + "Guitar_Of_Vast_Land", + "Guitar_Of_Gentle_Breeze", + "Claw_Of_Garm", + "Legacy_Of_Dragon", + "Coward", + "Coward_", + "Windhawk", + "Queen's_Whip", + "Oriental_Lute", + "Diary_Of_Great_Sage", + "Hardback", + "Survival_Rod", + "Survival_Rod_", + "Survival_Rod2", + "Survival_Rod2_", + "Ear_Of_Puppy", + "Angry_Mouth", + "Novice_Shield", + "Novice_Manteau", + "Celestial_Robe", + "Pauldron", + "Novice_Shoes", + "Fedora", + "Fedora_", + "Super_Novice_Hat", + "Super_Novice_Hat_", + "Galapago_Cap", + "Banana_Hat", + "Wing_Of_Eagle", + "Cursed_Lucky_Brooch", + "Shinobi's_Sash", + "Hyper_Changer", + "Dark_Crystal_Fragment", + "Long_Limb", + "Screw", + "Old_Pick", + "Old_Steel_Plate", + "Air_Pollutant", + "Fragment_Of_Crystal", + "Poisonous_Gas", + "Battered_Kettle", + "Tube", + "Fluorescent_Liquid", + "Headlamp", + "Red_Feather", + "Blue_Feather", + "Cursed_Seal", + "Tri_Headed_Dragon_Head", + "Treasure_Box", + "Dragonball_Green", + "Dragonball_Blue", + "Dragonball_Red", + "Dragonball_Yellow", + "Bloody_Page", + "Piece_Of_Bone_Armor", + "Scale_Of_Red_Dragon", + "Yellow_Spice", + "Sweet_Sauce", + "Plain_Sauce", + "Hot_Sauce", + "Red_Spice", + "Cooking_Oil", + "Cookbook01", + "Cookbook02", + "Cookbook03", + "Cookbook04", + "Cookbook05", + "Pot", + "Burnt_Parts", + "Pocket_Watch", + ("Ice_Heart",21), + ("Ice_Scale",22), + ("Bloody_Rune",22), + ("Rotten_Meat",22), + ("Sticky_Poison",22), + "Suspicious_Hat", + "White_Mask", + ("Old_White_Cloth",33), + ("Clattering_Skull",32), + ("Broken_Farming_Utensil",34), + "Orleans_Server", + "Thorny_Buckler", + "Orleans_Gown", + "Strong_Shield", + "Angel's_Arrival", + "Magni_Cap", + "Censor_Bar", + "Inverse_Scale", + "Blood_Tears", + "Doom_Slayer", + "Heart_Breaker", + "Hurricane_Fury", + "Ahlspiess", + "Huuma_Calm_Mind", + "Burning_Bow", + "Frozen_Bow", + "Earth_Bow", + "Gust_Bow", + "Magma_Fist", + "Icicle_Fist", + "Electric_Fist", + "Seismic_Fist", + "Combo_Battle_Glove", + "Base_Guitar", + "Electric_Eel", + "Sea_Witch_Foot", + "Carrot_Whip", + "Bullet", + "Silver_Bullet", + "Shell_Of_Blood", + "Flare_Sphere", + "Lighting_Sphere", + "Poison_Sphere", + "Blind_Sphere", + "Freezing_Sphere", + "Gate_KeeperDD", + "Thunder_P", + "Long_Barrel", + ("Lever_Action_Rifle",2), + "Long_Barrel_" +) +Old_Violet_Box: ( + ("Buckler_",7), + ("Shield_",7), + ("Mirror_Shield_",7), + ("Memorize_Book",7), + ("Novice_Guard",7), + ("Cotton_Shirt_",7), + ("Leather_Jacket_",7), + ("Adventurere's_Suit_",7), + ("Mantle_",7), + ("Coat_",7), + ("Mink_Coat",7), + ("Padded_Armor_",7), + ("Chain_Mail_",7), + ("Plate_Armor_",7), + ("Clothes_Of_The_Lord",7), + ("Formal_Suit",7), + ("Silk_Robe_",7), + ("Scapulare_",7), + ("Saint_Robe_",7), + ("Wooden_Mail_",7), + ("Tights_",7), + ("Silver_Robe_",7), + ("Thief_Clothes_",7), + ("Ninja_Suit",7), + ("Wedding_Dress",7), + ("G_Strings",7), + ("Novice_Breast",7), + ("Novice_Plate",7), + ("Sandals_",7), + ("Shoes_",7), + ("Boots_",7), + ("Chrystal_Pumps",7), + ("Cuffs",7), + ("Spiky_Heel",7), + ("Grave",7), + ("Novice_Boots",7), + ("Hood_",7), + ("Muffler_",7), + ("Manteau_",7), + ("Cape_Of_Ancient_Lord",7), + ("Ragamuffin_Cape",7), + ("Novice_Hood",7), + ("Ring",7), + ("Earring",7), + ("Necklace",7), + ("Glove",7), + ("Brooch",7), + ("Clip",7), + ("Rosary",7), + ("Skul_Ring",7), + ("Gold_Ring",7), + ("Silver_Ring",7), + ("Flower_Ring",7), + ("Diamond_Ring",7), + ("Mitten_Of_Presbyter",7), + ("Matyr's_Flea_Guard",7), + ("Belt",7), + ("Novice_Armlet",7), + ("Katana_",7), + ("Slayer_",7), + ("Bastard_Sword_",7), + ("Two_Hand_Sword_",7), + ("Broad_Sword_",7), + ("Claymore",7), + ("Jur_",7), + ("Katar_",7), + ("Jamadhar_",7), + ("Katar_Of_Cold_Icicle",7), + ("Katar_Of_Thornbush",7), + ("Katar_Of_Raging_Blaze",7), + ("Katar_Of_Piercing_Wind",7), + ("Battle_Axe_",7), + ("Hammer_",7), + ("Buster_",7), + ("Two_Handed_Axe_",7), + ("Lance_",7), + ("Guisarme_",7), + ("Glaive_",7), + ("Partizan_",7), + ("Trident_",7), + ("Halberd_",7), + ("Staff_Of_Soul",7), + ("Bow_",7), + ("Composite_Bow_",7), + ("Great_Bow_",7), + ("CrossBow_",7), + ("Arbalest_",7), + ("Kakkung_",7), + ("Hunter_Bow",7), + ("Sword_",7), + ("Falchion_",7), + ("Blade_",7), + ("Lapier_",7), + ("Scimiter_",7), + ("Tsurugi_",7), + ("Orcish_Sword",7), + ("Ring_Pommel_Saber_",7), + ("Saber_",7), + ("Hae_Dong_Gum_",7), + ("Flamberge",7), + ("Knife_",7), + ("Cutter_",7), + ("Main_Gauche_",7), + ("Dirk_",7), + ("Dagger_",7), + ("Stiletto_",7), + ("Gladius_",7), + ("Damascus_",7), + ("Novice_Knife",7), + ("Axe_",7), + ("Orcish_Axe",7), + ("Javelin_",7), + ("Spear_",7), + ("Pike_",7), + ("Club_",7), + ("Mace_",7), + ("Smasher_",7), + ("Flail_",7), + ("Morning_Star_",7), + ("Sword_Mace_",7), + ("Chain_",7), + ("Stunner",7), + ("Book",7), + ("Bible",7), + ("Tablet",7), + ("Book_Of_Billows",7), + ("Book_Of_Mother_Earth",7), + ("Book_Of_Blazing_Sun",7), + ("Book_Of_Gust_Of_Wind",7), + ("Girl's_Diary",7), + ("Rod_",7), + ("Wand_",7), + ("Staff_",7), + ("Arc_Wand_",7), + ("Mighty_Staff",7), + ("Blessed_Wand",7), + ("Bone_Wand",7), + ("Waghnakh_",7), + ("Knuckle_Duster_",7), + ("Hora_",7), + ("Fist_",7), + ("Claw_",7), + ("Finger_",7), + ("Violin_",7), + ("Mandolin_",7), + ("Lute_",7), + ("Guitar_",7), + ("Harp_",7), + ("Guh_Moon_Goh_",7), + ("Rope_",7), + ("Line_",7), + ("Wire_",7), + ("Rante_",7), + ("Tail_",7), + ("Whip_",7), + ("Sunglasses",7), + ("Glasses",7), + ("Diver's_Goggles",7), + ("Wedding_Veil",7), + ("Fancy_Flower",7), + ("Ribbon",7), + ("Ribbon_",7), + ("Hair_Band",7), + ("Bandana",7), + ("Eye_Bandage",7), + ("Cat_Hairband",7), + ("Bunny_Band",7), + ("Flower_Hairband",7), + ("Biretta",7), + ("Biretta_",7), + ("Flu_Mask",7), + ("Hat",7), + ("Hat_",7), + ("Turban",7), + ("Turban_",7), + ("Cap",7), + ("Cap_",7), + ("Helm",7), + ("Helm_",7), + ("Gemmed_Sallet",7), + ("Gemmed_Sallet_",7), + ("Circlet",7), + ("Circlet_",7), + ("Santa's_Hat",7), + ("One_Eyed_Glass",7), + ("Granpa_Beard",7), + ("Luxury_Sunglasses",7), + ("Spinning_Eyes",7), + ("Big_Sis'_Ribbon",7), + ("Sweet_Gents",7), + ("Golden_Gear",7), + ("Oldman's_Romance",7), + ("Western_Grace",7), + ("Fillet",7), + ("Holy_Bonnet",7), + ("Star_Sparkling",7), + ("Sunflower",7), + ("Snowy_Horn",7), + ("Mini_Propeller",7), + ("Mini_Glasses",7), + ("Pierrot_Nose",7), + ("Gangster_Patch",7), + ("Ganster_Mask",7), + ("Iron_Cane",7), + ("Cigar",7), + ("Smoking_Pipe",7), + ("Centimental_Flower",7), + ("Centimental_Leaf",7), + ("Jack_A_Dandy",7), + ("Red_Bandana",7), + ("Eagle_Eyes",7), + ("Nurse_Cap",7), + ("Bomb_Wick",7), + ("Spirit_Chain",7), + ("Apple_Of_Archer",7), + ("Pirate_Bandana",7), + ("Poo_Poo_Hat",7), + ("Funeral_Costume",7), + ("Masquerade",7), + ("Star_Dust",7), + ("Blinker",7), + ("Green_Feeler",7), + ("Viking_Helm",7), + ("Joker_Jester",7), + ("Machoman_Glasses",7), + ("Puppy_Love",7), + ("Safety_Helmet",7), + ("Indian_Hair_Piece",7), + ("Antenna",7), + ("Fin_Helm",7), + ("Egg_Shell",7), + ("Panda_Cap",7), + ("Poring_Hat",7), + ("Fruit_Shell",7), + ("Novice_Egg_Cap",7), + ("Mr_Smile",7), + ("Mr_Scream",7), + ("Goblini_Mask",7), + ("Gas_Mask",7), + ("Goblin_Mask_02",7), + ("Goblin_Mask_03",7), + ("Goblin_Mask_04",7), + ("Goggle",7), + ("Goggle_",7), + ("Skull_Helm",7), + ("Monster_Oxygen_Mask",7), + ("Transparent_Headgear",7), + ("Pacifier",7), + ("Wig",7), + ("Queen's_Hair_Ornament",7), + ("Silk_Ribbon",7), + ("Punisher",7), + ("Wild_Flower",7), + ("Battered_Pot",7), + ("Stellar_Hairpin",7), + ("Tiny_Egg_Shell",7), + ("Backpack",7), + ("Rocker_Glasses",7), + ("Green_Lace",7), + ("Golden_Bell",7), + ("Bark_Shorts",7), + ("Monkey_Circlet",7), + ("Red_Muffler",7), + ("Sword_Of_Grave_Keeper",7), + ("Ora_Ora",14), + ("Animal_Blood",14), + ("Hinalle",14), + ("Aloe",14), + ("Clover",14), + ("Four_Leaf_Clover",14), + ("Singing_Plant",14), + ("Ment",14), + ("Illusion_Flower",14), + ("Shoot",14), + ("Flower",14), + ("Emperium",14), + ("Yellow_Gemstone",14), + ("Red_Gemstone",14), + ("Blue_Gemstone",14), + ("Dark_Red_Jewel",14), + ("Violet_Jewel",14), + ("Skyblue_Jewel",14), + ("Azure_Jewel",14), + ("Scarlet_Jewel",14), + ("Cardinal_Jewel",14), + ("Cardinal_Jewel_",14), + ("Red_Jewel",14), + ("Blue_Jewel",14), + ("White_Jewel",14), + ("Golden_Jewel",14), + ("Bluish_Green_Jewel",14), + ("Crystal_Jewel",14), + ("Crystal_Jewel_",14), + ("Crystal_Jewel__",14), + ("Crystal_Jewel___",14), + ("Red_Frame",14), + ("Blue_Porcelain",14), + ("White_Platter",14), + ("Black_Ladle",14), + ("Pencil_Case",14), + ("Rouge",14), + ("Stuffed_Doll",14), + ("Poring_Doll",14), + ("Chonchon_Doll",14), + ("Spore_Doll",14), + ("Bunch_Of_Flowers",14), + ("Wedding_Bouquet",14), + ("Glass_Bead",14), + ("Crystal_Mirror",14), + ("Witherless_Rose",14), + ("Frozen_Rose",14), + ("Baphomet_Doll",14), + ("Osiris_Doll",14), + ("Grasshopper_Doll",14), + ("Monkey_Doll",14), + ("Raccoondog_Doll",14), + ("Oridecon_Stone",14), + ("Elunium_Stone",14), + ("Danggie",14), + ("Tree_Root",14), + ("Reptile_Tongue",14), + ("Scorpion's_Tail",14), + ("Stem",14), + ("Pointed_Scale",14), + ("Resin",14), + ("Spawn",14), + ("Jellopy",14), + ("Garlet",14), + ("Scell",14), + ("Zargon",14), + ("Tooth_Of_Bat",14), + ("Fluff",14), + ("Chrysalis",14), + ("Feather_Of_Birds",14), + ("Talon",14), + ("Sticky_Webfoot",14), + ("Animal's_Skin",14), + ("Claw_Of_Wolves",14), + ("Mushroom_Spore",14), + ("Orcish_Cuspid",14), + ("Evil_Horn",14), + ("Powder_Of_Butterfly",14), + ("Bill_Of_Birds",14), + ("Scale_Of_Snakes",14), + ("Insect_Feeler",14), + ("Immortal_Heart",14), + ("Rotten_Bandage",14), + ("Orcish_Voucher",14), + ("Skel_Bone",14), + ("Mementos",14), + ("Shell",14), + ("Scales_Shell",14), + ("Posionous_Canine",14), + ("Sticky_Mucus",14), + ("Bee_Sting",14), + ("Grasshopper's_Leg",14), + ("Nose_Ring",14), + ("Yoyo_Tail",14), + ("Solid_Shell",14), + ("Horseshoe",14), + ("Raccoon_Leaf",14), + ("Snail's_Shell",14), + ("Horn",14), + ("Bear's_Foot",14), + ("Feather",14), + ("Heart_Of_Mermaid",14), + ("Fin",14), + ("Cactus_Needle",14), + ("Stone_Heart",14), + ("Shining_Scales",14), + ("Worm_Peelings",14), + ("Gill",14), + ("Decayed_Nail",14), + ("Horrendous_Mouth",14), + ("Rotten_Scale",14), + ("Nipper",14), + ("Conch",14), + ("Tentacle",14), + ("Sharp_Scale",14), + ("Crap_Shell",14), + ("Clam_Shell",14), + ("Flesh_Of_Clam",14), + ("Turtle_Shell",14), + ("Voucher_Of_Orcish_Hero",14), + ("Gold",14), + ("Alchol",14), + ("Detrimindexta",14), + ("Karvodailnirol",14), + ("Counteragent",14), + ("Mixture",14), + ("Scarlet_Dyestuffs",14), + ("Lemon_Dyestuffs",14), + ("Cobaltblue_Dyestuffs",14), + ("Darkgreen_Dyestuffs",14), + ("Orange_Dyestuffs",14), + ("Violet_Dyestuffs",14), + ("White_Dyestuffs",14), + ("Black_Dyestuffs",14), + ("Oridecon",14), + ("Elunium",14), + ("Anvil",14), + ("Oridecon_Anvil",14), + ("Golden_Anvil",14), + ("Emperium_Anvil",14), + ("Boody_Red",14), + ("Crystal_Blue",14), + ("Wind_Of_Verdure",14), + ("Yellow_Live",14), + ("Flame_Heart",14), + ("Mistic_Frozen",14), + ("Rough_Wind",14), + ("Great_Nature",14), + ("Iron",14), + ("Steel",14), + ("Star_Crumb",14), + ("Sparkling_Dust",14), + ("Iron_Ore",14), + ("Coal",14), + ("Patriotism_Marks",14), + ("Hammer_Of_Blacksmith",14), + ("Old_Magic_Book",14), + ("Penetration",14), + ("Frozen_Heart",14), + ("Sacred_Marks",14), + ("Phracon",14), + ("Emveretarcon",14), + ("Lizard_Scruff",14), + ("Colorful_Shell",14), + ("Jaws_Of_Ant",14), + ("Thin_N'_Long_Tongue",14), + ("Rat_Tail",14), + ("Moustache_Of_Mole",14), + ("Nail_Of_Mole",14), + ("Wooden_Block",14), + ("Long_Hair",14), + ("Dokkaebi_Horn",14), + ("Fox_Tail",14), + ("Fish_Tail",14), + ("Chinese_Ink",14), + ("Spiderweb",14), + ("Acorn",14), + ("Porcupine_Spike",14), + ("Wild_Boar's_Mane",14), + ("Tiger's_Skin",14), + ("Tiger_Footskin",14), + ("Limb_Of_Mantis",14), + ("Blossom_Of_Maneater",14), + ("Root_Of_Maneater",14), + ("Cobold_Hair",14), + ("Dragon_Canine",14), + ("Dragon_Scale",14), + ("Dragon_Train",14), + ("Petite_DiablOfs_Horn",14), + ("Petite_DiablOfs_Wing",14), + ("Elder_Pixie's_Beard",14), + ("Lantern",14), + ("Short_Leg",14), + ("Nail_Of_Orc",14), + ("Tooth_Of_",14), + ("Sacred_Masque",14), + ("Tweezer",14), + ("Head_Of_Medusa",14), + ("Slender_Snake",14), + ("Skirt_Of_Virgin",14), + ("Tendon",14), + ("Detonator",14), + ("Single_Cell",14), + ("Tooth_Of_Ancient_Fish",14), + ("Lip_Of_Ancient_Fish",14), + ("Earthworm_Peeling",14), + ("Grit",14), + ("Moth_Dust",14), + ("Wing_Of_Moth",14), + ("Transparent_Cloth",14), + ("Golden_Hair",14), + ("Starsand_Of_Witch",14), + ("Pumpkin_Head",14), + ("Sharpened_Cuspid",14), + ("Reins",14), + ("Booby_Trap",14), + ("Tree_Of_Archer_1",14), + ("Tree_Of_Archer_2",14), + ("Tree_Of_Archer_3",14), + ("Morocc_Potion",14), + ("Payon_Potion",14), + ("Empty_Cylinder",14), + ("Empty_Potion",14), + ("Short_Daenggie",14), + ("Needle_Of_Alarm",14), + ("Round_Shell",14), + ("Worn_Out_Page",14), + ("Manacles",14), + ("Worn_Out_Prison_Uniform",14), + ("Mould_Powder",14), + ("Ogre_Tooth",14), + ("Anolian_Skin",14), + ("Mud_Lump",14), + ("Skull",14), + ("Wing_Of_Red_Bat",14), + ("Claw_Of_Rat",14), + ("Stiff_Horn",14), + ("Glitter_Shell",14), + ("Tail_Of_Steel_Scorpion",14), + ("Claw_Of_Monkey",14), + ("Tough_Scalelike_Stem",14), + ("Coral_Reef",14), + ("Old_Portrait",14), + ("Bookclip_In_Memory",14), + ("Spoon_Stub",14), + ("Key_Of_Clock_Tower",14), + ("Underground_Key",14), + ("Claw_Of_Desert_Wolf",14), + ("Old_Frying_Pan",14), + ("Piece_Of_Egg_Shell",14), + ("Poison_Spore",14), + ("Red_Socks_With_Holes",14), + ("Matchstick",14), + ("Fang_Of_Garm",14), + ("Yarn",14), + ("Fine_Grit",14), + ("Alice's_Apron",14), + ("Talon_Of_Griffin",14), + ("Stone",14), + ("Cyfar",14), + ("Brigan",14), + ("Cargo_Free_Ticket",14), + ("Warp_Free_Ticket",14), + ("Cart_Free_Ticket",14), + ("Soft_Feather",14), + ("Dragon_Fly_Wing",14), + ("Sea_Otter_Leather",14), + ("Ice_Piece",14), + ("Stone_Piece",14), + ("Burn_Tree",14), + ("Broken_Armor_Piece",14), + ("Broken_Shell",14), + ("Tatters_Clothes",14), + ("Rust_Suriken",14), + ("Wheel",14), + ("Mystery_Piece",14), + ("Broken_Steel_Piece",14), + ("Cold_Magma",14), + ("Burning_Heart",14), + ("Live_Coal",14), + ("Old_Magic_Circle",14), + ("Sharp_Leaf",14), + ("Peco_Wing_Feather",14), + ("Goat's_Horn",14), + ("Gaoat's_Skin",14), + ("Boroken_Shiled_Piece",14), + ("Shine_Spear_Blade",14), + ("Vroken_Sword",14), + ("Smooth_Paper",14), + ("Fright_Paper_Blade",14), + ("Broken_Pharaoh_Symbol",14), + ("Tutankhamen's_Mask",14), + ("Harpy's_Feather",14), + ("Harpy's_Claw",14), + ("Rent_Spell_Book",14), + ("Rent_Scroll",14), + ("Spawns",14), + ("Burning_Horse_Shoe",14), + ("Honey_Jar",14), + ("Hot_Hair",14), + ("Dragon's_Skin",14), + ("Sand_Lump",14), + ("Scropion's_Nipper",14), + ("Large_Jellopy",14), + ("Medicine_Bowl",14), + ("Fire_Bottle",14), + ("Acid_Bottle",14), + ("MenEater_Plant_Bottle",14), + ("Mini_Bottle",14), + ("Coating_Bottle",14), + ("Yellow_Plate",14), + ("Bamboo_Cut",14), + ("Oil_Paper",14), + ("Glossy_Hair",14), + ("Old_Japaness_Clothes",14), + ("Poison_Powder",14), + ("Poison_Toad's_Skin",14), + ("Broken_Shuriken",14), + ("Black_Mask",14), + ("Broken_Wine_Vessel",14), + ("Tengu's_Nose",14), + ("Black_Bear's_Skin",14), + ("Cloud_Piece",14), + ("Sharp_Feeler",14), + ("Hard_Peach",14), + ("Limpid_Celestial_Robe",14), + ("Soft_Silk_Cloth",14), + ("Mystery_Iron_Bit",14), + ("Great_Wing",14), + ("Taegeuk_Plate",14), + ("Tuxedo",14), + ("Leopard_Skin",14), + ("Leopard_Talon",14), + ("Packing_Ribbon",14), + ("Packing_Paper",14), + ("Cacao",14), + ("Thin_Stem",14), + ("Festival_Mask",14), + ("Browny_Root",14), + ("Heart_Of_Tree",14), + ("Solid_Peeling",14), + ("Lamplight",14), + ("Blade_Of_Pinwheel",14), + ("Germinating_Sprout",14), + ("Soft_Leaf",14), + ("Air_Rifle",14), + ("Shoulder_Protection",14), + ("Tough_Vines",14), + ("Great_Leaf",14), + ("Flexible_String",14), + ("Log",14), + ("Beetle_Nipper",14), + ("Solid_Twig",14), + ("Piece_Of_Black_Cloth",14), + ("Black_Kitty_Doll",14), + ("Old_Manteau",14), + ("Rusty_Cleaver",14), + ("Dullahan's_Helm",14), + ("Dullahan_Armor",14), + ("Rojerta_Piece",14), + ("Hanging_Doll",14), + ("Needle_Pouch",14), + ("Bat_Cage",14), + ("Broken_Needle",14), + ("Red_Scarf",14), + ("Spool",14), + ("Rotten_Rope",14), + ("Striped_Socks",14), + ("Ectoplasm",14), + ("Tangled_Chain",14), + ("Tree_Knot",14), + ("Distorted_Portrait",14), + ("Pumpkin_Bucket",14), + ("Fan",14), + ("Cat_Eyed_Stone",14), + ("Dried_Sand",14), + ("Dragon_Horn",14), + ("Dragon_Fang",14), + ("Tiger_Skin_Panties",14), + ("Little_Blacky_Ghost",14), + ("Bib",14), + ("Milk_Bottle",14), + ("Arrow",14), + ("Silver_Arrow",14), + ("Fire_Arrow",14), + ("Steel_Arrow",14), + ("Crystal_Arrow",14), + ("Arrow_Of_Wind",14), + ("Stone_Arrow",14), + ("Immatrial_Arrow",14), + ("Stun_Arrow",14), + ("Freezing_Arrow",14), + ("Flash_Arrow",14), + ("Curse_Arrow",14), + ("Rusty_Arrow",14), + ("Poison_Arrow",14), + ("Incisive_Arrow",14), + ("Oridecon_Arrow",14), + ("Arrow_Of_Shadow",14), + ("Sleep_Arrow",14), + ("Silence_Arrow",14), + ("Iron_Arrow",14), + ("Red_Potion",14), + ("Orange_Potion",14), + ("Yellow_Potion",14), + ("Green_Potion",14), + ("Red_Herb",14), + ("Yellow_Herb",14), + ("White_Herb",14), + ("Blue_Herb",14), + ("Green_Herb",14), + ("Apple",14), + ("Banana",14), + ("Grape",14), + ("Carrot",14), + ("Sweet_Potato",14), + ("Meat",14), + ("Honey",14), + ("Milk",14), + ("Leaflet_Of_Hinal",14), + ("Leaflet_Of_Aloe",14), + ("Fruit_Of_Mastela",14), + ("Holy_Water",14), + ("Panacea",14), + ("Monster's_Feed",14), + ("Candy",14), + ("Candy_Striper",14), + ("Apple_Juice",14), + ("Banana_Juice",14), + ("Grape_Juice",14), + ("Carrot_Juice",14), + ("Pumpkin",14), + ("Ice_Cream",14), + ("Pet_Food",14), + ("Well_Baked_Cookie",14), + ("Piece_Of_Cake",14), + ("Fish_Slice",14), + ("Red_Slim_Potion",14), + ("Yellow_Slim_Potion",14), + ("White_Slim_Potion",14), + ("Cheese",14), + ("Nice_Sweet_Potato",14), + ("Popped_Rice",14), + ("Shusi",14), + ("Bun",14), + ("Rice_Cake",14), + ("Chocolate",14), + ("White_Chocolate",14), + ("Old_Blue_Box",614), + ("Anodyne",14), + ("Aloebera",14), + ("Yggdrasilberry",14), + ("Seed_Of_Yggdrasil",14), + ("Amulet",14), + ("Leaf_Of_Yggdrasil",14), + ("Spectacles",14), + ("Portable_Furnace",14), + ("Iron_Hammer",14), + ("Golden_Hammer",14), + ("Oridecon_Hammer",14), + ("Worn_Out_Scroll",14), + ("Unripe_Apple",14), + ("Orange_Juice",14), + ("Bitter_Herb",14), + ("Rainbow_Carrot",14), + ("Earthworm_The_Dude",14), + ("Rotten_Fish",14), + ("Lusty_Iron",14), + ("Monster_Juice",14), + ("Sweet_Milk",14), + ("Well_Dried_Bone",14), + ("Singing_Flower",14), + ("Dew_Laden_Moss",14), + ("Deadly_Noxious_Herb",14), + ("Fatty_Chubby_Earthworm",14), + ("Baked_Yam",14), + ("Tropical_Banana",14), + ("Horror_Of_Tribe",14), + ("No_Recipient",14), + ("Old_Broom",14), + ("Silver_Knife_Of_Chaste",14), + ("Armlet_Of_Obedience",14), + ("Shining_Stone",14), + ("Contracts_In_Shadow",14), + ("Book_Of_Devil",14), + ("Pet_Incubator",14), + ("Gift_Box",114), + ("Center_Potion",14), + ("Awakening_Potion",14), + ("Berserk_Potion",14), + ("Heart_Of_Her",14), + ("Korea_Rice_Cake",14), + ("Gift_Box_1",14), + ("Gift_Box_2",14), + ("Gift_Box_3",14), + ("Gift_Box_4",14), + ("Handsei",14), + ("Poison_Bottle",14), + ("Gold_Pill",14), + ("Guard_",6), + "Tiara", + "Crown", + "Coronet", + "Angelic_Chain", + "Satanic_Chain", + "Sharp_Gear", + "Elven_Ears", + "Holy_Robe", + "Mage_Coat", + "An_Eye_Of_Dullahan", + "Safety_Ring", + "Critical_Ring", + "Ring_", + "Earring_", + "Necklace_", + "Glove_", + "Brooch_", + "Rosary_", + "Gemmed_Crown", + "Pair_Of_Red_Ribbon", + "Loard_Circlet", + "Bone_Helm", + "Corsair", + "Assassin_Mask", + "Horn_Of_Succubus", + "Inccubus_Horn", + "Spinx_Helm", + "Old_Card_Album", + "Dragon_Killer", + "Ginnungagap", + "Town_Sword_", + "Star_Dust_Blade", + "Gae_Bolg", + ("Various_Jur",2), + "Nail_Of_Loki", + "Bloody_Roar", + "Unholy_Touch", + "Hypnotist's_Staff_", + "Staff_Of_Wing", + "Luna_Bow", + "Dragon_Wing", + "Electric_Wire", + "Whip_Of_Red_Flame", + "Whip_Of_Ice_Piece", + "Whip_Of_Earth", + "Jump_Rope", + "Bladed_Whip", + "Guitar_Of_Passion", + "Guitar_Of_Blue_Solo", + "Guitar_Of_Vast_Land", + "Guitar_Of_Gentle_Breeze", + "Claw_Of_Garm", + "Legacy_Of_Dragon", + "Coward_", + "Windhawk", + "Queen's_Whip", + "Oriental_Lute", + "Diary_Of_Great_Sage", + "Hardback", + "Survival_Rod_", + "Survival_Rod2_", + "Ear_Of_Puppy", + "Angry_Mouth", + "Celestial_Robe", + "Pauldron", + "Fedora_", + "Super_Novice_Hat_", + "Galapago_Cap", + "Banana_Hat", + "Wing_Of_Eagle", + "Cursed_Lucky_Brooch", + "Shinobi's_Sash", + "Bloody_Iron_Ball", + "Hyper_Changer", + "Cookbook06", + "Cookbook07", + "Cookbook08", + "Cookbook09", + "Cookbook10", + "Dark_Crystal_Fragment", + "Long_Limb", + "Screw", + "Old_Pick", + "Old_Steel_Plate", + "Air_Pollutant", + "Fragment_Of_Crystal", + "Poisonous_Gas", + "Battered_Kettle", + "Tube", + "Fluorescent_Liquid", + "Headlamp", + "Piece_Of_Memory_Green", + "Piece_Of_Memory_Purple", + "Piece_Of_Memory_Blue", + "Piece_Of_Memory_Red", + "Red_Feather", + "Blue_Feather", + "Cursed_Seal", + "Tri_Headed_Dragon_Head", + "Treasure_Box", + "Dragonball_Green", + "Dragonball_Blue", + "Dragonball_Red", + "Dragonball_Yellow", + "Bloody_Page", + "Piece_Of_Bone_Armor", + "Scale_Of_Red_Dragon", + "Yellow_Spice", + "Sweet_Sauce", + "Plain_Sauce", + "Hot_Sauce", + "Red_Spice", + "Cooking_Oil", + "Cookbook01", + "Cookbook02", + "Cookbook03", + "Cookbook04", + "Cookbook05", + "Pot", + "Burnt_Parts", + "Pocket_Watch", + "Ice_Heart", + "Ice_Scale", + "Bloody_Rune", + "Rotten_Meat", + "Sticky_Poison", + "Suspicious_Hat", + "White_Mask", + ("Old_Violet_Box",103), + ("Old_White_Cloth",16), + ("Clattering_Skull",16), + ("Broken_Farming_Utensil",17), + "Inverse_Scale", + "Blood_Tears", + "Doom_Slayer", + "Heart_Breaker", + "Hurricane_Fury", + "Ahlspiess", + "Huuma_Calm_Mind", + "Burning_Bow", + "Frozen_Bow", + "Earth_Bow", + "Gust_Bow", + "Magma_Fist", + "Icicle_Fist", + "Electric_Fist", + "Seismic_Fist", + "Combo_Battle_Glove", + "Base_Guitar", + "Electric_Eel", + "Sea_Witch_Foot", + "Carrot_Whip", + "Bullet", + "Silver_Bullet", + "Shell_Of_Blood", + "Flare_Sphere", + "Lighting_Sphere", + "Poison_Sphere", + "Blind_Sphere", + "Freezing_Sphere", + "Gate_KeeperDD", + "Thunder_P", + "Long_Barrel", + ("Lever_Action_Rifle",2), + "Long_Barrel_" +) +Random_Quiver: ( + "Iron_Arrow_Container", + "Steel_Arrow_Container", + "Ori_Arrow_Container", + "Fire_Arrow_Container", + "Silver_Arrow_Container", + "Wind_Arrow_Container", + "Stone_Arrow_Container", + "Crystal_Arrow_Container", + "Shadow_Arrow_Container", + "Imma_Arrow_Container", + "Rusty_Arrow_Container", + ("Holy_Arrow_Quiver",2) +) +Set_Of_Taiming_Item: ( + "Orange_Juice", + "Bitter_Herb", + "Rainbow_Carrot", + "Earthworm_The_Dude", + "Rotten_Fish", + "Lusty_Iron", + "Monster_Juice", + "Sweet_Milk", + "Well_Dried_Bone", + "Singing_Flower", + "Dew_Laden_Moss", + "Deadly_Noxious_Herb", + "Fatty_Chubby_Earthworm", + "Baked_Yam", + "Tropical_Banana", + "Horror_Of_Tribe", + "No_Recipient", + "Old_Broom", + "Silver_Knife_Of_Chaste", + "Armlet_Of_Obedience", + "Shining_Stone", + "Contracts_In_Shadow", + "Book_Of_Devil", + "Heart_Of_Her", + "Prohibition_Red_Candle", + "Sway_Apron", + "Skull_Helm", + "Monster_Oxygen_Mask", + "Transparent_Headgear", + "Pacifier", + "Wig", + "Queen's_Hair_Ornament", + "Silk_Ribbon", + "Punisher", + "Wild_Flower", + "Battered_Pot", + "Stellar_Hairpin", + "Tiny_Egg_Shell", + "Backpack", + "Rocker_Glasses", + "Green_Lace", + "Golden_Bell", + "Bark_Shorts", + "Monkey_Circlet", + "Red_Muffler", + "Sword_Of_Grave_Keeper", + "Flaming_Ice", + "Tantanmen" +) +Accessory_Box: ( + ("Gold_Ring",14), + ("Mitten_Of_Presbyter",10), + ("Flower_Ring",14), + ("Necklace",12), + ("Necklace_",10), + ("Novice_Armlet",14), + ("Diamond_Ring",11), + ("Skul_Ring",14), + ("Thimble_Of_Archer",10), + ("Rosary",14), + ("Ring",10), + ("Matyr's_Flea_Guard",11), + ("Belt",10), + ("Brooch",12), + ("Nile_Rose_",10), + ("Silver_Ring",14), + ("Clip",12), + ("Earring",11), + ("Glove",11), + "Safety_Ring", + "Critical_Ring", + "Glove_", + "Ring_", + "Rosary_", + "Brooch_", + "Earring_", + ("Vesper_Core02",2), + ("Vesper_Core03",2), + ("Vesper_Core04",2), + "Thimble_Of_Archer_", + ("Red_Silk_Seal",2), + "Orleans_Glove", + "Vesper_Core01", + "Spiritual_Ring", + "Shinobi's_Sash", + "Hyper_Changer", + ("Lesser_Elemental_Ring",9), + "Expert_Ring", + "Librarian_Glove", + "Pocket_Watch_", + "Lunatic_Brooch", + "Iron_Wrist" +) +Wrapped_Mask: ( + ("Phantom_Of_Opera",10), + ("Mr_Scream",10), + ("Welding_Mask",10), + ("Goblini_Mask",10), + ("Gas_Mask",10), + ("Alarm_Mask",10), + ("Goblin_Mask_01",10), + ("Goblin_Mask_02",10), + ("Goblin_Mask_03",10), + ("Goblin_Mask_04",10), + ("Mr_Smile",9), + "Zherlthsh_Mask" +) +Bundle_Of_Magic_Scroll: ( + "Earth_Scroll_1_5", + "Cold_Scroll_1_3", + "Cold_Scroll_1_5", + "Fire_Scroll_1_3", + "Fire_Scroll_1_5", + "Wind_Scroll_1_3", + "Wind_Scroll_1_5", + "Ghost_Scroll_1_3", + "Ghost_Scroll_1_5", + "Fire_Scroll_2_1", + "Fire_Scroll_2_5", + "Fire_Scroll_3_1", + "Fire_Scroll_3_5", + "Cold_Scroll_2_1", + "Cold_Scroll_2_5", + "Holy_Scroll_1_3", + "Holy_Scroll_1_5" +) +Food_Package: ( + "Candy_Striper", + "Apple_Juice", + "Banana_Juice", + "Grape_Juice", + "Carrot_Juice", + "Ice_Cream", + "Well_Baked_Cookie", + "Yggdrasilberry", + "Fish_Slice", + "Cheese", + "Nice_Sweet_Potato", + "Popped_Rice", + "Shusi", + "Bun", + "Mojji", + "Rice_Cake", + "Seed_Of_Yggdrasil", + "Hash_Rice_Cake", + "Chocolate", + "HandMade_Chocolate", + "HandMade_Chocolate_", + "White_Chocolate", + "Rice_Ball", + "Tomyumkung", + "Prawn", + "Korea_Rice_Cake", + "Prickly_Fruit", + "Apple", + "Banana", + "Grape", + "Carrot", + "Sweet_Potato", + "Meat", + "Honey", + "Rice_Cake_Soup", + "Leaflet_Of_Hinal", + "Leaflet_Of_Aloe", + "Fruit_Of_Mastela", + "Milk", + "Lemon", + "Long_Rice_Cake", + "Piece_Of_Cake" +) +First_Aid_Kit: ( + ("Red_Potion",5), + ("Orange_Potion",5), + ("Yellow_Potion",5), + ("Slow_Down_Potion",5), + ("Green_Potion",5), + ("Red_Slim_Potion",5), + ("Yellow_Slim_Potion",5), + ("White_Slim_Potion",5), + ("Water_Of_Darkness",5), + ("Center_Potion",5), + ("Awakening_Potion",5), + ("Berserk_Potion",5), + ("Novice_Potion",5), + ("Anodyne",5), + ("Speed_Up_Potion",5) +) +Cookie_Bag: ( + ("Lucky_Candy",5), + ("Candy_Striper",5), + ("Lucky_Candy_Cane",5), + ("Well_Baked_Cookie",5), + ("Lucky_Cookie",5), + ("Piece_Of_Cake",5), + ("Rice_Ball",5), + "Sesame_Pastry", + "Honey_Pastry", + "Rainbow_Cake", + "Chocolate", + "HandMade_Chocolate", + "HandMade_Chocolate_", + "White_Chocolate", + "Chocolate_Drink", + ("Candy",4) +) +Egg_Boy: ( + ("Grape",299), + ("Rice_Ball",522), + ("Prohibition_Red_Candle",20), + ("Realgar_Wine",100), + ("Exorcize_Herb",50), + ("Crown",2), + "Inccubus_Horn" +) +Egg_Girl: ( + ("Grape",299), + ("Rice_Ball",522), + ("Sway_Apron",20), + ("Realgar_Wine",100), + ("Exorcize_Herb",50), + ("Tiara",2), + ("Hair_Protector",5), + "Horn_Of_Succubus" +) +Giftbox_China: ( + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Honey", + "Leaflet_Of_Hinal", + ("Leaflet_Of_Aloe",2), + "Panacea", + "Candy", + "Candy_Striper", + ("Old_Blue_Box",40), + ("Branch_Of_Dead_Tree",9), + "Anodyne", + "Aloebera", + "Yggdrasilberry", + "Seed_Of_Yggdrasil", + "Leaf_Of_Yggdrasil", + ("Portable_Furnace",5), + "Iron_Hammer", + "Golden_Hammer", + "Oridecon_Hammer", + "Ora_Ora", + "Animal_Blood", + "Hinalle", + "Aloe", + "Four_Leaf_Clover", + "Singing_Plant", + "Ment", + "Illusion_Flower", + "Emperium", + "Yellow_Gemstone", + "Red_Gemstone", + "Blue_Gemstone", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Wedding_Bouquet", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Oridecon_Stone", + "Elunium_Stone", + "Jellopy", + "Garlet", + "Scell", + "Zargon", + "Orcish_Voucher", + "Mementos", + "Voucher_Of_Orcish_Hero", + "Gold", + "Alchol", + "Detrimindexta", + "Karvodailnirol", + "Counteragent", + "Mixture", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Oridecon", + "Elunium", + "Anvil", + "Oridecon_Anvil", + "Golden_Anvil", + "Emperium_Anvil", + "Boody_Red", + "Crystal_Blue", + "Wind_Of_Verdure", + "Yellow_Live", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Iron", + "Steel", + "Star_Crumb", + "Sparkling_Dust", + "Iron_Ore", + "Coal", + "Patriotism_Marks", + "Hammer_Of_Blacksmith", + "Old_Magic_Book", + "Penetration", + "Frozen_Heart", + "Sacred_Marks", + "Phracon", + "Emveretarcon", + "Booby_Trap", + "Sword_", + "Falchion_", + "Blade_", + "Lapier_", + "Scimiter_", + "Katana_", + "Tsurugi_", + "Ring_Pommel_Saber_", + "Saber_", + "Hae_Dong_Gum_", + "Flamberge", + "Slayer_", + "Bastard_Sword_", + "Two_Hand_Sword_", + "Broad_Sword_", + "Claymore", + "Knife_", + "Cutter_", + "Main_Gauche_", + "Dirk_", + "Dagger_", + "Stiletto_", + "Gladius_", + "Damascus_", + "Jur_", + "Katar_", + "Jamadhar_", + "Axe_", + "Battle_Axe_", + "Hammer_", + "Buster_", + "Two_Handed_Axe_", + "Javelin_", + "Spear_", + "Pike_", + "Lance", + "Guisarme_", + "Glaive_", + "Partizan_", + "Trident_", + "Halberd_", + "Club_", + "Mace_", + "Smasher_", + "Flail_", + "Morning_Star_", + "Sword_Mace_", + "Chain_", + "Book", + "Bible", + "Rod_", + "Wand_", + "Staff_", + "Arc_Wand_", + "Mighty_Staff", + "Bow_", + "Composite_Bow_", + "CrossBow_", + "Arbalest", + "Kakkung", + "Hunter_Bow", + "Bow_Of_Roguemaster", + "Guard_", + "Buckler_", + "Shield_", + "Mirror_Shield_", + "Fancy_Flower", + "Ribbon_", + "Cat_Hairband", + "Flower_Hairband", + "Biretta_", + "Hat_", + "Turban_", + "Goggle_", + "Cap_", + "Helm_", + "Gemmed_Sallet_", + "Circlet_", + "Santa's_Hat", + "Big_Sis'_Ribbon", + "Coronet", + "Fillet", + "Snowy_Horn", + "Sharp_Gear", + "Pierrot_Nose", + "Gangster_Patch", + "Ganster_Mask", + "Centimental_Flower", + "Centimental_Leaf", + "Jack_A_Dandy", + "Stop_Post", + "Doctor_Cap", + "Red_Bandana", + "Eagle_Eyes", + "Bomb_Wick", + "Antler", + "Pirate_Bandana", + "Poo_Poo_Hat", + "Funeral_Costume", + "Masquerade", + "Pretend_Murdered", + "Star_Dust", + "Blinker", + "Binoculars", + "Green_Feeler", + "Viking_Helm", + "Cotton_Shirt_", + "Leather_Jacket_", + "Adventurere's_Suit_", + "Mantle_", + "Coat_", + "Mink_Coat", + "Padded_Armor_", + "Chain_Mail_", + "Plate_Armor_", + "Silk_Robe_", + "Scapulare_", + "Saint_Robe_", + "Wooden_Mail_", + "Tights_", + "Silver_Robe_", + "Thief_Clothes_", + "Ninja_Suit", + "Wedding_Dress", + "G_Strings", + "Sandals_", + "Shoes_", + "Chrystal_Pumps", + "Cuffs", + "Spiky_Heel", + "Hood_", + "Muffler_", + "Manteau_", + "Cape_Of_Ancient_Lord", + "Ragamuffin_Cape", + "Ring", + "Earring", + "Necklace", + "Glove", + "Brooch", + "Clip", + "Rosary", + "Skul_Ring", + "Gold_Ring", + "Silver_Ring", + "Flower_Ring", + "Diamond_Ring", + "Puppy_Love", + "Safety_Helmet", + "Indian_Hair_Piece", + "Fin_Helm", + "Egg_Shell" +) +Old_Bleu_Box: ( + ("Cold_Scroll_1_5",2), + ("Fire_Scroll_1_5",2), + ("Wind_Scroll_1_5",2), + ("Fire_Scroll_2_5",2), + ("Fire_Scroll_3_5",2), + ("Holy_Scroll_1_5",2), + ("Cold_Scroll_2_5",2), + ("Gift_Box",2), + ("Milk",2), + ("Well_Baked_Cookie",2) +) +Holy_Egg_2: ( + ("Oridecon",3), + ("Elunium",10), + ("White_Slim_Potion",30), + ("Blue_Potion",30), + ("Yggdrasilberry",3), + ("Seed_Of_Yggdrasil",2), + ("Leaf_Of_Yggdrasil",15), + ("Old_Card_Album",5), + "Drooping_Bunny" +) +Red_Box_: ( + ("Magic_Eyes",9), + ("Hibiscus",10), + ("Charming_Ribbon",10) +) +Hometown_Gift: ( + "Hearty_Rice_Cake", + "Salty_Rice_Cake", + "Lucky_Rice_Cake", + "Sesame_Pastry", + "Honey_Pastry", + "Rainbow_Cake", + "Korea_Rice_Cake" +) +Old_Yellow_Box: ( + "Cookie_Hat", + "Silver_Tiara_", + "Gold_Tiara_" +) +Old_Gift_Box: ( + ("Chinese_Crown_",14), + ("Tongue_Mask_",40), + ("Fallen_Leaves_",45) +) +Magic_Card_Album: ( + "Dark_Illusion_Card", + "Deviling_Card", + ("Dragon_Fly_Card",10), + ("Vagabond_Wolf_Card",10), + ("Mastering_Card",10), + "Maya_Puple_Card", + ("Mutant_Dragon_Card",10), + "Mysteltainn_Card", + "Vocal_Card", + ("Owl_Duke_Card",5), + ("Owl_Baron_Card",5), + "Archangeling_Card", + "Executioner_Card", + "Tirfing_Card", + ("Eclipse_Card",10), + ("Chepet_Card",10), + ("Choco_Card",10), + ("Cat_O_Nine_Tail_Card",5), + ("Kobold_Leader_Card",10), + ("Chimera_Card",10), + ("Toad_Card",10), + "Bloody_Knight_Card", + "Ungoliant_Card", + "Gemini_Card", + "Hydro_Card", + ("Tha_Maero_Card",3), + ("Tha_Odium_Card",3), + ("Tha_Despero_Card",3) +) +Masquerade_Ball_Box: ( + ("Drooping_Nine_Tail_",9), + "Soulless_Wing_", + ("Marvelous_Wig_",10), + ("Ati_Atihan_Hat_",10) +) +Louise_Costume_Box: ( + ("Red_Bag",16), + ("Cool_Summer_Outfit",2) +) +Xmas_Gift: ( + ("Fire_Cracker_Love",6), + ("Gift_Box",66), + ("Old_Bleu_Box",36), + ("Set_Of_Taiming_Item",6), + ("Wrapped_Mask",6), + ("Old_Blue_Box",24), + ("Bundle_Of_Magic_Scroll",12), + ("Buche_De_Noel",24), + ("Speed_Up_Potion",12), + ("Slow_Down_Potion",12), + ("Cookie_Bag",12), + ("Red_Bag",6), + ("First_Aid_Kit",12), + ("Crystal_Jewel__",12), + ("HandMade_Chocolate",18), + ("HandMade_Chocolate_",18), + ("Chocolate_Drink",18), + ("Santa's_Hat_",12), + ("Fire_Cracker_Xmas",4) +) +Tresure_Box_WoE: ( + ("Wind_Arrow_Container",23), + ("Stone_Arrow_Container",25), + ("Crystal_Arrow_Container",26), + ("Holy_Arrow_Quiver",7), + ("Bullet_Case",27), + ("Bullet_Case_Blood",27), + ("Bullet_Case_Silver",27), + ("Set_Of_Taiming_Item",12), + ("First_Aid_Kit",9), + ("Food_Package",36), + ("Bundle_Of_Magic_Scroll",9), + ("Old_Bleu_Box",8), + ("Cookie_Bag",48), + ("Hometown_Gift",6), + ("Cool_Summer_Outfit",22), + ("Union_Of_Tribe",6), + ("Wrapped_Mask",2), + ("Poison_Bottle",3), + ("Old_Blue_Box",6), + ("Crystal_Jewel__",9) +) +Masquerade_Ball_Box2: ( + ("Black_Bunny_Band",12), + ("Vanilmirth_Hat",10), + ("Cap_Of_Blindness",10), + "Dress_Hat" +) +Pierre_Treasurebox: ( + ("Scarlet_Dyestuffs",3), + ("Lemon_Dyestuffs",3), + ("Cobaltblue_Dyestuffs",3), + ("Darkgreen_Dyestuffs",3), + ("Orange_Dyestuffs",3), + ("Violet_Dyestuffs",3), + ("White_Dyestuffs",3), + ("Black_Dyestuffs",3), + ("Olivine",3), + ("Phlogopite",3), + ("Agate",3), + ("Muscovite",3), + ("Rose_Quartz",3), + ("Turquoise",3), + ("Citrine",3), + ("Pyroxene",3), + ("Biotite",3), + ("Str_Dish10",3), + ("Agi_Dish10",3), + ("Vit_Dish10",3), + ("Luk_Dish10",3), + ("Dex_Dish10",3), + ("Branch_Of_Dead_Tree",3), + ("Old_Violet_Box",5), + ("Gift_Box",3), + ("Old_Blue_Box",11), + ("Fire_Cracker",2), + "Bloody_Dead_Branch" +) +Cherish_Box: ( + ("Geographer_Band_",4), + ("Vacation_Hat_",5) +) +Cherish_Box_Ori: ( + ("Satellite_Hairband",2), + ("Pirate_Dagger",2), + ("Loki_Mask",2), + ("Ragnarok_Limited_Ed",3) +) +Splendid_Box: ( + //not yet supported/not in pre-re "Imperial_Guard", + "Bone_Plate", + //not yet supported/not in pre-re "Ebone_Armor", + "Krasnaya", + //not yet supported/not in pre-re "Alca_Bringer", + //not yet supported/not in pre-re "Chrome_Twohand_Sword", + "Krishna", + "Cakram", + //not yet supported/not in pre-re "Durga", + "Vecer_Axe", + "Giant_Axe", + //not yet supported/not in pre-re "Imperial_Spear", + //not yet supported/not in pre-re "Rafini_Staff", + "Falken_Blitz", + //not yet supported/not in pre-re "Elven_Bow", + //not yet supported/not in pre-re "Green_Whistle", + //not yet supported/not in pre-re "Stem_Whip", + "Krieg", + "Weihna", + //not yet supported/not in pre-re "Black_Wing", + "Ruber", + "Erde", + "Red_Square_Bag" + //not yet supported/not in pre-re "Carga_Mace", + //not yet supported/not in pre-re "Red_Ether_Bag", + //not yet supported/not in pre-re "Mystic_Bow" +) +//unknown carrier / unsupported +/*Candy_Holder: ( + ("Honey",9), + ("Candy",20), + ("Well_Baked_Cookie",15), + ("Piece_Of_Cake",10), + ("Bread",20), + "Old_Blue_Box", + "Yggdrasilberry", + "Old_Card_Album", + "Old_Violet_Box", + "Contracts_In_Shadow", + ("Niflheim_Ticket",10), + ("Pumpkin_Cake",5), + ("Pumpkin_Pie",5) +)*/ \ No newline at end of file diff --git a/db/pre-re/item_group_db.txt b/db/pre-re/item_group_db.txt deleted file mode 100644 index c05df5b91..000000000 --- a/db/pre-re/item_group_db.txt +++ /dev/null @@ -1,6 +0,0 @@ -import: db/pre-re/item_bluebox.txt -import: db/pre-re/item_violetbox.txt -import: db/pre-re/item_cardalbum.txt -import: db/item_findingore.txt -import: db/pre-re/item_giftbox.txt -import: db/pre-re/item_misc.txt diff --git a/db/pre-re/item_misc.txt b/db/pre-re/item_misc.txt deleted file mode 100644 index 5f6752135..000000000 --- a/db/pre-re/item_misc.txt +++ /dev/null @@ -1,559 +0,0 @@ -// GroupID,ItemID,Rate -// -// Cookie Bag -7,529,5 //Candy -7,530,5 //Candy Cane -7,538,5 //Well-baked Cookie -7,539,5 //Piece of Cake -7,558,1 //Chocolate -7,559,1 //Hand-made Chocolate -7,560,1 //Hand-made White Chocolate -7,561,1 //White Chocolate -7,564,5 //Rice Ball -7,570,5 //Lucky Candy -7,571,5 //Lucky Candy Cane -7,572,5 //Lucky Cookie -7,573,1 //Chocolate Drink -7,12122,1 //Sesame Pastry -7,12123,1 //Honey Pastry -7,12124,1 //Rainbow Cake -// First Aid Kit -8,501,5 // Red Potion -8,502,5 // Orange Potion -8,503,5 // Yellow Potion -8,504,5 // White Potion -8,505,5 // Blue Potion -8,506,5 // Green Potion -8,545,5 // Condensed Red Potion -8,546,5 // Condensed Yellow Potion -8,547,5 // Condensed White Potion -8,569,5 // Novice Potion -8,605,5 // Anodyne -8,645,5 // Concentration Potion -8,656,5 // Awakening Potion -8,657,5 // Berserk Potion -8,678,1 // Poison Bottle -8,12016,5 // Speed Potion -8,12017,5 // Slow Potion -8,12020,5 // Cursed_Water -// Herbs -9,507,1 // Red Herb -9,508,1 // Yellow Herb -9,509,1 // White Herb -// Fruits -10,512,1 // Apple -10,513,1 // Banana -10,514,1 // Grape -10,515,1 // Carrot -10,516,1 // Potato -// Meat -11,517,1 // Meat -11,528,1 // Monster Food -// Candy -12,529,1 // Candy -12,530,1 // Candy Cane -// Juice -13,531,1 // Apple Juice -13,532,1 // Banana Juice -13,534,1 // Carrot Juice -// Fish -14,544,1 // Raw Fish -14,551,1 // Sushi -// Boxes -15,603,1 // Old Blue Box -15,617,1 // Old Purple Box -15,644,1 // Gift Box -// Gemstones -16,715,1 // Yellow Gemstone -16,716,1 // Red Gemstone -16,717,1 // Blue Gemstone -// Elemental Resist Potions -17,12118,1 // Fire Resist Potion -17,12119,1 // Cold Resist Potion -17,12120,1 // Earth Resist Potion -17,12121,1 // Thunder Resist Potion -// Ores -18,1002,30 // Iron_Ore -18,998,28 // Iron -18,993,26 // Yellow_Live -18,1003,24 // Coal -18,992,22 // Wind_Of_Verdure -18,1010,20 // Phracon -18,991,18 // Crystal_Blue -18,990,16 // Boody_Red -18,999,14 // Steel -18,1011,12 // Emveretarcon -18,757,10 // Elunium_Stone -18,756,9 // Oridecon_Stone -18,997,8 // Great_Nature -18,996,7 // Rough_Wind -18,995,6 // Mistic_Frozen -18,994,5 // Flame_Heart -18,985,4 // Elunium -18,984,3 // Oridecon -18,969,2 // Gold -18,714,1 // Emperium -// Food Types -19,526,5 // Royal_Jelly -19,12042,10 // Str_Dish02 -19,12057,10 // Agi_Dish02 -19,12053,10 // Vit_Dish03 -19,12062,10 // Dex_Dish02 -19,12068,10 // Luk_Dish03 -19,12047,10 // Int_Dish02 -19,531,30 // Apple_Juice -19,532,30 // Banana_Juice -19,533,30 // Grape_Juice -19,534,30 // Carrot_Juice -19,538,30 // Well_Baked_Cookie -19,536,50 // Ice_Cream -19,544,50 // Fish_Slice -19,548,50 // Cheese -19,551,50 // Shusi -19,553,50 // Bun -19,554,50 // Mojji -19,535,50 // Pumpkin -19,516,100 // Sweet_Potato -19,513,100 // Banana -19,512,600 // Apple -// Recovery Types -20,522,5 // Fruit_Of_Mastela -20,521,5 // Leaflet_Of_Aloe -20,520,10 // Leaflet_Of_Hinal -20,545,10 // Red_Slim_Potion -20,12118,10 // Resist_Earth -20,508,20 // Yellow_Herb -20,501,20 // Red_Potion -20,511,30 // Green_Herb -20,507,30 // Red_Herb -20,569,50 // Novice_Potion -20,549,50 // Nice_Sweet_Potato -20,529,100 // Candy -20,528,200 // Monster's_Feed -20,550,600 // Popped_Rice -// Minerals - Unused -21,714,1 // Emperium -21,756,1 // Rough Oridecon -21,757,1 // Rough Elunium -21,969,1 // Gold -21,984,1 // Oridecon -21,985,1 // Elunium -21,990,1 // Red Blood -21,991,1 // Crystal Blue -21,992,1 // Wind of Verdure -21,993,1 // Green Live -21,994,1 // Flame Heart -21,995,1 // Mystic Frozen -21,996,1 // Rough Wind -21,997,1 // Great Nature -21,998,1 // Iron -21,999,1 // Steel -21,1002,1 // Iron Ore -21,1003,1 // Coal -21,1010,1 // Phracon -21,1011,1 // Emveretarcon -// Set Of Taiming Item -22,619,1 // Unripe Apple -22,620,1 // Orange Juice -22,621,1 // Bitter Herb -22,622,1 // Rainbow Carrot -22,623,1 // Earthworm the Dude -22,624,1 // Rotten Fish -22,625,1 // Rusty Iron -22,626,1 // Monster Juice -22,627,1 // Sweet Milk -22,628,1 // Well-Dried Bone -22,629,1 // Singing Flower -22,630,1 // Dew Laden Moss -22,631,1 // Deadly Noxious Herb -22,632,1 // Fatty Chubby Earthworm -22,633,1 // Sweet Potato -22,634,1 // Tropical Banana -22,635,1 // Orc Trophy -22,636,1 // No Recipient -22,637,1 // Old Broom -22,638,1 // Silver Knife of Chastity -22,639,1 // Armlet of Obedience -22,640,1 // Shining Stone -22,641,1 // Contracts in Shadow -22,642,1 // Book of the Devil -22,659,1 // Her Heart -22,660,1 // Forbidden Red Candle -22,661,1 // Soft Apron -22,10001,1 // Skull Helm -22,10002,1 // Monster Oxygen Mask -22,10003,1 // Transparent Headgear -22,10004,1 // Pacifier -22,10005,1 // Wig -22,10006,1 // Queen's Hair Ornament -22,10007,1 // Silk Ribbon -22,10008,1 // Punisher -22,10009,1 // Wild Flower -22,10010,1 // Battered Pot -22,10011,1 // Stellar Hairpin -22,10012,1 // Tiny Egg Shell -22,10013,1 // Backpack -22,10014,1 // Rocker Glasses -22,10015,1 // Green Lace -22,10016,1 // Golden Bell -22,10017,1 // Bark Shorts -22,10018,1 // Monkey Circlet -22,10019,1 // Red Scarf -22,10020,1 // Grave Keeper's Sword -22,12373,1 // Boy's Pure Heart -22,12374,1 // Ice Fireworks -22,12395,1 // Tantan Noodle -// Bundle Of Magic Scroll -23,686,1 // Level 3 Earth Spike -23,687,1 // Level 5 Earth Spike -23,688,1 // Level 3 Cold Bolt -23,689,1 // Level 5 Cold Bolt -23,690,1 // Level 3 Fire Bolt -23,691,1 // Level 5 Fire Bolt -23,692,1 // Level 3 Lightening Bolt -23,693,1 // Level 5 Lightening Bolt -23,694,1 // Level 3 Soul Strike -23,695,1 // Level 5 Soul Strike -23,696,1 // Level 1 Fire Ball -23,697,1 // Level 5 Fire Ball -23,698,1 // Level 1 Fire Wall -23,699,1 // Level 5 Fire Wall -23,700,1 // Level 1 Frost Diver -23,12000,1 // Level 5 Frost Diver -23,12001,1 // Level 3 Heal -23,12002,1 // Level 5 Heal -// Random Quiver -24,12004,1 // Quiver -24,12005,1 // Iron Arrow Quiver -24,12006,1 // Steel Arrow Quiver -24,12007,1 // Oridecon Arrow Quiver -24,12008,1 // Fire Arrow Quiver -24,12009,1 // Silver Arrow Quiver -24,12010,1 // Wind Arrow Quiver -24,12011,1 // Stone Arrow Quiver -24,12012,1 // Crystal Arrow Quiver -24,12013,1 // Shadow Arrow Quiver -24,12014,1 // Immaterial Arrow Quiver -24,12015,1 // Rusty Arrow Quiver -24,12183,2 // Holy Arrow Quiver -// Wrapped Mask -25,2278,10 // Mr. Smile -25,2281,10 // Opera Masque -25,2288,10 // Mr. Scream -25,2292,10 // Welding Mask -25,2297,10 // Goblin Mask -25,5005,10 // Gas Mask -25,5086,10 // Alarm Mask -25,5087,10 // Poker Face -25,5088,10 // Surprised Mask -25,5089,10 // Annoyed Mask -25,5090,10 // Goblin Leader Mask -25,5121,1 // Zherlthsh Mask -25,5176,2 // Hahoe Mask -// Accessory Box -26,2601,10 // Ring -26,2602,11 // Earring -26,2603,12 // Necklace -26,2604,12 // Glove -26,2605,12 // Brooch -26,2607,12 // Clip -26,2608,14 // Rosary -26,2609,14 // Skull Ring -26,2610,14 // Gold Ring -26,2611,14 // Silver Ring -26,2612,14 // Flower Ring -26,2613,11 // Diamond Ring -26,2615,1 // Safety Ring -26,2616,1 // Critical Ring -26,2617,10 // Celebrant's Mitten -26,2618,11 // Matyr's Leash -26,2619,10 // Bow Thimble -26,2621,1 // Ring -26,2622,1 // Earring -26,2623,10 // Necklace -26,2624,1 // Glove -26,2625,1 // Brooch -26,2626,1 // Rosary -26,2627,10 // Belt -26,2628,14 // Novice Armlet -26,2654,1 // Shinobi Sash -26,2656,1 // Armor Charm -26,2658,10 // Nile Rose -26,2659,2 // Vesper Core 01 -26,2660,2 // Vesper Core 02 -26,2661,2 // Vesper Core 03 -26,2662,2 // Vesper Core 04 -26,2671,1 // Bow Thimble -26,2677,1 // Spiritual Ring -26,2680,9 // Ring of Minor Spirits -26,2700,2 // Red Silk of Seal -26,2701,1 // Glove of Orleans -26,2703,1 // Expert Ring -26,2716,1 // Librarian Glove -26,2717,1 // Pocket Watch -26,2718,1 // Lunatic Brooch -26,2719,1 // Iron Wrist -// jewels -27,715,100 // Yellow_Gemstone -27,716,100 // Red_Gemstone -27,717,100 // Blue_Gemstone -27,718,10 // Dark_Red_Jewel -27,719,10 // Violet_Jewel -27,720,10 // Skyblue_Jewel -27,721,10 // Azure_Jewel -27,722,10 // Scarlet_Jewel -27,723,10 // Cardinal_Jewel -27,724,10 // Cardinal_Jewel_ -27,725,10 // Red_Jewel -27,726,10 // Blue_Jewel -27,727,10 // White_Jewel -27,728,10 // Golden_Jewel -27,729,10 // Bluish_Green_Jewel -27,730,5 // Crystal_Jewel -27,731,4 // Crystal_Jewel_ -27,732,3 // Crystal_Jewel__ -27,733,27 // Crystal_Jewel___ -27,746,50 // Glass_Bead -// Egg Boy -32,514,300 // Grape -32,564,522 // Rice Ball -32,660,20 // Forbidden Red Candle -32,682,100 // Distilled Fighting Spirit -32,683,50 // Herb of Incantation -32,2274,5 // Ghost Bandana -32,5072,2 // Incubus Horn -// Egg Girl -33,514,300 // Grape -33,564,522 // Rice Ball -33,661,20 // Soft Apron -33,682,100 // Distilled Fighting Spirit -33,683,50 // Herb of Incantation -33,5042,5 // Bao Bao -33,5066,2 // Succubus Horn -// Lotto Box -35,7391,1 // Lotto Ball 31 -35,7392,1 // Lotto Ball 32 -35,7393,1 // Lotto Ball 33 -35,7394,1 // Lotto Ball 34 -35,7395,1 // Lotto Ball 35 -35,7396,1 // Lotto Ball 36 -35,7397,1 // Lotto Ball 37 -35,7398,1 // Lotto Ball 38 -35,7540,1 // Lotto Ball 39 -35,7541,1 // Lotto Ball 40 -// Food Package -36,512,1 // Apple -36,513,1 // Banana -36,514,1 // Grape -36,515,1 // Carrot -36,516,1 // Potato -36,517,1 // Meat -36,518,1 // Honey -36,519,1 // Milk -36,520,1 // Hinalle Leaflet -36,521,1 // Aloe Leaflet -36,522,1 // Mastela Fruit -36,526,1 // Royal Jelly -36,529,1 // Candy -36,530,1 // Candy Cane -36,531,1 // Apple Juice -36,532,1 // Banana Juice -36,533,1 // Grape Juice -36,534,1 // Carrot Juice -36,536,1 // Ice Cream -36,538,1 // Well-baked Cookie -36,539,1 // Piece of Cake -36,544,1 // Raw Fish -36,548,1 // Cheese -36,549,1 // Yam -36,550,1 // Rice Cake -36,551,1 // Sushi -36,553,1 // Bao -36,554,1 // Mochi -36,555,1 // Traditional Rice Cake -36,556,1 // Rice Cake Stick -36,557,1 // Neatly Sliced Rice Cake -36,558,1 // Chocolate -36,559,1 // Hand-made Chocolate -36,560,1 // Hand-made White Chocolate -36,561,1 // White Chocolate -36,564,1 // Rice Ball -36,566,1 // Tom Yum Goong -36,567,1 // Shrimp -36,568,1 // Lemon -36,576,1 // Prickly Fruit -36,607,1 // Yggdrasil Berry -36,608,1 // Yggdrasil Seed -36,663,1 // Songpyun -36,669,1 // Rice-Cake Soup -// Potions -37,501,1 // Red Potion -37,502,1 // Orange Potion -37,503,1 // Yellow Potion -37,504,1 // White Potion -// Red Box_ -38,5137,1 // Alice Doll -38,5138,9 // Magic Eyes -38,5139,10 // Lotus -38,5140,10 // Kawaii Ribbon -// Old Bleu Box -39,519,1 // Milk -39,538,1 // Well-baked Cookie -39,644,1 // Gift Box -39,687,1 // Level 5 Earth Spike -39,689,1 // Level 5 Cold Bolt -39,691,1 // Level 5 Fire Bolt -39,693,1 // Level 5 Lightening Bolt -39,697,1 // Level 5 Fire Ball -39,699,1 // Level 5 Fire Wall -39,12000,1 // Level 5 Frost Diver -39,12002,1 // Level 5 Heal -// Red Box -40,5099,1 // Neko Mimi -40,5137,11 // Alice Doll -40,5138,11 // Magic Eyes -40,5139,11 // Lotus -40,5140,11 // Kawaii Ribbon -40,5142,11 // Crescent Helm -40,5143,12 // Kabuki Mask -40,5152,1 // Phoenix Crown -40,5181,11 // Helm of Darkness -40,5182,1 // Puppy Hat -40,5183,11 // Nest Hat -40,5185,11 // Laurel Crown -40,5186,11 // Geographer Decoration -40,5187,10 // Twin Ribbon -// Green Box -41,573,100 // Chocolate Drink -41,607,99 // Yggdrasil Berry -41,608,100 // Yggdrasil Seed -41,5182,1 // Puppy Hat -41,12018,100 // Firecracker -41,12075,100 // Steamed Tongue -41,12080,100 // Dragon Breath Cocktail -41,12085,100 // Immortal Stew -41,12090,100 // Steamed Desert Scorpions -41,12095,100 // Hwergelmir's Tonic -41,12100,100 // Cooked Nine Tail -// Old Yellow Box -42,5259,1 // Elephant Hat -42,5260,1 // Cookie Hat -42,5261,1 // Silver Tiara -42,5262,1 // Golden Tiara -// Hometown Gift -45,663,1 // Korean Rice Cake -45,12122,1 // Sesame Pastry -45,12123,1 // Honey Pastry -45,12124,1 // Rainbow Cake -45,12195,1 // Plain Rice Cake -45,12196,1 // Hearty Rice Cake -45,12197,1 // Salty Rice Cake -45,12198,1 // Lucky Rice Cake -// Masquerade Ball Box -46,5296,10 // Drooping Nine Tail -46,5297,1 // Soul Wing -46,5298,10 // Dokebi's Wig -46,5299,10 // Pagdayaw -// Tresure Box WoE -47,603,6 // Old Blue Box -47,658,6 // Tribal Solidarity -47,678,3 // Poison Bottle -47,732,9 // 3carat Diamond -47,12010,24 // Wind Arrow Quiver -47,12011,25 // Stone Arrow Quiver -47,12012,26 // Crystal Arrow Quiver -47,12105,12 // Taming Gift Set -47,12107,2 // Wrapped Mask -47,12108,9 // Scroll Package -47,12110,9 // First Aid Kit -47,12111,36 // Bundle of Food -47,12130,48 // Cookie Bag -47,12149,27 // Bullet Casing -47,12150,27 // Shell of Blood Casing -47,12151,27 // Silver Bullet Casing -47,12183,7 // Holy Arrow Quiver -47,12194,6 // Present from Home -47,12260,22 // Summer Event Suit -47,12702,8 // Old Bleu Box -// Masquerade Ball Box2 -48,5211,1 // Ribbon Hat -48,5213,13 // Rabbit Ears -48,5289,10 // Vanilmirth Hat -48,5304,10 // Executioner Hood -// Easter Scroll -49,636,110 // No Recipient -49,637,110 // Old Broom -49,638,110 // Silver Knife of Chastity -49,639,110 // Armlet of Obedience -49,640,110 // Shining Stone -49,641,110 // Contracts in Shadow -49,642,110 // Book of the Devil -49,643,205 // Pet Incubator -49,659,110 // Her Heart -49,2264,1 // Munak Hat -49,2274,1 // Ghost Bandana -49,5046,1 // Bongun Hat -49,5167,1 // Munak Hat [1] -49,5168,1 // Bongun Hat [1] -// Pierre Treasurebox -50,603,11 // Old Blue Box -50,604,3 // Dead Branch -50,617,5 // Old Purple Box -50,644,3 // Gift Box -50,975,3 // Scarlet Dyestuff -50,976,3 // Lemon Dyestuff -50,978,3 // Cobaltblue Dyestuff -50,979,3 // Darkgreen Dyestuff -50,980,3 // Orange Dyestuff -50,981,3 // Violet Dyestuff -50,982,3 // White Dyestuff -50,983,3 // Black Dyestuff -50,7289,3 // Peridot -50,7290,3 // Phlogopite -50,7291,3 // Agate -50,7292,3 // Muscovite -50,7293,3 // Rose Quartz -50,7294,3 // Turquoise -50,7295,3 // Citrin -50,7296,3 // Pyroxene -50,7297,3 // Biotite -50,12018,3 // Firecracker -50,12075,3 // Steamed Tongue -50,12085,3 // Immortal Stew -50,12090,3 // Steamed Desert Scorpions -50,12095,3 // Hwergelmir's Tonic -50,12100,3 // Cooked Nine Tail -50,12103,1 // Bloody Branch -// Cherish Box -51,5454,1 // Puppy Hat -51,5455,4 // Decorative Geographer -51,5456,5 // Summer Hat -// Cherish Box Ori -52,2712,3 // Collector's Edition Book -52,5212,2 // Solar Panels -52,5256,1 // Valkyrie Feather Band -52,5305,2 // Pirate Dagger -52,5332,2 // Loki Mask -// Louise_Costume_Box -53,12132,18 // Red_Bag -53,12260,2 // Cool_Summer_Outfit -// Xmas_Gift -54,559,18 // Light_Orange_Pot -54,560,18 // HandMade_Chocolate_ -54,573,18 // Chocolate_Drink -54,603,24 // Old_Blue_Box -54,644,66 // Gift_Box -54,732,12 // Crystal_Jewel__ -54,5136,12 // Santa's_Hat_ -54,12016,12 // Speed_Up_Potion -54,12017,12 // Slow_Down_Potion -54,12105,6 // Set_Of_Taiming_Item -54,12107,6 // Wrapped_Mask -54,12108,12 // Bundle_Of_Magic_Scroll -54,12110,12 // First_Aid_Kit -54,12130,12 // Cookie_Bag -54,12132,6 // Red_Bag -54,12354,24 // Buche_De_Noel -54,12702,36 // Old_Bleu_Box -54,14546,6 // Fire_Cracker_Love -54,14550,6 // Fire_Cracker_Xmas diff --git a/db/pre-re/item_packages.conf b/db/pre-re/item_packages.conf new file mode 100644 index 000000000..f2f467681 --- /dev/null +++ b/db/pre-re/item_packages.conf @@ -0,0 +1,6116 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +Special_Box: { + Wrapped_Mask: { + Rate: 3 + } + Poison_Bottle: { + Count: 2 + Rate: 10 + } + Set_Of_Taiming_Item: { + Rate: 5 + } + Cookie_Bag: { + Count: 2 + Rate: 100 + } + Mysterious_Can2: { + Count: 3 + Rate: 80 + } + Mysterious_PET_Bottle2: { + Count: 3 + Rate: 80 + } + Speed_Up_Potion: { + Count: 2 + Rate: 80 + } + Old_Blue_Box: { + Rate: 19 + } + Branch_Of_Dead_Tree: { + Count: 5 + Rate: 14 + } + First_Aid_Kit: { + Rate: 19 + } + Dried_Yggdrasilberry: { + Count: 3 + Rate: 70 + } + Angeling_Potion: { + Count: 3 + Rate: 70 + } + Ygnizem_Scroll: { + Count: 2 + Rate: 50 + } + Doppelganger_Scroll: { + Count: 2 + Rate: 50 + } + Wild_Rose_Scroll: { + Count: 2 + Rate: 60 + } + Gift_Box: { + Rate: 70 + } + Red_Bag: { + Count: 3 + Rate: 70 + } + Cool_Summer_Outfit: { + Count: 3 + Rate: 70 + } + Slow_Down_Potion: { + Count: 2 + Rate: 80 + } +} +Tresure_Box_WoE: { + Majestic_Goat_Repl: { + Rate: 5 + } + Jewel_Crown_Repl: { + Rate: 15 + } + Prontera_Army_Cap_Repl: { + Rate: 20 + } + Feather_Bonnet_Repl: { + Rate: 20 + } + Viking_Helm_Repl: { + Rate: 20 + } + Mysterious_Can: { + Count: 10 + Rate: 50 + } + Mysterious_PET_Bottle: { + Count: 10 + Rate: 50 + } + Mysterious_Can2: { + Count: 10 + Rate: 50 + } + Mysterious_PET_Bottle2: { + Count: 10 + Rate: 50 + } + Hometown_Gift: { + Count: 10 + Rate: 50 + } + Yggdrasilberry: { + Count: 5 + Rate: 30 + } + Seed_Of_Yggdrasil: { + Count: 10 + Rate: 50 + } + Dried_Yggdrasilberry: { + Count: 10 + Rate: 50 + } + Unripe_Fruit: { + Count: 5 + Rate: 50 + } + First_Aid_Kit: { + Count: 10 + Rate: 40 + } + Gift_Box: { + Count: 5 + Rate: 250 + } + Comp_Battle_Manual: { + Count: 3 + Rate: 20 + } + Old_Blue_Box: { + Count: 5 + Rate: 180 + } +} +RWC_Parti_Box: { + Wrapped_Mask: { + Rate: 3 + } + Poison_Bottle: { + Count: 2 + Rate: 10 + } + Set_Of_Taiming_Item: { + Rate: 5 + } + Cookie_Bag: { + Count: 2 + Rate: 90 + } + Mysterious_Can2: { + Count: 3 + Rate: 70 + } + Mysterious_PET_Bottle2: { + Count: 3 + Rate: 70 + } + Speed_Up_Potion: { + Count: 2 + Rate: 60 + } + Old_Violet_Box: { + Rate: 19 + } + Cat_Foot_Hairpin: { + Rate: 10 + } + Int_Dish10: { + Count: 2 + Rate: 35 + } + Vit_Dish10: { + Count: 2 + Rate: 35 + } + Agi_Dish10: { + Count: 2 + Rate: 35 + } + Dex_Dish10: { + Count: 2 + Rate: 35 + } + Luk_Dish10: { + Count: 2 + Rate: 35 + } + Str_Dish10: { + Count: 2 + Rate: 35 + } + Branch_Of_Dead_Tree: { + Count: 3 + Rate: 14 + } + Dried_Yggdrasilberry: { + Count: 3 + Rate: 70 + } + Angeling_Potion: { + Count: 3 + Rate: 50 + } + Ygnizem_Scroll: { + Count: 2 + Rate: 50 + } + Doppelganger_Scroll: { + Count: 2 + Rate: 50 + } + Wild_Rose_Scroll: { + Count: 2 + Rate: 50 + } + Old_Blue_Box: { + Rate: 50 + } + Hometown_Gift: { + Count: 2 + Rate: 99 + } + Pink_Drooping_Kitty: { + Rate: 10 + } + Red_Deviruchi_Cap: { + Rate: 10 + } +} +RWC_Final_Comp_Box: { + Comp_Battle_Manual: { + Random: false + Count: 2 + } + Comp_Insurance: { + Random: false + Count: 2 + } + Enriched_Slim_Pot: { + Random: false + Count: 30 + } + Fricco_Shoes: { + Random: false + } + Rider_Insignia: { + Random: false + } + Undershirt_: { + Random: false + } + Muffler_: { + Random: false + } +} +Gift_Bundle: { + White_Slim_Potion: { + Random: false + Count: 30 + } + Seed_Of_Yggdrasil: { + Random: false + Count: 2 + } + GM_Handwriting: { + Random: false + } +} +Crumpled_Paper: { + Calender_January: { + Rate: 84 + } + Calender_February: { + Rate: 84 + } + Calender_March: { + Rate: 84 + } + Calender_April: { + Rate: 84 + } + Calender_May: { + Rate: 83 + } + Calender_June: { + Rate: 83 + } + Calender_July: { + Rate: 83 + } + Calender_August: { + Rate: 83 + } + Calender_September: { + Rate: 83 + } + Calender_October: { + Rate: 83 + } + Calender_November: { + Rate: 83 + } + Calender_December: { + Rate: 83 + } +} +Solo_Gift_Basket: { + Lovely_Choco_Tart: { + Random: false + Count: 5 + } + Cute_Strawberry_Choco: { + Random: false + Count: 3 + } + White_Chocolate: { + Random: false + Count: 3 + } + Chocolate_Drink: { + Random: false + Count: 4 + } + HandMade_Chocolate: { + Random: false + Count: 10 + } + HandMade_Chocolate_: { + Random: false + Count: 10 + } +} +Couple_Event_Basket: { + Fire_Cracker_Love: { + Random: false + Count: 10 + } + Fire_Cracker_Wday: { + Random: false + Count: 10 + } + /* not yet supported/unknown Fire_Cracker_Vday: { + Random: false + Count: 10 + }*/ + Fire_Cracker_Bday: { + Random: false + Count: 10 + } + Fire_Cracker_Xmas: { + Random: false + Count: 10 + } +} +GM_Warp_Box: { + Wing_Of_Fly: { + Count: 3 + Rate: 155 + } + Wing_Of_Butterfly: { + Count: 3 + Rate: 155 + } + Warp_Free_Ticket: { + Count: 3 + Rate: 150 + } + WOB_Rune: { + Count: 3 + Rate: 140 + } + WOB_Schwaltz: { + Count: 3 + Rate: 140 + } + WOB_Rachel: { + Count: 3 + Rate: 130 + } + WOB_Local: { + Count: 3 + Rate: 130 + } +} +Fortune_Cookie1: { + Bless_Word_Paper1: { + Rate: 100 + } + Bless_Word_Paper2: { + Rate: 100 + } + Bless_Word_Paper3: { + Rate: 100 + } + Bless_Word_Paper4: { + Rate: 100 + } + Bless_Word_Paper5: { + Rate: 100 + } + Bless_Word_Paper6: { + Rate: 100 + } + Bless_Word_Paper7: { + Rate: 100 + } + Bless_Word_Paper8: { + Rate: 100 + } + Bless_Word_Paper9: { + Rate: 100 + } + Bless_Word_Paper10: { + Rate: 100 + } +} +Fortune_Cookie2: { + Guidebook_Exchange: { + Random: false + Announce: true + } +} +Fortune_Cookie3: { + Free_Cash_Coupon: { + Random: false + Announce: true + } +} +New_Gift_Envelope: { + Honey_Pastry: { + Rate: 115 + } + Lucky_Cookie03: { + Count: 3 + Rate: 50 + } + Gingerbread: { + Count: 3 + Rate: 50 + } + Guyak_Pudding: { + Count: 10 + Rate: 150 + } + New_Year_Bun: { + Count: 10 + Rate: 250 + } + Charm_Of_Happiness: { + Count: 2 + Rate: 80 + } + Halohalo: { + Count: 2 + Rate: 80 + } + Branch_Of_Dead_Tree: { + Count: 2 + Rate: 80 + } + Traditional_Firecrack: { + Rate: 100 + } + Magic_Card_Album: { + Rate: 5 + } +} +Passion_FB_Hat_Box: { + Passion_FB_Hat: { + Random: false + } +} +Cool_FB_Hat_Box: { + Cool_FB_Hat: { + Random: false + } +} +Victory_FB_Hat_Box: { + Victory_FB_Hat: { + Random: false + } +} +Glory_FB_Hat_Box: { + Glory_FB_Hat: { + Random: false + Expire: 24 + } +} +Passion_Hat_Box2: { + Passion_FB_Hat: { + Random: false + Expire: 6 + } +} +Cool_Hat_Box2: { + Cool_FB_Hat: { + Random: false + Expire: 6 + } +} +Victory_Hat_Box2: { + Victory_FB_Hat: { + Random: false + Expire: 6 + } +} +Aspersio_5_Scroll_Box: { + Aspersio_5_Scroll: { + Random: false + Count: 10 + Named: true + } +} +Pet_Egg_Scroll_Box1: { + Pet_Egg_Scroll1: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box2: { + Pet_Egg_Scroll2: { + Random: false + Named: true + } +} +Pet_Egg_Scroll1: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Insurance: { + Count: 2 + Named: true + Rate: 200 + } + Enriched_Oridecon: { + Named: true + Rate: 80 + } + Kafra_Card: { + Count: 2 + Named: true + Rate: 300 + } + Adrenaline_Scroll: { + Count: 2 + Named: true + Rate: 300 + } + Neuralizer: { + Named: true + Rate: 10 + } + Red_Deviruchi_Cap: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll2: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 90 + } + Wind_Walk_10_Scroll: { + Count: 2 + Named: true + Rate: 150 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 200 + } + Aspersio_5_Scroll: { + Count: 2 + Named: true + Rate: 200 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Red_Wizardry_Hat: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll_Box3: { + Pet_Egg_Scroll3: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box4: { + Pet_Egg_Scroll4: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box5: { + Pet_Egg_Scroll5: { + Random: false + Named: true + } +} +Pet_Egg_Scroll3: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Insurance: { + Count: 2 + Named: true + Rate: 200 + } + Enriched_Oridecon: { + Named: true + Rate: 80 + } + Kafra_Card: { + Count: 2 + Named: true + Rate: 300 + } + Adrenaline_Scroll: { + Count: 2 + Named: true + Rate: 300 + } + Neuralizer: { + Named: true + Rate: 10 + } + Pink_Drooping_Kitty: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll4: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 90 + } + Wind_Walk_10_Scroll: { + Count: 2 + Named: true + Rate: 150 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 200 + } + Aspersio_5_Scroll: { + Count: 2 + Named: true + Rate: 200 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Pink_Fur_Hat: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll5: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 150 + } + Enriched_Elunium: { + Named: true + Rate: 135 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 300 + } + Mini_Propeller_: { + Named: true + Rate: 5 + } + Bubble_Gum: { + Named: true + Rate: 200 + } + White_Wizardry_Hat: { + Named: true + Rate: 10 + } +} +Infiltrator_Box: { + Infiltrator_C: { + Random: false + Expire: 168 + Named: true + } +} +Muramasa_Box: { + Muramasa_C: { + Random: false + Expire: 168 + Named: true + } +} +Excalibur_Box: { + Excalibur_C: { + Random: false + Expire: 168 + Named: true + } +} +Combat_Knife_Box: { + Combat_Knife_C: { + Random: false + Expire: 168 + Named: true + } +} +Counter_Dagger_Box: { + Counter_Dagger_C: { + Random: false + Expire: 168 + Named: true + } +} +Kaiser_Knuckle_Box: { + Kaiser_Knuckle_C: { + Random: false + Expire: 168 + Named: true + } +} +Pole_Axe_Box: { + Pole_Axe_C: { + Random: false + Expire: 168 + Named: true + } +} +Mighty_Staff_Box: { + Mighty_Staff_C: { + Random: false + Expire: 168 + Named: true + } +} +Right_Epsilon_Box: { + Right_Epsilon_C: { + Random: false + Expire: 168 + Named: true + } +} +Balistar_Box: { + Balistar_C: { + Random: false + Expire: 168 + Named: true + } +} +Diary_Of_Great_Sage_Box: { + Diary_Of_Great_Sage_C: { + Random: false + Expire: 168 + Named: true + } +} +Asura_Box: { + Asura_C: { + Random: false + Expire: 168 + Named: true + } +} +Apple_Of_Archer_Box: { + Apple_Of_Archer_C: { + Random: false + Expire: 168 + Named: true + } +} +Bunny_Band_Box: { + Bunny_Band_C: { + Random: false + Expire: 168 + Named: true + } +} +Sahkkat_Box: { + Sahkkat_C: { + Random: false + Expire: 168 + Named: true + } +} +Lord_Circlet_Box: { + Lord_Circlet_C: { + Random: false + Expire: 168 + Named: true + } +} +Elven_Ears_Box: { + Elven_Ears_C: { + Random: false + Expire: 168 + Named: true + } +} +Steel_Flower_Box: { + Steel_Flower_C: { + Random: false + Expire: 168 + Named: true + } +} +Critical_Ring_Box: { + Critical_Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Earring_Box: { + Earring_C: { + Random: false + Expire: 168 + Named: true + } +} +Ring_Box: { + Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Necklace_Box: { + Necklace_C: { + Random: false + Expire: 168 + Named: true + } +} +Glove_Box: { + Glove_C: { + Random: false + Expire: 168 + Named: true + } +} +Brooch_Box: { + Brooch_C: { + Random: false + Expire: 168 + Named: true + } +} +Rosary_Box: { + Rosary_C: { + Random: false + Expire: 168 + Named: true + } +} +Safety_Ring_Box: { + Safety_Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core01_Box: { + Vesper_Core01_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core02_Box: { + Vesper_Core02_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core03_Box: { + Vesper_Core03_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core04_Box: { + Vesper_Core04_C: { + Random: false + Expire: 168 + Named: true + } +} +Pet_Egg_Scroll_Box6: { + Pet_Egg_Scroll6: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box7: { + Pet_Egg_Scroll7: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box8: { + Pet_Egg_Scroll8: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box9: { + Pet_Egg_Scroll9: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box10: { + Pet_Egg_Scroll10: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box11: { + Pet_Egg_Scroll11: { + Random: false + Named: true + } +} +Pet_Egg_Scroll6: { + Battle_Manual_Box: { + Named: true + Rate: 200 + } + Enriched_Elunium_Box: { + Named: true + Rate: 195 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 400 + } + Bubble_Gum_Box: { + Named: true + Rate: 200 + } + Pair_Of_Red_Ribbon_: { + Named: true + Rate: 2 + } + Drooping_Kitty_: { + Named: true + Rate: 1 + } + Orc_Hero_Helm_TW: { + Named: true + Rate: 1 + } + Magestic_Goat_TW: { + Named: true + Rate: 1 + } +} +Pet_Egg_Scroll7: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 80 + } + Insurance: { + Count: 2 + Named: true + Rate: 30 + } + Enriched_Oridecon: { + Count: 2 + Named: true + Rate: 120 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 190 + } + Megaphone_: { + Count: 5 + Named: true + Rate: 190 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 50 + } + Vit_Dish10: { + Count: 5 + Named: true + Rate: 200 + } + Bloody_Dead_Branch: { + Named: true + Rate: 120 + } + Succubus_Card: { + Named: true + Rate: 2 + } + Incubus_Card: { + Named: true + Rate: 2 + } + Smoking_Pipe_: { + Named: true + Rate: 5 + } + Pair_Of_Red_Ribbon_: { + Named: true + Rate: 9 + } +} +Pet_Egg_Scroll8: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 80 + } + Wind_Walk_10_Scroll: { + Count: 5 + Named: true + Rate: 60 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 120 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 244 + } + Neuralizer: { + Named: true + Rate: 1 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 10 + Named: true + Rate: 200 + } + Agi_Dish10: { + Count: 5 + Named: true + Rate: 100 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 30 + } + Silver_Tiara: { + Named: true + Rate: 3 + } + Magestic_Goat_TW: { + Named: true + Rate: 3 + } + Fish_On_Head_: { + Named: true + Rate: 9 + } +} +Pet_Egg_Scroll9: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 200 + } + Insurance: { + Count: 2 + Named: true + Rate: 50 + } + Enriched_Oridecon: { + Count: 2 + Named: true + Rate: 160 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 80 + } + Adrenaline_Scroll: { + Count: 5 + Named: true + Rate: 200 + } + Neuralizer: { + Named: true + Rate: 1 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 60 + } + Str_Dish10: { + Count: 5 + Named: true + Rate: 208 + } + Dark_Illusion_Card: { + Named: true + Rate: 5 + } + Dark_Lord_Card: { + Named: true + Rate: 1 + } + Orc_Hero_Helm_TW: { + Named: true + Rate: 5 + } + Bunny_Band_: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll10: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Wind_Walk_10_Scroll: { + Count: 5 + Named: true + Rate: 80 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 100 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 200 + } + Megaphone_: { + Count: 5 + Named: true + Rate: 160 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 100 + } + Yggdrasilberry: { + Count: 10 + Named: true + Rate: 152 + } + Int_Dish10: { + Count: 5 + Named: true + Rate: 100 + } + Injustice_Card: { + Named: true + Rate: 2 + } + Zherlthsh_Card: { + Named: true + Rate: 2 + } + Angelic_Chain_: { + Named: true + Rate: 2 + } + Satanic_Chain_: { + Named: true + Rate: 2 + } +} +Pet_Egg_Scroll11: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 115 + } + Enriched_Elunium: { + Count: 2 + Named: true + Rate: 90 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 205 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 205 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 115 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 55 + } + Dex_Dish10: { + Count: 5 + Named: true + Rate: 205 + } + Owl_Baron_Card: { + Named: true + Rate: 2 + } + Owl_Duke_Card: { + Named: true + Rate: 2 + } + Slipper: { + Named: true + Rate: 2 + } + Drooping_Kitty_: { + Named: true + Rate: 2 + } + Big_Golden_Bell_: { + Named: true + Rate: 2 + } +} +CP_Helm_Scroll_Box: { + CP_Helm_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Shield_Scroll_Box: { + CP_Shield_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Armor_Scroll_Box: { + CP_Armor_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Weapon_Scroll_Box: { + CP_Weapon_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +Repair_Scroll_Box: { + Repair_Scroll: { + Random: false + Named: true + } + Iron_Ore: { + Random: false + Named: true + } + Iron: { + Random: false + Named: true + } + Oridecon_Stone: { + Random: false + Named: true + } + Steel: { + Random: false + Named: true + } +} +Super_Pet_Egg1: { + Tiara: { + Named: true + Rate: 2 + } + Crown: { + Named: true + Rate: 2 + } + Loard_Circlet: { + Named: true + Rate: 1 + } + /* not yet supported/unknown Ear_Of_Angel: { + Named: true + Rate: 5 + }*/ + /* not yet supported/unknown Ear_Of_Devil: { + Named: true + Rate: 5 + }*/ + Flying_Angel: { + Named: true + Rate: 20 + } + Dark_Lord_Card: { + Named: true + Rate: 1 + } + Angeling_Card: { + Named: true + Rate: 2 + } + Ghostring_Card: { + Named: true + Rate: 2 + } + Nurse_Cap: { + Named: true + Rate: 80 + } + Centimental_Flower: { + Named: true + Rate: 45 + } + Tulip_Hairpin: { + Named: true + Rate: 50 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 85 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 170 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 230 + } +} +Super_Pet_Egg2: { + Golden_Gear: { + Named: true + Rate: 6 + } + Coronet: { + Named: true + Rate: 3 + } + Ghost_Bandana: { + Named: true + Rate: 6 + } + Horn_Of_Succubus: { + Named: true + Rate: 2 + } + Inccubus_Horn: { + Named: true + Rate: 2 + } + Archangeling_Card: { + Named: true + Rate: 10 + } + Knight_Of_Abyss_Card: { + Named: true + Rate: 3 + } + Pharaoh_Card: { + Named: true + Rate: 1 + } + Poring_Hat: { + Named: true + Rate: 80 + } + Centimental_Leaf: { + Named: true + Rate: 50 + } + First_Moon_Hair_Pin: { + Named: true + Rate: 40 + } + Cigar: { + Named: true + Rate: 20 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 160 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 227 + } +} +Super_Pet_Egg3: { + /* not yet supported/unknown Oldman: { + Named: true + Rate: 5 + }*/ + Fillet: { + Named: true + Rate: 6 + } + Smoking_Pipe: { + Named: true + Rate: 3 + } + Kafra_Band: { + Named: true + Rate: 1 + } + Hair_Protector: { + Named: true + Rate: 6 + } + Crescent_Scythe: { + Named: true + Rate: 10 + } + House_Auger: { + Named: true + Rate: 33 + } + Dark_Illusion_Card: { + Named: true + Rate: 2 + } + Drake_Card: { + Named: true + Rate: 2 + } + Maya_Card: { + Named: true + Rate: 2 + } + Ear_Mufs: { + Named: true + Rate: 100 + } + Pair_Of_Red_Ribbon: { + Named: true + Rate: 50 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 120 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 180 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 220 + } +} +Super_Pet_Egg4: { + Angelic_Chain: { + Named: true + Rate: 3 + } + Magestic_Goat: { + Named: true + Rate: 3 + } + Sharp_Gear: { + Named: true + Rate: 2 + } + Helm_Of_Angel: { + Named: true + Rate: 2 + } + Orc_Hero_Helm: { + Named: true + Rate: 4 + } + Doppelganger_Card: { + Named: true + Rate: 1 + } + Osiris_Card: { + Named: true + Rate: 2 + } + Phreeoni_Card: { + Named: true + Rate: 2 + } + Green_Feeler: { + Named: true + Rate: 70 + } + /* not yet supported/unknown Big_Sis: { + Named: true + Rate: 50 + }*/ + Mistic_Rose: { + Named: true + Rate: 36 + } + Well_Baked_Toast: { + Named: true + Rate: 35 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 170 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 230 + } +} +Super_Card_Pet_Egg1: { + Orc_Lady_Card: { + Named: true + Rate: 40 + } + Mummy_Card: { + Named: true + Rate: 30 + } + Marina_Card: { + Named: true + Rate: 80 + } + Desert_Wolf_Card: { + Named: true + Rate: 80 + } + Soldier_Skeleton_Card: { + Named: true + Rate: 17 + } + Magnolia_Card: { + Named: true + Rate: 40 + } + Andre_Card: { + Named: true + Rate: 7 + } + Mandragora_Card: { + Named: true + Rate: 40 + } + Vadon_Card: { + Named: true + Rate: 50 + } + Baphomet_Card: { + Named: true + Rate: 2 + } + Drainliar_Card: { + Named: true + Rate: 50 + } + Flying_Deleter_Card: { + Named: true + Rate: 20 + } + Nightmare_Terror_Card: { + Named: true + Rate: 8 + } + Pest_Card: { + Named: true + Rate: 20 + } + Marc_Card: { + Named: true + Rate: 20 + } + Dark_Frame_Card: { + Named: true + Rate: 10 + } + Deleter_Card: { + Named: true + Rate: 5 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 165 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 166 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 150 + } +} +Super_Card_Pet_Egg2: { + Orc_Load_Card: { + Named: true + Rate: 2 + } + Skel_Worker_Card: { + Named: true + Rate: 30 + } + Minorous_Card: { + Named: true + Rate: 55 + } + Garm_Baby_Card: { + Named: true + Rate: 18 + } + Goblin_Card: { + Named: true + Rate: 25 + } + Caramel_Card: { + Named: true + Rate: 70 + } + Scorpion_Card: { + Named: true + Rate: 5 + } + Flora_Card: { + Named: true + Rate: 35 + } + Hunter_Fly_Card: { + Named: true + Rate: 35 + } + Pecopeco_Egg_Card: { + Named: true + Rate: 40 + } + Hydra_Card: { + Named: true + Rate: 30 + } + Disguise_Card: { + Named: true + Rate: 30 + } + Rybio_Card: { + Named: true + Rate: 9 + } + Wraith_Dead_Card: { + Named: true + Rate: 20 + } + Majoruros_Card: { + Named: true + Rate: 18 + } + Pupa_Card: { + Named: true + Rate: 40 + } + Pecopeco_Card: { + Named: true + Rate: 40 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 168 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 165 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 166 + } +} +Super_Card_Pet_Egg3: { + Elder_Wilow_Card: { + Named: true + Rate: 70 + } + Deviruchi_Card: { + Named: true + Rate: 20 + } + Marduk_Card: { + Named: true + Rate: 40 + } + Carat_Card: { + Named: true + Rate: 45 + } + Choco_Card: { + Named: true + Rate: 30 + } + Pharaoh_Card: { + Named: true + Rate: 1 + } + Nine_Tail_Card: { + Named: true + Rate: 30 + } + Whisper_Card: { + Named: true + Rate: 10 + } + Frilldora_Card: { + Named: true + Rate: 20 + } + Dragon_Tail_Card: { + Named: true + Rate: 33 + } + Baphomet__Card: { + Named: true + Rate: 10 + } + Daydric_Card: { + Named: true + Rate: 35 + } + Harpy_Card: { + Named: true + Rate: 50 + } + Whisper_Boss_Card: { + Named: true + Rate: 10 + } + Thara_Frog_Card: { + Named: true + Rate: 50 + } + Executioner_Card: { + Named: true + Rate: 35 + } + Khalitzburg_Card: { + Named: true + Rate: 30 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 171 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 140 + } +} +Super_Card_Pet_Egg4: { + Thief_Bug_Male_Card: { + Named: true + Rate: 60 + } + Verit_Card: { + Named: true + Rate: 70 + } + Matyr_Card: { + Named: true + Rate: 25 + } + Sohee_Card: { + Named: true + Rate: 19 + } + Antique_Firelock_Card: { + Named: true + Rate: 40 + } + Blood_Butterfly_Card: { + Named: true + Rate: 38 + } + Mimic_Card: { + Named: true + Rate: 35 + } + Zerom_Card: { + Named: true + Rate: 38 + } + Phen_Card: { + Named: true + Rate: 10 + } + Kobold_Card: { + Named: true + Rate: 40 + } + Moonlight_Flower_Card: { + Named: true + Rate: 1 + } + Mantis_Card: { + Named: true + Rate: 45 + } + Smokie_Card: { + Named: true + Rate: 65 + } + Vitata_Card: { + Named: true + Rate: 10 + } + High_Orc_Card: { + Named: true + Rate: 3 + } + Penomena_Card: { + Named: true + Rate: 13 + } + Tirfing_Card: { + Named: true + Rate: 18 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 165 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 165 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 140 + } +} +Vigorgra_Package1: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package2: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Vit_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package3: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Int_Dish10_: { + Random: false + Count: 2 + Named: true + } + Dex_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package6: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 2 + Named: true + } + Adrenaline_Scroll: { + Random: false + Count: 24 + Named: true + } + Aspersio_5_Scroll: { + Random: false + Count: 20 + Named: true + } + Holy_Water: { + Random: false + Count: 20 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package7: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Str_Dish10_: { + Random: false + Count: 4 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package9: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Int_Dish10_: { + Random: false + Count: 4 + Named: true + } + Dex_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package10: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Int_Dish10_: { + Random: false + Count: 4 + Named: true + } + Vit_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package12: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Str_Dish10_: { + Random: false + Count: 4 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 4 + Named: true + } + Adrenaline_Scroll: { + Random: false + Count: 48 + Named: true + } + Aspersio_5_Scroll: { + Random: false + Count: 40 + Named: true + } + Holy_Water: { + Random: false + Count: 40 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Pet_Egg_Scroll12: { + Poring_Box: { + Named: true + Rate: 80 + } + Vit_Dish10_: { + Count: 10 + Named: true + Rate: 150 + } + Old_Violet_Box: { + Named: true + Rate: 80 + } + Dex_Dish10_: { + Count: 10 + Named: true + Rate: 150 + } + Megaphone_: { + Count: 3 + Named: true + Rate: 150 + } + Kafra_Card: { + Count: 5 + Named: true + Rate: 180 + } + Luk_Dish10_: { + Count: 10 + Named: true + Rate: 180 + } + Elven_Ears: { + Named: true + Rate: 10 + } + Flying_Angel: { + Named: true + Rate: 10 + } + Zeny_Scroll: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll13: { + Elephant_Hat: { + Named: true + Rate: 10 + } + Happy_Wig: { + Named: true + Rate: 10 + } + Enriched_Oridecon: { + Count: 5 + Named: true + Rate: 170 + } + Enriched_Elunium: { + Count: 5 + Named: true + Rate: 300 + } + Zeny_Scroll: { + Named: true + Rate: 10 + } + Yggdrasilberry: { + Count: 7 + Named: true + Rate: 100 + } + Fruit_Of_Mastela: { + Count: 15 + Named: true + Rate: 100 + } + Blue_Herb: { + Count: 8 + Named: true + Rate: 100 + } + Insurance: { + Count: 3 + Named: true + Rate: 100 + } + White_Slim_Potion: { + Count: 20 + Named: true + Rate: 100 + } +} +Pet_Egg_Scroll14: { + Hibiscus: { + Named: true + Rate: 10 + } + Charming_Ribbon: { + Named: true + Rate: 10 + } + Enriched_Oridecon: { + Count: 5 + Named: true + Rate: 150 + } + Enriched_Elunium: { + Count: 5 + Named: true + Rate: 250 + } + Zeny_Scroll: { + Named: true + Rate: 50 + } + Yggdrasilberry: { + Count: 7 + Named: true + Rate: 100 + } + Fruit_Of_Mastela: { + Count: 15 + Named: true + Rate: 100 + } + Grape_Juice: { + Count: 20 + Named: true + Rate: 100 + } + Insurance: { + Count: 3 + Named: true + Rate: 100 + } + White_Slim_Potion: { + Count: 20 + Named: true + Rate: 130 + } +} +Super_Pet_Egg5: { + Bird_Nest: { + Named: true + Rate: 15 + } + Fallen_Leaves: { + Named: true + Rate: 10 + } + Sheep_Hat: { + Named: true + Rate: 5 + } + Pumpkin_Hat: { + Named: true + Rate: 10 + } + Cyclops_Visor: { + Named: true + Rate: 6 + } + Alice_Doll: { + Named: true + Rate: 5 + } + Magic_Eyes: { + Named: true + Rate: 5 + } + Minstrel_Hat: { + Named: true + Rate: 5 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 216 + } +} +Super_Pet_Egg6: { + Marionette_Doll: { + Named: true + Rate: 5 + } + Gambler_Hat: { + Named: true + Rate: 10 + } + Elephant_Hat: { + Named: true + Rate: 10 + } + Baseball_Cap: { + Named: true + Rate: 5 + } + Silver_Tiara: { + Named: true + Rate: 5 + } + Joker_Jester_: { + Named: true + Rate: 6 + } + Headset_OST: { + Named: true + Rate: 5 + } + Chinese_Crown: { + Named: true + Rate: 5 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 226 + } +} +Super_Pet_Egg7: { + Candle: { + Named: true + Rate: 15 + } + Gold_Tiara: { + Named: true + Rate: 5 + } + Phrygian_Cap_: { + Named: true + Rate: 10 + } + Helm_Of_Darkness: { + Named: true + Rate: 5 + } + Puppy_Hat: { + Named: true + Rate: 10 + } + Romantic_White_Flower: { + Named: true + Rate: 8 + } + Hibiscus: { + Named: true + Rate: 5 + } + Charming_Ribbon: { + Named: true + Rate: 10 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 209 + } +} +Super_Pet_Egg8: { + Angeling_Hat: { + Named: true + Rate: 5 + } + Coppola: { + Named: true + Rate: 10 + } + Tongue_Mask: { + Named: true + Rate: 15 + } + Captain_Hat: { + Named: true + Rate: 5 + } + Laurel_Wreath: { + Named: true + Rate: 5 + } + Geographer_Band: { + Named: true + Rate: 5 + } + Twin_Ribbon: { + Named: true + Rate: 5 + } + Bird_Nest_Hat: { + Named: true + Rate: 10 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 217 + } +} +Pet_Egg_Scroll_E: { + Exorcize_Herb: { + Count: 10 + Named: true + Rate: 350 + } + Silk_Ribbon: { + Named: true + Rate: 130 + } + Realgar_Wine: { + Count: 10 + Named: true + Rate: 350 + } + Chung_E_Cake: { + Count: 10 + Named: true + Rate: 70 + } + Bok_Choy: { + Count: 10 + Named: true + Rate: 70 + } + Chung_E_Ticket: { + Named: true + Rate: 10 + } + Spring_Rabbit_Ticket: { + Named: true + Rate: 10 + } + Zeny_Scroll_Box: { + Named: true + Rate: 10 + } +} +Ramen_Hat_Box: { + Ramen_Hat: { + Random: false + Expire: 336 + Named: true + } +} +Mysterious_Travel_Sack1: { + Yellow_Baseball_Cap: { + Named: true + Rate: 1 + } + Valkyrie_Feather_Band: { + Named: true + Rate: 5 + } + Soulless_Wing: { + Named: true + Rate: 5 + } + Afro_Wig: { + Named: true + Rate: 1 + } + Happy_Wig: { + Named: true + Rate: 1 + } + Shiny_Wig: { + Named: true + Rate: 1 + } + Ring_Of_Water: { + Named: true + Rate: 2 + } + Ring_Of_Fire: { + Named: true + Rate: 2 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 2 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 5 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 5 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 5 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 200 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 200 + } + S_Def_Potion_Box30: { + Named: true + Rate: 200 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 205 + } +} +Mysterious_Travel_Sack2: { + Aussie_Flag_Hat: { + Named: true + Rate: 10 + } + Chullos: { + Named: true + Rate: 20 + } + Ati_Atihan_Hat: { + Named: true + Rate: 5 + } + Marcher_Hat: { + Named: true + Rate: 5 + } + Marvelous_Wig: { + Named: true + Rate: 100 + } + Fantastic_Wig: { + Named: true + Rate: 100 + } + Ring_Of_Wind: { + Named: true + Rate: 20 + } + Ring_Of_Earth: { + Named: true + Rate: 20 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 10 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 50 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 50 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 50 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 100 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 100 + } + S_Def_Potion_Box30: { + Named: true + Rate: 100 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 100 + } +} +Mysterious_Travel_Sack3: { + Kettle_Hat: { + Named: true + Rate: 20 + } + Deviling_Hat: { + Named: true + Rate: 10 + } + Pecopeco_Hairband: { + Named: true + Rate: 10 + } + Chick_Hat: { + Named: true + Rate: 50 + } + Vacation_Hat: { + Named: true + Rate: 30 + } + Ribbon_Black: { + Named: true + Rate: 60 + } + Ribbon_Yellow: { + Named: true + Rate: 50 + } + Ribbon_Green: { + Named: true + Rate: 50 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 10 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 50 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 50 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 50 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 100 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 100 + } + S_Def_Potion_Box30: { + Named: true + Rate: 100 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 100 + } +} +Mysterious_Travel_Sack4: { + Twin_Ribbon: { + Named: true + Rate: 2 + } + Ribbon_Of_Bride: { + Named: true + Rate: 2 + } + Charming_Ribbon: { + Named: true + Rate: 1 + } + Ribbon_Pink: { + Named: true + Rate: 2 + } + Ribbon_Orange: { + Named: true + Rate: 2 + } + Ribbon_White: { + Named: true + Rate: 2 + } + Red_Glasses: { + Named: true + Rate: 1 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 1 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 5 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 5 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 5 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 203 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 203 + } + S_Def_Potion_Box30: { + Named: true + Rate: 203 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 203 + } +} +Magician_Card_Box: { + Blood_Butterfly_Card: { + Random: false + Named: true + } + Parasite_Card: { + Random: false + Named: true + } + Harpy_Card: { + Random: false + Named: true + } + Miyabi_Ningyo_Card: { + Random: false + Named: true + } + Wicked_Nymph_Card: { + Random: false + Named: true + } + Loli_Ruri_Card: { + Random: false + Named: true + } +} +Acolyte_Card_Box: { + Rideword_Card: { + Random: false + Named: true + } + Fur_Seal_Card: { + Random: false + Named: true + } + Live_Peach_Tree_Card: { + Random: false + Named: true + } + Geographer_Card: { + Random: false + Named: true + } + Cookie_Card: { + Random: false + Named: true + } +} +Archer_Card_Box: { + Cruiser_Card: { + Random: false + Named: true + } + Anolian_Card: { + Random: false + Named: true + } + Merman_Card: { + Random: false + Named: true + } + Dragon_Tail_Card: { + Random: false + Named: true + } + Alligator_Card: { + Random: false + Named: true + } +} +Swordman_Card_Box: { + Freezer_Card: { + Random: false + Named: true + } + Heater_Card: { + Random: false + Named: true + } + Solider_Card: { + Random: false + Named: true + } + Permeter_Card: { + Random: false + Named: true + } + Assulter_Card: { + Random: false + Named: true + } +} +Thief_Card_Box: { + Shinobi_Card: { + Random: false + Named: true + } + Wander_Man_Card: { + Random: false + Named: true + } + Wild_Rose_Card: { + Random: false + Named: true + } + The_Paper_Card: { + Random: false + Named: true + } + Dancing_Dragon_Card: { + Random: false + Named: true + } +} +Merchant_Card_Box: { + Mystcase_Card: { + Random: false + Named: true + } + Zipper_Bear_Card: { + Random: false + Named: true + } + Raggler_Card: { + Random: false + Named: true + } + Baby_Leopard_Card: { + Random: false + Named: true + } + Hylozoist_Card: { + Random: false + Named: true + } +} +Hard_Core_Set_Box: { + Battle_Manual: { + Random: false + Count: 10 + Named: true + } + Bubble_Gum: { + Random: false + Count: 10 + Named: true + } + Insurance: { + Random: false + Count: 10 + Named: true + } +} +Kitty_Set_Box: { + White_Drooping_Kitty: { + Random: false + Named: true + } + Blue_Drooping_Kitty: { + Random: false + Named: true + } + Pink_Drooping_Kitty: { + Random: false + Named: true + } + Yellow_Drooping_Kitty: { + Random: false + Named: true + } + Gray_Drooping_Kitty: { + Random: false + Named: true + } +} +Soft_Core_Set_Box: { + Battle_Manual: { + Random: false + Count: 5 + Named: true + } + Bubble_Gum: { + Random: false + Count: 5 + Named: true + } + Insurance: { + Random: false + Count: 5 + Named: true + } +} +Deviruchi_Set_Box: { + Red_Deviruchi_Cap: { + Random: false + Named: true + } + White_Deviruchi_Cap: { + Random: false + Named: true + } + Gray_Deviruchi_Cap: { + Random: false + Named: true + } +} +MVP_Hunt_Box: { + Convex_Mirror: { + Random: false + Count: 3 + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } + Bubble_Gum: { + Random: false + Named: true + } + Megaphone_: { + Random: false + Named: true + } +} +Brewing_Box: { + Dex_Dish10_: { + Random: false + Count: 10 + Named: true + } + Int_Dish10_: { + Random: false + Count: 10 + Named: true + } + Luk_Dish10_: { + Random: false + Count: 10 + Named: true + } +} +Acidbomb_10_Box: { + Fire_Bottle: { + Random: false + Count: 10 + Named: true + } + Acid_Bottle: { + Random: false + Count: 10 + Named: true + } +} +Basic_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 25 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 10 + Named: true + } +} +Adv_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 50 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 20 + Named: true + } +} +Elite_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 100 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 50 + Named: true + } +} +Beholder_Ring_Box: { + Beholder_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Hallow_Ring_Box: { + Hallow_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Clamorous_Ring_Box: { + Clamorous_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Chemical_Ring_Box: { + Chemical_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Insecticide_Ring_Box: { + Insecticide_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Fisher_Ring_Box: { + Fisher_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Decussate_Ring_Box: { + Decussate_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Bloody_Ring_Box: { + Bloody_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Satanic_Ring_Box: { + Satanic_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Dragoon_Ring_Box: { + Dragoon_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Angel_Scroll: { + Angelic_Chain: { + Named: true + Rate: 5 + } + Dress_Of_Angel: { + Named: true + Rate: 100 + } + /* not yet supported/unknown Ear_Of_Angel: { + Named: true + Rate: 100 + }*/ + Kiss_Of_Angel: { + Named: true + Rate: 30 + } + Angeling_Hat: { + Named: true + Rate: 50 + } + Angeling_Hairpin: { + Named: true + Rate: 130 + } + Gold_Spirit_Chain: { + Named: true + Rate: 110 + } + Angeling_Card: { + Named: true + Rate: 30 + } + Blessing_10_Scroll_Box: { + Named: true + Rate: 420 + } + Archangeling_Card: { + Named: true + Rate: 20 + } +} +Devil_Scroll: { + Satanic_Chain: { + Named: true + Rate: 4 + } + Book_Of_Devil: { + Count: 5 + Named: true + Rate: 150 + } + /* not yet supported/unknown Ear_Of_Devil: { + Named: true + Rate: 100 + }*/ + Petite_DiablOfs_Wing: { + Named: true + Rate: 125 + } + Pet_Egg_Scroll1: { + Named: true + Rate: 180 + } + Deviling_Card: { + Named: true + Rate: 1 + } + Pet_Egg_Scroll_Box1: { + Named: true + Rate: 200 + } + Horn_Of_Succubus: { + Named: true + Rate: 45 + } + Inccubus_Horn: { + Named: true + Rate: 45 + } + Diabolic_Box: { + Named: true + Rate: 150 + } +} +July7_Scroll: { + Basic_Siege_Supply_Box: { + Random: false + Named: true + } + Underripe_Yggseed: { + Count: 10 + Named: true + Rate: 1500 + } + Str_Dish_Box: { + Named: true + Rate: 1500 + } + Bubble_Gum_Box: { + Named: true + Rate: 1550 + } + Battle_Manual_Box: { + Named: true + Rate: 1500 + } + Convex_Mirror_Box: { + Named: true + Rate: 1500 + } + /* not yet supported/unknown Eddga_Scroll: { + Named: true + Rate: 400 + }*/ + Token_Of_Siegfried_Box: { + Named: true + Rate: 1500 + } + Berzebub_Card: { + Announce: true + Named: true + Rate: 1 + } + Guarantee_Weapon_9Up: { + Announce: true + Named: true + Rate: 20 + } + Guarantee_Armor_9Up: { + Announce: true + Named: true + Rate: 20 + } +} +Bacsojin_Scroll: { + Magical_Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Special_Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Tayelin_Doll_Hat: { + Named: true + Rate: 5 + } + Binit_Doll_Hat: { + Named: true + Rate: 5 + } + Debril_Doll_Hat: { + Named: true + Rate: 5 + } + Blessing_10_Scroll_Box: { + Named: true + Rate: 180 + } + Hibiscus: { + Named: true + Rate: 25 + } + Charming_Ribbon: { + Named: true + Rate: 30 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } + Slipper: { + Named: true + Rate: 14 + } + Insurance: { + Count: 5 + Named: true + Rate: 135 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 150 + } +} +Animal_Scroll: { + Tiger_Mask: { + Named: true + Rate: 5 + } + Guardian_Lion_Mask: { + Named: true + Rate: 5 + } + Luk_Dish10: { + Count: 5 + Named: true + Rate: 185 + } + Panda_Cap: { + Named: true + Rate: 5 + } + Brown_Bear_Cap: { + Named: true + Rate: 5 + } + Smokie_Hat: { + Named: true + Rate: 5 + } + Str_Dish08: { + Count: 5 + Named: true + Rate: 185 + } + Lazy_Raccoon: { + Named: true + Rate: 5 + } + Drooping_Bunny: { + Named: true + Rate: 5 + } + Int_Dish03: { + Count: 5 + Named: true + Rate: 185 + } + Elephant_Hat_: { + Named: true + Rate: 10 + } + Sea_Otter_Cap: { + Named: true + Rate: 10 + } + Vit_Dish09: { + Count: 5 + Named: true + Rate: 185 + } + Galapago_Cap: { + Named: true + Rate: 10 + } + Magestic_Goat_TW: { + Named: true + Rate: 5 + } + Fish_On_Head_: { + Named: true + Rate: 5 + } + Agi_Dish06: { + Count: 5 + Named: true + Rate: 185 + } +} +Heart_Scroll: { + Orleans_Glove: { + Named: true + Rate: 5 + } + Wool_Scarf: { + Named: true + Rate: 5 + } + Red_Glasses: { + Named: true + Rate: 15 + } + Str_Dish08: { + Count: 7 + Named: true + Rate: 200 + } + Vit_Dish10: { + Count: 5 + Named: true + Rate: 200 + } + Spiritual_Ring: { + Named: true + Rate: 1 + } + Agi_Dish09: { + Count: 5 + Named: true + Rate: 200 + } + Scarf_Belt: { + Named: true + Rate: 40 + } + Lesser_Elemental_Ring: { + Named: true + Rate: 5 + } + Luk_Dish07: { + Count: 8 + Named: true + Rate: 200 + } + Lion_Mask: { + Named: true + Rate: 20 + } + Fur_Hat: { + Named: true + Rate: 20 + } + Ulle_Cap: { + Named: true + Rate: 20 + } + Valkyrie_Feather_Band: { + Named: true + Rate: 4 + } + Winter_Hat: { + Named: true + Rate: 20 + } + Ear_Mufs: { + Named: true + Rate: 45 + } +} +New_Year_Scroll: { + Silver_Tiara: { + Named: true + Rate: 1 + } + Magic_Card_Album: { + Named: true + Rate: 5 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 180 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 180 + } + Clothing_Dye_Coupon: { + Count: 2 + Named: true + Rate: 50 + } + Marcher_Hat: { + Named: true + Rate: 1 + } + Yggdrasilberry_Box_: { + Named: true + Rate: 100 + } + Dead_Tree_Branch_Box1: { + Named: true + Rate: 132 + } + Megaphone_Box: { + Named: true + Rate: 150 + } + Mini_Propeller_: { + Named: true + Rate: 1 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 100 + } + Old_Violet_Box: { + Count: 2 + Named: true + Rate: 100 + } +} +Valentine_Pledge_Box: { + Valentine_Pledge: { + Random: false + Expire: 8760 + Named: true + } +} +Ox_Tail_Scroll: { + Yggdrasilberry_Box_: { + Named: true + Rate: 1420 + } + Luk_Dish_Box: { + Named: true + Rate: 1420 + } + Kafra_Card_Box: { + Named: true + Rate: 1420 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 1420 + } + Insurance_Package: { + Named: true + Rate: 1420 + } + /* not yet supported/unknown Zealotus_Scroll: { + Count: 5 + Named: true + Rate: 300 + }*/ + Assumptio_5_Scroll_Box: { + Named: true + Rate: 1400 + } + Max_Weight_Up_Box: { + Named: true + Rate: 500 + } + /* not yet supported/unknown B_Dragon_Hat_Box: { + Announce: true + Named: true + Rate: 150 + }*/ +} +Buddah_Scroll: { + Zeny_Scroll: { + Count: 7 + Named: true + Rate: 201 + } + S_Def_Potion_Box30: { + Named: true + Rate: 112 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 111 + } + B_Def_Potion_Box10: { + Named: true + Rate: 110 + } + B_Mdef_Potion_Box10: { + Named: true + Rate: 109 + } + Dun_Tele_Scroll_Box10: { + Named: true + Rate: 108 + } + Spark_Candy_Box10: { + Count: 7 + Named: true + Rate: 80 + } + Ati_Atihan_Hat_: { + Named: true + Rate: 50 + } + Drooping_Bunny: { + Named: true + Rate: 50 + } + Kabuki_Mask: { + Named: true + Rate: 49 + } + Deprotai_Doll_Hat: { + Named: true + Rate: 9 + } + Bright_Fury: { + Named: true + Rate: 8 + } + Secret_Medicine: { + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +Evil_Incarnation: { + Dead_Tree_Branch_Box2: { + Named: true + Rate: 224 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 124 + } + Int_Dish_Box: { + Named: true + Rate: 123 + } + Luk_Dish_Box: { + Named: true + Rate: 122 + } + Vit_Dish_Box: { + Named: true + Rate: 121 + } + Str_Dish_Box: { + Named: true + Rate: 120 + } + Romantic_White_Flower: { + Named: true + Rate: 47 + } + Love_Berry: { + Named: true + Rate: 46 + } + Minstrel_Hat: { + Named: true + Rate: 26 + } + Puppy_Hat: { + Named: true + Rate: 25 + } + Kafra_Band: { + Named: true + Rate: 10 + } + Majestic_Evil_Horn: { + Named: true + Rate: 9 + } + Secret_Medicine: { + Count: 2 + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +/* not yet supported/unknown F_Clover_Box_Mouth: { + Leaf_Clover_In_Mouth: { + Random: false + Named: true + } +}*/ +/* not yet supported/unknown F_Clover_Box_Mouth2: { + Leaf_Clover_In_Mouth: { + Random: false + Expire: 2 + Named: true + } +}*/ +/* not yet supported/unknown F_Clover_Box_Mouth4: { + Leaf_Clover_In_Mouth: { + Random: false + Expire: 4 + Named: true + } +}*/ +Pr_Reset_Stone_Box: { + Premium_Reset_Stone: { + Random: false + } +} +/* not yet supported/unknown Life_Ribbon_Box: { + Life_Ribbon: { + Random: false + Named: true + } +}*/ +/* not yet supported/unknown Life_Ribbon_Box2: { + Life_Ribbon: { + Random: false + Expire: 2 + Named: true + } +}*/ +/* not yet supported/unknown Life_Ribbon_Box3: { + Life_Ribbon: { + Random: false + Expire: 4 + Named: true + } +}*/ +/* not yet supported/unknown Magic_Candy_Box10: { + Magic_Candy: { + Random: false + Count: 10 + Named: true + } +}*/ +/* not yet supported/unknown Boarding_Halter_Box: { + Boarding_Halter: { + Random: false + Expire: 168 + Named: true + } +}*/ +Fire_Brand_Box: { + Fire_Brand_C: { + Random: false + Expire: 168 + Named: true + } +} +All_In_One_Ring_Box: { + All_In_One_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Lucky_Egg_C6: { + Pierre_Treasurebox: { + Rate: 500 + } + Yggdrasilberry: { + Count: 5 + Rate: 500 + } + Underripe_Yggseed: { + Count: 10 + Rate: 500 + } + Psychic_ArmorS: { + Count: 2 + Rate: 500 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 700 + } + Comp_Insurance: { + Count: 3 + Rate: 700 + } + Comp_Bubble_Gum: { + Count: 2 + Rate: 700 + } + Comp_Battle_Manual: { + Count: 2 + Rate: 500 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1200 + } + White_Slim_Pot_Box2: { + Rate: 1200 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Old_Card_Album: { + Rate: 350 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 300 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 300 + } + Passion_FB_Hat: { + Announce: true + Rate: 300 + } + Cool_FB_Hat: { + Announce: true + Rate: 300 + } + Victory_FB_Hat: { + Announce: true + Rate: 300 + } + Glory_FB_Hat: { + Announce: true + Rate: 100 + } +} +/* item not unknown/supported - not yet available +Lucky_Egg_C2: { + Magic_Card_Album: { + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 900 + } + Poison_Bottle_Box2: { + Rate: 900 + } + Blue_Herb_Box2: { + Rate: 900 + } + Guarantee_Weapon_5Up: { + Rate: 200 + } + Guarantee_Armor_5Up: { + Rate: 200 + } + Sealed_Dracula_Card: { + Rate: 1 + } + Drake_Card: { + Rate: 1 + } + Cancer_Diadem: { + Rate: 150 + } + Cancer_Crown: { + Rate: 150 + } + Mini_Propeller_: { + Rate: 150 + } + Battle_Manual_Box: { + Announce: true + Rate: 1000 + } + Comp_Bubble_Gum: { + Rate: 800 + } + Comp_Insurance: { + Count: 3 + Announce: true + Rate: 800 + } + J_Aspersio_5_Scroll: { + Count: 5 + Announce: true + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Announce: true + Rate: 800 + } + Psychic_ArmorS: { + Count: 2 + Announce: true + Rate: 800 + } + Yggdrasilberry_Box_: { + Announce: true + Rate: 948 + } + Bogy_Horn: { + Announce: true + Rate: 150 + } + Flame_Sprits_Armor__: { + Announce: true + Rate: 150 + } + Jasper_Crest: { + Announce: true + Rate: 150 + } +}*/ +Lucky_Egg_C6: { + Yggdrasilberry_Box_: { + Rate: 928 + } + Battle_Manual_Box: { + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Fallen_Bishop_Card: { + Rate: 1 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Passion_FB_Hat: { + Announce: true + Rate: 50 + } + Cool_FB_Hat: { + Announce: true + Rate: 50 + } + Victory_FB_Hat: { + Announce: true + Rate: 20 + } + Glory_FB_Hat: { + Announce: true + Rate: 50 + } +} +/* item not unknown/supported - not yet available +Lucky_Egg_C9: { + Comp_Bubble_Gum: { + Count: 3 + Rate: 1500 + } + Battle_Manual_Box: { + Rate: 1459 + } + Comp_Insurance: { + Count: 3 + Rate: 1500 + } + White_Slim_Pot_Box2: { + Rate: 1500 + } + Poison_Bottle_Box2: { + Rate: 1500 + } + Dead_Tree_Branch_Box2: { + Rate: 1500 + } + Elven_Ears_: { + Announce: true + Rate: 10 + } + Holy_Marching_Hat_J: { + Announce: true + Rate: 300 + } + Auger_Of_Spirit: { + Announce: true + Rate: 20 + } + Orc_Hero_Card: { + Announce: true + Rate: 1 + } + Flying_Angel: { + Announce: true + Rate: 100 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 500 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 5 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 5 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C7: { + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Yggdrasilberry_Box_: { + Rate: 1043 + } + Underripe_Yggseed: { + Count: 10 + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Battle_Manual_Box: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Valkyrie_Helm: { + Announce: true + Rate: 50 + } + Ifrit_Card: { + Announce: true + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 2 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 2 + } + Mask_Of_Ifrit: { + Announce: true + Rate: 1 + } + Ifrit: { + Announce: true + Rate: 1 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C8: { + Yggdrasilberry_Box_: { + Rate: 900 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 95 + } + Dead_Tree_Branch_Box2: { + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Battle_Manual_Box: { + Rate: 900 + } + Fruit_Of_Mastela_Box2: { + Rate: 900 + } + Poison_Bottle_Box2: { + Rate: 900 + } + White_Slim_Pot_Box2: { + Rate: 900 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Black_Devil_Mask_: { + Announce: true + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 2 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 2 + } + Drooping_Morocc_Minion: { + Announce: true + Rate: 150 + } + Wanderer: { + Announce: true + Rate: 150 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C10: { + Guarantee_Weapon_8Up: { + Announce: true + Rate: 5 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 5 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Evil_Marcher_Hat: { + Announce: true + Rate: 15 + } + Battle_Manual_Box: { + Rate: 500 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 100 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 200 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 200 + } + E_WOB_Rune: { + Count: 10 + Rate: 900 + } + E_WOB_Schwaltz: { + Count: 10 + Rate: 900 + } + E_WOB_Rachel: { + Count: 10 + Rate: 900 + } + E_WOB_Local: { + Count: 10 + Rate: 900 + } + RWC2010_Indonesia: { + Announce: true + Rate: 1 + } + Sealed_Kiel_Card: { + Announce: true + Rate: 1 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Heart_Eye_Patch1: { + Announce: true + Rate: 150 + } + Heart_Eye_Patch2: { + Announce: true + Rate: 150 + } + Boy: { + Rate: 400 + } + Flaming_Ice: { + Rate: 400 + } + Tantanmen: { + Rate: 400 + } +}*/ +/* item not unknown/supported - not yet available +Wind_Type_Scroll: { + Gemini_Diadem: { + Announce: true + Rate: 100 + } + Gemini_Crown: { + Announce: true + Rate: 100 + } + Libra_Diadem: { + Announce: true + Rate: 50 + } + Libra_Crown: { + Announce: true + Rate: 100 + } + Aquarius_Diadem: { + Announce: true + Rate: 100 + } + Aquarius_Crown: { + Announce: true + Rate: 100 + } + Snowman_Hat_Box: { + Announce: true + Rate: 5 + } + Sunglasses_Bball_Hat: { + Announce: true + Rate: 234 + } + Hankie_In_Mouth: { + Announce: true + Rate: 50 + } + New_Style_Coupon_Box: { + Rate: 50 + } + Neuralizer_Box: { + Announce: true + Rate: 10 + } + Battle_Manual_Box: { + Rate: 1000 + } + Kafra_Card_Box: { + Rate: 1000 + } + Bloody_Dead_Branch: { + Rate: 500 + } + Spark_Candy_Box10: { + Rate: 1500 + } + Str_Dish_Box: { + Rate: 1200 + } + Int_Dish_Box: { + Rate: 1200 + } + Token_Of_Siegfried_Box: { + Rate: 1200 + } + Garm_Card: { + Announce: true + Rate: 1 + } + Fruit_Of_Mastela_Box2: { + Rate: 1500 + } +}*/ +/* item not unknown/supported - not yet available +LUcky_Egg_C3: { + Magic_Card_Album: { + Announce: true + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Poison_Bottle_Box2: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 800 + } + Chung_E_Pet_Coupon: { + Announce: true + Rate: 500 + } + Succu_Pet_Coupon: { + Announce: true + Rate: 500 + } + Imp_Pet_Coupon: { + Announce: true + Rate: 500 + } + Leo_Crown: { + Announce: true + Rate: 150 + } + Dress_Hat: { + Announce: true + Rate: 100 + } + Sunglasses_: { + Announce: true + Rate: 10 + } + Battle_Manual_Box: { + Rate: 489 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 800 + } + Comp_Insurance: { + Count: 3 + Rate: 800 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Rate: 800 + } + Psychic_ArmorS: { + Count: 2 + Rate: 800 + } + Yggdrasilberry_Box_: { + Rate: 800 + } + Upg_Buckler_Box: { + Announce: true + Rate: 100 + } + Flame_Sprits_Armor__: { + Announce: true + Rate: 200 + } + Sealed_Kiel_Card: { + Announce: true + Rate: 1 + } + Donut_In_Mouth: { + Announce: true + Rate: 150 + } + K_Rabbit_Bonnet: { + Announce: true + Rate: 50 + } +}*/ +Lucky_Egg_C4: { + White_Slim_Pot_Box2: { + Rate: 790 + } + Poison_Bottle_Box2: { + Rate: 720 + } + Blue_Herb_Box2: { + Rate: 720 + } + Battle_Manual_Box: { + Rate: 700 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 720 + } + Deviling_Card: { + Announce: true + Rate: 1 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 720 + } + Comp_Insurance: { + Count: 3 + Rate: 720 + } + Underripe_Yggseed: { + Count: 10 + Rate: 720 + } + Psychic_ArmorS: { + Count: 2 + Rate: 720 + } + Yggdrasilberry_Box_: { + Rate: 720 + } + /* not yet supported/unknown Lunatic_Hat_Box: { + Announce: true + Rate: 200 + }*/ + /* not yet supported/unknown Necromencer: { + Announce: true + Rate: 200 + }*/ + Fried_Egg: { + Announce: true + Rate: 200 + } + /* not yet supported/unknown Sagittarius_Crown: { + Announce: true + Rate: 200 + }*/ + Savage_Baby_Hat: { + Announce: true + Rate: 198 + } + /* not yet supported/unknown Fur_Seal_Hat_Box: { + Announce: true + Rate: 200 + }*/ + Chung_E_Pet_Coupon: { + Announce: true + Rate: 500 + } + Succu_Pet_Coupon: { + Announce: true + Rate: 500 + } + Imp_Pet_Coupon: { + Announce: true + Rate: 500 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } +} +Lucky_Egg_C5: { + Yggdrasilberry_Box_: { + Rate: 900 + } + Underripe_Yggseed: { + Count: 10 + Rate: 900 + } + Psychic_ArmorS: { + Count: 2 + Rate: 900 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 900 + } + Vanberk_Card: { + Announce: true + Rate: 1 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 900 + } + Comp_Insurance: { + Count: 3 + Rate: 900 + } + Battle_Manual_Box: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 800 + } + Poison_Bottle_Box2: { + Rate: 800 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Magestic_Goat_: { + Announce: true + Rate: 150 + } + Delicious_Shaved_Ice: { + Announce: true + Rate: 299 + } + Fit_Pipe: { + Announce: true + Rate: 299 + } + /* not yet supported/unknown Gril: { + Announce: true + Rate: 299 + }*/ + Ring_Of_Flame_Lord: { + Announce: true + Rate: 50 + } + /* not yet supported/unknown Samambaia_Box: { + Announce: true + Rate: 200 + }*/ + Ring_Of_Resonance: { + Announce: true + Rate: 50 + } +} +/* not yet supported/unknown +Comin_Actor_Box: { + Charlie_Beard: { + Random: false + } + Charlie_Hat: { + Random: false + } +}*/ +/* not yet supported/unknown +Hen_Set_Box: { + Chicken_Beak: { + Random: false + } + Cocks_Comb: { + Random: false + } +}*/ +Lucky_Egg_C: { + Magic_Card_Album: { + Announce: true + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 1500 + } + Poison_Bottle_Box2: { + Rate: 1500 + } + Blue_Herb_Box2: { + Rate: 1500 + } + Chung_E_Pet_Coupon: { + Rate: 1200 + } + Succu_Pet_Coupon: { + Rate: 1200 + } + Imp_Pet_Coupon: { + Rate: 1200 + } + Crown_: { + Rate: 290 + } + Sharp_Gear_: { + Rate: 250 + } + Ribbon_Of_Bride: { + Announce: true + Rate: 50 + } + /* not yet supported/unknown Odin: { + Rate: 599 + }*/ + /* not yet supported/unknown Archangel_Wing: { + Announce: true + Rate: 50 + }*/ + Elven_Ears_: { + Announce: true + Rate: 10 + } + Rabbit_Earplug: { + Rate: 200 + } +} +/* item not unknown/supported - not yet available +Water_Type_Scroll: { + Cancer_Diadem: { + Announce: true + Rate: 150 + } + Cancer_Crown: { + Announce: true + Rate: 150 + } + Scorpio_Diadem: { + Announce: true + Rate: 60 + } + Scorpio_Crown: { + Announce: true + Rate: 60 + } + Pisces_Diadem: { + Announce: true + Rate: 110 + } + Pisces_Crown: { + Announce: true + Rate: 150 + } + Wizard_Left_Eye: { + Announce: true + Rate: 20 + } + Indi_Feather_Band: { + Announce: true + Rate: 266 + } + Unbreak_Weap_Box: { + Rate: 300 + } + Unbreak_Def_Box: { + Rate: 300 + } + Token_Of_Siegfried_Box: { + Rate: 1500 + } + Bubble_Gum_Box: { + Rate: 1500 + } + Magic_Card_Album: { + Rate: 100 + } + Agi_Dish_Box: { + Rate: 1900 + } + Dex_Dish_Box: { + Rate: 1900 + } + Donut_In_Mouth: { + Announce: true + Rate: 10 + } + Robo_Eye_Box: { + Announce: true + Rate: 20 + } + Sealed_TurtleG_Card: { + Announce: true + Rate: 1 + } + Sealed_Amon_Ra_Card: { + Announce: true + Rate: 3 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1500 + } +}*/ +/* item not unknown/supported - not yet available +Earth_Type_Scroll: { + Capricorn_Diadem: { + Announce: true + Rate: 150 + } + Capricorn_Crown: { + Announce: true + Rate: 150 + } + Virgo_Diadem: { + Announce: true + Rate: 150 + } + Virgo_Crown: { + Announce: true + Rate: 150 + } + Taurus_Diadem: { + Announce: true + Rate: 150 + } + Taurus_Crown: { + Announce: true + Rate: 150 + } + Teardrop: { + Announce: true + Rate: 50 + } + Abacus_In_Mouth: { + Announce: true + Rate: 300 + } + Unbreak_Weap_Box: { + Rate: 194 + } + Unbreak_Def_Box: { + Rate: 194 + } + Token_Of_Siegfried_Box: { + Rate: 1600 + } + Bubble_Gum_Box: { + Rate: 1600 + } + Battle_Manual_Box: { + Rate: 1600 + } + Balloon_Hat: { + Announce: true + Rate: 5 + } + Hexagon_Spectacles: { + Announce: true + Rate: 300 + } + Rabbit_Bonnet: { + Announce: true + Rate: 5 + } + Hen_Set_Box: { + Announce: true + Rate: 50 + } + Sealed_Knight_WS_Card: { + Announce: true + Rate: 1 + } + Sealed_Lady_Tanee_Card: { + Announce: true + Rate: 1 + } + Silvervine_Fruit_Box10: { + Rate: 1600 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1600 + } +} +/* item not unknown/supported - not yet available +Earth_Type_Scroll: { + Capricorn_Diadem: { + Announce: true + Rate: 150 + } + Capricorn_Crown: { + Announce: true + Rate: 150 + } + Virgo_Diadem: { + Announce: true + Rate: 150 + } + Virgo_Crown: { + Announce: true + Rate: 150 + } + Taurus_Diadem: { + Announce: true + Rate: 150 + } + Taurus_Crown: { + Announce: true + Rate: 150 + } + Teardrop: { + Announce: true + Rate: 50 + } + Abacus_In_Mouth: { + Announce: true + Rate: 300 + } + Unbreak_Weap_Box: { + Rate: 194 + } + Unbreak_Def_Box: { + Rate: 194 + } + Token_Of_Siegfried_Box: { + Rate: 1600 + } + Bubble_Gum_Box: { + Rate: 1600 + } + Battle_Manual_Box: { + Rate: 1600 + } + Balloon_Hat: { + Announce: true + Rate: 5 + } + Hexagon_Spectacles: { + Announce: true + Rate: 300 + } + Rabbit_Bonnet: { + Announce: true + Rate: 5 + } + Hen_Set_Box: { + Announce: true + Rate: 50 + } + Sealed_Knight_WS_Card: { + Announce: true + Rate: 1 + } + Sealed_Lady_Tanee_Card: { + Announce: true + Rate: 1 + } + Fruit_Of_Mastela_Box2: { + Rate: 1600 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1600 + } +}*/ +/* item not unknown/supported - not yet available +Vocation_Scroll: { + HP_Increase_PotionL: { + Count: 30 + Rate: 1200 + } + Vit_Dish_Box: { + Rate: 1350 + } + Int_Dish_Box: { + Rate: 1350 + } + Boarding_Halter_Box: { + Rate: 200 + } + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + Psychic_ArmorS: { + Count: 10 + Rate: 500 + } + HD_Ori_Box10: { + Rate: 150 + } + Token_Of_Siegfried_Box: { + Rate: 1100 + } + Megaphone_Box: { + Rate: 1079 + } +// not yet supported/unknown Diabolic_Scroll: { +// Count: 5 +// Rate: 1100 +// } + Bloody_Dead_Branch: { + Announce: true + Rate: 580 + } + HD_Elu_Box10: { + Rate: 150 + } + Gang_Scarf: { + Announce: true + Rate: 45 + } + Sealed_Orc_Load_Card: { + Announce: true + Rate: 10 + } + Sealed_B_Magaleta_Card: { + Announce: true + Rate: 10 + } + Red_Bread_Hat: { + Announce: true + Rate: 5 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 10 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 10 + } + Incant_Samurai_Card: { + Announce: true + Rate: 1 + } + Neuralizer_Box: { + Announce: true + Rate: 50 + } +}*/ +/* item not unknown/supported - not yet available Wisdom_Scroll: { + White_Slim_Pot_Box2: { + Rate: 1100 + } + Blue_Herb_Box2: { + Rate: 1100 + } + Fruit_Of_Mastela_Box2: { + Rate: 1200 + } + Dead_Tree_Branch_Box2: { + Rate: 1100 + } + B_Def_Potion_Box30: { + Rate: 1100 + } + B_Mdef_Potion_Box30: { + Rate: 1100 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1100 + } + Unbreak_Weap_Box: { + Rate: 100 + } + Unbreak_Def_Box: { + Rate: 100 + } + Battle_Manual_Box: { + Rate: 784 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 400 + } + Trident_Helmet: { + Announce: true + Rate: 150 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 5 + } + Sealed_B_Harword_Card: { + Announce: true + Rate: 15 + } + Randgris_Card: { + Announce: true + Rate: 1 + } + Turtle_Hat_Box: { + Announce: true + Rate: 100 + } + Snake_Head: { + Announce: true + Rate: 40 + } + Ghostring_Card: { + Announce: true + Rate: 5 + } +}*/ +/* item not unknown/supported - not yet available +Patron_Scroll: { + Agi_Dish_Box: { + Rate: 1300 + } + Luk_Dish_Box: { + Rate: 1300 + } + Yggdrasilberry_Box_: { + Rate: 1200 + } + Miracle_Medicine: { + Rate: 200 + } + Fruit_Of_Mastela_Box2: { + Rate: 1150 + } + Bubble_Gum_Box: { + Rate: 1100 + } + Storm_10_Scroll_Box: { + Rate: 1060 + } + Job_Manual50_Box: { + Rate: 500 + } + Songpyun_Box50: { + Rate: 1110 + } + Magic_Card_Album: { + Rate: 200 + } + Immuned_Shield: { + Announce: true + Rate: 30 + } + Sealed_Berz_Card: { + Announce: true + Rate: 1 + } + Sealed_Eddga_Card: { + Announce: true + Rate: 15 + } + Cat_Ears_Beret: { + Announce: true + Rate: 20 + } + Snowman_Hat_Box: { + Announce: true + Rate: 5 + } + Hankie_In_Mouth: { + Announce: true + Rate: 30 + } + Mistress_Card: { + Announce: true + Rate: 1 + } +}*/ +/* item not unknown/supported - not yet available +Heaven_Scroll: { + Yggdrasilberry_Box_: { + Rate: 1200 + } + Max_Weight_Up_Box: { + Rate: 280 + } + SP_Increase_PotionL: { + Count: 30 + Rate: 1200 + } + Insurance_Package: { + Rate: 850 + } + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + Accuracy_30_Scroll: { + Count: 10 + Rate: 1200 + } + Bubble_Gum_Box: { + Rate: 1075 + } + Enriched_Elunium_Box: { + Rate: 200 + } + Enriched_Oridecon_Box: { + Rate: 200 + } + Convex_Mirror_Box: { + Rate: 896 + } + Spark_Candy_Box10: { + Rate: 1200 + } + Tw_Frog_Hat: { + Announce: true + Rate: 150 + } + Carrot_In_Mouth: { + Announce: true + Rate: 78 + } + Puppy_Ears_Hat: { + Announce: true + Rate: 100 + } + Powder_Snow_Box: { + Announce: true + Rate: 1 + } + Sealed_B_Shecil_Card: { + Announce: true + Rate: 15 + } + Sealed_Apocalips_H_Card: { + Announce: true + Rate: 5 + } + Green_Apple_Hat: { + Announce: true + Rate: 150 + } +}*/ +Tw_Aug_Scroll: { + Yggdrasilberry_Box_: { + Rate: 1350 + } + Poison_Bottle_Box2: { + Rate: 1280 + } +/* Diabolic_Scroll: { + Count: 5 + Rate: 1300 + }*/ + Bubble_Gum_Box: { + Rate: 1300 + } + Battle_Manual_Box: { + Rate: 1130 + } + Psychic_ArmorS: { + Count: 10 + Rate: 1021 + } + Vit_Dish_Box: { + Rate: 1350 + } + Ninja_Scroll: { + Announce: true + Rate: 150 + } + Pink_Fur_Hat: { + Announce: true + Rate: 100 + } + Whisper_Boss_Card: { + Announce: true + Rate: 15 + } + Gloom_Under_Night_Card: { + Announce: true + Rate: 1 + } +} +/* item not unknown/supported - not yet available +Tw_April_Scroll: { + Str_Dish_Box: { + Rate: 1500 + } + Luk_Dish_Box: { + Rate: 1500 + } + Vit_Dish_Box: { + Rate: 1500 + } + S_Mdef_Potion_Box30: { + Rate: 1300 + } + S_Def_Potion_Box30: { + Rate: 1300 + } + Holy_Armor_S_Box10: { + Rate: 1300 + } + Shadow_Armor_S_Box10: { + Rate: 1300 + } + Turtle_General_Card: { + Announce: true + Rate: 1 + } + RWC2010_Indonesia: { + Announce: true + Rate: 6 + } + Neuralizer_Box: { + Announce: true + Rate: 3 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 10 + } + Spiked_Scarf_Box: { + Announce: true + Rate: 50 + } + Rainbow_Scarf_Box: { + Announce: true + Rate: 50 + } + Fish_Head_Hat_Box: { + Announce: true + Rate: 180 + } +}*/ +/* not yet supported/unknown C_Wing_Of_Fly_3Day_Box: { + C_Wing_Of_Fly: { + Random: false + Expire: 72 + Named: true + } +}*/ +/* item not unknown/supported - not yet available +Ex_Def_Potion_Box: { + Ex_Def_Potion: { + Random: false + Count: 5 + Named: true + } + RWC_Scroll_2012: { + Random: false + Named: true + } +}*/ +/* item not unknown/supported - not yet available +RWC_Scroll_2012: { + RWC_Inicializer: { + Rate: 1000 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 90 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 90 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 5 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 5 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + Bubble_Gum_Box5: { + Rate: 1500 + } + Carat_Dia: { + Rate: 1000 + } + Battle_Manual_Box5: { + Rate: 1500 + } + Old_C_Album_Weapon: { + Rate: 500 + } + Old_C_Album_Acc: { + Rate: 500 + } + Branch_Of_Dead_Tree: { + Count: 3 + Rate: 1000 + } + Magic_Card_Album: { + Announce: true + Rate: 100 + } + RWC_Memory_Staff: { + Announce: true + Rate: 150 + } + RWC_Memory_Mace: { + Announce: true + Rate: 150 + } + RWC_Memory_Knife: { + Announce: true + Rate: 150 + } + Rainbow_Feather_Deco: { + Announce: true + Rate: 150 + } + C_Rainbow_Feather_Deco: { + Announce: true + Rate: 110 + } +}*/ +/* item not unknown/supported - not yet available +Old_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 400 + } + Splendide_Coin: { + Rate: 200 + } + Manuk_Coin: { + Rate: 100 + } + Sapa_Feat_Cert: { + Rate: 80 + } + Mora_Coin: { + Rate: 50 + } + Anger_Seagod: { + Rate: 1 + } + Cgrade_Coin: { + Rate: 74 + } + Dgrade_Coin: { + Rate: 95 + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Manuk_Coin: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Mora_Coin: { + Random: false + } + Agrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Manuk_Coin: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Mora_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +High_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Agrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Mid_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Bgrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Manuk_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Low_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Cgrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Manuk_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Sgrade_Pocket: { + Agrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Agrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Anger_Seagod: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Agrade_Pocket: { + Agrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Cgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Bgrade_Pocket: { + Bgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Cgrade_Pocket: { + Cgrade_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Egrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Dgrade_Pocket: { + Dgrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + Count: 2 + } + Egrade_Coin: { + Random: false + Count: 2 + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Egrade_Pocket: { + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + Count: 2 + } + Egrade_Coin: { + Random: false + Count: 2 + } + Malang_Sp_Can: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box: { + Ptotection_Seagod: { + Random: false + Expire: 23 + } +}*/ +/* item not unknown/supported - not yet available +Hairtail_Box1: { + Hairtail: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Hairtail_Box2: { + Hairtail: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Spearfish_Box1: { + Spearfish_: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Spearfish_Box2: { + Spearfish_: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Saurel_Box1: { + Saurel: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Saurel_Box2: { + Saurel: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Tuna_Box1: { + Tuna: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Tuna_Box2: { + Tuna: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Malang_Crab_Box1: { + Malang_Snow_Crab: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Malang_Crab_Box2: { + Malang_Snow_Crab: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Brindle_Eel_Box1: { + Brindle_Eel: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Brindle_Eel_Box2: { + Brindle_Eel: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box2: { + Ptotection_Seagod: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box3: { + Ptotection_Seagod: { + Random: false + Expire: 360 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box: { + Octopus_Hunt_Stick: { + Random: false + Expire: 23 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box2: { + Octopus_Hunt_Stick: { + Random: false + Expire: 72 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box3: { + Octopus_Hunt_Stick: { + Random: false + Expire: 168 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box10: { + Silvervine: { + Random: false + Count: 10 + } + Malang_Sp_Can: { + Random: false + Count: 30 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box40: { + Silvervine: { + Random: false + Count: 40 + } + Malang_Sp_Can: { + Random: false + Count: 120 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box4: { + Silvervine: { + Random: false + Count: 4 + } + Malang_Sp_Can: { + Random: false + Count: 12 + } +}*/ +/* not yet supported/unknown Malang_Woe_Encard_Box: { + Ptotection_Seagod_Box: { + Random: false + } + Octo_Hstick_Box: { + Random: false + } +}*/ \ No newline at end of file diff --git a/db/pre-re/item_violetbox.txt b/db/pre-re/item_violetbox.txt deleted file mode 100644 index ef8bd163d..000000000 --- a/db/pre-re/item_violetbox.txt +++ /dev/null @@ -1,928 +0,0 @@ -// Old Violet Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -2,501,14 // Red Potion -2,502,14 // Orange Potion -2,503,14 // Yellow Potion -2,504,14 // White Potion -2,505,14 // Blue Potion -2,506,14 // Green Potion -2,507,14 // Red Herb -2,508,14 // Yellow Herb -2,509,14 // White Herb -2,510,14 // Blue Herb -2,511,14 // Green Herb -2,512,14 // Apple -2,513,14 // Banana -2,514,14 // Grape -2,515,14 // Carrot -2,516,14 // Potato -2,517,14 // Meat -2,518,14 // Honey -2,519,14 // Milk -2,520,14 // Hinalle Leaflet -2,521,14 // Aloe Leaflet -2,522,14 // Mastela Fruit -2,523,14 // Holy Water -2,525,14 // Panacea -2,526,14 // Royal Jelly -2,528,14 // Monster Food -2,529,14 // Candy -2,530,14 // Candy Cane -2,531,14 // Apple Juice -2,532,14 // Banana Juice -2,533,14 // Grape Juice -2,534,14 // Carrot Juice -2,535,14 // Pumpkin -2,536,14 // Ice Cream -2,537,14 // Pet Food -2,538,14 // Well-baked Cookie -2,539,14 // Piece of Cake -2,544,14 // Raw Fish -2,545,14 // Condensed Red Potion -2,546,14 // Condensed Yellow Potion -2,547,14 // Condensed White Potion -2,548,14 // Cheese -2,549,14 // Yam -2,550,14 // Rice Cake -2,551,14 // Sushi -2,553,14 // Bao -2,555,14 // Traditional Rice Cake -2,558,14 // Chocolate -2,561,14 // White Chocolate -2,601,14 // Fly Wing -2,602,14 // Butterfly Wing -2,604,214 // Dead Branch -2,605,14 // Anodyne -2,606,14 // Aloevera -2,607,14 // Yggdrasil Berry -2,608,14 // Yggdrasil Seed -2,609,14 // Amulet -2,610,14 // Yggdrasil Leaf -2,611,14 // Magnifier -2,612,14 // Mini Furnace -2,613,14 // Iron Hammer -2,614,14 // Golden Hammer -2,615,14 // Oridecon Hammer -2,616,1 // Old Card Album -2,617,103 // Old Purple Box -2,618,14 // Worn Out Scroll -2,619,14 // Unripe Apple -2,620,14 // Orange Juice -2,621,14 // Bitter Herb -2,622,14 // Rainbow Carrot -2,623,14 // Earthworm the Dude -2,624,14 // Rotten Fish -2,625,14 // Rusty Iron -2,626,14 // Monster Juice -2,627,14 // Sweet Milk -2,628,14 // Well-Dried Bone -2,629,14 // Singing Flower -2,630,14 // Dew Laden Moss -2,631,14 // Deadly Noxious Herb -2,632,14 // Fatty Chubby Earthworm -2,633,14 // Sweet Potato -2,634,14 // Tropical Banana -2,635,14 // Orc Trophy -2,636,14 // No Recipient -2,637,14 // Old Broom -2,638,14 // Silver Knife of Chastity -2,639,14 // Armlet of Obedience -2,640,14 // Shining Stone -2,641,14 // Contracts in Shadow -2,642,14 // Book of the Devil -2,643,14 // Pet Incubator -2,644,114 // Gift Box -2,645,14 // Concentration Potion -2,656,14 // Awakening Potion -2,657,14 // Berserk Potion -2,659,14 // Her Heart -2,663,14 // Songpyun -2,664,14 // Gift Box -2,665,14 // Gift Box -2,666,14 // Gift Box -2,667,14 // Gift Box -2,668,14 // Red_Envelope -2,678,14 // Poison Bottle -2,679,14 // Pilule -2,701,14 // Ora Ora -2,702,14 // Animal Gore -2,703,14 // Hinalle -2,704,14 // Aloe -2,705,14 // Clover -2,706,14 // Four Leaf Clover -2,707,14 // Singing Plant -2,708,14 // Ment -2,710,14 // Illusion Flower -2,711,14 // Shoot -2,712,14 // Flower -2,713,14 // Empty Bottle -2,715,14 // Yellow Gemstone -2,716,14 // Red Gemstone -2,717,14 // Blue Gemstone -2,718,14 // Garnet -2,719,14 // Amethyst -2,720,14 // Aquamarine -2,721,14 // Emerald -2,722,14 // Pearl -2,723,14 // Ruby -2,724,14 // Cursed Ruby -2,725,14 // Sardonyx -2,726,14 // Sapphire -2,727,14 // Opal -2,728,14 // Topaz -2,729,14 // Zircon -2,730,14 // 1carat Diamond -2,731,14 // 2carat Diamond -2,732,14 // 3carat Diamond -2,733,14 // Cracked Diamond -2,734,14 // Red Frame -2,735,14 // Chung Jah -2,736,14 // China -2,737,14 // Black Ladle -2,738,14 // Pencil Case -2,739,14 // Rouge -2,740,14 // Puppet -2,741,14 // Poring Doll -2,742,14 // Chonchon Doll -2,743,14 // Spore Doll -2,744,14 // Bouquet -2,745,14 // Wedding Bouquet -2,746,14 // Glass Bead -2,747,14 // Crystal Mirror -2,748,14 // Witherless Rose -2,749,14 // Frozen Rose -2,750,14 // Baphomet Doll -2,751,14 // Osiris Doll -2,752,14 // Grasshopper Doll -2,753,14 // Yoyo Doll -2,754,14 // Raccoon Doll -2,901,14 // Danggie -2,902,14 // Tree Root -2,903,14 // Reptile Tongue -2,904,14 // Scorpion Tail -2,905,14 // Stem -2,906,14 // Pointed Scale -2,907,14 // Resin -2,908,14 // Spawn -2,909,14 // Jellopy -2,910,14 // Garlet -2,911,14 // Scell -2,912,14 // Zargon -2,913,14 // Tooth of Bat -2,914,14 // Fluff -2,915,14 // Chrysalis -2,916,14 // Feather of Birds -2,917,14 // Talon -2,918,14 // Sticky Webfoot -2,919,14 // Animal Skin -2,920,14 // Wolf Claw -2,921,14 // Mushroom Spore -2,922,14 // Orc's Fang -2,923,14 // Evil Horn -2,924,14 // Powder of Butterfly -2,925,14 // Bill of Birds -2,926,14 // Snake Scale -2,928,14 // Insect Feeler -2,929,14 // Immortal Heart -2,930,14 // Rotten Bandage -2,931,14 // Orcish Voucher -2,932,14 // Skel-Bone -2,934,14 // Memento -2,935,14 // Shell -2,936,14 // Scale Shell -2,937,14 // Venom Canine -2,938,14 // Sticky Mucus -2,939,14 // Bee Sting -2,940,14 // Grasshopper's Leg -2,941,14 // Nose Ring -2,942,14 // Yoyo Tail -2,943,14 // Solid Shell -2,944,14 // Horseshoe -2,945,14 // Raccoon Leaf -2,946,14 // Snail's Shell -2,947,14 // Horn -2,948,14 // Bear's Footskin -2,949,14 // Feather -2,950,14 // Heart of Mermaid -2,951,14 // Fin -2,952,14 // Cactus Needle -2,953,14 // Stone Heart -2,954,14 // Shining Scale -2,955,14 // Worm Peeling -2,956,14 // Gill -2,957,14 // Decayed Nail -2,958,14 // Horrendous Mouth -2,959,14 // Stinky Scale -2,960,14 // Nipper -2,961,14 // Conch -2,962,14 // Tentacle -2,963,14 // Sharp Scale -2,964,14 // Crab Shell -2,965,14 // Clam Shell -2,966,14 // Clam Flesh -2,967,14 // Turtle Shell -2,968,14 // Heroic Emblem -2,969,14 // Gold -2,971,14 // Detrimindexta -2,972,14 // Karvodailnirol -2,973,14 // Counteragent -2,974,14 // Mixture -2,975,14 // Scarlet Dyestuff -2,976,14 // Lemon Dyestuff -2,978,14 // Cobaltblue Dyestuff -2,979,14 // Darkgreen Dyestuff -2,980,14 // Orange Dyestuff -2,981,14 // Violet Dyestuff -2,982,14 // White Dyestuff -2,983,14 // Black Dyestuff -2,986,14 // Anvil -2,987,14 // Oridecon Anvil -2,988,14 // Golden Anvil -2,989,14 // Emperium Anvil -2,990,14 // Red Blood -2,991,14 // Crystal Blue -2,992,14 // Wind of Verdure -2,993,14 // Green Live -2,994,14 // Flame Heart -2,995,14 // Mystic Frozen -2,996,14 // Rough Wind -2,997,14 // Great Nature -2,998,14 // Iron -2,999,14 // Steel -2,1000,14 // Star Crumb -2,1001,14 // Star Dust -2,1002,14 // Iron Ore -2,1003,14 // Coal -2,1004,14 // Chivalry Emblem -2,1005,14 // Hammer of Blacksmith -2,1006,14 // Old Magicbook -2,1007,14 // Necklace of Wisdom -2,1008,14 // Necklace of Oblivion -2,1009,14 // Hand of God -2,1010,14 // Phracon -2,1011,14 // Emveretarcon -2,1012,14 // Frill -2,1013,14 // Rainbow Shell -2,1014,14 // Ant Jaw -2,1015,14 // Tongue -2,1016,14 // Rat Tail -2,1017,14 // Mole Whiskers -2,1018,14 // Mole Claw -2,1019,14 // Trunk -2,1020,14 // Black Hair -2,1021,14 // Dokebi Horn -2,1022,14 // Nine Tails -2,1023,14 // Fish Tail -2,1024,14 // Squid Ink -2,1025,14 // Cobweb -2,1026,14 // Acorn -2,1027,14 // Porcupine Quill -2,1028,14 // Mane -2,1029,14 // Tiger Skin -2,1031,14 // Mantis Scythe -2,1032,14 // Maneater Blossom -2,1033,14 // Maneater Root -2,1034,14 // Blue Hair -2,1035,14 // Dragon Canine -2,1036,14 // Dragon Scale -2,1037,14 // Dragon Tail -2,1038,14 // Little Evil Horn -2,1039,14 // Little Evil Wing -2,1040,14 // Elder Pixie's Moustache -2,1041,14 // Lantern -2,1042,14 // Bug Leg -2,1043,14 // Orc Claw -2,1044,14 // Zenorc's Fang -2,1045,14 // Cultish Masque -2,1046,14 // Scorpion Nipper -2,1047,14 // Dead Medusa -2,1048,14 // Horrendous Hair -2,1049,14 // Skirt of Virgin -2,1050,14 // Tendon -2,1051,14 // Detonator -2,1052,14 // Single Cell -2,1053,14 // Ancient Tooth -2,1054,14 // Ancient Lips -2,1055,14 // Earthworm Peeling -2,1056,14 // Grit -2,1057,14 // Moth Dust -2,1058,14 // Moth Wings -2,1059,14 // Fabric -2,1060,14 // Golden Hair -2,1061,14 // Witched Starsand -2,1062,14 // Jack o' Pumpkin -2,1063,14 // Fang -2,1064,14 // Reins -2,1065,14 // Trap -2,1066,14 // Fine-grained Trunk -2,1067,14 // Solid Trunk -2,1068,14 // Barren Trunk -2,1088,14 // Morocc Solution -2,1089,14 // Payon Solution -2,1092,14 // Empty Test Tube -2,1093,14 // Empty Potion Bottle -2,1094,14 // Short Daenggie -2,1095,14 // Clock Hand -2,1096,14 // Round Shell -2,1097,14 // Worn Out Page -2,1098,14 // Manacles -2,1099,14 // Worn-out Prison Uniform -2,1102,7 // Sword -2,1105,7 // Falchion -2,1108,7 // Blade -2,1111,7 // Rapier -2,1114,7 // Scimitar -2,1117,7 // Katana -2,1120,7 // Tsurugi -2,1124,7 // Orcish sword -2,1125,7 // Ring Pommel Saber -2,1127,7 // Saber -2,1128,7 // Haedonggum -2,1129,7 // Flamberge -2,1147,1 // Town Sword -2,1148,1 // Star Dust Blade -2,1152,7 // Slayer -2,1155,7 // Bastard Sword -2,1158,7 // Two-Handed Sword -2,1162,7 // Broad Sword -2,1163,7 // Claymore -2,1202,7 // Knife -2,1205,7 // Cutter -2,1208,7 // Main Gauche -2,1211,7 // Dirk -2,1214,7 // Dagger -2,1217,7 // Stiletto -2,1220,7 // Gladius -2,1226,7 // Damascus -2,1243,7 // Novice Main Gauche -2,1251,7 // Jur -2,1253,7 // Katar -2,1255,7 // Jamadhar -2,1256,7 // Katar of Frozen Icicle -2,1257,7 // Katar of Quaking -2,1258,7 // Katar of Raging Blaze -2,1259,7 // Katar of Piercing Wind -2,1262,1 // Loki's Nail -2,1263,1 // Unholy Touch -2,1264,2 // Specialty Jur -2,1265,1 // Bloody Roar -2,1269,1 // Inverse Scale -2,1271,1 // Blood Tears -2,1302,7 // Axe -2,1304,7 // Orcish Axe -2,1307,1 // Windhawk -2,1352,7 // Battle Axe -2,1355,7 // Hammer -2,1358,7 // Buster -2,1361,7 // Two-Handed Axe -2,1370,1 // Doom Slayer -2,1376,1 // Heart Breaker -2,1377,1 // Hurricane Fury -2,1402,7 // Javelin -2,1405,7 // Spear -2,1408,7 // Pike -2,1411,7 // Lance -2,1452,7 // Guisarme -2,1455,7 // Glaive -2,1458,7 // Partizan -2,1461,7 // Trident -2,1464,7 // Halberd -2,1472,7 // Soul Staff -2,1474,1 // Gae Bolg -2,1478,1 // Ahlspiess -2,1502,7 // Club -2,1505,7 // Mace -2,1508,7 // Smasher -2,1511,7 // Flail -2,1514,7 // Morning Star -2,1517,7 // Sword Mace -2,1520,7 // Chain -2,1522,7 // Stunner -2,1550,7 // Book -2,1551,7 // Bible -2,1552,7 // Tablet -2,1553,7 // Book of Billows -2,1554,7 // Book of Mother Earth -2,1555,7 // Book of the Blazing Sun -2,1556,7 // Book of Gust of Wind -2,1558,7 // Girl's Diary -2,1559,1 // Legacy of Dragon -2,1560,1 // Sage's Diary -2,1561,1 // Hardcover Book -2,1602,7 // Rod -2,1605,7 // Wand -2,1608,7 // Staff -2,1611,7 // Arc Wand -2,1613,7 // Mighty Staff -2,1614,7 // Wand of Occult -2,1615,7 // Evil Bone Wand -2,1616,1 // Wing Staff -2,1618,1 // Survivor's Rod -2,1620,1 // Survivor's Rod -2,1622,1 // Hypnotist's Staff -2,1702,7 // Bow -2,1705,7 // Composite Bow -2,1708,7 // Great Bow -2,1711,7 // Crossbow -2,1715,7 // Arbalest -2,1716,7 // Gakkung Bow -2,1718,7 // Hunter Bow -2,1723,1 // Luna Bow -2,1724,1 // Dragon Wing -2,1730,1 // Burning Bow -2,1731,1 // Frozen Bow -2,1732,1 // Earth Bow -2,1733,1 // Gust Bow -2,1750,14 // Arrow -2,1751,14 // Silver Arrow -2,1752,14 // Fire Arrow -2,1753,14 // Steel Arrow -2,1754,14 // Crystal Arrow -2,1755,14 // Arrow of Wind -2,1756,14 // Stone Arrow -2,1757,14 // Immaterial Arrow -2,1758,14 // Stun Arrow -2,1759,14 // Frozen Arrow -2,1760,14 // Flash Arrow -2,1761,14 // Cursed Arrow -2,1762,14 // Rusty Arrow -2,1763,14 // Poison Arrow -2,1764,14 // Sharp Arrow -2,1765,14 // Oridecon Arrow -2,1767,14 // Shadow Arrow -2,1768,14 // Sleep Arrow -2,1769,14 // Mute Arrow -2,1770,14 // Iron Arrow -2,1802,7 // Waghnak -2,1804,7 // Knuckle Duster -2,1806,7 // Studded Knuckles -2,1808,7 // Fist -2,1810,7 // Claw -2,1812,7 // Finger -2,1815,1 // Hatii Claw -2,1818,1 // Magma Fist -2,1819,1 // Icicle Fist -2,1820,1 // Electric Fist -2,1821,1 // Seismic Fist -2,1822,1 // Combo Battle Glove -2,1902,7 // Violin -2,1904,7 // Mandolin -2,1906,7 // Lute -2,1908,7 // Guitar -2,1910,7 // Harp -2,1912,7 // Gumoongoh -2,1914,1 // Burning Passion Guitar -2,1915,1 // Loner's Guitar -2,1916,1 // Green Acre Guitar -2,1917,1 // Gentle Breeze Guitar -2,1918,1 // Oriental Lute -2,1919,1 // Base Guitar -2,1951,7 // Rope -2,1953,7 // Whip -2,1955,7 // Wire Whip -2,1957,7 // Rante Whip -2,1959,7 // Tail Whip -2,1961,7 // Whip -2,1965,1 // Red Flame Whip -2,1966,1 // Icicle Whip -2,1967,1 // Gaia Whip -2,1968,1 // Skipping Rope -2,1969,1 // Blade Whip -2,1970,1 // Queen's Whip -2,1971,1 // Electric Wire -2,1972,1 // Electric Eel -2,1973,1 // Sea Witch's Foot -2,1974,1 // Carrot Whip -2,2102,7 // Guard -2,2104,7 // Buckler -2,2106,7 // Shield -2,2108,7 // Mirror Shield -2,2109,7 // Memory Book -2,2112,7 // Novice Guard -2,2201,7 // Sunglasses -2,2203,7 // Glasses -2,2205,7 // Diver Goggles -2,2206,7 // Wedding Veil -2,2207,7 // Fancy Flower -2,2208,7 // Ribbon -2,2209,7 // Ribbon -2,2210,7 // Hair Band -2,2211,7 // Bandana -2,2212,7 // Eye Patch -2,2213,7 // Kitty Band -2,2214,7 // Bunny Band -2,2215,7 // Flower Band -2,2216,7 // Biretta -2,2217,7 // Biretta -2,2218,7 // Flu Mask -2,2220,7 // Hat -2,2221,7 // Hat -2,2222,7 // Turban -2,2223,7 // Turban -2,2224,7 // Goggles -2,2225,7 // Goggles -2,2226,7 // Cap -2,2227,7 // Cap -2,2228,7 // Helm -2,2229,7 // Helm -2,2230,7 // Gemmed Sallet -2,2231,7 // Gemmed Sallet -2,2232,7 // Circlet -2,2233,7 // Circlet -2,2236,7 // Santa Hat -2,2239,7 // Monocle -2,2241,7 // Grandpa Beard -2,2242,7 // Purple Glasses -2,2243,7 // Geek Glasses -2,2244,7 // Big Ribbon -2,2245,7 // Sweet Gent -2,2246,7 // Golden Gear -2,2247,7 // Romantic Gent -2,2248,7 // Western Grace -2,2249,1 // Coronet -2,2250,7 // Cute Ribbon -2,2251,7 // Monk Hat -2,2252,7 // Wizard Hat -2,2253,7 // Sunflower -2,2254,1 // Angel Wing -2,2255,1 // Evil Wing -2,2257,7 // Unicorn Horn -2,2258,1 // Spiky Band -2,2259,7 // Mini Propeller -2,2260,7 // Mini Glasses -2,2261,7 // Army Cap -2,2262,7 // Clown Nose -2,2263,7 // Zorro Masque -2,2265,7 // Gangster Mask -2,2266,7 // Iron Cain -2,2267,7 // Cigarette -2,2268,7 // Pipe -2,2269,7 // Romantic Flower -2,2270,7 // Romantic Leaf -2,2271,7 // Jack be Dandy -2,2274,1 // Ghost Bandana -2,2275,7 // Red Bandana -2,2276,7 // Angled Glasses -2,2277,7 // Nurse Cap -2,2278,7 // Mr. Smile -2,2279,7 // Bomb Wick -2,2282,7 // Halo -2,2285,7 // Apple of Archer -2,2286,1 // Elven Ears -2,2287,7 // Pirate Bandana -2,2288,7 // Mr. Scream -2,2289,7 // Poo Poo Hat -2,2290,7 // Funeral Hat -2,2291,7 // Masquerade -2,2294,7 // Stellar -2,2295,7 // Blinker -2,2297,7 // Goblin Mask -2,2298,7 // Green Feeler -2,2299,7 // Orc Helm -2,2302,7 // Cotton Shirt -2,2304,7 // Jacket -2,2306,7 // Adventurer's Suit -2,2308,7 // Mantle -2,2310,7 // Coat -2,2311,7 // Mink Coat -2,2313,7 // Padded Armor -2,2315,7 // Chain Mail -2,2317,7 // Full Plate -2,2318,7 // Lord's Clothes -2,2320,7 // Formal Suit -2,2322,7 // Silk Robe -2,2324,7 // Scapulare -2,2326,7 // Saint's Robe -2,2327,1 // Holy Robe -2,2329,7 // Wooden Mail -2,2331,7 // Tights -2,2333,7 // Silver Robe -2,2334,1 // Mage Coat -2,2336,7 // Thief Clothes -2,2337,7 // Ninja Suit -2,2339,7 // Pantie -2,2340,7 // Novice Breastplate -2,2352,7 // Tattered Novice Ninja Suit -2,2402,7 // Sandals -2,2404,7 // Shoes -2,2406,7 // Boots -2,2407,7 // Crystal Pumps -2,2408,7 // Shackles -2,2409,7 // High Heels -2,2411,7 // Greaves -2,2414,7 // Novice Slippers -2,2502,7 // Hood -2,2504,7 // Muffler -2,2506,7 // Manteau -2,2507,7 // Ancient Cape -2,2508,7 // Ragamuffin Manteau -2,2510,7 // Somber Novice Hood -2,2513,1 // Heavenly Maiden Robe -2,2514,1 // Pauldron -2,2515,1 // Eagle Wing -2,2601,7 // Ring -2,2602,7 // Earring -2,2603,7 // Necklace -2,2604,7 // Glove -2,2605,7 // Brooch -2,2607,7 // Clip -2,2608,7 // Rosary -2,2609,7 // Skull Ring -2,2610,7 // Gold Ring -2,2611,7 // Silver Ring -2,2612,7 // Flower Ring -2,2613,7 // Diamond Ring -2,2614,1 // Eye of Dullahan -2,2615,1 // Safety Ring -2,2616,1 // Critical Ring -2,2617,7 // Celebrant's Mitten -2,2618,7 // Matyr's Leash -2,2621,1 // Ring -2,2622,1 // Earring -2,2623,1 // Necklace -2,2624,1 // Glove -2,2625,1 // Brooch -2,2626,1 // Rosary -2,2627,7 // Belt -2,2628,7 // Novice Armlet -2,2652,1 // Goddess of Fortune's Cursed Brooch -2,2654,1 // Shinobi Sash -2,2655,1 // Bloodied Shackle Ball -2,2656,1 // Armor Charm -2,5002,1 // Jewel Crown -2,5003,7 // Joker Jester -2,5005,7 // Gas Mask -2,5006,7 // Machoman's Glasses -2,5007,1 // Grand Circlet -2,5009,7 // Safety Helmet -2,5010,7 // Indian Fillet -2,5011,7 // Aerial -2,5014,7 // Fin Helm -2,5015,7 // Egg Shell -2,5017,1 // Bone Helm -2,5030,7 // Panda Hat -2,5035,7 // Poring Hat -2,5037,7 // Nutshell -2,5053,1 // Sphinx Hat -2,5055,7 // Novice False Eggshell -2,5066,1 // Succubus Horn -2,5072,1 // Incubus Horn -2,5085,1 // Small Ribbons -2,5088,7 // Surprised Mask -2,5089,7 // Annoyed Mask -2,5090,7 // Goblin Leader Mask -2,5111,1 // Galapago Cap -2,5113,1 // Angry Snarl -2,5116,1 // Banana Hat -2,5118,1 // Puppy Headband -2,5119,1 // Super Novice Hat -2,5120,1 // Bucket Hat -2,7001,14 // Mould Powder -2,7002,14 // Ogre Tooth -2,7003,14 // Anolian Skin -2,7004,14 // Mud Lump -2,7005,14 // Skull -2,7006,14 // Wing of Red Bat -2,7007,14 // Claw of Rat -2,7008,14 // Stiff Horn -2,7009,14 // Glitter Shell -2,7010,14 // Tail of Steel Scorpion -2,7011,14 // Claw of Monkey -2,7012,14 // Tough Scalelike Stem -2,7013,14 // Coral Reef -2,7014,14 // Old Portrait -2,7015,14 // Memory Bookmark -2,7016,14 // Bent Spoon -2,7026,14 // Key of the Clock Tower -2,7027,14 // Key of the Underground -2,7030,14 // Claw of Desert Wolf -2,7031,14 // Old Frying Pan -2,7032,14 // Piece of Egg Shell -2,7033,14 // Poison Spore -2,7034,14 // Red Stocking -2,7035,14 // Matchstick -2,7036,14 // Fang of Garm -2,7038,14 // Yarn -2,7041,14 // Fine Grit -2,7047,14 // Alice's Apron -2,7048,14 // Talon of Griffon -2,7049,14 // Stone -2,7053,14 // Cyfar -2,7054,14 // Brigan -2,7059,14 // Free Ticket for Kafra Storage -2,7060,14 // Free Ticket for Kafra Transportation -2,7061,14 // Free Ticket for the Cart Service -2,7063,14 // Soft Feather -2,7064,14 // Wing of Dragonfly -2,7065,14 // Sea-Otter Fur -2,7066,14 // Ice Cubic -2,7067,14 // Stone Fragment -2,7068,14 // Burnt Tree -2,7069,14 // Destroyed Armor -2,7070,14 // Broken Shell -2,7071,14 // Tattered Clothes -2,7072,14 // Old Shuriken -2,7093,14 // Cogwheel -2,7094,14 // Fragment -2,7095,14 // Metal Fragment -2,7096,14 // Lava -2,7097,14 // Burning Heart -2,7098,14 // Live Coal -2,7099,14 // Worn-out Magic Scroll -2,7100,14 // Sharp Leaf -2,7101,14 // Peco Peco Feather -2,7106,14 // Antelope Horn -2,7107,14 // Antelope Skin -2,7108,14 // Piece of Shield -2,7109,14 // Shining Spear Blade -2,7110,14 // Broken Sword -2,7111,14 // Slick Paper -2,7112,14 // Sharp Paper -2,7113,14 // Broken Pharaoh Emblem -2,7114,14 // Masque of Tutankhamen -2,7115,14 // Harpy Feather -2,7116,14 // Harpy Talon -2,7117,14 // Torn Magic Book -2,7118,14 // Torn Scroll -2,7119,14 // Bacillus -2,7120,14 // Burning Horseshoe -2,7121,14 // Honey Pot -2,7122,14 // Burning Hair -2,7123,14 // Dragon Skin -2,7124,14 // Sand Clump -2,7125,14 // Scorpion Claw -2,7126,14 // Large Jellopy -2,7134,14 // Medicine Bowl -2,7135,14 // Fire Bottle -2,7136,14 // Acid Bottle -2,7137,14 // Plant Bottle -2,7138,14 // Marine Sphere Bottle -2,7139,14 // Glistening Coat -2,7149,14 // Yellow Plate -2,7150,14 // Piece of Bamboo -2,7151,14 // Oil Paper -2,7152,14 // Glossy Hair -2,7153,14 // Worn-out Kimono -2,7154,14 // Poisonous Powder -2,7155,14 // Poisonous Toad Skin -2,7156,14 // Broken Shuriken -2,7157,14 // Dark Mask -2,7158,14 // Broken Liquor Jar -2,7159,14 // Tengu Nose -2,7161,14 // Black Bear Skin -2,7162,14 // Cloud Crumb -2,7163,14 // Hard Feeler -2,7164,14 // Solid_Peach -2,7165,14 // Transparent Celestial Robe -2,7166,14 // Soft Silk -2,7167,14 // Strange Steel Piece -2,7168,14 // Giant Butterfly Wing -2,7169,14 // Ba_Gua -2,7171,14 // Leopard Skin -2,7172,14 // Leopard Claw -2,7174,14 // Wrapping Lace -2,7175,14 // Wrapping Paper -2,7182,14 // Cacao -2,7186,14 // Thin Trunk -2,7187,14 // Festival Mask -2,7188,14 // Brown_Root -2,7189,14 // Wooden Heart -2,7190,14 // Solid Husk -2,7191,14 // Lamp -2,7192,14 // Vane -2,7193,14 // Sprout -2,7194,14 // Soft Blade of Grass -2,7195,14 // Slingshot -2,7196,14 // Shoulder Protector -2,7197,14 // Tough Vines -2,7198,14 // Huge Leaf -2,7200,14 // Elastic Band -2,7201,14 // Log -2,7202,14 // Pincher of Beetle -2,7203,14 // Strong Branch -2,7205,14 // Piece of Black Cloth -2,7206,14 // Black Cat Doll -2,7207,14 // Old Manteau -2,7208,14 // Rusty Kitchen Knife -2,7209,14 // Helm of Dullahan -2,7210,14 // Armor Piece of Dullahan -2,7211,14 // Fragment of Rossata Stone -2,7212,14 // Hung Doll -2,7213,14 // Needle Packet -2,7214,14 // Bat Cage -2,7215,14 // Broken Needle -2,7216,14 // Red Muffler -2,7217,14 // Spool -2,7218,14 // Decomposed Rope -2,7219,14 // Striped Sock -2,7220,14 // Ectoplasm -2,7221,14 // Tangled Chains -2,7222,14 // Wooden Gnarl -2,7223,14 // Contorted Self-Portrait -2,7225,14 // Pumpkin Lantern -2,7262,14 // Folding Fan of Cat Ghost -2,7263,14 // Cat's Eye -2,7264,14 // Dry Sand -2,7265,14 // Dragon Horn -2,7266,14 // Denture from Dragon Mask -2,7267,14 // Tiger Panty -2,7268,14 // Little Ghost Doll -2,7269,14 // Pinafore -2,7270,14 // Nursing_Bottle -2,7315,1 // Dark Crystal Fragment -2,7316,1 // Insect Leg -2,7317,1 // Rusty Screw -2,7318,1 // Old Pick -2,7319,1 // Used Iron Plate -2,7320,1 // Dust Pollutant -2,7321,1 // Crystal Fragment -2,7322,1 // Toxic Gas -2,7323,1 // Battered Kettle -2,7325,1 // Flexible Tube -2,7326,1 // Fluorescent Liquid -2,7327,1 // Flashlight -2,7436,1 // Fragment of Agony -2,7437,1 // Fragment of Misery -2,7438,1 // Fragment of Hatred -2,7439,1 // Fragment of Despair -2,7440,1 // Red Feather -2,7441,1 // Blue Feather -2,7442,1 // Cursed Seal -2,7443,1 // Three-Headed Dragon's Head -2,7444,1 // Treasure Box -2,7445,1 // Green Bijou -2,7446,1 // Blue Bijou -2,7447,1 // Red Bijou -2,7448,1 // Yellow Bijou -2,7449,1 // Bloody Page -2,7450,1 // Skeletal Armor Piece -2,7451,1 // Fire Dragon Scale -2,7452,1 // Yellow Spice -2,7453,1 // Sweet Sauce -2,7454,1 // Savory Sauce -2,7455,1 // Spicy Sauce -2,7456,1 // Red Spice -2,7457,1 // Cooking Oil -2,7472,1 // Level 1 Cookbook -2,7473,1 // Level 2 Cookbook -2,7474,1 // Level 3 Cookbook -2,7475,1 // Level 4 Cookbook -2,7476,1 // Level 5 Cookbook -2,7477,1 // Level 6 Cookbook -2,7478,1 // Level 7 Cookbook -2,7479,1 // Level 8 Cookbook -2,7480,1 // Level 9 Cookbook -2,7481,1 // Level 10 Cookbook -2,7482,1 // Pot -2,7512,1 // Burnt Part -2,7513,1 // Pocket Watch -2,7561,1 // Glacial Heart -2,7562,1 // Ice Scale -2,7563,1 // Bloody Rune -2,7564,1 // Rotten Meat -2,7565,1 // Sticky Poison -2,7567,1 // Suspicious Hat -2,7568,1 // White Mask -2,7751,17 // Old White Cloth -2,7752,16 // Clattering Skull -2,7753,17 // Broken Farming Utensil -2,10001,7 // Skull Helm -2,10002,7 // Monster Oxygen Mask -2,10003,7 // Transparent Headgear -2,10004,7 // Pacifier -2,10005,7 // Wig -2,10006,7 // Queen's Hair Ornament -2,10007,7 // Silk Ribbon -2,10008,7 // Punisher -2,10009,7 // Wild Flower -2,10010,7 // Battered Pot -2,10011,7 // Stellar Hairpin -2,10012,7 // Tiny Egg Shell -2,10013,7 // Backpack -2,10014,7 // Rocker Glasses -2,10015,7 // Green Lace -2,10016,7 // Golden Bell -2,10017,7 // Bark Shorts -2,10018,7 // Monkey Circlet -2,10019,7 // Red Scarf -2,10020,7 // Grave Keeper's Sword -2,13001,1 // Dragon Killer -2,13002,1 // Ginnungagap -2,13004,1 // Cowardice Blade -2,13163,1 // Long Barrel -2,13164,1 // Long Barrel -2,13167,1 // Gate Keeper-DD -2,13168,1 // Thunder P -2,13170,2 // Lever Action Rifle -2,13200,1 // Bullet -2,13201,1 // Silver Bullet -2,13202,1 // Bloody Shell -2,13203,1 // Flare Sphere -2,13204,1 // Lightning Sphere -2,13205,1 // Poison Sphere -2,13206,1 // Blind Sphere -2,13207,1 // Freezing Sphere -2,13304,1 // Huuma Calm Mind diff --git a/db/re/item_bluebox.txt b/db/re/item_bluebox.txt deleted file mode 100644 index 7a4ff7086..000000000 --- a/db/re/item_bluebox.txt +++ /dev/null @@ -1,1027 +0,0 @@ -// Old Blue Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -1,501,12 // Red Potion -1,502,12 // Orange Potion -1,503,12 // Yellow Potion -1,504,12 // White Potion -1,505,12 // Blue Potion -1,506,12 // Green Potion -1,507,12 // Red Herb -1,508,12 // Yellow Herb -1,509,12 // White Herb -1,510,12 // Blue Herb -1,511,12 // Green Herb -1,512,12 // Apple -1,513,12 // Banana -1,514,12 // Grape -1,515,12 // Carrot -1,516,12 // Potato -1,517,12 // Meat -1,518,12 // Honey -1,519,12 // Milk -1,520,12 // Hinalle Leaflet -1,521,12 // Aloe Leaflet -1,522,12 // Mastela Fruit -1,523,12 // Holy Water -1,525,12 // Panacea -1,526,12 // Royal Jelly -1,528,12 // Monster Food -1,529,12 // Candy -1,530,12 // Candy Cane -1,531,12 // Apple Juice -1,532,12 // Banana Juice -1,533,12 // Grape Juice -1,534,12 // Carrot Juice -1,535,12 // Pumpkin -1,536,12 // Ice Cream -1,537,12 // Pet Food -1,538,12 // Well-baked Cookie -1,539,12 // Piece of Cake -1,544,12 // Raw Fish -1,545,12 // Condensed Red Potion -1,546,12 // Condensed Yellow Potion -1,547,12 // Condensed White Potion -1,548,12 // Cheese -1,549,12 // Yam -1,550,12 // Rice Cake -1,551,12 // Sushi -1,553,12 // Bao -1,555,12 // Traditional Rice Cake -1,558,12 // Chocolate -1,561,12 // White Chocolate -1,601,12 // Fly Wing -1,602,12 // Butterfly Wing -1,604,512 // Dead Branch -1,605,12 // Anodyne -1,606,12 // Aloevera -1,607,12 // Yggdrasil Berry -1,608,12 // Yggdrasil Seed -1,609,12 // Amulet -1,610,12 // Yggdrasil Leaf -1,611,12 // Magnifier -1,612,12 // Mini Furnace -1,613,12 // Iron Hammer -1,614,12 // Golden Hammer -1,615,12 // Oridecon Hammer -1,618,12 // Worn Out Scroll -1,619,12 // Unripe Apple -1,620,12 // Orange Juice -1,621,12 // Bitter Herb -1,622,12 // Rainbow Carrot -1,623,12 // Earthworm the Dude -1,624,12 // Rotten Fish -1,625,12 // Rusty Iron -1,626,12 // Monster Juice -1,627,12 // Sweet Milk -1,628,12 // Well-Dried Bone -1,629,12 // Singing Flower -1,630,12 // Dew Laden Moss -1,631,12 // Deadly Noxious Herb -1,632,12 // Fatty Chubby Earthworm -1,633,12 // Sweet Potato -1,634,12 // Tropical Banana -1,635,12 // Orc Trophy -1,636,12 // No Recipient -1,637,12 // Old Broom -1,638,12 // Silver Knife of Chastity -1,639,12 // Armlet of Obedience -1,640,12 // Shining Stone -1,641,12 // Contracts in Shadow -1,642,12 // Book of the Devil -1,643,12 // Pet Incubator -1,644,312 // Gift Box -1,645,12 // Concentration Potion -1,656,12 // Awakening Potion -1,657,12 // Berserk Potion -1,659,12 // Her Heart -1,663,12 // Songpyun -1,664,12 // Gift Box -1,665,12 // Gift Box -1,666,12 // Gift Box -1,667,12 // Gift Box -1,668,12 // Red_Envelope -1,678,12 // Poison Bottle -1,679,12 // Pilule -1,701,12 // Ora Ora -1,702,12 // Animal Gore -1,703,12 // Hinalle -1,704,12 // Aloe -1,705,12 // Clover -1,706,12 // Four Leaf Clover -1,707,12 // Singing Plant -1,708,12 // Ment -1,710,12 // Illusion Flower -1,711,12 // Shoot -1,712,12 // Flower -1,713,12 // Empty Bottle -1,715,12 // Yellow Gemstone -1,716,12 // Red Gemstone -1,717,12 // Blue Gemstone -1,718,12 // Garnet -1,719,12 // Amethyst -1,720,12 // Aquamarine -1,721,12 // Emerald -1,722,12 // Pearl -1,723,12 // Ruby -1,724,12 // Cursed Ruby -1,725,12 // Sardonyx -1,726,12 // Sapphire -1,727,12 // Opal -1,728,12 // Topaz -1,729,12 // Zircon -1,730,12 // 1carat Diamond -1,731,12 // 2carat Diamond -1,732,12 // 3carat Diamond -1,733,12 // Cracked Diamond -1,734,12 // Red Frame -1,735,12 // Chung Jah -1,736,12 // China -1,737,12 // Black Ladle -1,738,12 // Pencil Case -1,739,12 // Rouge -1,740,12 // Puppet -1,741,12 // Poring Doll -1,742,12 // Chonchon Doll -1,743,12 // Spore Doll -1,744,12 // Bouquet -1,745,12 // Wedding Bouquet -1,746,12 // Glass Bead -1,747,12 // Crystal Mirror -1,748,12 // Witherless Rose -1,749,12 // Frozen Rose -1,750,12 // Baphomet Doll -1,751,12 // Osiris Doll -1,752,12 // Grasshopper Doll -1,753,12 // Yoyo Doll -1,754,12 // Raccoon Doll -1,901,12 // Danggie -1,902,12 // Tree Root -1,903,12 // Reptile Tongue -1,904,12 // Scorpion Tail -1,905,12 // Stem -1,906,12 // Pointed Scale -1,907,12 // Resin -1,908,12 // Spawn -1,909,12 // Jellopy -1,910,12 // Garlet -1,911,12 // Scell -1,912,12 // Zargon -1,913,12 // Tooth of Bat -1,914,12 // Fluff -1,915,12 // Chrysalis -1,916,12 // Feather of Birds -1,917,12 // Talon -1,918,12 // Sticky Webfoot -1,919,12 // Animal Skin -1,920,12 // Wolf Claw -1,921,12 // Mushroom Spore -1,922,12 // Orc's Fang -1,923,12 // Evil Horn -1,924,12 // Powder of Butterfly -1,925,12 // Bill of Birds -1,926,12 // Snake Scale -1,928,12 // Insect Feeler -1,929,12 // Immortal Heart -1,930,12 // Rotten Bandage -1,931,12 // Orcish Voucher -1,932,12 // Skel-Bone -1,934,12 // Memento -1,935,12 // Shell -1,936,12 // Scale Shell -1,937,12 // Venom Canine -1,938,12 // Sticky Mucus -1,939,12 // Bee Sting -1,940,12 // Grasshopper's Leg -1,941,12 // Nose Ring -1,942,12 // Yoyo Tail -1,943,12 // Solid Shell -1,944,12 // Horseshoe -1,945,12 // Raccoon Leaf -1,946,12 // Snail's Shell -1,947,12 // Horn -1,948,12 // Bear's Footskin -1,949,12 // Feather -1,950,12 // Heart of Mermaid -1,951,12 // Fin -1,952,12 // Cactus Needle -1,953,12 // Stone Heart -1,954,12 // Shining Scale -1,955,12 // Worm Peeling -1,956,12 // Gill -1,957,12 // Decayed Nail -1,958,12 // Horrendous Mouth -1,959,12 // Stinky Scale -1,960,12 // Nipper -1,961,12 // Conch -1,962,12 // Tentacle -1,963,12 // Sharp Scale -1,964,12 // Crab Shell -1,965,12 // Clam Shell -1,966,12 // Clam Flesh -1,967,12 // Turtle Shell -1,968,12 // Heroic Emblem -1,969,12 // Gold -1,971,12 // Detrimindexta -1,972,12 // Karvodailnirol -1,973,12 // Counteragent -1,974,12 // Mixture -1,975,12 // Scarlet Dyestuff -1,976,12 // Lemon Dyestuff -1,978,12 // Cobaltblue Dyestuff -1,979,12 // Darkgreen Dyestuff -1,980,12 // Orange Dyestuff -1,981,12 // Violet Dyestuff -1,982,12 // White Dyestuff -1,983,12 // Black Dyestuff -1,986,12 // Anvil -1,987,12 // Oridecon Anvil -1,988,12 // Golden Anvil -1,989,12 // Emperium Anvil -1,990,12 // Red Blood -1,991,12 // Crystal Blue -1,992,12 // Wind of Verdure -1,993,12 // Green Live -1,994,12 // Flame Heart -1,995,12 // Mystic Frozen -1,996,12 // Rough Wind -1,997,12 // Great Nature -1,998,12 // Iron -1,999,12 // Steel -1,1000,12 // Star Crumb -1,1001,12 // Star Dust -1,1002,12 // Iron Ore -1,1003,12 // Coal -1,1004,12 // Chivalry Emblem -1,1005,12 // Hammer of Blacksmith -1,1006,12 // Old Magicbook -1,1007,12 // Necklace of Wisdom -1,1008,12 // Necklace of Oblivion -1,1009,12 // Hand of God -1,1010,12 // Phracon -1,1011,12 // Emveretarcon -1,1012,12 // Frill -1,1013,12 // Rainbow Shell -1,1014,12 // Ant Jaw -1,1015,12 // Tongue -1,1016,12 // Rat Tail -1,1017,12 // Mole Whiskers -1,1018,12 // Mole Claw -1,1019,12 // Trunk -1,1020,12 // Black Hair -1,1021,12 // Dokebi Horn -1,1022,12 // Nine Tails -1,1023,12 // Fish Tail -1,1024,12 // Squid Ink -1,1025,12 // Cobweb -1,1026,12 // Acorn -1,1027,12 // Porcupine Quill -1,1028,12 // Mane -1,1029,12 // Tiger Skin -1,1031,12 // Mantis Scythe -1,1032,12 // Maneater Blossom -1,1033,12 // Maneater Root -1,1034,12 // Blue Hair -1,1035,12 // Dragon Canine -1,1036,12 // Dragon Scale -1,1037,12 // Dragon Tail -1,1038,12 // Little Evil Horn -1,1039,12 // Little Evil Wing -1,1040,12 // Elder Pixie's Moustache -1,1041,12 // Lantern -1,1042,12 // Bug Leg -1,1043,12 // Orc Claw -1,1044,12 // Zenorc's Fang -1,1045,12 // Cultish Masque -1,1046,12 // Scorpion Nipper -1,1047,12 // Dead Medusa -1,1048,12 // Horrendous Hair -1,1049,12 // Skirt of Virgin -1,1050,12 // Tendon -1,1051,12 // Detonator -1,1052,12 // Single Cell -1,1053,12 // Ancient Tooth -1,1054,12 // Ancient Lips -1,1055,12 // Earthworm Peeling -1,1056,12 // Grit -1,1057,12 // Moth Dust -1,1058,12 // Moth Wings -1,1059,12 // Fabric -1,1060,12 // Golden Hair -1,1061,12 // Witched Starsand -1,1062,12 // Jack o' Pumpkin -1,1063,12 // Fang -1,1064,12 // Reins -1,1065,12 // Trap -1,1066,12 // Fine-grained Trunk -1,1067,12 // Solid Trunk -1,1068,12 // Barren Trunk -1,1088,12 // Morocc Solution -1,1089,12 // Payon Solution -1,1092,12 // Empty Test Tube -1,1093,12 // Empty Potion Bottle -1,1094,12 // Short Daenggie -1,1095,12 // Clock Hand -1,1096,12 // Round Shell -1,1097,12 // Worn Out Page -1,1098,12 // Manacles -1,1099,12 // Worn-out Prison Uniform -1,1101,6 // Sword -1,1102,6 // Sword -1,1104,6 // Falchion -1,1105,6 // Falchion -1,1107,6 // Blade -1,1108,6 // Blade -1,1110,6 // Rapier -1,1111,6 // Rapier -1,1113,6 // Scimitar -1,1114,6 // Scimitar -1,1116,3 // Katana -1,1117,3 // Katana -1,1119,6 // Tsurugi -1,1120,6 // Tsurugi -1,1122,6 // Ring Pommel Saber -1,1123,6 // Haedonggum -1,1124,6 // Orcish sword -1,1125,6 // Ring Pommel Saber -1,1126,6 // Saber -1,1127,6 // Saber -1,1128,6 // Haedonggum -1,1129,6 // Flamberge -1,1146,1 // Town Sword -1,1147,1 // Town Sword -1,1148,1 // Star Dust Blade -1,1151,3 // Slayer -1,1152,3 // Slayer -1,1154,3 // Bastard Sword -1,1155,3 // Bastard Sword -1,1157,3 // Two-Handed Sword -1,1158,3 // Two-Handed Sword -1,1160,3 // Broad Sword -1,1162,3 // Broad Sword -1,1163,3 // Claymore -1,1201,3 // Knife -1,1202,3 // Knife -1,1204,3 // Cutter -1,1205,3 // Cutter -1,1207,3 // Main Gauche -1,1208,3 // Main Gauche -1,1210,3 // Dirk -1,1211,3 // Dirk -1,1213,3 // Dagger -1,1214,3 // Dagger -1,1216,3 // Stiletto -1,1217,3 // Stiletto -1,1219,3 // Gladius -1,1220,3 // Gladius -1,1222,3 // Damascus -1,1226,3 // Damascus -1,1243,3 // Novice Main Gauche -1,1245,1 // Cinquedea -1,1247,1 // Kindle Dagger -1,1248,1 // Obsidian Dagger -1,1249,1 // Fisherman's Dagger -1,1250,3 // Jur -1,1251,3 // Jur -1,1252,3 // Katar -1,1253,3 // Katar -1,1254,3 // Jamadhar -1,1255,3 // Jamadhar -1,1256,3 // Katar of Frozen Icicle -1,1257,3 // Katar of Quaking -1,1258,3 // Katar of Raging Blaze -1,1259,3 // Katar of Piercing Wind -1,1262,1 // Loki's Nail -1,1263,1 // Unholy Touch -1,1264,2 // Specialty Jur -1,1265,1 // Bloody Roar -1,1269,1 // Inverse Scale -1,1271,1 // Blood Tears -1,1301,3 // Axe -1,1302,3 // Axe -1,1304,3 // Orcish Axe -1,1307,1 // Windhawk -1,1351,3 // Battle Axe -1,1352,3 // Battle Axe -1,1354,3 // Hammer -1,1355,3 // Hammer -1,1357,3 // Buster -1,1358,3 // Buster -1,1360,3 // Two-Handed Axe -1,1361,3 // Two-Handed Axe -1,1370,1 // Doom Slayer -1,1376,1 // Heart Breaker -1,1377,1 // Hurricane Fury -1,1401,9 // Javelin -1,1402,9 // Javelin -1,1404,9 // Spear -1,1405,9 // Spear -1,1407,9 // Pike -1,1408,9 // Pike -1,1410,3 // Lance -1,1411,3 // Lance -1,1451,3 // Guisarme -1,1452,3 // Guisarme -1,1454,3 // Glaive -1,1455,3 // Glaive -1,1457,3 // Partizan -1,1458,3 // Partizan -1,1460,3 // Trident -1,1461,3 // Trident -1,1463,3 // Halberd -1,1464,3 // Halberd -1,1472,3 // Soul Staff -1,1474,1 // Gae Bolg -1,1478,1 // Ahlspiess -1,1501,6 // Club -1,1502,6 // Club -1,1504,6 // Mace -1,1505,6 // Mace -1,1507,6 // Smasher -1,1508,6 // Smasher -1,1510,6 // Flail -1,1511,6 // Flail -1,1513,6 // Morning Star -1,1514,6 // Morning Star -1,1516,6 // Sword Mace -1,1517,6 // Sword Mace -1,1519,6 // Chain -1,1520,6 // Chain -1,1522,6 // Stunner -1,1550,3 // Book -1,1551,3 // Bible -1,1552,3 // Tablet -1,1553,3 // Book of Billows -1,1554,3 // Book of Mother Earth -1,1555,3 // Book of the Blazing Sun -1,1556,3 // Book of Gust of Wind -1,1558,3 // Girl's Diary -1,1559,1 // Legacy of Dragon -1,1560,1 // Sage's Diary -1,1561,1 // Hardcover Book -1,1601,3 // Rod -1,1602,3 // Rod -1,1604,3 // Wand -1,1605,3 // Wand -1,1607,3 // Staff -1,1608,3 // Staff -1,1610,3 // Arc Wand -1,1611,3 // Arc Wand -1,1613,3 // Mighty Staff -1,1614,3 // Wand of Occult -1,1615,3 // Evil Bone Wand -1,1616,1 // Wing Staff -1,1617,1 // Survivor's Rod -1,1618,1 // Survivor's Rod -1,1619,1 // Survivor's Rod -1,1620,1 // Survivor's Rod -1,1621,1 // Hypnotist's Staff -1,1622,1 // Hypnotist's Staff -1,1701,3 // Bow -1,1702,3 // Bow -1,1704,3 // Composite Bow -1,1705,3 // Composite Bow -1,1707,3 // Great Bow -1,1708,3 // Great Bow -1,1710,3 // Crossbow -1,1711,3 // Crossbow -1,1713,3 // Arbalest -1,1714,3 // Gakkung Bow -1,1715,3 // Arbalest -1,1716,3 // Gakkung Bow -1,1718,3 // Hunter Bow -1,1723,1 // Luna Bow -1,1724,1 // Dragon Wing -1,1730,1 // Burning Bow -1,1731,1 // Frozen Bow -1,1732,1 // Earth Bow -1,1733,1 // Gust Bow -1,1750,12 // Arrow -1,1751,12 // Silver Arrow -1,1752,12 // Fire Arrow -1,1753,12 // Steel Arrow -1,1754,12 // Crystal Arrow -1,1755,12 // Arrow of Wind -1,1756,12 // Stone Arrow -1,1757,12 // Immaterial Arrow -1,1758,12 // Stun Arrow -1,1759,12 // Frozen Arrow -1,1760,12 // Flash Arrow -1,1761,12 // Cursed Arrow -1,1762,12 // Rusty Arrow -1,1763,12 // Poison Arrow -1,1764,12 // Sharp Arrow -1,1765,12 // Oridecon Arrow -1,1767,12 // Shadow Arrow -1,1768,12 // Sleep Arrow -1,1769,12 // Mute Arrow -1,1770,12 // Iron Arrow -1,1801,3 // Waghnak -1,1802,3 // Waghnak -1,1803,3 // Knuckle Duster -1,1804,3 // Knuckle Duster -1,1805,3 // Studded Knuckles -1,1806,3 // Studded Knuckles -1,1807,3 // Fist -1,1808,3 // Fist -1,1809,3 // Claw -1,1810,3 // Claw -1,1811,3 // Finger -1,1812,3 // Finger -1,1815,1 // Hatii Claw -1,1818,1 // Magma Fist -1,1819,1 // Icicle Fist -1,1820,1 // Electric Fist -1,1821,1 // Seismic Fist -1,1822,1 // Combo Battle Glove -1,1901,3 // Violin -1,1902,3 // Violin -1,1903,3 // Mandolin -1,1904,3 // Mandolin -1,1905,3 // Lute -1,1906,3 // Lute -1,1907,3 // Guitar -1,1908,3 // Guitar -1,1909,3 // Harp -1,1910,3 // Harp -1,1911,3 // Gumoongoh -1,1912,3 // Gumoongoh -1,1914,1 // Burning Passion Guitar -1,1915,1 // Loner's Guitar -1,1916,1 // Green Acre Guitar -1,1917,1 // Gentle Breeze Guitar -1,1918,1 // Oriental Lute -1,1919,1 // Base Guitar -1,1950,3 // Rope -1,1951,3 // Rope -1,1952,3 // Whip -1,1953,3 // Whip -1,1954,3 // Wire Whip -1,1955,3 // Wire Whip -1,1956,3 // Rante Whip -1,1957,3 // Rante Whip -1,1958,3 // Tail Whip -1,1959,3 // Tail Whip -1,1960,3 // Whip -1,1961,3 // Whip -1,1965,1 // Red Flame Whip -1,1966,1 // Icicle Whip -1,1967,1 // Gaia Whip -1,1968,1 // Skipping Rope -1,1969,1 // Blade Whip -1,1970,1 // Queen's Whip -1,1971,1 // Electric Wire -1,1972,1 // Electric Eel -1,1973,1 // Sea Witch's Foot -1,1974,1 // Carrot Whip -1,2101,3 // Guard -1,2102,3 // Guard -1,2103,3 // Buckler -1,2104,3 // Buckler -1,2105,3 // Shield -1,2106,3 // Shield -1,2107,3 // Mirror Shield -1,2108,3 // Mirror Shield -1,2109,3 // Memory Book -1,2112,3 // Novice Guard -1,2113,1 // Novice Shield -1,2123,1 // Orleans's Server -1,2124,1 // Thorny Buckler -1,2125,1 // Strong Shield -1,2201,3 // Sunglasses -1,2203,3 // Glasses -1,2205,3 // Diver Goggles -1,2206,3 // Wedding Veil -1,2207,3 // Fancy Flower -1,2208,3 // Ribbon -1,2209,3 // Ribbon -1,2210,3 // Hair Band -1,2211,3 // Bandana -1,2212,3 // Eye Patch -1,2213,3 // Kitty Band -1,2214,3 // Bunny Band -1,2215,3 // Flower Band -1,2216,3 // Biretta -1,2217,3 // Biretta -1,2218,3 // Flu Mask -1,2220,3 // Hat -1,2221,3 // Hat -1,2222,3 // Turban -1,2223,3 // Turban -1,2224,3 // Goggles -1,2225,3 // Goggles -1,2226,3 // Cap -1,2227,3 // Cap -1,2228,3 // Helm -1,2229,3 // Helm -1,2230,3 // Gemmed Sallet -1,2231,3 // Gemmed Sallet -1,2232,3 // Circlet -1,2233,3 // Circlet -1,2236,3 // Santa Hat -1,2239,3 // Monocle -1,2241,3 // Grandpa Beard -1,2242,3 // Purple Glasses -1,2243,3 // Geek Glasses -1,2244,3 // Big Ribbon -1,2245,3 // Sweet Gent -1,2246,3 // Golden Gear -1,2247,3 // Romantic Gent -1,2248,3 // Western Grace -1,2249,1 // Coronet -1,2250,3 // Cute Ribbon -1,2251,3 // Monk Hat -1,2252,3 // Wizard Hat -1,2253,3 // Sunflower -1,2254,1 // Angel Wing -1,2255,1 // Evil Wing -1,2257,3 // Unicorn Horn -1,2258,1 // Spiky Band -1,2259,3 // Mini Propeller -1,2260,3 // Mini Glasses -1,2261,3 // Army Cap -1,2262,3 // Clown Nose -1,2263,3 // Zorro Masque -1,2265,3 // Gangster Mask -1,2266,3 // Iron Cain -1,2267,3 // Cigarette -1,2268,3 // Pipe -1,2269,3 // Romantic Flower -1,2270,3 // Romantic Leaf -1,2271,3 // Jack be Dandy -1,2274,1 // Ghost Bandana -1,2275,3 // Red Bandana -1,2276,3 // Angled Glasses -1,2277,3 // Nurse Cap -1,2278,3 // Mr. Smile -1,2279,3 // Bomb Wick -1,2282,3 // Halo -1,2285,3 // Apple of Archer -1,2287,3 // Pirate Bandana -1,2288,3 // Mr. Scream -1,2289,3 // Poo Poo Hat -1,2290,3 // Funeral Hat -1,2291,3 // Masquerade -1,2294,3 // Stellar -1,2295,3 // Blinker -1,2297,3 // Goblin Mask -1,2298,3 // Green Feeler -1,2299,3 // Orc Helm -1,2301,3 // Cotton Shirt -1,2302,3 // Cotton Shirt -1,2303,3 // Jacket -1,2304,3 // Jacket -1,2305,3 // Adventurer's Suit -1,2306,3 // Adventurer's Suit -1,2307,3 // Mantle -1,2308,3 // Mantle -1,2309,3 // Coat -1,2310,3 // Coat -1,2311,3 // Mink Coat -1,2312,3 // Padded Armor -1,2313,3 // Padded Armor -1,2314,3 // Chain Mail -1,2315,3 // Chain Mail -1,2316,3 // Full Plate -1,2317,3 // Full Plate -1,2318,3 // Lord's Clothes -1,2320,3 // Formal Suit -1,2321,3 // Silk Robe -1,2322,3 // Silk Robe -1,2323,3 // Scapulare -1,2324,3 // Scapulare -1,2325,3 // Saint's Robe -1,2326,3 // Saint's Robe -1,2328,3 // Wooden Mail -1,2329,3 // Wooden Mail -1,2330,3 // Tights -1,2331,3 // Tights -1,2332,3 // Silver Robe -1,2333,3 // Silver Robe -1,2335,3 // Thief Clothes -1,2336,3 // Thief Clothes -1,2337,3 // Ninja Suit -1,2339,3 // Pantie -1,2340,3 // Novice Breastplate -1,2341,3 // Legion Plate Armor -1,2352,3 // Tattered Novice Ninja Suit -1,2365,1 // Orleans's Gown -1,2401,3 // Sandals -1,2402,3 // Sandals -1,2403,3 // Shoes -1,2404,3 // Shoes -1,2405,3 // Boots -1,2406,3 // Boots -1,2407,3 // Crystal Pumps -1,2408,3 // Shackles -1,2409,3 // High Heels -1,2411,3 // Greaves -1,2414,3 // Novice Slippers -1,2416,1 // Novice Shoes -1,2420,1 // Angel's Reincarnation -1,2501,3 // Hood -1,2502,3 // Hood -1,2503,3 // Muffler -1,2504,3 // Muffler -1,2505,3 // Manteau -1,2506,3 // Manteau -1,2507,3 // Ancient Cape -1,2508,3 // Ragamuffin Manteau -1,2510,3 // Somber Novice Hood -1,2512,1 // Novice Manteau -1,2513,1 // Heavenly Maiden Robe -1,2514,1 // Pauldron -1,2515,1 // Eagle Wing -1,2601,3 // Ring -1,2602,3 // Earring -1,2603,3 // Necklace -1,2604,3 // Glove -1,2605,3 // Brooch -1,2607,3 // Clip -1,2608,3 // Rosary -1,2609,3 // Skull Ring -1,2610,3 // Gold Ring -1,2611,3 // Silver Ring -1,2612,3 // Flower Ring -1,2613,3 // Diamond Ring -1,2617,3 // Celebrant's Mitten -1,2618,3 // Matyr's Leash -1,2621,1 // Ring -1,2622,1 // Earring -1,2623,1 // Necklace -1,2624,1 // Glove -1,2625,1 // Brooch -1,2626,1 // Rosary -1,2627,3 // Belt -1,2628,3 // Novice Armlet -1,2652,1 // Goddess of Fortune's Cursed Brooch -1,2654,1 // Shinobi Sash -1,2656,1 // Armor Charm -1,5002,1 // Jewel Crown -1,5003,3 // Joker Jester -1,5005,3 // Gas Mask -1,5006,3 // Machoman's Glasses -1,5009,3 // Safety Helmet -1,5010,3 // Indian Fillet -1,5011,3 // Aerial -1,5014,3 // Fin Helm -1,5015,3 // Egg Shell -1,5030,3 // Panda Hat -1,5035,3 // Poring Hat -1,5037,3 // Nutshell -1,5055,3 // Novice False Eggshell -1,5085,1 // Small Ribbons -1,5088,3 // Surprised Mask -1,5089,3 // Annoyed Mask -1,5090,3 // Goblin Leader Mask -1,5111,1 // Galapago Cap -1,5112,1 // Super Novice Hat -1,5113,1 // Angry Snarl -1,5114,1 // Bucket Hat -1,5116,1 // Banana Hat -1,5118,1 // Puppy Headband -1,5119,1 // Super Novice Hat -1,5120,1 // Bucket Hat -1,5122,1 // Magni's Cap -1,5175,1 // Censor Bar -1,7001,12 // Mould Powder -1,7002,12 // Ogre Tooth -1,7003,12 // Anolian Skin -1,7004,12 // Mud Lump -1,7005,12 // Skull -1,7006,12 // Wing of Red Bat -1,7007,12 // Claw of Rat -1,7008,12 // Stiff Horn -1,7009,12 // Glitter Shell -1,7010,12 // Tail of Steel Scorpion -1,7011,12 // Claw of Monkey -1,7012,12 // Tough Scalelike Stem -1,7013,12 // Coral Reef -1,7014,12 // Old Portrait -1,7015,12 // Memory Bookmark -1,7016,12 // Bent Spoon -1,7026,12 // Key of the Clock Tower -1,7027,12 // Key of the Underground -1,7030,12 // Claw of Desert Wolf -1,7031,12 // Old Frying Pan -1,7032,12 // Piece of Egg Shell -1,7033,12 // Poison Spore -1,7034,12 // Red Stocking -1,7035,12 // Matchstick -1,7036,12 // Fang of Garm -1,7038,12 // Yarn -1,7041,12 // Fine Grit -1,7047,12 // Alice's Apron -1,7048,12 // Talon of Griffon -1,7049,12 // Stone -1,7053,12 // Cyfar -1,7054,12 // Brigan -1,7059,12 // Free Ticket for Kafra Storage -1,7060,12 // Free Ticket for Kafra Transportation -1,7061,12 // Free Ticket for the Cart Service -1,7063,12 // Soft Feather -1,7064,12 // Wing of Dragonfly -1,7065,12 // Sea-Otter Fur -1,7066,12 // Ice Cubic -1,7067,12 // Stone Fragment -1,7068,12 // Burnt Tree -1,7069,12 // Destroyed Armor -1,7070,12 // Broken Shell -1,7071,12 // Tattered Clothes -1,7072,12 // Old Shuriken -1,7093,12 // Cogwheel -1,7094,12 // Fragment -1,7095,12 // Metal Fragment -1,7096,12 // Lava -1,7097,12 // Burning Heart -1,7098,12 // Live Coal -1,7099,12 // Worn-out Magic Scroll -1,7100,12 // Sharp Leaf -1,7101,12 // Peco Peco Feather -1,7106,12 // Antelope Horn -1,7107,12 // Antelope Skin -1,7108,12 // Piece of Shield -1,7109,12 // Shining Spear Blade -1,7110,12 // Broken Sword -1,7111,12 // Slick Paper -1,7112,12 // Sharp Paper -1,7113,12 // Broken Pharaoh Emblem -1,7114,12 // Masque of Tutankhamen -1,7115,12 // Harpy Feather -1,7116,12 // Harpy Talon -1,7117,12 // Torn Magic Book -1,7118,12 // Torn Scroll -1,7119,12 // Bacillus -1,7120,12 // Burning Horseshoe -1,7121,12 // Honey Pot -1,7122,12 // Burning Hair -1,7123,12 // Dragon Skin -1,7124,12 // Sand Clump -1,7125,12 // Scorpion Claw -1,7126,12 // Large Jellopy -1,7134,12 // Medicine Bowl -1,7135,12 // Fire Bottle -1,7136,12 // Acid Bottle -1,7137,12 // Plant Bottle -1,7138,12 // Marine Sphere Bottle -1,7139,12 // Glistening Coat -1,7149,12 // Yellow Plate -1,7150,12 // Piece of Bamboo -1,7151,12 // Oil Paper -1,7152,12 // Glossy Hair -1,7153,12 // Worn-out Kimono -1,7154,12 // Poisonous Powder -1,7155,12 // Poisonous Toad Skin -1,7156,12 // Broken Shuriken -1,7157,12 // Dark Mask -1,7158,12 // Broken Liquor Jar -1,7159,12 // Tengu Nose -1,7161,12 // Black Bear Skin -1,7162,12 // Cloud Crumb -1,7163,12 // Hard Feeler -1,7164,12 // Solid_Peach -1,7165,12 // Transparent Celestial Robe -1,7166,12 // Soft Silk -1,7167,12 // Strange Steel Piece -1,7168,12 // Giant Butterfly Wing -1,7169,12 // Ba_Gua -1,7171,12 // Leopard Skin -1,7172,12 // Leopard Claw -1,7174,12 // Wrapping Lace -1,7175,12 // Wrapping Paper -1,7182,12 // Cacao -1,7186,12 // Thin Trunk -1,7187,12 // Festival Mask -1,7188,12 // Brown_Root -1,7189,12 // Wooden Heart -1,7190,12 // Solid Husk -1,7191,12 // Lamp -1,7192,12 // Vane -1,7193,12 // Sprout -1,7194,12 // Soft Blade of Grass -1,7195,12 // Slingshot -1,7196,12 // Shoulder Protector -1,7197,12 // Tough Vines -1,7198,12 // Huge Leaf -1,7200,12 // Elastic Band -1,7201,12 // Log -1,7202,12 // Pincher of Beetle -1,7203,12 // Strong Branch -1,7205,12 // Piece of Black Cloth -1,7206,12 // Black Cat Doll -1,7207,12 // Old Manteau -1,7208,12 // Rusty Kitchen Knife -1,7209,12 // Helm of Dullahan -1,7210,12 // Armor Piece of Dullahan -1,7211,12 // Fragment of Rossata Stone -1,7212,12 // Hung Doll -1,7213,12 // Needle Packet -1,7214,12 // Bat Cage -1,7215,12 // Broken Needle -1,7216,12 // Red Muffler -1,7217,12 // Spool -1,7218,12 // Decomposed Rope -1,7219,12 // Striped Sock -1,7220,12 // Ectoplasm -1,7221,12 // Tangled Chains -1,7222,12 // Wooden Gnarl -1,7223,12 // Contorted Self-Portrait -1,7225,12 // Pumpkin Lantern -1,7262,12 // Folding Fan of Cat Ghost -1,7263,12 // Cat's Eye -1,7264,12 // Dry Sand -1,7265,12 // Dragon Horn -1,7266,12 // Denture from Dragon Mask -1,7267,12 // Tiger Panty -1,7268,12 // Little Ghost Doll -1,7269,12 // Pinafore -1,7270,12 // Nursing_Bottle -1,7315,1 // Dark Crystal Fragment -1,7316,1 // Insect Leg -1,7317,1 // Rusty Screw -1,7318,1 // Old Pick -1,7319,1 // Used Iron Plate -1,7320,1 // Dust Pollutant -1,7321,1 // Crystal Fragment -1,7322,1 // Toxic Gas -1,7323,1 // Battered Kettle -1,7325,1 // Flexible Tube -1,7326,1 // Fluorescent Liquid -1,7327,1 // Flashlight -1,7440,1 // Red Feather -1,7441,1 // Blue Feather -1,7442,1 // Cursed Seal -1,7443,1 // Three-Headed Dragon's Head -1,7444,1 // Treasure Box -1,7445,1 // Green Bijou -1,7446,1 // Blue Bijou -1,7447,1 // Red Bijou -1,7448,1 // Yellow Bijou -1,7449,1 // Bloody Page -1,7450,1 // Skeletal Armor Piece -1,7451,1 // Fire Dragon Scale -1,7452,1 // Yellow Spice -1,7453,1 // Sweet Sauce -1,7454,1 // Savory Sauce -1,7455,1 // Spicy Sauce -1,7456,1 // Red Spice -1,7457,1 // Cooking Oil -1,7472,1 // Level 1 Cookbook -1,7473,1 // Level 2 Cookbook -1,7474,1 // Level 3 Cookbook -1,7475,1 // Level 4 Cookbook -1,7476,1 // Level 5 Cookbook -1,7482,1 // Pot -1,7512,1 // Burnt Part -1,7513,1 // Pocket Watch -1,7561,15 // Glacial Heart -1,7562,15 // Ice Scale -1,7563,15 // Bloody Rune -1,7564,15 // Rotten Meat -1,7565,15 // Sticky Poison -1,7567,1 // Suspicious Hat -1,7568,1 // White Mask -1,7751,34 // Old White Cloth -1,7752,32 // Clattering Skull -1,7753,34 // Broken Farming Utensil -1,10001,3 // Skull Helm -1,10002,3 // Monster Oxygen Mask -1,10003,3 // Transparent Headgear -1,10004,3 // Pacifier -1,10005,3 // Wig -1,10006,3 // Queen's Hair Ornament -1,10007,3 // Silk Ribbon -1,10008,3 // Punisher -1,10009,3 // Wild Flower -1,10010,3 // Battered Pot -1,10011,3 // Stellar Hairpin -1,10012,3 // Tiny Egg Shell -1,10013,3 // Backpack -1,10014,3 // Rocker Glasses -1,10015,3 // Green Lace -1,10016,3 // Golden Bell -1,10017,3 // Bark Shorts -1,10018,3 // Monkey Circlet -1,10019,3 // Red Scarf -1,10020,3 // Grave Keeper's Sword -1,13000,1 // Jujube Dagger -1,13001,1 // Dragon Killer -1,13002,1 // Ginnungagap -1,13003,1 // Cowardice Blade -1,13004,1 // Cowardice Blade -1,13163,1 // Long Barrel -1,13164,1 // Long Barrel -1,13167,1 // Gate Keeper-DD -1,13168,1 // Thunder P -1,13170,2 // Lever Action Rifle -1,13200,1 // Bullet -1,13201,1 // Silver Bullet -1,13202,1 // Bloody Shell -1,13203,1 // Flare Sphere -1,13204,1 // Lightning Sphere -1,13205,1 // Poison Sphere -1,13206,1 // Blind Sphere -1,13207,1 // Freezing Sphere -1,13304,1 // Huuma Calm Mind diff --git a/db/re/item_cardalbum.txt b/db/re/item_cardalbum.txt deleted file mode 100644 index d22e040f9..000000000 --- a/db/re/item_cardalbum.txt +++ /dev/null @@ -1,446 +0,0 @@ -// Old Card Album Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -3,4001,10 // Poring Card -3,4002,10 // Fabre Card -3,4003,6 // Pupa Card -3,4004,11 // Drops Card -3,4005,1 // Santa Poring Card -3,4006,7 // Lunatic Card -3,4007,4 // Peco Peco Egg Card -3,4008,10 // Picky Card -3,4009,10 // Chonchon Card -3,4010,10 // Willow Card -3,4011,10 // Picky Egg Card -3,4012,8 // Thief Bug Egg Card -3,4013,7 // Andre Egg Card -3,4014,5 // Roda Frog Card -3,4015,7 // Condor Card -3,4016,7 // Thief Bug Card -3,4017,5 // Savage Babe Card -3,4019,5 // Hornet Card -3,4020,5 // Farmiliar Card -3,4021,5 // Rocker Card -3,4022,5 // Spore Card -3,4023,5 // Baby Desert Wolf Card -3,4024,5 // Plankton Card -3,4025,5 // Skeleton Card -3,4026,3 // Female Thief Bug Card -3,4027,3 // Kukre Card -3,4028,3 // Tarou Card -3,4029,3 // Wolf Card -3,4030,3 // Mandragora Card -3,4031,3 // Peco Peco Card -3,4032,3 // Ambernite Card -3,4033,3 // Poporing Card -3,4034,3 // Wormtail Card -3,4035,3 // Hydra Card -3,4036,3 // Muka Card -3,4037,3 // Snake Card -3,4038,3 // Zombie Card -3,4039,3 // Stainer Card -3,4041,3 // Coco Card -3,4042,3 // Steel Chonchon Card -3,4043,3 // Andre Card -3,4044,3 // Smokie Card -3,4045,3 // Horn Card -3,4046,3 // Martin Card -3,4048,3 // Poison Spore Card -3,4049,3 // Vadon Card -3,4050,3 // Male Thief Bug Card -3,4051,3 // Yoyo Card -3,4052,3 // Elder Willow Card -3,4053,1 // Vitata Card -3,4055,3 // Marina Card -3,4056,3 // Dustiness Card -3,4057,2 // Metaller Card -3,4058,2 // Thara Frog Card -3,4060,2 // Goblin Card -3,4061,2 // Cornutus Card -3,4062,2 // Anacondaq Card -3,4063,2 // Caramel Card -3,4064,2 // Zerom Card -3,4065,2 // Kaho Card -3,4066,2 // Orc Warrior Card -3,4067,2 // Megalodon Card -3,4068,2 // Scorpion Card -3,4069,2 // Drainliar Card -3,4070,2 // Eggyra Card -3,4071,2 // Orc Zombie Card -3,4072,2 // Golem Card -3,4073,2 // Pirate Skeleton Card -3,4074,2 // Bigfoot Card -3,4075,2 // Argos Card -3,4076,2 // Magnolia Card -3,4077,2 // Phen Card -3,4078,2 // Savage Card -3,4079,2 // Mantis Card -3,4080,2 // Flora Card -3,4081,2 // Hode Card -3,4082,1 // Desert Wolf Card -3,4083,1 // Rafflesia Card -3,4084,1 // Marine Sphere Card -3,4085,1 // Orc Skeleton Card -3,4086,1 // Soldier Skeleton Card -3,4087,1 // Giearth Card -3,4088,1 // Frilldora Card -3,4089,1 // Swordfish Card -3,4090,1 // Munak Card -3,4091,1 // Kobold Card -3,4092,1 // Skeleton Worker Card -3,4093,1 // Obeaune Card -3,4094,1 // Archer Skeleton Card -3,4095,1 // Marse Card -3,4096,1 // Zenorc Card -3,4097,1 // Matyr Card -3,4098,1 // Dokebi Card -3,4099,1 // Pasana Card -3,4100,1 // Sohee Card -3,4101,1 // Sandman Card -3,4102,1 // Whisper Card -3,4103,1 // Horong Card -3,4104,1 // Requiem Card -3,4105,1 // Marc Card -3,4106,1 // Mummy Card -3,4107,1 // Verit Card -3,4108,1 // Myst Card -3,4109,1 // Jakk Card -3,4110,1 // Ghoul Card -3,4111,1 // Strouf Card -3,4112,1 // Marduk Card -3,4113,1 // Marionette Card -3,4114,1 // Argiope Card -3,4115,1 // Hunter Fly Card -3,4116,1 // Isis Card -3,4117,1 // Sidewinder Card -3,4118,1 // Earth Petite Card -3,4119,1 // Bathory Card -3,4120,1 // Sky Petite Card -3,4122,1 // Deviruchi Card -3,4125,1 // Deviace Card -3,4127,1 // Nightmare Card -3,4129,1 // Bapho Jr. Card -3,4133,1 // Raydric Card -3,4136,1 // Khalitzburg Card -3,4141,1 // Evil Druid Card -3,4149,1 // Gargoyle Card -3,4150,1 // Goat Card -3,4151,1 // Gajomart Card -3,4152,1 // Galapago Card -3,4153,1 // Crab Card -3,4154,1 // Dumpling Child Card -3,4156,1 // Goblin Steamrider Card -3,4157,1 // Goblin Archer Card -3,4158,1 // Sky Deleter Card -3,4159,1 // Nine Tail Card -3,4160,1 // Firelock Soldier Card -3,4161,1 // Grand Peco Card -3,4162,1 // Grizzly Card -3,4164,1 // Gullinbursti Card -3,4165,1 // Gig Card -3,4166,1 // Nightmare Terror Card -3,4167,1 // Neraid Card -3,4170,1 // Dark Frame Card -3,4172,1 // The Paper Card -3,4173,1 // Demon Pungus Card -3,4175,1 // Poisonous Toad Card -3,4176,1 // Dullahan Card -3,4177,1 // Dryad Card -3,4178,1 // Dragon Tail Card -3,4180,1 // Driller Card -3,4181,1 // Disguise Card -3,4182,1 // Diabolic Card -3,4184,1 // Lava Golem Card -3,4185,1 // Rideword Card -3,4186,1 // Raggler Card -3,4187,1 // Raydric Archer Card -3,4188,1 // Leib Olmai Card -3,4189,1 // Wraith Dead Card -3,4190,1 // Wraith Card -3,4191,1 // Loli Ruri Card -3,4192,1 // Rotar Zairo Card -3,4193,1 // Lude Card -3,4194,1 // Rybio Card -3,4195,1 // Leaf Cat Card -3,4196,1 // Marin Card -3,4199,1 // Merman Card -3,4200,1 // Megalith Card -3,4201,1 // Majoruros Card -3,4202,1 // Civil Servant Card -3,4204,1 // Mini Demon Card -3,4205,1 // Mimic Card -3,4206,1 // Myst Case Card -3,4208,1 // Miyabi Doll Card -3,4209,1 // Violy Card -3,4210,1 // Wanderer Card -3,4212,1 // Bongun Card -3,4213,1 // Brilight Card -3,4214,1 // Bloody Murderer Card -3,4215,1 // Blazer Card -3,4216,1 // Sasquatch Card -3,4217,1 // Enchanted Peach Tree Card -3,4218,1 // Succubus Card -3,4219,1 // Sage Worm Card -3,4220,1 // Solider Card -3,4221,1 // Skeleton General Card -3,4222,1 // Skeleton Prisoner Card -3,4223,1 // Stalactic Golem Card -3,4224,1 // Stem Worm Card -3,4225,1 // Stone Shooter Card -3,4226,1 // Sting Card -3,4227,1 // Spring Rabbit Card -3,4228,1 // Sleeper Card -3,4229,1 // Clock Tower Manager Card -3,4230,1 // Shinobi Card -3,4231,1 // Increase Soil Card -3,4232,1 // Hermit Plant Card -3,4233,1 // Baby Leopard Card -3,4234,1 // Anolian Card -3,4235,1 // Christmas Cookie Card -3,4237,1 // Owl Duke Card -3,4238,1 // Owl Baron Card -3,4239,1 // Iron Fist Card -3,4240,1 // Arclouze Card -3,4242,1 // Apocalipse Card -3,4243,1 // Antonio Card -3,4244,1 // Alarm Card -3,4245,1 // Am Mut Card -3,4246,1 // Assaulter Card -3,4247,1 // Aster Card -3,4248,1 // Ancient Mummy Card -3,4249,1 // Ancient Worm Card -3,4251,1 // Elder Card -3,4252,1 // Alligator Card -3,4253,1 // Alice Card -3,4255,1 // Orc Lady Card -3,4256,1 // Orc Archer Card -3,4257,1 // Wild Rose Card -3,4258,1 // Evil Nymph Card -3,4259,1 // Wooden Golem Card -3,4260,1 // Wootan Shooter Card -3,4261,1 // Wootan Fighter Card -3,4262,1 // Cloud Hermit Card -3,4264,1 // Wind Ghost Card -3,4265,1 // Li Me Mang Ryang Card -3,4267,1 // Explosion Card -3,4268,1 // Injustice Card -3,4269,1 // Incubus Card -3,4270,1 // Giant Spider Card -3,4271,1 // Giant Hornet Card -3,4272,1 // Dancing Dragon Card -3,4273,1 // Shell Fish Card -3,4274,1 // Zombie Master Card -3,4275,1 // Zombie Prisoner Card -3,4277,1 // Zherlthsh Card -3,4278,1 // Gibbet Card -3,4279,1 // Earth Deleter Card -3,4280,1 // Geographer Card -3,4281,1 // Zipper Bear Card -3,4282,1 // Tengu Card -3,4283,1 // Greatest General Card -3,4284,1 // Chepet Card -3,4285,1 // Choco Card -3,4286,1 // Karakasa Card -3,4287,1 // Kapha Card -3,4288,1 // Carat Card -3,4289,1 // Caterpillar Card -3,4290,1 // Cat O' Nine Tails Card -3,4292,1 // Kobold Archer Card -3,4293,1 // Cookie Card -3,4294,1 // Quve Card -3,4295,1 // Kraben Card -3,4296,1 // Cramp Card -3,4297,1 // Cruiser Card -3,4298,1 // Creamy Fear Card -3,4299,1 // Clock Card -3,4300,1 // Chimera Card -3,4301,1 // Killer Mantis Card -3,4304,1 // Tamruan Card -3,4307,1 // Beetle King Card -3,4308,1 // Tri Joint Card -3,4309,1 // Parasite Card -3,4310,1 // Panzer Goblin Card -3,4311,1 // Permeter Card -3,4312,1 // Seal Card -3,4313,1 // Punk Card -3,4314,1 // Penomena Card -3,4315,1 // Pest Card -3,4316,1 // False Angel Card -3,4319,1 // Freezer Card -3,4321,1 // Hylozoist Card -3,4322,1 // High Orc Card -3,4323,1 // Garm Baby Card -3,4325,1 // Harpy Card -3,4326,1 // Sea-Otter Card -3,4327,1 // Bloody Butterfly Card -3,4328,1 // Hyegun Card -3,4329,1 // Phendark Card -3,4331,1 // Heater Card -3,4332,1 // Waste Stove Card -3,4333,3 // Venomous Card -3,4334,1 // Noxious Card -3,4335,3 // Pitman Card -3,4336,1 // Ungoliant Card -3,4337,1 // Porcellio Card -3,4338,1 // Obsidian Card -3,4339,1 // Mineral Card -3,4340,1 // Teddy Bear Card -3,4341,1 // Metaling Card -3,4343,1 // Holden Card -3,4344,3 // Anopheles Card -3,4345,3 // Hill Wind Card -3,4346,1 // Egnigem Cenia Card -3,4347,3 // Armeyer Dinze Card -3,4348,1 // Wikebine Tres Card -3,4349,1 // Errende Ebecee Card -3,4350,3 // Laurell Weinder Card -3,4351,1 // Kavach Icarus Card -3,4353,1 // Remover Card -3,4354,1 // Gemini-S58 Card -3,4355,3 // Gremlin Card -3,4356,1 // Beholder Card -3,4358,1 // Seyren Windsor Card -3,4360,3 // Eremes Guile Card -3,4362,1 // Howard Alt-Eisen Card -3,4366,1 // Kathryne Keyron Card -3,4368,1 // Cecil Damon Card -3,4369,1 // Venatu Card -3,4370,1 // Dimik Card -3,4371,1 // Archdam Card -3,4373,1 // Chung E Card -3,4375,1 // Orc Baby Card -3,4377,3 // Green Iguana Card -3,4378,1 // Gold Acidus Card -3,4379,1 // Blue Acidus Card -3,4380,3 // Red Ferus Card -3,4381,1 // Green Ferus Card -3,4382,1 // Yellow Novus Card -3,4383,3 // Red Novus Card -3,4384,1 // Hydro Card -3,4385,3 // Dragon Egg Card -3,4387,1 // Ancient Mimic Card -3,4388,3 // Deathword Card -3,4389,1 // Plasma Card -3,4390,1 // Breeze Card -3,4391,3 // Retribution Card -3,4392,1 // Observation Card -3,4393,1 // Shelter Card -3,4394,1 // Solace Card -3,4395,1 // Thanatos Maero Card -3,4396,1 // Thanatos Odium Card -3,4397,1 // Thanatos Despero Card -3,4400,1 // Aliza Card -3,4401,1 // Alicel Card -3,4402,1 // Aliot Card -3,4404,1 // Skogul Card -3,4405,1 // Frus Card -3,4409,1 // Agav Card -3,4410,1 // Echio Card -3,4411,1 // Vanberk Card -3,4412,1 // Isilla Card -3,4413,1 // Hodremlin Card -3,4414,1 // Seeker Card -3,4415,2 // Snowier Card -3,4416,1 // Siroma Card -3,4417,1 // Ice Titan Card -3,4418,1 // Gazeti Card -3,4420,1 // Muscipular Card -3,4421,2 // Drosera Card -3,4422,1 // Roween Card -3,4423,1 // Galion Card -3,4424,3 // Stapo Card -3,4426,1 // Byorgue Card -3,4427,1 // Sword Guardian Card -3,4428,1 // Bow Guardian Card -3,4429,1 // Salamander Card -3,4431,1 // Kasa Card -3,4432,2 // Magmaring Card -3,4433,1 // Imp Card -3,4434,1 // Knocker Card -3,4435,1 // Zombie Slaughter Card -3,4436,2 // Ragged Zombie Card -3,4437,2 // Hell Poodle Card -3,4438,2 // Banshee Card -3,4439,1 // Flame Skull Card -3,4440,1 // Necromancer Card -3,4442,1 // Tatacho Card -3,4443,2 // Aqua Elemental Card -3,4444,2 // Draco Card -3,4445,1 // Luciola Vespa Card -3,4447,1 // Centipede Card -3,4448,1 // Cornus Card -3,4449,1 // Dark Shadow Card -3,4450,1 // Banshee Master Card -3,4452,2 // Centipede Larva Card -3,4453,1 // Hillsrion Card -3,4460,1 // Rhyncho Card -3,4461,1 // Phylla Card -3,4464,1 // Aunoe Card -3,4465,1 // Fanat Card -3,4466,1 // Beholder Master Card -3,4467,1 // Heavy Metaling Card -3,4468,1 // Dark Pinguicula Card -3,4469,3 // Naga Card -3,4470,3 // Nepenthes Card -3,4471,3 // Draco Egg Card -3,4472,3 // Bradium Golem Card -3,4473,3 // Ancient Tree Card -3,4474,3 // Zakudam Card -3,4475,3 // Cobalt Mineral Card -3,4476,3 // Pinguicula Card -3,4477,3 // Hell Apocalypse Card -3,4505,1 // Scaraba Card -3,4506,1 // Dolomedes Card -3,4508,1 // Gold Scaraba Card -3,4510,1 // Miming Card -3,4511,2 // Little Fatum Card -3,4512,1 // Parus Card -3,4513,1 // Angra Mantis Card -3,4514,2 // Pom Spider Card -3,4515,2 // Alnoldi Card -3,4516,1 // Comodo Card -3,4517,1 // Cendrawasih Card -3,4518,1 // Banaspaty Card -3,4519,2 // Butoijo Card -3,4521,1 // Sedora Card -3,4522,1 // Sropho Card -3,4523,1 // Pot Dofle Card -3,4524,1 // King Dramoh Card -3,4530,1 // Siorava Card -3,4531,2 // Red Eruma Card -3,4532,1 // Wild Rider Card -3,4533,2 // Octopus Card -// Magic Card Album -44,4047,1 // Ghostring Card -44,4054,1 // Angeling Card -44,4163,1 // Gryphon Card -44,4169,1 // Dark Illusion Card -44,4174,1 // Deviling Card -44,4179,10 // Dragon Fly Card -44,4183,10 // Vagabond Wolf Card -44,4197,10 // Mastering Card -44,4198,1 // Maya Purple Card -44,4203,10 // Mutant Dragonoid Card -44,4207,1 // Mysteltainn Card -44,4211,1 // Vocal card -44,4237,5 // Owl Duke Card -44,4238,5 // Owl Baron Card -44,4241,1 // Arc Angeling Card -44,4250,1 // Executioner Card -44,4254,1 // Tirfing Card -44,4266,10 // Eclipse Card -44,4284,10 // Chepet Card -44,4285,10 // Choco Card -44,4290,5 // Cat O' Nine Tails Card -44,4291,10 // Kobold Leader Card -44,4300,10 // Chimera Card -44,4306,10 // Toad Card -44,4320,1 // Bloody Knight Card -44,4336,1 // Ungoliant Card -44,4354,1 // Gemini-S58 Card -44,4384,1 // Hydro Card -44,4395,3 // Thanatos Maero Card -44,4396,3 // Thanatos Odium Card -44,4397,3 // Thanatos Despero Card diff --git a/db/re/item_chain.conf b/db/re/item_chain.conf new file mode 100644 index 000000000..795c2f700 --- /dev/null +++ b/db/re/item_chain.conf @@ -0,0 +1,95 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +ITMCHAIN_ORE: { + Iron_Ore: 600 + Iron: 380 + Yellow_Live: 100 + Coal: 80 + Wind_Of_Verdure: 100 + Phracon: 600 + Crystal_Blue: 100 + Boody_Red: 100 + Steel: 50 + Emveretarcon: 380 + Elunium_Stone: 70 + Oridecon_Stone: 80 + Great_Nature: 40 + Rough_Wind: 40 + Mistic_Frozen: 40 + Flame_Heart: 40 + Elunium: 20 + Oridecon: 20 + Gold: 10 + Emperium: 5 +} + +ITMCHAIN_GEM: { + Dark_Red_Jewel: 80 + Violet_Jewel: 30 + Skyblue_Jewel: 40 + Azure_Jewel: 130 + Scarlet_Jewel: 70 + Cardinal_Jewel: 190 + Cardinal_Jewel_: 50 + Red_Jewel: 130 + Blue_Jewel: 140 + White_Jewel: 80 + Golden_Jewel: 150 + Bluish_Green_Jewel: 150 + Crystal_Jewel: 150 + Crystal_Jewel_: 80 + Crystal_Jewel__: 50 + Crystal_Jewel___: 30 +} + +ITMCHAIN_HEAL: { + Fruit_Of_Mastela: 5 + Leaflet_Of_Aloe: 5 + Leaflet_Of_Hinal: 10 + Red_Slim_Potion: 10 + Resist_Earth: 10 + Yellow_Herb: 20 + Red_Potion: 20 + Green_Herb: 30 + Red_Herb: 30 + Novice_Potion: 50 + Nice_Sweet_Potato: 50 + Candy: 100 + ID528: 200 //Monster's_Feed + Popped_Rice: 600 +} + +ITMCHAIN_FOOD: { + Royal_Jelly: 5 + Str_Dish02: 10 + Agi_Dish02: 10 + Vit_Dish03: 10 + Dex_Dish02: 10 + Luk_Dish03: 10 + Int_Dish02: 10 + Apple_Juice: 30 + Banana_Juice: 30 + Grape_Juice: 30 + Carrot_Juice: 30 + Well_Baked_Cookie: 30 + Ice_Cream: 50 + Fish_Slice: 50 + Cheese: 50 + Shusi: 50 + Bun: 50 + Mojji: 50 + Pumpkin: 50 + Sweet_Potato: 100 + Banana: 100 + Apple: 600 +} \ No newline at end of file diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 71e544107..1aa694317 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -178,7 +178,7 @@ 4193:4294,{ bonus bMaxHP,300; bonus bMaxSP,60; } 4208:4258:4325:4327:4382,{ bonus bInt,3; bonus2 bSkillAtk,"WZ_HEAVENDRIVE",10; bonus2 bSkillAtk,"MG_THUNDERSTORM",10; if(BaseJob==Job_Sage) { bonus bMagicDamageReturn,20; bonus2 bAddMonsterDropItem,716,100; bonus2 bAddMonsterDropItem,715,100; bonus bVariableCastrate,-20; } } 4218:4269,{ bonus bHPrecovRate,30; bonus bSPrecovRate,30; bonus bVit,4; bonus bInt,4; } -4220:4246:4311:4319:4331,{ bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus3 bAutoSpell,"BS_WEAPONPERFECT",1,3; bonus2 bAddMonsterDropItem,501,500; if(BaseClass==Job_Swordman) bonus2 bAddItemHealRate,IG_Potion,50; } +4220:4246:4311:4319:4331,{ bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus3 bAutoSpell,"BS_WEAPONPERFECT",1,3; bonus2 bAddMonsterDropItem,501,500; if(BaseClass==Job_Swordman) { bonus2 bAddItemHealRate,Red_Potion,50; bonus2 bAddItemHealRate,Yellow_Potion,50; bonus2 bAddItemHealRate,Orange_Potion,50; bonus2 bAddItemHealRate,White_Potion,50; } } 4229:4244:4299:4313,{ bonus bDef,3; bonus bMdef,3; } 4237:4238,{ bonus3 bAutoSpell,"MG_LIGHTNINGBOLT",5,20; } 4268:4277,{ bonus bBaseAtk,20; bonus bLuk,3; } diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 7696af4cb..b5fa2e12a 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -109,7 +109,7 @@ //=================================================================== 601,Wing_Of_Fly,Fly Wing,11,60,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AL_TELEPORT",1; },{},{} 602,Wing_Of_Butterfly,Butterfly Wing,11,300,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AL_TELEPORT",3; },{},{} -603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BlueBox),1; },{},{} +603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 603,1; },{},{} 604,Branch_Of_Dead_Tree,Dead Branch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-1,1,""; },{},{} 605,Anodyne,Anodyne,11,2000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_ENDURE",1; },{},{} 606,Aloebera,Aloevera,11,1500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_SELFPROVOKE",1; },{},{} @@ -122,8 +122,8 @@ 613,Iron_Hammer,Iron Hammer,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 1; },{},{} 614,Golden_Hammer,Golden Hammer,2,3000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 2; },{},{} 615,Oridecon_Hammer,Oridecon Hammer,2,5000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{ produce 3; },{},{} -616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_CardAlbum),1; },{},{} -617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_VioletBox),1; },{},{} +616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 616,1; },{},{} +617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 617,1; },{},{} 618,Worn_Out_Scroll,Worn Out Scroll,2,50,,20,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 619,Unripe_Apple,Unripe Apple,2,1000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1002; },{},{} 620,Orange_Juice,Orange Juice,2,1500,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1113; },{},{} @@ -150,7 +150,7 @@ 641,Contracts_In_Shadow,Contract in Shadow,2,100,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1109; },{},{} 642,Book_Of_Devil,Book of the Devil,2,1800,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1101; },{},{} 643,Pet_Incubator,Pet Incubator,2,3000,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ bpet; },{},{} -644,Gift_Box,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox),1; },{},{} +644,Gift_Box,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 644,1; },{},{} //ASPD in RE they give a fixed +4/+6/+9 ASPD 645,Center_Potion,Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATTHASTE_POTION1,1800000,4; },{},{} @@ -163,10 +163,10 @@ 661,Sway_Apron,Soft Apron,2,20000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1275; },{},{} 662,Inspector_Certificate,Authoritative Badge,2,1450,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MOVHASTE_HORSE,180000,0; },{},{} 663,Korea_Rice_Cake,Korean Rice Cake,0,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 10,0; },{},{} -664,Gift_Box_1,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_1),1; },{},{} -665,Gift_Box_2,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_2),1; },{},{} -666,Gift_Box_3,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_3),1; },{},{} -667,Gift_Box_4,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBox_4),1; },{},{} +664,Gift_Box_1,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 664,1; },{},{} +665,Gift_Box_2,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 665,1; },{},{} +666,Gift_Box_3,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 666,1; },{},{} +667,Gift_Box_4,Gift Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 667,1; },{},{} 668,Handsei,Red Envelope,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ set Zeny,Zeny+rand(1000,10000); },{},{} 669,Rice_Cake_Soup,Tempting Rice-Cake Soup,0,500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal -100,-100; },{},{} 670,Gold_Coin_Moneybag,Bag of Gold Coins,3,100000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -498,8 +498,8 @@ 1139,Tale_Fing_,Tirfing,4,20,,1000,200,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000; },{},{} 1140,Byeorrun_Gum,Byeollungum,4,20,,900,150,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,50; bonus bAllStats,2; },{},{} 1141,Immaterial_Sword,Immaterial Sword,4,20,,900,140,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Ghost; bonus2 bSPVanishRate,30,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0; },{},{} -1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Jewel,100; },{},{} -1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Ore,30; },{},{} +1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus bAddMonsterDropChainItem,ITMCHAIN_GEM; },{},{} +1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus bAddMonsterDropChainItem,ITMCHAIN_ORE; },{},{} 1144,Sasimi,Sashimi,4,20,,1400,75,,1,0,0x000654E2,7,2,2,3,48,1,2,{ bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,RC_Fish,4000; },{},{} 1145,Holy_Avenger,Holy Avenger,4,450000,,1350,125,,1,0,0x00004000,7,2,2,3,75,1,2,{ bonus bAtkEle,Ele_Holy; bonus bVit,2; },{},{} 1146,Town_Sword,Town Sword,4,42000,,800,100,,1,1,0x00000001,7,2,2,3,30,1,2,{},{},{} @@ -1459,7 +1459,7 @@ 2414,Novice_Boots,Novice Slippers,5,1,,1,,5,,0,0x00000001,7,2,64,,0,0,0,{},{},{} 2415,Slipper,Bunny Slipper,5,34000,,300,,3,,1,0xFFFFFFFE,7,0,64,,30,1,0,{ bonus bLuk,3; bonus bMdef,3; },{},{} 2416,Novice_Shoes,Novice Shoes,5,35000,,500,,8,,1,0x00000001,7,2,64,,40,1,0,{ bonus bMaxHPrate,5; },{},{} -2417,Fricco_Shoes,Fricco's Shoes,5,30000,,500,,12,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bAgi,2; bonus2 bAddItemHealRate,IG_Potion,20; },{},{} +2417,Fricco_Shoes,Fricco's Shoes,5,30000,,500,,12,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20; },{},{} 2418,Vidar's_Boots,Vidar's Boots,5,30000,,650,,13,,0,0xFFFFFFFE,7,2,64,,65,1,0,{ bonus bMaxHPrate,9; bonus bMaxSPrate,9; },{},{} 2419,Goibne's_Combat_Boots,Goibne's Greaves,5,30000,,700,,13,,0,0xFFFFFFFE,7,2,64,,54,1,0,{ bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5; },{},{} 2420,Angel's_Arrival,Angel's Reincarnation,5,10000,,300,,8,,1,0x00000001,7,2,64,,25,1,0,{ bonus bMaxHP,100; },{},{} @@ -2122,9 +2122,9 @@ 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,534,RC_Insect,300; },{},{} +4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Apple_Juice,50; bonus2 bAddItemHealRate,Banana_Juice,50; bonus2 bAddItemHealRate,Carrot_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; },{},{} +4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Candy,50; bonus2 bAddItemHealRate,Candy_Striper,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; },{},{} 4156,Steam_Goblin_Card,Goblin Steamrider Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7; },{},{} 4157,Goblin_Archer_Card,Goblin Archer Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7; },{},{} @@ -2185,7 +2185,7 @@ 4212,Bon_Gun_Card,Bongun Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"SM_BASH",1,20; bonus2 bAddSkillBlow,"SM_BASH",5; bonus2 bAddDefClass,1026,-100; },{},{} 4213,Brilight_Card,Brilight Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Silence,600; },{},{} 4214,Bloody_Murderer_Card,Bloody Murderer Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7; },{},{} -4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Food,600; },{},{} +4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAddMonsterDropChainItem,ITMCHAIN_FOOD; },{},{} 4216,Sasquatch_Card,Sasquatch Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,600; },{},{} 4217,Live_Peach_Tree_Card,Enchanted Peach Tree Card,6,20,,10,,,,,,,,32,,,,,{ bonus3 bAutoSpell,"AL_HEAL",1+9*(getskilllv("AL_HEAL")==10),20; },{},{} 4218,Succubus_Card,Succubus Card,6,20,,10,,,,,,,,16,,,,,{ bonus bVit,-3; bonus bHPrecovRate,-20; bonus bMaxHP,1000; },{},{} @@ -2197,12 +2197,12 @@ 4224,Stem_Worm_Card,Stem Worm Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12032,RC_Brute,100; },{},{} 4225,Stone_Shooter_Card,Stone Shooter Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,10; bonus bHit,10; },{},{} 4226,Sting_Card,Sting Card,6,20,,10,,,,,,,,32,,,,,{ bonus bDef,2; if(getrefine()>8) bonus bMdef,5; },{},{} -4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItem,517,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200; },{},{} +4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Meat,50; bonus2 bAddItemHealRate,528,50; bonus3 bAddMonsterDropItem,Meat,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200; },{},{} 4228,Sleeper_Card,Sleeper Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12031,RC_Fish,100; },{},{} 4229,C_Tower_Manager_Card,Tower Keeper Card,6,20,,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus bVariableCastrate,-5; },{},{} 4230,Shinobi_Card,Shinobi Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAgi,1; bonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100; },{},{} 4231,Increase_Soil_Card,Mi Gao Card,6,20,,10,,,,,,,,32,,,,,{ bonus2 bSubRace2,5,50; },{},{} -4232,Wild_Ginseng_Card,Hermit Plant Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100; },{},{} +4232,Wild_Ginseng_Card,Hermit Plant Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Red_Herb,50; bonus2 bAddItemHealRate,Yellow_Herb,50; bonus2 bAddItemHealRate,White_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100; },{},{} 4233,Baby_Leopard_Card,Baby Leopard Card,6,20,,10,,,,,,,,16,,,,,{ bonus bLuk,3; if(BaseClass==Job_Merchant) bonus bUnbreakableArmor,0; },{},{} 4234,Anolian_Card,Anolian Card,6,20,,10,,,,,,,,16,,,,,{ bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION")==10),30; },{},{} 4235,Cookie_XMAS_Card,Christmas Cookie Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10; },{},{} @@ -2252,7 +2252,7 @@ 4279,Deleter_Card,Earth Deleter Card,6,20,,10,,,,,,,,16,,,,,{ bonus bSPrecovRate,-100; bonus bSPGainValue,10; },{},{ heal 0,-100; } 4280,Geographer_Card,Geographer Card,6,20,,10,,,,,,,,16,,,,,{ bonus3 bAutoSpellWhenHit,"AL_BLESSING",2+8*(getskilllv("AL_BLESSING")==10),30; },{},{} 4281,Zipper_Bear_Card,Zipper Bear Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass==Job_Merchant) bonus bUnbreakableWeapon,0; },{},{} -4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Recovery,600; },{},{} +4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAddMonsterDropChainItem,ITMCHAIN_HEAL; },{},{} 4283,Greatest_General_Card,Greatest General Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"MO_CALLSPIRITS",5,2+18*(BaseClass==Job_Acolyte); },{},{} 4284,Chepet_Card,Chepet Card,6,20,,10,,,,,,,,2,,,,,{ bonus4 bAutoSpell,"AL_HEAL",5,50,1; },{},{} 4285,Choco_Card,Choco Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee2,5; bonus bFlee,10; },{},{} @@ -2296,7 +2296,7 @@ 4323,Garm_Baby_Card,Hatii Babe Card,6,20,,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,"MG_FROSTDIVER",3,50; },{},{} 4324,Garm_Card,Hatii Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,5000; },{},{} 4325,Harpy_Card,Harpy Card,6,20,,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",5; },{},{} -4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300; },{},{} +4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,Sushi,50; bonus2 bAddItemHealRate,Fish_Slice,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300; },{},{} 4327,Blood_Butterfly_Card,Bloody Butterfly Card,6,20,,10,,,,,,,,136,,,,,{ bonus bVariableCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,"MG_FIREWALL",5; },{},{} 4328,Hyegun_Card,Yao Jun Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee,15; bonus bCritical,1; },{},{} 4329,Phendark_Card,Phendark Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_DemiHuman,5; },{},{ heal 0,-5; } @@ -3264,7 +3264,7 @@ 5570,Gemini_Crown,Gemini Crown,5,20,,300,,6,,1,0xFFFFFFFF,7,2,256,,0,1,551,{ bonus bAgi,2; bonus bBaseAtk,2; bonus bMdef,5; if(getrefine()>6) { bonus bDef,1; bonus bMatk,15; bonus bFlee,10; bonus2 bSubEle,Ele_Wind,5; } },{},{} //5571,Rasta_Wig,Rasta_Wig,5,20,,100,,1,,0,0xFFFFFFFF,7,2,256,,0,1,552,{ bonus bStr,1; },{},{} 5572,Savage_Baby_Hat,Savage Babe Hat,5,20,,100,,1,,1,0xFFFFFFFF,7,2,256,,30,1,553,{ bonus bVit,2; bonus2 bAddEff,Eff_Stun,500; bonus2 bSubRace,RC_Brute,-10; },{},{} -5573,Bogy_Horn,Dokebi Horn,5,20,,100,,1,,1,0xFFFFFFFF,7,2,256,,75,1,554,{ bonus2 bAddMonsterDropItemGroup,IG_Jewel,100; bonus3 bAutoSpell,"MC_MAMMONITE",5,70; },{},{} +5573,Bogy_Horn,Dokebi Horn,5,20,,100,,1,,1,0xFFFFFFFF,7,2,256,,75,1,554,{ bonus bAddMonsterDropChainItem,ITMCHAIN_GEM; bonus3 bAutoSpell,"MC_MAMMONITE",5,70; },{},{} 5574,Pencil_In_Mouth,Well-Chewed Pencil,5,20,,100,,0,,0,0xFFFFFFFF,7,2,1,,10,0,555,{ bonus bdex,2; bonus bHitRate,3; },{},{} 5575,Onigiri_Hat,Rice Ball Hat,5,20,,100,,6,,1,0xFFFFFFFF,7,2,256,,30,0,556,{},{},{} //5576,Japan_Winecup,Wine Cup,5,20,,100,,1,,0,0xFFFFFFFF,7,2,1,,0,0,557,{},{},{} @@ -5319,10 +5319,10 @@ 12020,Water_Of_Darkness,Cursed Water,11,2,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",8; },{},{} 12021,Pork_Belly,Pork,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,99),0; },{},{} 12022,Spareribs,Galbi,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,99),0; },{},{} -12023,Giftbox_China,Wrapped Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GiftBoxChina),1; },{},{} +12023,Giftbox_China,Wrapped Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12023,1; },{},{} 12024,Red_Pouch_Of_Surprise,Red Pouch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-4,1,""; },{},{} -12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggBoy),1; },{},{} -12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggGirl),1; },{},{} +12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12025,1; },{},{} +12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12026,1; },{},{} 12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0; },{},{} 12028,Box_Of_Thunder,Box of Thunder,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MOVHASTE_HORSE,20000,0; },{},{} 12029,Gloomy_Box,Box of Gloom,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AC_CONCENTRATION",1; },{},{} @@ -5334,7 +5334,7 @@ 12035,Lotto_Box01,Lotto Box 01,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7361,7370),1; },{},{} 12036,Lotto_Box02,Lotto Box 02,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7371,7380),1; },{},{} 12037,Lotto_Box03,Lotto Box 03,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7381,7390),1; },{},{} -12038,Lotto_Box04,Lotto Box 04,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_LottoBox),1; },{},{} +12038,Lotto_Box04,Lotto Box 04,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12038,1; },{},{} 12039,Lotto_Box05,Lotto Box 05,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7542,7546),1; },{},{} 12040,Stone_Of_Intelligence_,Stone of Sage,2,100000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ homevolution; },{},{} 12041,Str_Dish01,Fried Grasshopper Legs,0,2000,,60,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_STR,1200000,1; percentheal 5,0; },{},{} @@ -5400,14 +5400,14 @@ 12101,Citron,Citron,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12102,Meat_Skewer,Grilled Skewer,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12103,Bloody_Dead_Branch,Bloody Branch,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-3,1,""; },{},{} -12104,Random_Quiver,Random Quiver,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Quiver),1; },{},{} -12105,Set_Of_Taiming_Item,Taming Gift Set,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; },{},{} -12106,Accessory_Box,Jewelry Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Accesory),1; },{},{} -12107,Wrapped_Mask,Wrapped Mask,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Mask),1; },{},{} -12108,Bundle_Of_Magic_Scroll,Scroll Package,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; },{},{} +12104,Random_Quiver,Random Quiver,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12104,1; },{},{} +12105,Set_Of_Taiming_Item,Taming Gift Set,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12105,1; getrandgroupitem 12105,1; getrandgroupitem 12105,1; },{},{} +12106,Accessory_Box,Jewelry Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12106,1; },{},{} +12107,Wrapped_Mask,Wrapped Mask,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12107,1; },{},{} +12108,Bundle_Of_Magic_Scroll,Scroll Package,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; },{},{} 12109,Poring_Box,Poring Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-2,1,""; },{},{} -12110,First_Aid_Kit,First Aid Kit,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; },{},{} -12111,Food_Package,Bundle of Food,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; },{},{} +12110,First_Aid_Kit,First Aid Kit,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; },{},{} +12111,Food_Package,Bundle of Food,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1; },{},{} 12112,Tropical_Sograt,Tropical Sograt,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Curse,10000,1; },{},{} 12113,Vermilion_The_Beach,Vermilion on the Beach,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Stun,10000,1; },{},{} 12114,Elemental_Fire,Elemental Converter,11,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",4; },{},{} @@ -5426,7 +5426,7 @@ 12127,High_end_Cooking_Kits,Professional Cooking Kit,2,2000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 13; },{},{} 12128,Imperial_Cooking_Kits,Royal Cooking Kit,2,5000,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 14; },{},{} 12129,Fantastic_Cooking_Kits,Fantastic Cooking Kit,2,10000,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ cooking 15; },{},{} -12130,Cookie_Bag,Cookie Bag,2,2,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; },{},{} +12130,Cookie_Bag,Cookie Bag,2,2,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12130,1; getrandgroupitem 12130,1; getrandgroupitem 12130,1; },{},{} 12131,Lucky_Potion,Lucky Potion,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12132,Red_Bag,Santa's Bag,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Xmas,600000,0; },{},{} 12133,Ice_Cream_,McDonald's Ice Cone,0,0,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; } },{},{} @@ -5482,15 +5482,15 @@ 12183,Holy_Arrow_Quiver,Holy Arrow Quiver,2,2,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1772,500; },{},{} 12184,Mercenary_Red_Potion,Mercenary Red Potion,2,500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 1000,0; },{},{} 12185,Mercenary_Blue_Potion,Mercenary Blue Potion,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 0,100; },{},{} -12186,Red_Box,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_RedBox),1; },{},{} -12187,Green_Box,Old Green Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_GreenBox),1; },{},{} +12186,Red_Box,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12186,1; },{},{} +12187,Green_Box,Old Green Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12187,1; },{},{} 12188,Magical_Moon_Cake,Grace Moon Cake,0,20,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; },{},{} -12189,Red_Box_,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_RedBox_2),1; },{},{} +12189,Red_Box_,Old Red Box,2,50000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12189,1; },{},{} 12190,Moon_Cake,Moon Cake,2,2,,300,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12191,Special_Moon_Cake,Special Moon Cake,2,2,,500,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12192,Pumpkin_Pie,Pumpkin Pie,0,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,5; },{},{} 12193,Brezel,Pretzel,2,20,,20,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12194,Hometown_Gift,Hometown Gift,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; },{},{} +12194,Hometown_Gift,Hometown Gift,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12194,1; getrandgroupitem 12194,1; getrandgroupitem 12194,1; },{},{} 12195,Plain_Rice_Cake,Plain Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{} 12196,Hearty_Rice_Cake,Hearty Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,0; },{},{} 12197,Salty_Rice_Cake,Salty Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 10,10; },{},{} @@ -5534,15 +5534,15 @@ 12237,Choco_Lump,Junky Chocolate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_BLOODING,18000,0; },{},{} 12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{} 12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{} -12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_YellowBox),1; },{},{} +12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12240,1; },{},{} 12241,M_Center_Potion,Mercenary Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION1,1800000,0; },{},{} 12242,M_Awakening_Potion,Mercenary Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION2,1800000,0; },{},{} 12243,M_Berserk_Potion,Mercenary Berserk Potion,2,3000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ATTHASTE_POTION3,1800000,0; },{},{} -12244,Old_Gift_Box,Old Gift Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_OldGiftBox),1; },{},{} +12244,Old_Gift_Box,Old Gift Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12244,1; },{},{} 12245,Green_Ale_US,Green Ale,0,5000,,500,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,0; },{},{} -12246,Magic_Card_Album,Mystical Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_MagicCardAlbum),1; },{},{} +12246,Magic_Card_Album,Mystical Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12246,1; },{},{} 12247,Halohalo,Halo-Halo,2,2,,100,,,,,0xFFFFFFFF,7,2,,,20,,,{ sc_start SC_INCALLSTATUS,600000,3; },{},{} -12248,Masquerade_Ball_Box,Fancy Ball Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Masquerade),1; },{},{} +12248,Masquerade_Ball_Box,Fancy Ball Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12248,1; },{},{} 12249,Payroll_Of_Kafra_,Payment Statement for Kafra Employee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12250,Str_Dish10_M,Steamed Tongue,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_STR,3600000,10; percentheal 20,20; },{},{} 12251,Agi_Dish10_M,Steamed Desert Scorpions,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_FOOD_AGI,3600000,10; percentheal 15,5; },{},{} @@ -5575,12 +5575,12 @@ 12278,Alice_Scroll,Alice Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 2060,1800000; },{},{} 12279,Undead_Element_Scroll,Undead Elemental Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; },{},{} 12280,Holy_Element_Scroll,Holy Elemental Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_BENEDICTIO; sc_start SC_BENEDICTIO,300000,1; },{},{} -12281,Tresure_Box_WoE,Event Treasure Box,2,20,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Tresure_Box_WoE),1; },{},{} +12281,Tresure_Box_WoE,Event Treasure Box,2,20,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 12282,Internet_Cafe1,Internet Cafe1,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCALLSTATUS,5400000,3; sc_start SC_PLUSATTACKPOWER,5400000,15; sc_start SC_PLUSMAGICPOWER,5400000,15; },{},{} 12283,Internet_Cafe2,Internet Cafe2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCSTR,5400000,8; sc_start SC_INCDEX,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,32; sc_start SC_INCFLEE,5400000,5; },{},{} 12284,Internet_Cafe3,Internet Cafe3,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_PLUSMAGICPOWER,5400000,40; },{},{} 12285,Internet_Cafe4,Internet Cafe4,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,24; sc_start SC_PLUSMAGICPOWER,5400000,24; },{},{} -12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Masquerade_2),1; },{},{} +12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12286,1; },{},{} 12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 1; },{},{} 12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 2; },{},{} 12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 3; },{},{} @@ -5628,12 +5628,12 @@ 12331,Ginseng,Ginseng,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 6,0; },{},{} 12332,Fruit_Juice,Fruit Juice,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,6; },{},{} 12333,Ansila,Ancilla,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,15; },{},{} -12334,Cherish_Box,Treasure Edition Helm Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Cherish_Box),1; },{},{} +12334,Cherish_Box,Treasure Edition Helm Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12334,1; },{},{} 12335,Yummy_Skewered_Dish,Grilled Delicious Skewer,0,1000,,350,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 60,60; },{},{} 12336,Baked_Mushroom,Grilled Mushroom,0,500,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 30,30; },{},{} 12337,Grilled_Sausage,Grilled Sausages,0,300,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,20; },{},{} 12338,Grilled_Corn,Grilled Corn,2,100,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCSTR,180000,2; sc_start SC_INCINT,180000,2; sc_start SC_INCAGI,180000,2; },{},{} -12339,Cherish_Box_Ori,Treasure Edition Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Cherish_Box_Ori),1; },{},{} +12339,Cherish_Box_Ori,Treasure Edition Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12339,1; },{},{} 12340,Mysterious_Rice_Powder,Chewy Rice Powder,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1815; },{},{} 12341,Special_Alloy_Trap_Box,Special Alloy Trap Box,2,30000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7940,100; },{},{} 12342,Manuk's_Opportunity,Manuk's Opportunity,2,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_POTION_BERSERK; sc_start SC_MANU_ATK,600000,10; },{},{} @@ -5649,8 +5649,8 @@ 12352,Dun_Tele_Scroll3,Dungeon Teleport Scroll 3,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12353,Tiny_Waterbottle,Small Bottle,2,800,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PROPERTYWATER,90000,1; },{},{} 12354,Buche_De_Noel,Buche De Noel,2,2,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7; },{},{} -12355,Xmas_Gift,Xmas Gift,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Xmas_Gift),1; },{},{} -12356,Louise_Costume_Box,Louise Costume Box,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Louise_Costume_Box),1; },{},{} +12355,Xmas_Gift,Xmas Gift,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12355,1; },{},{} +12356,Louise_Costume_Box,Louise Costume Box,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12356,1; },{},{} 12357,Shiny_Wing_Gown,Shiny Wing Gown,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1630; },{},{} 12358,Fan_Of_Wind,Fan Of Wind,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1513; },{},{} 12359,Very_Soft_Plant,Very Soft Plant,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1586; },{},{} @@ -5766,7 +5766,7 @@ 12471,F_Adrenaline_Scroll,F Adrenaline Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12472,F_Convex_Mirror,F Convex Mirror,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12473,RWC_Parti_Box,RWC Parti Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12474,RWC_Final_Comp_Box,RWC Final Comp Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +12474,RWC_Final_Comp_Box,RWC Final Comp Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(12474); },{},{} 12475,Cure_Free,Cure Free,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_SILENCE; sc_end SC_BLOODING; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_ORCISH; sc_end SC_CHANGEUNDEAD; itemheal 500,0; },{},{} 12476,PCBang_Coupon_Box3,PCBang Coupon Box3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12477,Gift_Bundle,Gift Bundle,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -5834,7 +5834,7 @@ 12539,Splendid_Box,Splendid Box,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12540,GM_Warp_Box,GM Warp Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12541,Fortune_Cookie1,Fortune Cookie1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12542,Fortune_Cookie2,Fortune Cookie2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +12542,Fortune_Cookie2,Fortune Cookie2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 12543,Fortune_Cookie3,Fortune Cookie3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12544,Mystic_Tree_Branch,Mystic Tree Branch,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12545,Lucky_Egg_C5,Lucky Egg C5,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -5865,7 +5865,7 @@ 12570,Cheer_Scarf8_Box,Cheer Scarf8 Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12571,Cheer_Scarf10_Box,Cheer Scarf10 Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12572,Cheer_Scarf10_Box2,Cheer Scarf10 Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12573,Fruit_Basket,Fruit Basket,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Fruit_Basket),1; getrandgroupitem(IG_Fruit_Basket),1; getrandgroupitem(IG_Fruit_Basket),1; },{},{} +12573,Fruit_Basket,Fruit Basket,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12573,1; getrandgroupitem 12573,1; getrandgroupitem 12573,1; },{},{} 12574,Mora_Berry,Mora Berry,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 0,rand(50,65); },{},{} 12575,Arrow_Of_Elf_Cntr,Arrow Of Elf Cntr,2,500,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1773,500; },{},{} 12576,Hunting_Arrow_Cntr,Hunting Arrow Cntr,2,500,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1774,500; },{},{} @@ -5879,17 +5879,17 @@ 12601,Fresh_Watermelon_Juice,Fresh Watermelon Juice,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,5; },{},{} // 12612,Old_Coin_Bag,Old Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12613,Improved_Coin_Bag,Improved Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1; },{},{} -12614,Intermediate_Coin_Bag,Intermediate Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1; },{},{} -12615,Minor_Coin_Bag,Minor Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1; },{},{} -12616,S_Grade_Coin_Bag,S Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_S_Grade_Coin_Bag),1; getrandgroupitem(IG_S_Grade_Coin_Bag),1; getrandgroupitem(IG_S_Grade_Coin_Bag),1; },{},{} -12617,A_Grade_Coin_Bag,A Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_A_Grade_Coin_Bag),1; getrandgroupitem(IG_A_Grade_Coin_Bag),1; getrandgroupitem(IG_A_Grade_Coin_Bag),1; },{},{} +12613,Improved_Coin_Bag,Improved Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12613,1; getrandgroupitem 12613,1; getrandgroupitem 12613,1; getrandgroupitem 12613,1; },{},{} +12614,Intermediate_Coin_Bag,Intermediate Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12614,1; getrandgroupitem 12614,1; getrandgroupitem 12614,1; getrandgroupitem 12614,1; },{},{} +12615,Minor_Coin_Bag,Minor Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12615,1; getrandgroupitem 12615, 1; getrandgroupitem 12615,1; getrandgroupitem 12615,1; },{},{} +12616,S_Grade_Coin_Bag,S Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12616,1; getrandgroupitem 12616,1; getrandgroupitem 12616,1; },{},{} +12617,A_Grade_Coin_Bag,A Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12617,1; getrandgroupitem 12617,1; getrandgroupitem 12617,1; },{},{} 12618,B_Grade_Coin_Bag,B Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12619,C_Grade_Coin_Bag,C Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12620,D_Grade_Coin_Bag,D Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12621,E_Grade_Coin_Bag,E Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12622,Reins_Of_Mount,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ setmounting(); },{},{} -12623,Advanced_Weapons_Box,Advanced Weapons Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Advanced_Weapons_Box),1; },{},{} +12623,Advanced_Weapons_Box,Advanced Weapons Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12623,1; },{},{} 12624,Delicious_Jelly,Delicious Jelly,0,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 3,3; },{},{} // 12636,Malangdo_Canned_Specialties,Malangdo Canned Specialties,2,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "malangdo",140,114; },{},{} @@ -5907,10 +5907,23 @@ 12663,Transformation_Scroll(Poring),Transformation Scroll(Poring),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0; },{},{} 12664,Transformation_Scroll(Golem),Transformation Scroll(Golem),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0; },{},{} // +// ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script } + +12690,Old_C_Album_Helm,Old Card Album Helm,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +12691,Old_C_Album_Armor,Old Card Album Armor,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +12692,Old_C_Album_Shield,Old Card Album Shield,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +12693,Old_C_Album_Garment,Old Card Album Garment,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +12694,Old_C_Album_Shoes,Old Card Album Shoes,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +12695,Old_C_Album_Acc,Old Card Album Acc,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +// +12698,Old_C_Album_Weapon,Old Card Album Weapon,2,20,,50,,,,,0xFFFFFFFF,7,2,,,1,,,{},{},{} +// +12818,High_Weapon_Box,High Weapon Box,2,20,,50,,,,,0xFFFFFFFF,7,2,,,100,,,{},{},{} +// 12699,Tikbalang_Belt,Tikbalang Belt,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 2313; },{},{} 12700,Upside_Down_Shirt,Upside Down Shirt,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "malaya",242,211; },{},{} 12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BleuBox),1; getrandgroupitem(IG_BleuBox),1; },{},{} +12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12702,1; getrandgroupitem 12702,1; },{},{} 12703,Holy_Egg_2,Holy Egg,11,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12704,Elixir_Of_Life,Elixir of Life,0,0,,10,,,,,0xFFFFFFFF,7,2,,,85,,,{ percentheal 100,0; },{},{} 12705,Noble_Nameplate,Noble Nameplate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,90,,,{ sc_start SC_CASH_PLUSEXP,1800000,100; },{},{} @@ -5922,7 +5935,7 @@ 12711,Pretzel,Pretzel,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,90),0; },{},{} 12712,Green_Beer,Green Beer,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12713,Monster_Extract,Monster Extract,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12714,Easter_Scroll,Easter Scroll,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Easter_Scroll),1; },{},{} +12714,Easter_Scroll,Easter Scroll,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12714,1; },{},{} 12715,Black_Treasure_Box,Black Treasure Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12716,Indian_Rice_Cake,Indian Rice Cake,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} // Guillotine Cross Poisons @@ -6755,7 +6768,7 @@ 13908,Deviruchi_Set_Box,XM Deviruchi Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5227,1; getitem 5228,1; getitem 5229,1; },{},{} 13909,MVP_Hunt_Box,MVP Hunting Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,1; getitem 12210,1; getitem 12221,1; getitem 12214,3; },{},{} 13910,Brewing_Box,XM Brewing Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; getitem 12205,10; getitem 12206,10; },{},{} -13911,Christmas_Pet_Scroll,Christmas Pet Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +13911,Xmas_Pet_Scroll,Christmas Pet Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 13912,Pty_Blessing_Box,Party Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14588,10; },{},{} 13913,Pty_Inc_Agi_Box,Party Increase Agi 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14589,10; },{},{} 13914,Pty_Assumptio_Box,Party Assumptio 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14590,10; },{},{} @@ -6769,7 +6782,7 @@ 13922,Rabbit_Ear_Hat_Box,Bunny Top Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5378,1; },{},{} 13923,Darkness_Helm_Box,Dark Randgris Helm Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5373,1; },{},{} 13924,L_Orc_Hero_Helm_Box,Orc Hero Headdress Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5375,1; },{},{} -13925,Year_Of_Mouse_Scroll,... GoodLuck Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +13925,Lucky_Scroll08,... GoodLuck Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 13926,Crusader_Card_Box,Crusader Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4371,1; getitem 4311,1; getitem 4319,1; getitem 4331,1; },{},{} 13927,Alchemist_Card_Box,Alchemist Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4281,1; getitem 4233,1; getitem 4343,1; getitem 4186,1; getitem 4036,1; },{},{} 13928,Rogue_Card_Box,Rogue Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4039,1; getitem 4210,1; getitem 4257,1; getitem 4230,1; getitem 4348,1; },{},{} @@ -6789,12 +6802,12 @@ 13942,Love_Angel_Box_1m,Love Angel Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14009,1; },{},{} 13943,Squirrel_Box_1m,Squirrel Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14010,1; },{},{} 13944,Gogo_Box_1m,Gogo Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14011,1; },{},{} -13945,BRO_SM_Package,Brazil Swordsman Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2317,1; getitem 2106,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 2229,1; getitem 2266,1; },{},{} -13946,BRO_MG_Package,Brazil Magician Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2322,1; getitem 2102,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4077,1; getitem 2607,2; getitem 5027,1; },{},{} -13947,BRO_AC_Package,Brazil Acolyte Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2326,1; getitem 2104,1; getitem 2404,1; getitem 2504,1; getitem 4003,1; getitem 4100,1; getitem 2607,2; getitem 2217,1; },{},{} -13948,BRO_AR_Package,Brazil Archer package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2331,1; getitem 1716,1; getitem 2406,1; getitem 2504,1; getitem 4064,1; getitem 4102,1; getitem 2607,2; getitem 2285,1; },{},{} -13949,BRO_MC_Package,Brazil Merchant Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2315,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 5021,1; },{},{} -13950,BRO_TF_Package,Brazil Thief Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2336,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4097,1; getitem 4102,1; getitem 2607,2; getitem 2274,1; },{},{} +13945,Br_SwordPackage,Brazil Swordsman Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +13946,Br_MagePackage,Brazil Magician Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +13947,Br_AcolPackage,Brazil Acolyte Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +13948,Br_ArcherPackage,Brazil Archer package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +13949,Br_MerPackage,Brazil Merchant Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +13950,Br_ThiefPackage,Brazil Thief Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 13951,Wasteland_Outlaw_Box,Western Outlaw Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13109,604800; },{},{} 13952,Lever_Action_Rifle_Box,Lever Action Rifle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13170,604800; },{},{} 13953,All_In_One_Ring_Box,All In One Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{} @@ -7073,7 +7086,7 @@ 14226,Quagmire_Scroll_Box50,Quagmire Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,50; },{},{} 14227,Healing_Staff_Box,Healing Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1638,604800; },{},{} 14228,Praxinus_Box,Praccsinos Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2752,604800; },{},{} -14229,Cherry_Blossom_Scroll,Cherry Blossom Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +14229,Sakura_Scroll,Cherry Blossom Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 14230,Note_Headphones_Box,Note Headphones Box,18,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5151,1; },{},{} 14231,Novice_Breastplate_Boxes,Novice Breastplate Boxes,18,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 14232,Yggdrasilberry_Box_,Yggdrasil Berry 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 607,10; },{},{} @@ -7142,9 +7155,12 @@ 14295,Mercenary_Contract_Box10,Mercenary Contract Box 10ea,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6050,10; },{},{} 14296,Angel_Scroll,Angel Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 14297,Devil_Scroll,Devil Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +14298,Surprise_Scroll,Surprise Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 14300,Mask_Of_Ifrit_Box,Mask Of Ifrit Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5420,1; },{},{} 14301,Ifrit's_Ear_Box,Ears Of Ifrit Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5421,1; },{},{} 14304,Scuba_Mask_Box,Scuba Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5397,1; },{},{} +14306,RWC_Special_Scroll,RWC Special Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +14307,RWC_Limited_Scroll,RWC Limited Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 14314,Phreeoni_Scroll_Box,Phreeoni Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14597,10; },{},{} 14315,Ghostring_Scroll_Box,Ghostring Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14598,10; },{},{} 14316,July7_Scroll,July7 Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -7261,7 +7277,7 @@ 14593,Magic_Power_Scroll,Mystical Amplification Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "HW_MAGICPOWER",10; },{},{} 14594,Quagmire_Scroll,Quagmire Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_QUAGMIRE",5; },{},{} 14595,Unsealed_Magic_Spell,Unsealed Magic Spell,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "yuno_fild09",255,127; },{},{} -14596,Pierre_Treasurebox,Pierre's Treasure Box,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; },{},{} +14596,Pierre_Treasurebox,Pierre's Treasure Box,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; },{},{} 14597,PhreeoniS,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4121; },{},{} 14598,GhostringS,Ghostring Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,60000,4047; },{},{} 14599,Greed_Scroll_C,Greed Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -7547,6 +7563,8 @@ 16776,Universal_Catalog_Gold_Box10,Universal Catalog Gold 10 Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12581,10; },{},{} 16777,Universal_Catalog_Gold_Box50,Universal Catalog Gold 50 Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12581,50; },{},{} // +16826,Sagittarius_Scr_Box,Sagittarius Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} +// 16972,Weather_Report_Box,Weather Report Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 16973,Yellow_Hat_Box,Yellow Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 19515,1; },{},{} 16974,Comin_Actor_Box,Comin Actor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} @@ -7670,6 +7688,7 @@ 17147,Ribbon_Chef_Hat_Box,Ribbon Chef Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 18631,1; },{},{} 17152,Bridal_Ribbon_Box,Bridal Ribbon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 18636,1; },{},{} 17155,Upg_Huuma_Shuriken_Box,Upg Huuma Shuriken Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13316,86400; },{},{} +17156,TCG_Card_Scroll,TCG Card Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ packageitem(); },{},{} 17157,Vital_Flower_Box,Vital Flower Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6113,10; },{},{} 17158,Flame_Gemstone_Box,Flame Gemstone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6114,10; },{},{} 17162,Boarding_Halter_Box7,Boarding Halter Box7,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/db/re/item_giftbox.txt b/db/re/item_giftbox.txt deleted file mode 100644 index e90951bff..000000000 --- a/db/re/item_giftbox.txt +++ /dev/null @@ -1,629 +0,0 @@ -// Gift Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -// GiftBox -4,501,1 // Red Potion -4,502,1 // Orange Potion -4,503,1 // Yellow Potion -4,504,1 // White Potion -4,505,1 // Blue Potion -4,506,1 // Green Potion -4,526,1 // Royal Jelly -4,529,1 // Candy -4,530,1 // Candy Cane -4,537,1 // Pet Food -4,538,1 // Well-baked Cookie -4,539,1 // Piece of Cake -4,617,1 // Old Purple Box -4,644,19 // Gift Box -4,706,1 // Four Leaf Clover -4,718,1 // Garnet -4,719,1 // Amethyst -4,720,1 // Aquamarine -4,721,1 // Emerald -4,722,1 // Pearl -4,723,1 // Ruby -4,724,1 // Cursed Ruby -4,725,1 // Sardonyx -4,726,1 // Sapphire -4,727,1 // Opal -4,728,1 // Topaz -4,729,1 // Zircon -4,730,1 // 1carat Diamond -4,731,1 // 2carat Diamond -4,732,1 // 3carat Diamond -4,733,1 // Cracked Diamond -4,734,1 // Red Frame -4,735,1 // Chung Jah -4,736,1 // China -4,737,1 // Black Ladle -4,738,1 // Pencil Case -4,739,1 // Rouge -4,740,1 // Puppet -4,741,1 // Poring Doll -4,742,1 // Chonchon Doll -4,743,1 // Spore Doll -4,744,1 // Bouquet -4,745,1 // Wedding Bouquet -4,746,1 // Glass Bead -4,747,1 // Crystal Mirror -4,748,1 // Witherless Rose -4,749,1 // Frozen Rose -4,750,1 // Baphomet Doll -4,751,1 // Osiris Doll -4,752,1 // Grasshopper Doll -4,753,1 // Yoyo Doll -4,754,1 // Raccoon Doll -4,969,1 // Gold -4,975,1 // Scarlet Dyestuff -4,976,1 // Lemon Dyestuff -4,978,1 // Cobaltblue Dyestuff -4,979,1 // Darkgreen Dyestuff -4,980,1 // Orange Dyestuff -4,981,1 // Violet Dyestuff -4,982,1 // White Dyestuff -4,983,1 // Black Dyestuff -4,994,1 // Flame Heart -4,995,1 // Mystic Frozen -4,996,1 // Rough Wind -4,997,1 // Great Nature -4,999,1 // Steel -4,1000,1 // Star Crumb -4,1558,1 // Girl's Diary -4,4005,1 // Santa Poring Card -4,7034,1 // Red Stocking -// GiftBox_1 -28,501,1 // Red Potion -28,502,1 // Orange Potion -28,503,1 // Yellow Potion -28,504,1 // White Potion -28,505,1 // Blue Potion -28,506,1 // Green Potion -28,526,1 // Royal Jelly -28,529,1 // Candy -28,530,1 // Candy Cane -28,537,1 // Pet Food -28,538,1 // Well-baked Cookie -28,539,1 // Piece of Cake -28,617,1 // Old Purple Box -28,644,19 // Gift Box -28,706,1 // Four Leaf Clover -28,718,1 // Garnet -28,719,1 // Amethyst -28,720,1 // Aquamarine -28,721,1 // Emerald -28,722,1 // Pearl -28,723,1 // Ruby -28,724,1 // Cursed Ruby -28,725,1 // Sardonyx -28,726,1 // Sapphire -28,727,1 // Opal -28,728,1 // Topaz -28,729,1 // Zircon -28,730,1 // 1carat Diamond -28,731,1 // 2carat Diamond -28,732,1 // 3carat Diamond -28,733,1 // Cracked Diamond -28,734,1 // Red Frame -28,735,1 // Chung Jah -28,736,1 // China -28,737,1 // Black Ladle -28,738,1 // Pencil Case -28,739,1 // Rouge -28,740,1 // Puppet -28,741,1 // Poring Doll -28,742,1 // Chonchon Doll -28,743,1 // Spore Doll -28,744,1 // Bouquet -28,745,1 // Wedding Bouquet -28,746,1 // Glass Bead -28,747,1 // Crystal Mirror -28,748,1 // Witherless Rose -28,749,1 // Frozen Rose -28,750,1 // Baphomet Doll -28,751,1 // Osiris Doll -28,752,1 // Grasshopper Doll -28,753,1 // Yoyo Doll -28,754,1 // Raccoon Doll -28,969,1 // Gold -28,975,1 // Scarlet Dyestuff -28,976,1 // Lemon Dyestuff -28,978,1 // Cobaltblue Dyestuff -28,979,1 // Darkgreen Dyestuff -28,980,1 // Orange Dyestuff -28,981,1 // Violet Dyestuff -28,982,1 // White Dyestuff -28,983,1 // Black Dyestuff -28,994,1 // Flame Heart -28,995,1 // Mystic Frozen -28,996,1 // Rough Wind -28,997,1 // Great Nature -28,999,1 // Steel -28,1000,1 // Star Crumb -28,1558,1 // Girl's Diary -28,4005,1 // Santa Poring Card -28,7034,1 // Red Stocking -// GiftBox_2 -29,501,1 // Red Potion -29,502,1 // Orange Potion -29,503,1 // Yellow Potion -29,504,1 // White Potion -29,505,1 // Blue Potion -29,506,1 // Green Potion -29,526,1 // Royal Jelly -29,529,1 // Candy -29,530,1 // Candy Cane -29,537,1 // Pet Food -29,538,1 // Well-baked Cookie -29,539,1 // Piece of Cake -29,617,1 // Old Purple Box -29,644,19 // Gift Box -29,706,1 // Four Leaf Clover -29,718,1 // Garnet -29,719,1 // Amethyst -29,720,1 // Aquamarine -29,721,1 // Emerald -29,722,1 // Pearl -29,723,1 // Ruby -29,724,1 // Cursed Ruby -29,725,1 // Sardonyx -29,726,1 // Sapphire -29,727,1 // Opal -29,728,1 // Topaz -29,729,1 // Zircon -29,730,1 // 1carat Diamond -29,731,1 // 2carat Diamond -29,732,1 // 3carat Diamond -29,733,1 // Cracked Diamond -29,734,1 // Red Frame -29,735,1 // Chung Jah -29,736,1 // China -29,737,1 // Black Ladle -29,738,1 // Pencil Case -29,739,1 // Rouge -29,740,1 // Puppet -29,741,1 // Poring Doll -29,742,1 // Chonchon Doll -29,743,1 // Spore Doll -29,744,1 // Bouquet -29,745,1 // Wedding Bouquet -29,746,1 // Glass Bead -29,747,1 // Crystal Mirror -29,748,1 // Witherless Rose -29,749,1 // Frozen Rose -29,750,1 // Baphomet Doll -29,751,1 // Osiris Doll -29,752,1 // Grasshopper Doll -29,753,1 // Yoyo Doll -29,754,1 // Raccoon Doll -29,969,1 // Gold -29,975,1 // Scarlet Dyestuff -29,976,1 // Lemon Dyestuff -29,978,1 // Cobaltblue Dyestuff -29,979,1 // Darkgreen Dyestuff -29,980,1 // Orange Dyestuff -29,981,1 // Violet Dyestuff -29,982,1 // White Dyestuff -29,983,1 // Black Dyestuff -29,994,1 // Flame Heart -29,995,1 // Mystic Frozen -29,996,1 // Rough Wind -29,997,1 // Great Nature -29,999,1 // Steel -29,1000,1 // Star Crumb -29,1558,1 // Girl's Diary -29,4005,1 // Santa Poring Card -29,7034,1 // Red Stocking -// Gift_Box3 -30,501,1 // Red Potion -30,502,1 // Orange Potion -30,503,1 // Yellow Potion -30,504,1 // White Potion -30,505,1 // Blue Potion -30,506,1 // Green Potion -30,526,1 // Royal Jelly -30,529,1 // Candy -30,530,1 // Candy Cane -30,537,1 // Pet Food -30,538,1 // Well-baked Cookie -30,539,1 // Piece of Cake -30,617,1 // Old Purple Box -30,644,19 // Gift Box -30,706,1 // Four Leaf Clover -30,718,1 // Garnet -30,719,1 // Amethyst -30,720,1 // Aquamarine -30,721,1 // Emerald -30,722,1 // Pearl -30,723,1 // Ruby -30,724,1 // Cursed Ruby -30,725,1 // Sardonyx -30,726,1 // Sapphire -30,727,1 // Opal -30,728,1 // Topaz -30,729,1 // Zircon -30,730,1 // 1carat Diamond -30,731,1 // 2carat Diamond -30,732,1 // 3carat Diamond -30,733,1 // Cracked Diamond -30,734,1 // Red Frame -30,735,1 // Chung Jah -30,736,1 // China -30,737,1 // Black Ladle -30,738,1 // Pencil Case -30,739,1 // Rouge -30,740,1 // Puppet -30,741,1 // Poring Doll -30,742,1 // Chonchon Doll -30,743,1 // Spore Doll -30,744,1 // Bouquet -30,745,1 // Wedding Bouquet -30,746,1 // Glass Bead -30,747,1 // Crystal Mirror -30,748,1 // Witherless Rose -30,749,1 // Frozen Rose -30,750,1 // Baphomet Doll -30,751,1 // Osiris Doll -30,752,1 // Grasshopper Doll -30,753,1 // Yoyo Doll -30,754,1 // Raccoon Doll -30,969,1 // Gold -30,975,1 // Scarlet Dyestuff -30,976,1 // Lemon Dyestuff -30,978,1 // Cobaltblue Dyestuff -30,979,1 // Darkgreen Dyestuff -30,980,1 // Orange Dyestuff -30,981,1 // Violet Dyestuff -30,982,1 // White Dyestuff -30,983,1 // Black Dyestuff -30,994,1 // Flame Heart -30,995,1 // Mystic Frozen -30,996,1 // Rough Wind -30,997,1 // Great Nature -30,999,1 // Steel -30,1000,1 // Star Crumb -30,1558,1 // Girl's Diary -30,4005,1 // Santa Poring Card -30,7034,1 // Red Stocking -// GiftBox_4 -31,501,1 // Red Potion -31,502,1 // Orange Potion -31,503,1 // Yellow Potion -31,504,1 // White Potion -31,505,1 // Blue Potion -31,506,1 // Green Potion -31,526,1 // Royal Jelly -31,529,1 // Candy -31,530,1 // Candy Cane -31,537,1 // Pet Food -31,538,1 // Well-baked Cookie -31,539,1 // Piece of Cake -31,617,1 // Old Purple Box -31,644,19 // Gift Box -31,706,1 // Four Leaf Clover -31,718,1 // Garnet -31,719,1 // Amethyst -31,720,1 // Aquamarine -31,721,1 // Emerald -31,722,1 // Pearl -31,723,1 // Ruby -31,724,1 // Cursed Ruby -31,725,1 // Sardonyx -31,726,1 // Sapphire -31,727,1 // Opal -31,728,1 // Topaz -31,729,1 // Zircon -31,730,1 // 1carat Diamond -31,731,1 // 2carat Diamond -31,732,1 // 3carat Diamond -31,733,1 // Cracked Diamond -31,734,1 // Red Frame -31,735,1 // Chung Jah -31,736,1 // China -31,737,1 // Black Ladle -31,738,1 // Pencil Case -31,739,1 // Rouge -31,740,1 // Puppet -31,741,1 // Poring Doll -31,742,1 // Chonchon Doll -31,743,1 // Spore Doll -31,744,1 // Bouquet -31,745,1 // Wedding Bouquet -31,746,1 // Glass Bead -31,747,1 // Crystal Mirror -31,748,1 // Witherless Rose -31,749,1 // Frozen Rose -31,750,1 // Baphomet Doll -31,751,1 // Osiris Doll -31,752,1 // Grasshopper Doll -31,753,1 // Yoyo Doll -31,754,1 // Raccoon Doll -31,969,1 // Gold -31,975,1 // Scarlet Dyestuff -31,976,1 // Lemon Dyestuff -31,978,1 // Cobaltblue Dyestuff -31,979,1 // Darkgreen Dyestuff -31,980,1 // Orange Dyestuff -31,981,1 // Violet Dyestuff -31,982,1 // White Dyestuff -31,983,1 // Black Dyestuff -31,994,1 // Flame Heart -31,995,1 // Mystic Frozen -31,996,1 // Rough Wind -31,997,1 // Great Nature -31,999,1 // Steel -31,1000,1 // Star Crumb -31,1558,1 // Girl's Diary -31,4005,1 // Santa Poring Card -31,7034,1 // Red Stocking -// GiftBox_China -34,501,1 // Red Potion -34,502,1 // Orange Potion -34,503,1 // Yellow Potion -34,504,1 // White Potion -34,505,1 // Blue Potion -34,506,1 // Green Potion -34,518,1 // Honey -34,520,1 // Hinalle Leaflet -34,521,2 // Aloe Leaflet -34,525,1 // Panacea -34,526,1 // Royal Jelly -34,529,1 // Candy -34,530,1 // Candy Cane -34,603,40 // Old Blue Box -34,604,9 // Dead Branch -34,605,1 // Anodyne -34,606,1 // Aloevera -34,607,1 // Yggdrasil Berry -34,608,1 // Yggdrasil Seed -34,610,1 // Yggdrasil Leaf -34,612,5 // Mini Furnace -34,613,1 // Iron Hammer -34,614,1 // Golden Hammer -34,615,1 // Oridecon Hammer -34,701,1 // Ora Ora -34,702,1 // Animal Gore -34,703,1 // Hinalle -34,704,1 // Aloe -34,706,1 // Four Leaf Clover -34,707,1 // Singing Plant -34,708,1 // Ment -34,710,1 // Illusion Flower -34,715,1 // Yellow Gemstone -34,716,1 // Red Gemstone -34,717,1 // Blue Gemstone -34,718,1 // Garnet -34,719,1 // Amethyst -34,720,1 // Aquamarine -34,721,1 // Emerald -34,722,1 // Pearl -34,723,1 // Ruby -34,724,1 // Cursed Ruby -34,725,1 // Sardonyx -34,726,1 // Sapphire -34,727,1 // Opal -34,728,1 // Topaz -34,729,1 // Zircon -34,730,1 // 1carat Diamond -34,731,1 // 2carat Diamond -34,732,1 // 3carat Diamond -34,733,1 // Cracked Diamond -34,734,1 // Red Frame -34,735,1 // Chung Jah -34,736,1 // China -34,737,1 // Black Ladle -34,738,1 // Pencil Case -34,740,1 // Puppet -34,741,1 // Poring Doll -34,742,1 // Chonchon Doll -34,743,1 // Spore Doll -34,745,1 // Wedding Bouquet -34,747,1 // Crystal Mirror -34,748,1 // Witherless Rose -34,749,1 // Frozen Rose -34,752,1 // Grasshopper Doll -34,753,1 // Yoyo Doll -34,754,1 // Raccoon Doll -34,909,1 // Jellopy -34,910,1 // Garlet -34,911,1 // Scell -34,912,1 // Zargon -34,931,1 // Orcish Voucher -34,934,1 // Memento -34,968,1 // Heroic Emblem -34,969,1 // Gold -34,971,1 // Detrimindexta -34,972,1 // Karvodailnirol -34,973,1 // Counteragent -34,974,1 // Mixture -34,975,1 // Scarlet Dyestuff -34,976,1 // Lemon Dyestuff -34,978,1 // Cobaltblue Dyestuff -34,979,1 // Darkgreen Dyestuff -34,980,1 // Orange Dyestuff -34,981,1 // Violet Dyestuff -34,982,1 // White Dyestuff -34,983,1 // Black Dyestuff -34,986,1 // Anvil -34,987,1 // Oridecon Anvil -34,988,1 // Golden Anvil -34,989,1 // Emperium Anvil -34,990,1 // Red Blood -34,991,1 // Crystal Blue -34,992,1 // Wind of Verdure -34,993,1 // Green Live -34,994,1 // Flame Heart -34,995,1 // Mystic Frozen -34,996,1 // Rough Wind -34,997,1 // Great Nature -34,998,1 // Iron -34,999,1 // Steel -34,1000,1 // Star Crumb -34,1001,1 // Star Dust -34,1002,1 // Iron Ore -34,1003,1 // Coal -34,1004,1 // Chivalry Emblem -34,1005,1 // Hammer of Blacksmith -34,1006,1 // Old Magicbook -34,1007,1 // Necklace of Wisdom -34,1008,1 // Necklace of Oblivion -34,1009,1 // Hand of God -34,1010,1 // Phracon -34,1011,1 // Emveretarcon -34,1065,1 // Trap -34,1102,1 // Sword -34,1105,1 // Falchion -34,1108,1 // Blade -34,1111,1 // Rapier -34,1114,1 // Scimitar -34,1117,1 // Katana -34,1120,1 // Tsurugi -34,1125,1 // Ring Pommel Saber -34,1127,1 // Saber -34,1128,1 // Haedonggum -34,1129,1 // Flamberge -34,1152,1 // Slayer -34,1155,1 // Bastard Sword -34,1158,1 // Two-Handed Sword -34,1162,1 // Broad Sword -34,1163,1 // Claymore -34,1202,1 // Knife -34,1205,1 // Cutter -34,1208,1 // Main Gauche -34,1211,1 // Dirk -34,1214,1 // Dagger -34,1217,1 // Stiletto -34,1220,1 // Gladius -34,1226,1 // Damascus -34,1251,1 // Jur -34,1253,1 // Katar -34,1255,1 // Jamadhar -34,1302,1 // Axe -34,1352,1 // Battle Axe -34,1355,1 // Hammer -34,1358,1 // Buster -34,1361,1 // Two-Handed Axe -34,1402,1 // Javelin -34,1405,1 // Spear -34,1408,1 // Pike -34,1410,1 // Lance -34,1452,1 // Guisarme -34,1455,1 // Glaive -34,1458,1 // Partizan -34,1461,1 // Trident -34,1464,1 // Halberd -34,1502,1 // Club -34,1505,1 // Mace -34,1508,1 // Smasher -34,1511,1 // Flail -34,1514,1 // Morning Star -34,1517,1 // Sword Mace -34,1520,1 // Chain -34,1550,1 // Book -34,1551,1 // Bible -34,1602,1 // Rod -34,1605,1 // Wand -34,1608,1 // Staff -34,1611,1 // Arc Wand -34,1613,1 // Mighty Staff -34,1702,1 // Bow -34,1705,1 // Composite Bow -34,1711,1 // Crossbow -34,1713,1 // Arbalest -34,1714,1 // Gakkung Bow -34,1718,1 // Hunter Bow -34,1719,1 // Roguemaster's Bow -34,2102,1 // Guard -34,2104,1 // Buckler -34,2106,1 // Shield -34,2108,1 // Mirror Shield -34,2207,1 // Fancy Flower -34,2209,1 // Ribbon -34,2213,1 // Kitty Band -34,2215,1 // Flower Band -34,2217,1 // Biretta -34,2221,1 // Hat -34,2223,1 // Turban -34,2225,1 // Goggles -34,2227,1 // Cap -34,2229,1 // Helm -34,2231,1 // Gemmed Sallet -34,2233,1 // Circlet -34,2236,1 // Santa Hat -34,2244,1 // Big Ribbon -34,2249,1 // Coronet -34,2250,1 // Cute Ribbon -34,2257,1 // Unicorn Horn -34,2258,1 // Spiky Band -34,2262,1 // Clown Nose -34,2263,1 // Zorro Masque -34,2265,1 // Gangster Mask -34,2269,1 // Romantic Flower -34,2270,1 // Romantic Leaf -34,2271,1 // Jack be Dandy -34,2272,1 // Stop Post -34,2273,1 // Doctor Band -34,2275,1 // Red Bandana -34,2276,1 // Angled Glasses -34,2279,1 // Bomb Wick -34,2284,1 // Antlers -34,2287,1 // Pirate Bandana -34,2289,1 // Poo Poo Hat -34,2290,1 // Funeral Hat -34,2291,1 // Masquerade -34,2293,1 // Pretend Murdered -34,2294,1 // Stellar -34,2295,1 // Blinker -34,2296,1 // Binoculars -34,2298,1 // Green Feeler -34,2299,1 // Orc Helm -34,2302,1 // Cotton Shirt -34,2304,1 // Jacket -34,2306,1 // Adventurer's Suit -34,2308,1 // Mantle -34,2310,1 // Coat -34,2311,1 // Mink Coat -34,2313,1 // Padded Armor -34,2315,1 // Chain Mail -34,2317,1 // Full Plate -34,2322,1 // Silk Robe -34,2324,1 // Scapulare -34,2326,1 // Saint's Robe -34,2329,1 // Wooden Mail -34,2331,1 // Tights -34,2333,1 // Silver Robe -34,2336,1 // Thief Clothes -34,2337,1 // Ninja Suit -34,2339,1 // Pantie -34,2402,1 // Sandals -34,2404,1 // Shoes -34,2407,1 // Crystal Pumps -34,2408,1 // Shackles -34,2409,1 // High Heels -34,2502,1 // Hood -34,2504,1 // Muffler -34,2506,1 // Manteau -34,2507,1 // Ancient Cape -34,2508,1 // Ragamuffin Manteau -34,2601,1 // Ring -34,2602,1 // Earring -34,2603,1 // Necklace -34,2604,1 // Glove -34,2605,1 // Brooch -34,2607,1 // Clip -34,2608,1 // Rosary -34,2609,1 // Skull Ring -34,2610,1 // Gold Ring -34,2611,1 // Silver Ring -34,2612,1 // Flower Ring -34,2613,1 // Diamond Ring -34,5009,1 // Safety Helmet -34,5010,1 // Indian Fillet -34,5014,1 // Fin Helm -34,5015,2 // Egg Shell -// Old Gift Box -43,5270,45 // Happy Wig -43,5271,15 // Phoenix Crown -43,5272,40 // Smiling Mask diff --git a/db/re/item_group.conf b/db/re/item_group.conf new file mode 100644 index 000000000..3308cd96c --- /dev/null +++ b/db/re/item_group.conf @@ -0,0 +1,3974 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +// : ( <...> "Item_Name" or ("Item_Name",Repeat_Count) ) +Old_Card_Album: ( + ("Poring_Card",8), + ("Fabre_Card",10), + ("Pupa_Card",6), + ("Drops_Card",11), + "Poring__Card", + ("Lunatic_Card",7), + ("Pecopeco_Egg_Card",4), + ("Picky_Card",10), + ("Chonchon_Card",10), + ("Wilow_Card",10), + ("Picky__Card",10), + ("Thief_Bug_Egg_Card",8), + ("Andre_Egg_Card",7), + ("Roda_Frog_Card",5), + ("Condor_Card",7), + ("Thief_Bug_Card",7), + ("Savage_Babe_Card",5), + ("Hornet_Card",5), + ("Farmiliar_Card",5), + ("Rocker_Card",5), + ("Spore_Card",5), + ("Desert_Wolf_Babe_Card",5), + ("Plankton_Card",5), + ("Skeleton_Card",5), + ("Thief_Bug_Female_Card",3), + ("Kukre_Card",3), + ("Tarou_Card",3), + ("Wolf_Card",3), + ("Mandragora_Card",3), + ("Pecopeco_Card",3), + ("Ambernite_Card",3), + ("Poporing_Card",3), + ("Worm_Tail_Card",3), + ("Hydra_Card",3), + ("Muka_Card",3), + ("Snake_Card",3), + ("Zombie_Card",3), + ("Stainer_Card",3), + ("Coco_Card",3), + ("Steel_Chonchon_Card",3), + ("Andre_Card",3), + ("Smokie_Card",3), + ("Horn_Card",3), + ("Martin_Card",3), + ("Poison_Spore_Card",3), + ("Vadon_Card",3), + ("Thief_Bug_Male_Card",3), + ("Yoyo_Card",3), + ("Elder_Wilow_Card",3), + "Vitata_Card", + ("Marina_Card",3), + ("Dustiness_Card",3), + ("Metaller_Card",2), + ("Thara_Frog_Card",2), + ("Goblin_Card",2), + ("Cornutus_Card",2), + ("Anacondaq_Card",2), + ("Caramel_Card",2), + ("Zerom_Card",2), + ("Kaho_Card",2), + ("Orc_Warrior_Card",2), + ("Megalodon_Card",2), + ("Scorpion_Card",2), + ("Drainliar_Card",2), + ("Eggyra_Card",2), + ("Orc_Zombie_Card",2), + ("Golem_Card",2), + ("Pirate_Skel_Card",2), + ("BigFoot_Card",2), + ("Argos_Card",2), + ("Magnolia_Card",2), + ("Phen_Card",2), + ("Savage_Card",2), + ("Mantis_Card",2), + ("Flora_Card",2), + ("Hode_Card",2), + "Desert_Wolf_Card", + "Rafflesia_Card", + "Marine_Sphere_Card", + "Orc_Skeleton_Card", + "Soldier_Skeleton_Card", + "Giearth_Card", + "Frilldora_Card", + "Sword_Fish_Card", + "Munak_Card", + "Kobold_Card", + "Skel_Worker_Card", + "Obeaune_Card", + "Archer_Skeleton_Card", + "Marse_Card", + "Zenorc_Card", + "Matyr_Card", + "Dokebi_Card", + "Pasana_Card", + "Sohee_Card", + "Sand_Man_Card", + "Whisper_Card", + "Horong_Card", + "Requiem_Card", + "Marc_Card", + "Mummy_Card", + "Verit_Card", + "Myst_Card", + "Jakk_Card", + "Ghoul_Card", + "Strouf_Card", + "Marduk_Card", + "Marionette_Card", + "Argiope_Card", + "Hunter_Fly_Card", + "Isis_Card", + "Side_Winder_Card", + "Petit_Card", + "Bathory_Card", + "Petit__Card", + "Deviruchi_Card", + "Deviace_Card", + "Nightmare_Card", + "Baphomet__Card", + "Daydric_Card", + "Khalitzburg_Card", + "Joker_Card", + "Evil_Druid_Card", + "Gargoyle_Card", + "Goat_Card", + "Gajomart_Card", + "Galapago_Card", + "Crab_Card", + "Rice_Cake_Boy_Card", + "Steam_Goblin_Card", + "Goblin_Archer_Card", + "Flying_Deleter_Card", + "Nine_Tail_Card", + "Antique_Firelock_Card", + "Grand_Peco_Card", + "Grizzly_Card", + "Gullinbursti_Card", + "Gig_Card", + "Nightmare_Terror_Card", + "Neraid_Card", + "Dark_Frame_Card", + "The_Paper_Card", + "Demon_Pungus_Card", + "Poison_Toad_Card", + "Dullahan_Card", + "Dryad_Card", + "Dragon_Tail_Card", + "Driller_Card", + "Disguise_Card", + "Diabolic_Card", + "Lava_Golem_Card", + "Rideword_Card", + "Raggler_Card", + "Raydric_Archer_Card", + "Leib_Olmai_Card", + "Wraith_Dead_Card", + "Wraith_Card", + "Loli_Ruri_Card", + "Rotar_Zairo_Card", + "Lude_Card", + "Rybio_Card", + "Leaf_Cat_Card", + "Marin_Card", + "Merman_Card", + "Megalith_Card", + "Majoruros_Card", + "Civil_Servant_Card", + "Mini_Demon_Card", + "Mimic_Card", + "Mystcase_Card", + "Miyabi_Ningyo_Card", + "Violy_Card", + "Bon_Gun_Card", + "Brilight_Card", + "Bloody_Murderer_Card", + "Blazzer_Card", + "Sasquatch_Card", + "Live_Peach_Tree_Card", + "Succubus_Card", + "Sageworm_Card", + "Solider_Card", + "Skeleton_General_Card", + "Skel_Prisoner_Card", + "Stalactic_Golem_Card", + "Stem_Worm_Card", + "Stone_Shooter_Card", + "Sting_Card", + "Spring_Rabbit_Card", + "Sleeper_Card", + "Shinobi_Card", + "Increase_Soil_Card", + "Wild_Ginseng_Card", + "Baby_Leopard_Card", + "Anolian_Card", + "Cookie_XMAS_Card", + "Owl_Duke_Card", + "Owl_Baron_Card", + "Iron_Fist_Card", + "Arclouse_Card", + "Apocalips_Card", + "Alarm_Card", + "Am_Mut_Card", + "Assulter_Card", + "Aster_Card", + "Ancient_Mummy_Card", + "Ancient_Worm_Card", + "Elder_Card", + "Alligator_Card", + "Alice_Card", + "Orc_Lady_Card", + "Orc_Archer_Card", + "Wild_Rose_Card", + "Wicked_Nymph_Card", + "Wooden_Golem_Card", + "Wootan_Shooter_Card", + "Wootan_Fighter_Card", + "Evil_Cloud_Hermit_Card", + "Wind_Ghost_Card", + "Li_Me_Mang_Ryang_Card", + "Explosion_Card", + "Injustice_Card", + "Incubus_Card", + "Giant_Spider_Card", + "Giant_Honet_Card", + "Dancing_Dragon_Card", + "Shellfish_Card", + "Zombie_Master_Card", + "Zombie_Prisoner_Card", + "Zherlthsh_Card", + "Gibbet_Card", + "Deleter_Card", + "Geographer_Card", + "Zipper_Bear_Card", + "Tengu_Card", + "Greatest_General_Card", + "Chepet_Card", + "Choco_Card", + "Karakasa_Card", + "Kapha_Card", + "Carat_Card", + "Caterpillar_Card", + "Cat_O_Nine_Tail_Card", + "Kobold_Archer_Card", + "Cookie_Card", + "Quve_Card", + "Kraben_Card", + "Cramp_Card", + "Cruiser_Card", + "Cremy_Fear_Card", + "Clock_Card", + "Chimera_Card", + "Killer_Mantis_Card", + "Tamruan_Card", + "C_Tower_Manager_Card", + "Kind_Of_Beetle_Card", + "Tri_Joint_Card", + "Parasite_Card", + "Panzer_Goblin_Card", + "Permeter_Card", + "Fur_Seal_Card", + "Punk_Card", + "Penomena_Card", + "Pest_Card", + "Fake_Angel_Card", + "Freezer_Card", + "Hylozoist_Card", + "High_Orc_Card", + "Garm_Baby_Card", + "Harpy_Card", + "See_Otter_Card", + "Blood_Butterfly_Card", + "Hyegun_Card", + "Phendark_Card", + "Heater_Card", + "Agav_Card", + "Echio_Card", + "Vanberk_Card", + "Isilla_Card", + "Hodremlin_Card", + "Seeker_Card", + ("Snowier_Card",2), + "Siroma_Card", + "Ice_Titan_Card", + "Gazeti_Card", + "Muscipular_Card", + ("Drosera_Card",2), + "Roween_Card", + "Galion_Card", + ("Stapo_Card",3), + "Byorgue_Card", + "Sword_Guardian_Card", + "Bow_Guardian_Card", + "Salamander_Card", + "Kasa_Card", + ("Magmaring_Card",2), + "Imp_Card", + "Knocker_Card", + "Zombie_Slaughter_Card", + ("Ragged_Zombie_Card",2), + ("Hell_Poodle_Card",2), + ("Banshee_Card",2), + "Flame_Skull_Card", + "Necromancer_Card" +) +Gift_Box: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_1: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_2: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_3: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Gift_Box_4: ( + ("Oridecon_Stone",4), + ("Elunium_Stone",2), + ("Oridecon",2), + "Elunium", + "Emperium", + "Steel", + "Star_Crumb", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Gold", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Rouge", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Bunch_Of_Flowers", + "Wedding_Bouquet", + "Glass_Bead", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Baphomet_Doll", + "Osiris_Doll", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Four_Leaf_Clover", + "Poring__Card", + "Red_Socks_With_Holes", + "Red_Potion", + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Candy", + "Candy_Striper", + "Pet_Food", + "Well_Baked_Cookie", + "Piece_Of_Cake", + "Old_Blue_Box", + "Old_Violet_Box", + ("Gift_Box",19), + "Girl's_Diary" +) +Old_Blue_Box: ( + ("Guard_",3), + ("Buckler",3), + ("Buckler_",3), + ("Shield",3), + ("Shield_",3), + ("Mirror_Shield",3), + ("Mirror_Shield_",3), + ("Memorize_Book",3), + ("Novice_Guard",3), + ("Cotton_Shirt",3), + ("Cotton_Shirt_",3), + ("Leather_Jacket",3), + ("Leather_Jacket_",3), + ("Adventure_Suit",3), + ("Adventurere's_Suit_",3), + ("Mantle",3), + ("Mantle_",3), + ("Coat",3), + ("Coat_",3), + ("Mink_Coat",3), + ("Padded_Armor",3), + ("Padded_Armor_",3), + ("Chain_Mail",3), + ("Chain_Mail_",3), + ("Plate_Armor",3), + ("Plate_Armor_",3), + ("Clothes_Of_The_Lord",3), + ("Formal_Suit",3), + ("Silk_Robe",3), + ("Silk_Robe_",3), + ("Scapulare",3), + ("Scapulare_",3), + ("Saint_Robe",3), + ("Saint_Robe_",3), + ("Wooden_Mail",3), + ("Wooden_Mail_",3), + ("Tights",3), + ("Tights_",3), + ("Silver_Robe",3), + ("Silver_Robe_",3), + ("Thief_Clothes",3), + ("Thief_Clothes_",3), + ("Ninja_Suit",3), + ("Wedding_Dress",3), + ("G_Strings",3), + ("Novice_Breast",3), + ("Full_Plate_Armor",3), + ("Novice_Plate",3), + ("Sandals",3), + ("Sandals_",3), + ("Shoes",3), + ("Shoes_",3), + ("Boots",3), + ("Boots_",3), + ("Chrystal_Pumps",3), + ("Cuffs",3), + ("Spiky_Heel",3), + ("Grave",3), + ("Novice_Boots",3), + ("Hood",3), + ("Hood_",3), + ("Muffler",3), + ("Muffler_",3), + ("Manteau",3), + ("Manteau_",3), + ("Cape_Of_Ancient_Lord",3), + ("Ragamuffin_Cape",3), + ("Novice_Hood",3), + ("Ring",3), + ("Earring",3), + ("Necklace",3), + ("Glove",3), + ("Brooch",3), + ("Clip",3), + ("Rosary",3), + ("Skul_Ring",3), + ("Gold_Ring",3), + ("Silver_Ring",3), + ("Flower_Ring",3), + ("Diamond_Ring",3), + ("Mitten_Of_Presbyter",3), + ("Matyr's_Flea_Guard",3), + ("Belt",3), + ("Novice_Armlet",3), + ("Katana",3), + ("Katana_",3), + ("Slayer",3), + ("Slayer_",3), + ("Bastard_Sword",3), + ("Bastard_Sword_",3), + ("Two_Hand_Sword",3), + ("Two_Hand_Sword_",3), + ("Broad_Sword",3), + ("Broad_Sword_",3), + ("Claymore",3), + ("Jur",3), + ("Jur_",3), + ("Katar",3), + ("Katar_",3), + ("Jamadhar",3), + ("Jamadhar_",3), + ("Katar_Of_Cold_Icicle",3), + ("Katar_Of_Thornbush",3), + ("Katar_Of_Raging_Blaze",3), + ("Katar_Of_Piercing_Wind",3), + ("Battle_Axe",3), + ("Battle_Axe_",3), + ("Hammer",3), + ("Hammer_",3), + ("Buster",3), + ("Buster_",3), + ("Two_Handed_Axe",3), + ("Two_Handed_Axe_",3), + ("Lance",3), + ("Lance_",3), + ("Guisarme",3), + ("Guisarme_",3), + ("Glaive",3), + ("Glaive_",3), + ("Partizan",3), + ("Partizan_",3), + ("Trident",3), + ("Trident_",3), + ("Halberd",3), + ("Halberd_",3), + ("Staff_Of_Soul",3), + ("Bow",3), + ("Bow_",3), + ("Composite_Bow",3), + ("Composite_Bow_",3), + ("Great_Bow",3), + ("Great_Bow_",3), + ("CrossBow",3), + ("CrossBow_",3), + ("Arbalest",3), + ("Kakkung",3), + ("Arbalest_",3), + ("Kakkung_",3), + ("Hunter_Bow",3), + ("Sword",6), + ("Sword_",6), + ("Falchion",6), + ("Falchion_",6), + ("Blade",6), + ("Blade_",6), + ("Lapier",6), + ("Lapier_",6), + ("Scimiter",6), + ("Scimiter_",6), + ("Tsurugi",6), + ("Tsurugi_",6), + ("Ring_Pommel_Saber",6), + ("Haedonggum",6), + ("Orcish_Sword",6), + ("Ring_Pommel_Saber_",6), + ("Saber",6), + ("Saber_",6), + ("Hae_Dong_Gum_",6), + ("Flamberge",6), + ("Knife",3), + ("Knife_",3), + ("Cutter",3), + ("Cutter_",3), + ("Main_Gauche",3), + ("Main_Gauche_",3), + ("Dirk",3), + ("Dirk_",3), + ("Dagger",3), + ("Dagger_",3), + ("Stiletto",3), + ("Stiletto_",3), + ("Gladius",3), + ("Gladius_",3), + ("Damascus",3), + ("Damascus_",3), + ("Novice_Knife",3), + ("Axe",3), + ("Axe_",3), + ("Orcish_Axe",3), + ("Javelin",9), + ("Javelin_",9), + ("Spear",9), + ("Spear_",9), + ("Pike",9), + ("Pike_",9), + ("Club",6), + ("Club_",6), + ("Mace",6), + ("Mace_",6), + ("Smasher",6), + ("Smasher_",6), + ("Flail",6), + ("Flail_",6), + ("Morning_Star",6), + ("Morning_Star_",6), + ("Sword_Mace",6), + ("Sword_Mace_",6), + ("Chain",6), + ("Chain_",6), + ("Stunner",6), + ("Book",3), + ("Bible",3), + ("Tablet",3), + ("Book_Of_Billows",3), + ("Book_Of_Mother_Earth",3), + ("Book_Of_Blazing_Sun",3), + ("Book_Of_Gust_Of_Wind",3), + ("Girl's_Diary",3), + ("Rod",3), + ("Rod_",3), + ("Wand",3), + ("Wand_",3), + ("Staff",3), + ("Staff_",3), + ("Arc_Wand",3), + ("Arc_Wand_",3), + ("Mighty_Staff",3), + ("Blessed_Wand",3), + ("Bone_Wand",3), + ("Waghnakh",3), + ("Waghnakh_",3), + ("Knuckle_Duster",3), + ("Knuckle_Duster_",3), + ("Hora",3), + ("Hora_",3), + ("Fist",3), + ("Fist_",3), + ("Claw",3), + ("Claw_",3), + ("Finger",3), + ("Finger_",3), + ("Violin",3), + ("Violin_",3), + ("Mandolin",3), + ("Mandolin_",3), + ("Lute",3), + ("Lute_",3), + ("Guitar",3), + ("Guitar_",3), + ("Harp",3), + ("Harp_",3), + ("Guh_Moon_Goh",3), + ("Guh_Moon_Goh_",3), + ("Rope",3), + ("Rope_",3), + ("Line",3), + ("Line_",3), + ("Wire",3), + ("Wire_",3), + ("Rante",3), + ("Rante_",3), + ("Tail",3), + ("Tail_",3), + ("Whip",3), + ("Whip_",3), + ("Sunglasses",3), + ("Glasses",3), + ("Diver's_Goggles",3), + ("Wedding_Veil",3), + ("Fancy_Flower",3), + ("Ribbon",3), + ("Ribbon_",3), + ("Hair_Band",3), + ("Bandana",3), + ("Eye_Bandage",3), + ("Cat_Hairband",3), + ("Bunny_Band",3), + ("Flower_Hairband",3), + ("Biretta",3), + ("Biretta_",3), + ("Flu_Mask",3), + ("Hat",3), + ("Hat_",3), + ("Turban",3), + ("Turban_",3), + ("Cap",3), + ("Cap_",3), + ("Helm",3), + ("Helm_",3), + ("Gemmed_Sallet",3), + ("Gemmed_Sallet_",3), + ("Circlet",3), + ("Circlet_",3), + ("Santa's_Hat",3), + ("One_Eyed_Glass",3), + ("Granpa_Beard",3), + ("Luxury_Sunglasses",3), + ("Spinning_Eyes",3), + ("Big_Sis'_Ribbon",3), + ("Sweet_Gents",3), + ("Golden_Gear",3), + ("Oldman's_Romance",3), + ("Western_Grace",3), + ("Fillet",3), + ("Holy_Bonnet",3), + ("Star_Sparkling",3), + ("Sunflower",3), + ("Snowy_Horn",3), + ("Mini_Propeller",3), + ("Mini_Glasses",3), + ("Pierrot_Nose",3), + ("Gangster_Patch",3), + ("Ganster_Mask",3), + ("Iron_Cane",3), + ("Cigar",3), + ("Smoking_Pipe",3), + ("Centimental_Flower",3), + ("Centimental_Leaf",3), + ("Jack_A_Dandy",3), + ("Red_Bandana",3), + ("Eagle_Eyes",3), + ("Nurse_Cap",3), + ("Bomb_Wick",3), + ("Spirit_Chain",3), + ("Apple_Of_Archer",3), + ("Pirate_Bandana",3), + ("Poo_Poo_Hat",3), + ("Funeral_Costume",3), + ("Masquerade",3), + ("Star_Dust",3), + ("Blinker",3), + ("Green_Feeler",3), + ("Viking_Helm",3), + ("Joker_Jester",3), + ("Machoman_Glasses",3), + ("Puppy_Love",3), + ("Safety_Helmet",3), + ("Indian_Hair_Piece",3), + ("Antenna",3), + ("Fin_Helm",3), + ("Egg_Shell",3), + ("Panda_Cap",3), + ("Poring_Hat",3), + ("Fruit_Shell",3), + ("Novice_Egg_Cap",3), + ("Mr_Smile",3), + ("Mr_Scream",3), + ("Goblini_Mask",3), + ("Gas_Mask",3), + ("Goblin_Mask_02",3), + ("Goblin_Mask_03",3), + ("Goblin_Mask_04",3), + ("Goggle",3), + ("Goggle_",3), + ("Skull_Helm",3), + ("Monster_Oxygen_Mask",3), + ("Transparent_Headgear",3), + ("Pacifier",3), + ("Wig",3), + ("Queen's_Hair_Ornament",3), + ("Silk_Ribbon",3), + ("Punisher",3), + ("Wild_Flower",3), + ("Battered_Pot",3), + ("Stellar_Hairpin",3), + ("Tiny_Egg_Shell",3), + ("Backpack",3), + ("Rocker_Glasses",3), + ("Green_Lace",3), + ("Golden_Bell",3), + ("Bark_Shorts",3), + ("Monkey_Circlet",3), + ("Red_Muffler",3), + ("Sword_Of_Grave_Keeper",3), + ("Ora_Ora",12), + ("Animal_Blood",12), + ("Hinalle",12), + ("Aloe",12), + ("Clover",12), + ("Four_Leaf_Clover",12), + ("Singing_Plant",12), + ("Ment",12), + ("Illusion_Flower",12), + ("Shoot",12), + ("Flower",12), + ("Emperium",12), + ("Yellow_Gemstone",12), + ("Red_Gemstone",12), + ("Blue_Gemstone",12), + ("Dark_Red_Jewel",12), + ("Violet_Jewel",12), + ("Skyblue_Jewel",12), + ("Azure_Jewel",12), + ("Scarlet_Jewel",12), + ("Cardinal_Jewel",12), + ("Cardinal_Jewel_",12), + ("Red_Jewel",12), + ("Blue_Jewel",12), + ("White_Jewel",12), + ("Golden_Jewel",12), + ("Bluish_Green_Jewel",12), + ("Crystal_Jewel",12), + ("Crystal_Jewel_",12), + ("Crystal_Jewel__",12), + ("Crystal_Jewel___",12), + ("Red_Frame",12), + ("Blue_Porcelain",12), + ("White_Platter",12), + ("Black_Ladle",12), + ("Pencil_Case",12), + ("Rouge",12), + ("Stuffed_Doll",12), + ("Poring_Doll",12), + ("Chonchon_Doll",12), + ("Spore_Doll",12), + ("Bunch_Of_Flowers",12), + ("Wedding_Bouquet",12), + ("Glass_Bead",12), + ("Crystal_Mirror",12), + ("Witherless_Rose",12), + ("Frozen_Rose",12), + ("Baphomet_Doll",12), + ("Osiris_Doll",12), + ("Grasshopper_Doll",12), + ("Monkey_Doll",12), + ("Raccoondog_Doll",12), + ("Oridecon_Stone",12), + ("Elunium_Stone",12), + ("Danggie",12), + ("Tree_Root",12), + ("Reptile_Tongue",12), + ("Scorpion's_Tail",12), + ("Stem",12), + ("Pointed_Scale",12), + ("Resin",12), + ("Spawn",12), + ("Jellopy",12), + ("Garlet",12), + ("Scell",12), + ("Zargon",12), + ("Tooth_Of_Bat",12), + ("Fluff",12), + ("Chrysalis",12), + ("Feather_Of_Birds",12), + ("Talon",12), + ("Sticky_Webfoot",12), + ("Animal's_Skin",12), + ("Claw_Of_Wolves",12), + ("Mushroom_Spore",12), + ("Orcish_Cuspid",12), + ("Evil_Horn",12), + ("Powder_Of_Butterfly",12), + ("Bill_Of_Birds",12), + ("Scale_Of_Snakes",12), + ("Insect_Feeler",12), + ("Immortal_Heart",12), + ("Rotten_Bandage",12), + ("Orcish_Voucher",12), + ("Skel_Bone",12), + ("Mementos",12), + ("Shell",12), + ("Scales_Shell",12), + ("Posionous_Canine",12), + ("Sticky_Mucus",12), + ("Bee_Sting",12), + ("Grasshopper's_Leg",12), + ("Nose_Ring",12), + ("Yoyo_Tail",12), + ("Solid_Shell",12), + ("Horseshoe",12), + ("Raccoon_Leaf",12), + ("Snail's_Shell",12), + ("Horn",12), + ("Bear's_Foot",12), + ("Feather",12), + ("Heart_Of_Mermaid",12), + ("Fin",12), + ("Cactus_Needle",12), + ("Stone_Heart",12), + ("Shining_Scales",12), + ("Worm_Peelings",12), + ("Gill",12), + ("Decayed_Nail",12), + ("Horrendous_Mouth",12), + ("Rotten_Scale",12), + ("Nipper",12), + ("Conch",12), + ("Tentacle",12), + ("Sharp_Scale",12), + ("Crap_Shell",12), + ("Clam_Shell",12), + ("Flesh_Of_Clam",12), + ("Turtle_Shell",12), + ("Voucher_Of_Orcish_Hero",12), + ("Gold",12), + ("Alchol",12), + ("Detrimindexta",12), + ("Karvodailnirol",12), + ("Counteragent",12), + ("Mixture",12), + ("Scarlet_Dyestuffs",12), + ("Lemon_Dyestuffs",12), + ("Cobaltblue_Dyestuffs",12), + ("Darkgreen_Dyestuffs",12), + ("Orange_Dyestuffs",12), + ("Violet_Dyestuffs",12), + ("White_Dyestuffs",12), + ("Black_Dyestuffs",12), + ("Oridecon",12), + ("Elunium",12), + ("Anvil",12), + ("Oridecon_Anvil",12), + ("Golden_Anvil",12), + ("Emperium_Anvil",12), + ("Boody_Red",12), + ("Crystal_Blue",12), + ("Wind_Of_Verdure",12), + ("Yellow_Live",12), + ("Flame_Heart",12), + ("Mistic_Frozen",12), + ("Rough_Wind",12), + ("Great_Nature",12), + ("Iron",12), + ("Steel",12), + ("Star_Crumb",12), + ("Sparkling_Dust",12), + ("Iron_Ore",12), + ("Coal",12), + ("Patriotism_Marks",12), + ("Hammer_Of_Blacksmith",12), + ("Old_Magic_Book",12), + ("Penetration",12), + ("Frozen_Heart",12), + ("Sacred_Marks",12), + ("Phracon",12), + ("Emveretarcon",12), + ("Lizard_Scruff",12), + ("Colorful_Shell",12), + ("Jaws_Of_Ant",12), + ("Thin_N'_Long_Tongue",12), + ("Rat_Tail",12), + ("Moustache_Of_Mole",12), + ("Nail_Of_Mole",12), + ("Wooden_Block",12), + ("Long_Hair",12), + ("Dokkaebi_Horn",12), + ("Fox_Tail",12), + ("Fish_Tail",12), + ("Chinese_Ink",12), + ("Spiderweb",12), + ("Acorn",12), + ("Porcupine_Spike",12), + ("Wild_Boar's_Mane",12), + ("Tiger's_Skin",12), + ("Tiger_Footskin",12), + ("Limb_Of_Mantis",12), + ("Blossom_Of_Maneater",12), + ("Root_Of_Maneater",12), + ("Cobold_Hair",12), + ("Dragon_Canine",12), + ("Dragon_Scale",12), + ("Dragon_Train",12), + ("Petite_DiablOfs_Horn",12), + ("Petite_DiablOfs_Wing",12), + ("Elder_Pixie's_Beard",12), + ("Lantern",12), + ("Short_Leg",12), + ("Nail_Of_Orc",12), + ("Tooth_Of_",12), + ("Sacred_Masque",12), + ("Tweezer",12), + ("Head_Of_Medusa",12), + ("Slender_Snake",12), + ("Skirt_Of_Virgin",12), + ("Tendon",12), + ("Detonator",12), + ("Single_Cell",12), + ("Tooth_Of_Ancient_Fish",12), + ("Lip_Of_Ancient_Fish",12), + ("Earthworm_Peeling",12), + ("Grit",12), + ("Moth_Dust",12), + ("Wing_Of_Moth",12), + ("Transparent_Cloth",12), + ("Golden_Hair",12), + ("Starsand_Of_Witch",12), + ("Pumpkin_Head",12), + ("Sharpened_Cuspid",12), + ("Reins",12), + ("Booby_Trap",12), + ("Tree_Of_Archer_1",12), + ("Tree_Of_Archer_2",12), + ("Tree_Of_Archer_3",12), + ("Morocc_Potion",12), + ("Payon_Potion",12), + ("Empty_Cylinder",12), + ("Empty_Potion",12), + ("Short_Daenggie",12), + ("Needle_Of_Alarm",12), + ("Round_Shell",12), + ("Worn_Out_Page",12), + ("Manacles",12), + ("Worn_Out_Prison_Uniform",12), + ("Mould_Powder",12), + ("Ogre_Tooth",12), + ("Anolian_Skin",12), + ("Mud_Lump",12), + ("Skull",12), + ("Wing_Of_Red_Bat",12), + ("Claw_Of_Rat",12), + ("Stiff_Horn",12), + ("Glitter_Shell",12), + ("Tail_Of_Steel_Scorpion",12), + ("Claw_Of_Monkey",12), + ("Tough_Scalelike_Stem",12), + ("Coral_Reef",12), + ("Old_Portrait",12), + ("Bookclip_In_Memory",12), + ("Spoon_Stub",12), + ("Key_Of_Clock_Tower",12), + ("Underground_Key",12), + ("Claw_Of_Desert_Wolf",12), + ("Old_Frying_Pan",12), + ("Piece_Of_Egg_Shell",12), + ("Poison_Spore",12), + ("Red_Socks_With_Holes",12), + ("Matchstick",12), + ("Fang_Of_Garm",12), + ("Yarn",12), + ("Fine_Grit",12), + ("Alice's_Apron",12), + ("Talon_Of_Griffin",12), + ("Stone",12), + ("Cyfar",12), + ("Brigan",12), + ("Cargo_Free_Ticket",12), + ("Warp_Free_Ticket",12), + ("Cart_Free_Ticket",12), + ("Soft_Feather",12), + ("Dragon_Fly_Wing",12), + ("Sea_Otter_Leather",12), + ("Ice_Piece",12), + ("Stone_Piece",12), + ("Burn_Tree",12), + ("Broken_Armor_Piece",12), + ("Broken_Shell",12), + ("Tatters_Clothes",12), + ("Rust_Suriken",12), + ("Wheel",12), + ("Mystery_Piece",12), + ("Broken_Steel_Piece",12), + ("Cold_Magma",12), + ("Burning_Heart",12), + ("Live_Coal",12), + ("Old_Magic_Circle",12), + ("Sharp_Leaf",12), + ("Peco_Wing_Feather",12), + ("Goat's_Horn",12), + ("Gaoat's_Skin",12), + ("Boroken_Shiled_Piece",12), + ("Shine_Spear_Blade",12), + ("Vroken_Sword",12), + ("Smooth_Paper",12), + ("Fright_Paper_Blade",12), + ("Broken_Pharaoh_Symbol",12), + ("Tutankhamen's_Mask",12), + ("Harpy's_Feather",12), + ("Harpy's_Claw",12), + ("Rent_Spell_Book",12), + ("Rent_Scroll",12), + ("Spawns",12), + ("Burning_Horse_Shoe",12), + ("Honey_Jar",12), + ("Hot_Hair",12), + ("Dragon's_Skin",12), + ("Sand_Lump",12), + ("Scropion's_Nipper",12), + ("Large_Jellopy",12), + ("Medicine_Bowl",12), + ("Fire_Bottle",12), + ("Acid_Bottle",12), + ("MenEater_Plant_Bottle",12), + ("Mini_Bottle",12), + ("Coating_Bottle",12), + ("Yellow_Plate",12), + ("Bamboo_Cut",12), + ("Oil_Paper",12), + ("Glossy_Hair",12), + ("Old_Japaness_Clothes",12), + ("Poison_Powder",12), + ("Poison_Toad's_Skin",12), + ("Broken_Shuriken",12), + ("Black_Mask",12), + ("Broken_Wine_Vessel",12), + ("Tengu's_Nose",12), + ("Black_Bear's_Skin",12), + ("Cloud_Piece",12), + ("Sharp_Feeler",12), + ("Hard_Peach",12), + ("Limpid_Celestial_Robe",12), + ("Soft_Silk_Cloth",12), + ("Mystery_Iron_Bit",12), + ("Great_Wing",12), + ("Taegeuk_Plate",12), + ("Tuxedo",12), + ("Leopard_Skin",12), + ("Leopard_Talon",12), + ("Packing_Ribbon",12), + ("Packing_Paper",12), + ("Cacao",12), + ("Thin_Stem",12), + ("Festival_Mask",12), + ("Browny_Root",12), + ("Heart_Of_Tree",12), + ("Solid_Peeling",12), + ("Lamplight",12), + ("Blade_Of_Pinwheel",12), + ("Germinating_Sprout",12), + ("Soft_Leaf",12), + ("Air_Rifle",12), + ("Shoulder_Protection",12), + ("Tough_Vines",12), + ("Great_Leaf",12), + ("Flexible_String",12), + ("Log",12), + ("Beetle_Nipper",12), + ("Solid_Twig",12), + ("Piece_Of_Black_Cloth",12), + ("Black_Kitty_Doll",12), + ("Old_Manteau",12), + ("Rusty_Cleaver",12), + ("Dullahan's_Helm",12), + ("Dullahan_Armor",12), + ("Rojerta_Piece",12), + ("Hanging_Doll",12), + ("Needle_Pouch",12), + ("Bat_Cage",12), + ("Broken_Needle",12), + ("Red_Scarf",12), + ("Spool",12), + ("Rotten_Rope",12), + ("Striped_Socks",12), + ("Ectoplasm",12), + ("Tangled_Chain",12), + ("Tree_Knot",12), + ("Distorted_Portrait",12), + ("Pumpkin_Bucket",12), + ("Fan",12), + ("Cat_Eyed_Stone",12), + ("Dried_Sand",12), + ("Dragon_Horn",12), + ("Dragon_Fang",12), + ("Tiger_Skin_Panties",12), + ("Little_Blacky_Ghost",12), + ("Bib",12), + ("Milk_Bottle",12), + ("Arrow",12), + ("Silver_Arrow",12), + ("Fire_Arrow",12), + ("Steel_Arrow",12), + ("Crystal_Arrow",12), + ("Arrow_Of_Wind",12), + ("Stone_Arrow",12), + ("Immatrial_Arrow",12), + ("Stun_Arrow",12), + ("Freezing_Arrow",12), + ("Flash_Arrow",12), + ("Curse_Arrow",12), + ("Rusty_Arrow",12), + ("Poison_Arrow",12), + ("Incisive_Arrow",12), + ("Oridecon_Arrow",12), + ("Arrow_Of_Shadow",12), + ("Sleep_Arrow",12), + ("Silence_Arrow",12), + ("Iron_Arrow",12), + ("Red_Potion",12), + ("Orange_Potion",12), + ("Yellow_Potion",12), + ("Green_Potion",11), + ("Red_Herb",12), + ("Yellow_Herb",12), + ("White_Herb",12), + ("Blue_Herb",12), + ("Green_Herb",12), + ("Apple",12), + ("Banana",12), + ("Grape",12), + ("Carrot",12), + ("Sweet_Potato",12), + ("Meat",12), + ("Honey",12), + ("Milk",12), + ("Leaflet_Of_Hinal",12), + ("Leaflet_Of_Aloe",12), + ("Fruit_Of_Mastela",12), + ("Holy_Water",12), + ("Panacea",12), + ("Monster's_Feed",12), + ("Candy",12), + ("Candy_Striper",12), + ("Apple_Juice",12), + ("Banana_Juice",12), + ("Grape_Juice",12), + ("Carrot_Juice",12), + ("Pumpkin",12), + ("Ice_Cream",12), + ("Pet_Food",12), + ("Well_Baked_Cookie",12), + ("Piece_Of_Cake",12), + ("Fish_Slice",12), + ("Red_Slim_Potion",12), + ("Yellow_Slim_Potion",12), + ("White_Slim_Potion",12), + ("Cheese",12), + ("Nice_Sweet_Potato",12), + ("Popped_Rice",12), + ("Shusi",12), + ("Bun",12), + ("Rice_Cake",12), + ("Chocolate",12), + ("White_Chocolate",12), + "Wing_Of_Butterfly", + ("Old_Blue_Box",1173), + ("Anodyne",12), + ("Aloebera",12), + ("Yggdrasilberry",12), + ("Seed_Of_Yggdrasil",12), + ("Amulet",12), + ("Leaf_Of_Yggdrasil",12), + ("Spectacles",12), + ("Portable_Furnace",12), + ("Iron_Hammer",12), + ("Golden_Hammer",12), + ("Oridecon_Hammer",12), + ("Worn_Out_Scroll",12), + ("Unripe_Apple",12), + ("Orange_Juice",12), + ("Bitter_Herb",12), + ("Rainbow_Carrot",12), + ("Earthworm_The_Dude",12), + ("Rotten_Fish",12), + ("Lusty_Iron",12), + ("Monster_Juice",12), + ("Sweet_Milk",12), + ("Well_Dried_Bone",12), + ("Singing_Flower",12), + ("Dew_Laden_Moss",12), + ("Deadly_Noxious_Herb",12), + ("Fatty_Chubby_Earthworm",12), + ("Baked_Yam",12), + ("Tropical_Banana",12), + ("Horror_Of_Tribe",12), + ("No_Recipient",12), + ("Old_Broom",12), + ("Silver_Knife_Of_Chaste",12), + ("Armlet_Of_Obedience",12), + ("Shining_Stone",12), + ("Contracts_In_Shadow",12), + ("Book_Of_Devil",12), + ("Pet_Incubator",12), + ("Gift_Box",312), + ("Center_Potion",12), + ("Awakening_Potion",12), + ("Berserk_Potion",12), + ("Heart_Of_Her",12), + ("Korea_Rice_Cake",12), + ("Gift_Box_1",12), + ("Gift_Box_2",12), + ("Gift_Box_3",12), + ("Gift_Box_4",12), + ("Handsei",12), + ("Poison_Bottle",12), + ("Gold_Pill",12), + ("Guard",2), + "Coronet", + "Angelic_Chain", + "Satanic_Chain", + "Sharp_Gear", + "Ring_", + "Earring_", + "Necklace_", + "Glove_", + "Brooch_", + "Rosary_", + "Gemmed_Crown", + "Pair_Of_Red_Ribbon", + "Cinquedea", + "Kindling_Dagger", + "Obsidian_Dagger", + "Fisherman's_Dagger", + "Jujube_Dagger", + "Dragon_Killer", + "Ginnungagap", + "Town_Sword", + "Town_Sword_", + "Star_Dust_Blade", + "Gae_Bolg", + ("Various_Jur",2), + "Nail_Of_Loki", + "Bloody_Roar", + "Unholy_Touch", + "Hypnotist's_Staff", + "Hypnotist's_Staff_", + "Staff_Of_Wing", + "Luna_Bow", + "Dragon_Wing", + "Electric_Wire", + "Whip_Of_Red_Flame", + "Whip_Of_Ice_Piece", + "Whip_Of_Earth", + "Jump_Rope", + "Bladed_Whip", + "Guitar_Of_Passion", + "Guitar_Of_Blue_Solo", + "Guitar_Of_Vast_Land", + "Guitar_Of_Gentle_Breeze", + "Claw_Of_Garm", + "Legacy_Of_Dragon", + "Coward", + "Coward_", + "Windhawk", + "Queen's_Whip", + "Oriental_Lute", + "Diary_Of_Great_Sage", + "Hardback", + "Survival_Rod", + "Survival_Rod_", + "Survival_Rod2", + "Survival_Rod2_", + "Ear_Of_Puppy", + "Angry_Mouth", + "Novice_Shield", + "Novice_Manteau", + "Celestial_Robe", + "Pauldron", + "Novice_Shoes", + "Fedora", + "Fedora_", + "Super_Novice_Hat", + "Super_Novice_Hat_", + "Galapago_Cap", + "Banana_Hat", + "Wing_Of_Eagle", + "Cursed_Lucky_Brooch", + "Shinobi's_Sash", + "Hyper_Changer", + "Dark_Crystal_Fragment", + "Long_Limb", + "Screw", + "Old_Pick", + "Old_Steel_Plate", + "Air_Pollutant", + "Fragment_Of_Crystal", + "Poisonous_Gas", + "Battered_Kettle", + "Tube", + "Fluorescent_Liquid", + "Headlamp", + "Red_Feather", + "Blue_Feather", + "Cursed_Seal", + "Tri_Headed_Dragon_Head", + "Treasure_Box", + "Dragonball_Green", + "Dragonball_Blue", + "Dragonball_Red", + "Dragonball_Yellow", + "Bloody_Page", + "Piece_Of_Bone_Armor", + "Scale_Of_Red_Dragon", + "Yellow_Spice", + "Sweet_Sauce", + "Plain_Sauce", + "Hot_Sauce", + "Red_Spice", + "Cooking_Oil", + "Cookbook01", + "Cookbook02", + "Cookbook03", + "Cookbook04", + "Cookbook05", + "Pot", + "Burnt_Parts", + "Pocket_Watch", + ("Ice_Heart",21), + ("Ice_Scale",22), + ("Bloody_Rune",22), + ("Rotten_Meat",22), + ("Sticky_Poison",22), + "Suspicious_Hat", + "White_Mask", + ("Old_White_Cloth",33), + ("Clattering_Skull",32), + ("Broken_Farming_Utensil",34), + "Orleans_Server", + "Thorny_Buckler", + "Orleans_Gown", + "Strong_Shield", + "Angel's_Arrival", + "Magni_Cap", + "Censor_Bar", + "Inverse_Scale", + "Blood_Tears", + "Doom_Slayer", + "Heart_Breaker", + "Hurricane_Fury", + "Ahlspiess", + "Huuma_Calm_Mind", + "Burning_Bow", + "Frozen_Bow", + "Earth_Bow", + "Gust_Bow", + "Magma_Fist", + "Icicle_Fist", + "Electric_Fist", + "Seismic_Fist", + "Combo_Battle_Glove", + "Base_Guitar", + "Electric_Eel", + "Sea_Witch_Foot", + "Carrot_Whip", + "Bullet", + "Silver_Bullet", + "Shell_Of_Blood", + "Flare_Sphere", + "Lighting_Sphere", + "Poison_Sphere", + "Blind_Sphere", + "Freezing_Sphere", + "Gate_KeeperDD", + "Thunder_P", + "Long_Barrel", + ("Lever_Action_Rifle",2), + "Long_Barrel_" +) +Old_Violet_Box: ( + ("Buckler_",7), + ("Shield_",7), + ("Mirror_Shield_",7), + ("Memorize_Book",7), + ("Novice_Guard",7), + ("Cotton_Shirt_",7), + ("Leather_Jacket_",7), + ("Adventurere's_Suit_",7), + ("Mantle_",7), + ("Coat_",7), + ("Mink_Coat",7), + ("Padded_Armor_",7), + ("Chain_Mail_",7), + ("Plate_Armor_",7), + ("Clothes_Of_The_Lord",7), + ("Formal_Suit",7), + ("Silk_Robe_",7), + ("Scapulare_",7), + ("Saint_Robe_",7), + ("Wooden_Mail_",7), + ("Tights_",7), + ("Silver_Robe_",7), + ("Thief_Clothes_",7), + ("Ninja_Suit",7), + ("Wedding_Dress",7), + ("G_Strings",7), + ("Novice_Breast",7), + ("Novice_Plate",7), + ("Sandals_",7), + ("Shoes_",7), + ("Boots_",7), + ("Chrystal_Pumps",7), + ("Cuffs",7), + ("Spiky_Heel",7), + ("Grave",7), + ("Novice_Boots",7), + ("Hood_",7), + ("Muffler_",7), + ("Manteau_",7), + ("Cape_Of_Ancient_Lord",7), + ("Ragamuffin_Cape",7), + ("Novice_Hood",7), + ("Ring",7), + ("Earring",7), + ("Necklace",7), + ("Glove",7), + ("Brooch",7), + ("Clip",7), + ("Rosary",7), + ("Skul_Ring",7), + ("Gold_Ring",7), + ("Silver_Ring",7), + ("Flower_Ring",7), + ("Diamond_Ring",7), + ("Mitten_Of_Presbyter",7), + ("Matyr's_Flea_Guard",7), + ("Belt",7), + ("Novice_Armlet",7), + ("Katana_",7), + ("Slayer_",7), + ("Bastard_Sword_",7), + ("Two_Hand_Sword_",7), + ("Broad_Sword_",7), + ("Claymore",7), + ("Jur_",7), + ("Katar_",7), + ("Jamadhar_",7), + ("Katar_Of_Cold_Icicle",7), + ("Katar_Of_Thornbush",7), + ("Katar_Of_Raging_Blaze",7), + ("Katar_Of_Piercing_Wind",7), + ("Battle_Axe_",7), + ("Hammer_",7), + ("Buster_",7), + ("Two_Handed_Axe_",7), + ("Lance_",7), + ("Guisarme_",7), + ("Glaive_",7), + ("Partizan_",7), + ("Trident_",7), + ("Halberd_",7), + ("Staff_Of_Soul",7), + ("Bow_",7), + ("Composite_Bow_",7), + ("Great_Bow_",7), + ("CrossBow_",7), + ("Arbalest_",7), + ("Kakkung_",7), + ("Hunter_Bow",7), + ("Sword_",7), + ("Falchion_",7), + ("Blade_",7), + ("Lapier_",7), + ("Scimiter_",7), + ("Tsurugi_",7), + ("Orcish_Sword",7), + ("Ring_Pommel_Saber_",7), + ("Saber_",7), + ("Hae_Dong_Gum_",7), + ("Flamberge",7), + ("Knife_",7), + ("Cutter_",7), + ("Main_Gauche_",7), + ("Dirk_",7), + ("Dagger_",7), + ("Stiletto_",7), + ("Gladius_",7), + ("Damascus_",7), + ("Novice_Knife",7), + ("Axe_",7), + ("Orcish_Axe",7), + ("Javelin_",7), + ("Spear_",7), + ("Pike_",7), + ("Club_",7), + ("Mace_",7), + ("Smasher_",7), + ("Flail_",7), + ("Morning_Star_",7), + ("Sword_Mace_",7), + ("Chain_",7), + ("Stunner",7), + ("Book",7), + ("Bible",7), + ("Tablet",7), + ("Book_Of_Billows",7), + ("Book_Of_Mother_Earth",7), + ("Book_Of_Blazing_Sun",7), + ("Book_Of_Gust_Of_Wind",7), + ("Girl's_Diary",7), + ("Rod_",7), + ("Wand_",7), + ("Staff_",7), + ("Arc_Wand_",7), + ("Mighty_Staff",7), + ("Blessed_Wand",7), + ("Bone_Wand",7), + ("Waghnakh_",7), + ("Knuckle_Duster_",7), + ("Hora_",7), + ("Fist_",7), + ("Claw_",7), + ("Finger_",7), + ("Violin_",7), + ("Mandolin_",7), + ("Lute_",7), + ("Guitar_",7), + ("Harp_",7), + ("Guh_Moon_Goh_",7), + ("Rope_",7), + ("Line_",7), + ("Wire_",7), + ("Rante_",7), + ("Tail_",7), + ("Whip_",7), + ("Sunglasses",7), + ("Glasses",7), + ("Diver's_Goggles",7), + ("Wedding_Veil",7), + ("Fancy_Flower",7), + ("Ribbon",7), + ("Ribbon_",7), + ("Hair_Band",7), + ("Bandana",7), + ("Eye_Bandage",7), + ("Cat_Hairband",7), + ("Bunny_Band",7), + ("Flower_Hairband",7), + ("Biretta",7), + ("Biretta_",7), + ("Flu_Mask",7), + ("Hat",7), + ("Hat_",7), + ("Turban",7), + ("Turban_",7), + ("Cap",7), + ("Cap_",7), + ("Helm",7), + ("Helm_",7), + ("Gemmed_Sallet",7), + ("Gemmed_Sallet_",7), + ("Circlet",7), + ("Circlet_",7), + ("Santa's_Hat",7), + ("One_Eyed_Glass",7), + ("Granpa_Beard",7), + ("Luxury_Sunglasses",7), + ("Spinning_Eyes",7), + ("Big_Sis'_Ribbon",7), + ("Sweet_Gents",7), + ("Golden_Gear",7), + ("Oldman's_Romance",7), + ("Western_Grace",7), + ("Fillet",7), + ("Holy_Bonnet",7), + ("Star_Sparkling",7), + ("Sunflower",7), + ("Snowy_Horn",7), + ("Mini_Propeller",7), + ("Mini_Glasses",7), + ("Pierrot_Nose",7), + ("Gangster_Patch",7), + ("Ganster_Mask",7), + ("Iron_Cane",7), + ("Cigar",7), + ("Smoking_Pipe",7), + ("Centimental_Flower",7), + ("Centimental_Leaf",7), + ("Jack_A_Dandy",7), + ("Red_Bandana",7), + ("Eagle_Eyes",7), + ("Nurse_Cap",7), + ("Bomb_Wick",7), + ("Spirit_Chain",7), + ("Apple_Of_Archer",7), + ("Pirate_Bandana",7), + ("Poo_Poo_Hat",7), + ("Funeral_Costume",7), + ("Masquerade",7), + ("Star_Dust",7), + ("Blinker",7), + ("Green_Feeler",7), + ("Viking_Helm",7), + ("Joker_Jester",7), + ("Machoman_Glasses",7), + ("Puppy_Love",7), + ("Safety_Helmet",7), + ("Indian_Hair_Piece",7), + ("Antenna",7), + ("Fin_Helm",7), + ("Egg_Shell",7), + ("Panda_Cap",7), + ("Poring_Hat",7), + ("Fruit_Shell",7), + ("Novice_Egg_Cap",7), + ("Mr_Smile",7), + ("Mr_Scream",7), + ("Goblini_Mask",7), + ("Gas_Mask",7), + ("Goblin_Mask_02",7), + ("Goblin_Mask_03",7), + ("Goblin_Mask_04",7), + ("Goggle",7), + ("Goggle_",7), + ("Skull_Helm",7), + ("Monster_Oxygen_Mask",7), + ("Transparent_Headgear",7), + ("Pacifier",7), + ("Wig",7), + ("Queen's_Hair_Ornament",7), + ("Silk_Ribbon",7), + ("Punisher",7), + ("Wild_Flower",7), + ("Battered_Pot",7), + ("Stellar_Hairpin",7), + ("Tiny_Egg_Shell",7), + ("Backpack",7), + ("Rocker_Glasses",7), + ("Green_Lace",7), + ("Golden_Bell",7), + ("Bark_Shorts",7), + ("Monkey_Circlet",7), + ("Red_Muffler",7), + ("Sword_Of_Grave_Keeper",7), + ("Ora_Ora",14), + ("Animal_Blood",14), + ("Hinalle",14), + ("Aloe",14), + ("Clover",14), + ("Four_Leaf_Clover",14), + ("Singing_Plant",14), + ("Ment",14), + ("Illusion_Flower",14), + ("Shoot",14), + ("Flower",14), + ("Emperium",14), + ("Yellow_Gemstone",14), + ("Red_Gemstone",14), + ("Blue_Gemstone",14), + ("Dark_Red_Jewel",14), + ("Violet_Jewel",14), + ("Skyblue_Jewel",14), + ("Azure_Jewel",14), + ("Scarlet_Jewel",14), + ("Cardinal_Jewel",14), + ("Cardinal_Jewel_",14), + ("Red_Jewel",14), + ("Blue_Jewel",14), + ("White_Jewel",14), + ("Golden_Jewel",14), + ("Bluish_Green_Jewel",14), + ("Crystal_Jewel",14), + ("Crystal_Jewel_",14), + ("Crystal_Jewel__",14), + ("Crystal_Jewel___",14), + ("Red_Frame",14), + ("Blue_Porcelain",14), + ("White_Platter",14), + ("Black_Ladle",14), + ("Pencil_Case",14), + ("Rouge",14), + ("Stuffed_Doll",14), + ("Poring_Doll",14), + ("Chonchon_Doll",14), + ("Spore_Doll",14), + ("Bunch_Of_Flowers",14), + ("Wedding_Bouquet",14), + ("Glass_Bead",14), + ("Crystal_Mirror",14), + ("Witherless_Rose",14), + ("Frozen_Rose",14), + ("Baphomet_Doll",14), + ("Osiris_Doll",14), + ("Grasshopper_Doll",14), + ("Monkey_Doll",14), + ("Raccoondog_Doll",14), + ("Oridecon_Stone",14), + ("Elunium_Stone",14), + ("Danggie",14), + ("Tree_Root",14), + ("Reptile_Tongue",14), + ("Scorpion's_Tail",14), + ("Stem",14), + ("Pointed_Scale",14), + ("Resin",14), + ("Spawn",14), + ("Jellopy",14), + ("Garlet",14), + ("Scell",14), + ("Zargon",14), + ("Tooth_Of_Bat",14), + ("Fluff",14), + ("Chrysalis",14), + ("Feather_Of_Birds",14), + ("Talon",14), + ("Sticky_Webfoot",14), + ("Animal's_Skin",14), + ("Claw_Of_Wolves",14), + ("Mushroom_Spore",14), + ("Orcish_Cuspid",14), + ("Evil_Horn",14), + ("Powder_Of_Butterfly",14), + ("Bill_Of_Birds",14), + ("Scale_Of_Snakes",14), + ("Insect_Feeler",14), + ("Immortal_Heart",14), + ("Rotten_Bandage",14), + ("Orcish_Voucher",14), + ("Skel_Bone",14), + ("Mementos",14), + ("Shell",14), + ("Scales_Shell",14), + ("Posionous_Canine",14), + ("Sticky_Mucus",14), + ("Bee_Sting",14), + ("Grasshopper's_Leg",14), + ("Nose_Ring",14), + ("Yoyo_Tail",14), + ("Solid_Shell",14), + ("Horseshoe",14), + ("Raccoon_Leaf",14), + ("Snail's_Shell",14), + ("Horn",14), + ("Bear's_Foot",14), + ("Feather",14), + ("Heart_Of_Mermaid",14), + ("Fin",14), + ("Cactus_Needle",14), + ("Stone_Heart",14), + ("Shining_Scales",14), + ("Worm_Peelings",14), + ("Gill",14), + ("Decayed_Nail",14), + ("Horrendous_Mouth",14), + ("Rotten_Scale",14), + ("Nipper",14), + ("Conch",14), + ("Tentacle",14), + ("Sharp_Scale",14), + ("Crap_Shell",14), + ("Clam_Shell",14), + ("Flesh_Of_Clam",14), + ("Turtle_Shell",14), + ("Voucher_Of_Orcish_Hero",14), + ("Gold",14), + ("Alchol",14), + ("Detrimindexta",14), + ("Karvodailnirol",14), + ("Counteragent",14), + ("Mixture",14), + ("Scarlet_Dyestuffs",14), + ("Lemon_Dyestuffs",14), + ("Cobaltblue_Dyestuffs",14), + ("Darkgreen_Dyestuffs",14), + ("Orange_Dyestuffs",14), + ("Violet_Dyestuffs",14), + ("White_Dyestuffs",14), + ("Black_Dyestuffs",14), + ("Oridecon",14), + ("Elunium",14), + ("Anvil",14), + ("Oridecon_Anvil",14), + ("Golden_Anvil",14), + ("Emperium_Anvil",14), + ("Boody_Red",14), + ("Crystal_Blue",14), + ("Wind_Of_Verdure",14), + ("Yellow_Live",14), + ("Flame_Heart",14), + ("Mistic_Frozen",14), + ("Rough_Wind",14), + ("Great_Nature",14), + ("Iron",14), + ("Steel",14), + ("Star_Crumb",14), + ("Sparkling_Dust",14), + ("Iron_Ore",14), + ("Coal",14), + ("Patriotism_Marks",14), + ("Hammer_Of_Blacksmith",14), + ("Old_Magic_Book",14), + ("Penetration",14), + ("Frozen_Heart",14), + ("Sacred_Marks",14), + ("Phracon",14), + ("Emveretarcon",14), + ("Lizard_Scruff",14), + ("Colorful_Shell",14), + ("Jaws_Of_Ant",14), + ("Thin_N'_Long_Tongue",14), + ("Rat_Tail",14), + ("Moustache_Of_Mole",14), + ("Nail_Of_Mole",14), + ("Wooden_Block",14), + ("Long_Hair",14), + ("Dokkaebi_Horn",14), + ("Fox_Tail",14), + ("Fish_Tail",14), + ("Chinese_Ink",14), + ("Spiderweb",14), + ("Acorn",14), + ("Porcupine_Spike",14), + ("Wild_Boar's_Mane",14), + ("Tiger's_Skin",14), + ("Tiger_Footskin",14), + ("Limb_Of_Mantis",14), + ("Blossom_Of_Maneater",14), + ("Root_Of_Maneater",14), + ("Cobold_Hair",14), + ("Dragon_Canine",14), + ("Dragon_Scale",14), + ("Dragon_Train",14), + ("Petite_DiablOfs_Horn",14), + ("Petite_DiablOfs_Wing",14), + ("Elder_Pixie's_Beard",14), + ("Lantern",14), + ("Short_Leg",14), + ("Nail_Of_Orc",14), + ("Tooth_Of_",14), + ("Sacred_Masque",14), + ("Tweezer",14), + ("Head_Of_Medusa",14), + ("Slender_Snake",14), + ("Skirt_Of_Virgin",14), + ("Tendon",14), + ("Detonator",14), + ("Single_Cell",14), + ("Tooth_Of_Ancient_Fish",14), + ("Lip_Of_Ancient_Fish",14), + ("Earthworm_Peeling",14), + ("Grit",14), + ("Moth_Dust",14), + ("Wing_Of_Moth",14), + ("Transparent_Cloth",14), + ("Golden_Hair",14), + ("Starsand_Of_Witch",14), + ("Pumpkin_Head",14), + ("Sharpened_Cuspid",14), + ("Reins",14), + ("Booby_Trap",14), + ("Tree_Of_Archer_1",14), + ("Tree_Of_Archer_2",14), + ("Tree_Of_Archer_3",14), + ("Morocc_Potion",14), + ("Payon_Potion",14), + ("Empty_Cylinder",14), + ("Empty_Potion",14), + ("Short_Daenggie",14), + ("Needle_Of_Alarm",14), + ("Round_Shell",14), + ("Worn_Out_Page",14), + ("Manacles",14), + ("Worn_Out_Prison_Uniform",14), + ("Mould_Powder",14), + ("Ogre_Tooth",14), + ("Anolian_Skin",14), + ("Mud_Lump",14), + ("Skull",14), + ("Wing_Of_Red_Bat",14), + ("Claw_Of_Rat",14), + ("Stiff_Horn",14), + ("Glitter_Shell",14), + ("Tail_Of_Steel_Scorpion",14), + ("Claw_Of_Monkey",14), + ("Tough_Scalelike_Stem",14), + ("Coral_Reef",14), + ("Old_Portrait",14), + ("Bookclip_In_Memory",14), + ("Spoon_Stub",14), + ("Key_Of_Clock_Tower",14), + ("Underground_Key",14), + ("Claw_Of_Desert_Wolf",14), + ("Old_Frying_Pan",14), + ("Piece_Of_Egg_Shell",14), + ("Poison_Spore",14), + ("Red_Socks_With_Holes",14), + ("Matchstick",14), + ("Fang_Of_Garm",14), + ("Yarn",14), + ("Fine_Grit",14), + ("Alice's_Apron",14), + ("Talon_Of_Griffin",14), + ("Stone",14), + ("Cyfar",14), + ("Brigan",14), + ("Cargo_Free_Ticket",14), + ("Warp_Free_Ticket",14), + ("Cart_Free_Ticket",14), + ("Soft_Feather",14), + ("Dragon_Fly_Wing",14), + ("Sea_Otter_Leather",14), + ("Ice_Piece",14), + ("Stone_Piece",14), + ("Burn_Tree",14), + ("Broken_Armor_Piece",14), + ("Broken_Shell",14), + ("Tatters_Clothes",14), + ("Rust_Suriken",14), + ("Wheel",14), + ("Mystery_Piece",14), + ("Broken_Steel_Piece",14), + ("Cold_Magma",14), + ("Burning_Heart",14), + ("Live_Coal",14), + ("Old_Magic_Circle",14), + ("Sharp_Leaf",14), + ("Peco_Wing_Feather",14), + ("Goat's_Horn",14), + ("Gaoat's_Skin",14), + ("Boroken_Shiled_Piece",14), + ("Shine_Spear_Blade",14), + ("Vroken_Sword",14), + ("Smooth_Paper",14), + ("Fright_Paper_Blade",14), + ("Broken_Pharaoh_Symbol",14), + ("Tutankhamen's_Mask",14), + ("Harpy's_Feather",14), + ("Harpy's_Claw",14), + ("Rent_Spell_Book",14), + ("Rent_Scroll",14), + ("Spawns",14), + ("Burning_Horse_Shoe",14), + ("Honey_Jar",14), + ("Hot_Hair",14), + ("Dragon's_Skin",14), + ("Sand_Lump",14), + ("Scropion's_Nipper",14), + ("Large_Jellopy",14), + ("Medicine_Bowl",14), + ("Fire_Bottle",14), + ("Acid_Bottle",14), + ("MenEater_Plant_Bottle",14), + ("Mini_Bottle",14), + ("Coating_Bottle",14), + ("Yellow_Plate",14), + ("Bamboo_Cut",14), + ("Oil_Paper",14), + ("Glossy_Hair",14), + ("Old_Japaness_Clothes",14), + ("Poison_Powder",14), + ("Poison_Toad's_Skin",14), + ("Broken_Shuriken",14), + ("Black_Mask",14), + ("Broken_Wine_Vessel",14), + ("Tengu's_Nose",14), + ("Black_Bear's_Skin",14), + ("Cloud_Piece",14), + ("Sharp_Feeler",14), + ("Hard_Peach",14), + ("Limpid_Celestial_Robe",14), + ("Soft_Silk_Cloth",14), + ("Mystery_Iron_Bit",14), + ("Great_Wing",14), + ("Taegeuk_Plate",14), + ("Tuxedo",14), + ("Leopard_Skin",14), + ("Leopard_Talon",14), + ("Packing_Ribbon",14), + ("Packing_Paper",14), + ("Cacao",14), + ("Thin_Stem",14), + ("Festival_Mask",14), + ("Browny_Root",14), + ("Heart_Of_Tree",14), + ("Solid_Peeling",14), + ("Lamplight",14), + ("Blade_Of_Pinwheel",14), + ("Germinating_Sprout",14), + ("Soft_Leaf",14), + ("Air_Rifle",14), + ("Shoulder_Protection",14), + ("Tough_Vines",14), + ("Great_Leaf",14), + ("Flexible_String",14), + ("Log",14), + ("Beetle_Nipper",14), + ("Solid_Twig",14), + ("Piece_Of_Black_Cloth",14), + ("Black_Kitty_Doll",14), + ("Old_Manteau",14), + ("Rusty_Cleaver",14), + ("Dullahan's_Helm",14), + ("Dullahan_Armor",14), + ("Rojerta_Piece",14), + ("Hanging_Doll",14), + ("Needle_Pouch",14), + ("Bat_Cage",14), + ("Broken_Needle",14), + ("Red_Scarf",14), + ("Spool",14), + ("Rotten_Rope",14), + ("Striped_Socks",14), + ("Ectoplasm",14), + ("Tangled_Chain",14), + ("Tree_Knot",14), + ("Distorted_Portrait",14), + ("Pumpkin_Bucket",14), + ("Fan",14), + ("Cat_Eyed_Stone",14), + ("Dried_Sand",14), + ("Dragon_Horn",14), + ("Dragon_Fang",14), + ("Tiger_Skin_Panties",14), + ("Little_Blacky_Ghost",14), + ("Bib",14), + ("Milk_Bottle",14), + ("Arrow",14), + ("Silver_Arrow",14), + ("Fire_Arrow",14), + ("Steel_Arrow",14), + ("Crystal_Arrow",14), + ("Arrow_Of_Wind",14), + ("Stone_Arrow",14), + ("Immatrial_Arrow",14), + ("Stun_Arrow",14), + ("Freezing_Arrow",14), + ("Flash_Arrow",14), + ("Curse_Arrow",14), + ("Rusty_Arrow",14), + ("Poison_Arrow",14), + ("Incisive_Arrow",14), + ("Oridecon_Arrow",14), + ("Arrow_Of_Shadow",14), + ("Sleep_Arrow",14), + ("Silence_Arrow",14), + ("Iron_Arrow",14), + ("Red_Potion",14), + ("Orange_Potion",14), + ("Yellow_Potion",14), + ("Green_Potion",14), + ("Red_Herb",14), + ("Yellow_Herb",14), + ("White_Herb",14), + ("Blue_Herb",14), + ("Green_Herb",14), + ("Apple",14), + ("Banana",14), + ("Grape",14), + ("Carrot",14), + ("Sweet_Potato",14), + ("Meat",14), + ("Honey",14), + ("Milk",14), + ("Leaflet_Of_Hinal",14), + ("Leaflet_Of_Aloe",14), + ("Fruit_Of_Mastela",14), + ("Holy_Water",14), + ("Panacea",14), + ("Monster's_Feed",14), + ("Candy",14), + ("Candy_Striper",14), + ("Apple_Juice",14), + ("Banana_Juice",14), + ("Grape_Juice",14), + ("Carrot_Juice",14), + ("Pumpkin",14), + ("Ice_Cream",14), + ("Pet_Food",14), + ("Well_Baked_Cookie",14), + ("Piece_Of_Cake",14), + ("Fish_Slice",14), + ("Red_Slim_Potion",14), + ("Yellow_Slim_Potion",14), + ("White_Slim_Potion",14), + ("Cheese",14), + ("Nice_Sweet_Potato",14), + ("Popped_Rice",14), + ("Shusi",14), + ("Bun",14), + ("Rice_Cake",14), + ("Chocolate",14), + ("White_Chocolate",14), + ("Old_Blue_Box",614), + ("Anodyne",14), + ("Aloebera",14), + ("Yggdrasilberry",14), + ("Seed_Of_Yggdrasil",14), + ("Amulet",14), + ("Leaf_Of_Yggdrasil",14), + ("Spectacles",14), + ("Portable_Furnace",14), + ("Iron_Hammer",14), + ("Golden_Hammer",14), + ("Oridecon_Hammer",14), + ("Worn_Out_Scroll",14), + ("Unripe_Apple",14), + ("Orange_Juice",14), + ("Bitter_Herb",14), + ("Rainbow_Carrot",14), + ("Earthworm_The_Dude",14), + ("Rotten_Fish",14), + ("Lusty_Iron",14), + ("Monster_Juice",14), + ("Sweet_Milk",14), + ("Well_Dried_Bone",14), + ("Singing_Flower",14), + ("Dew_Laden_Moss",14), + ("Deadly_Noxious_Herb",14), + ("Fatty_Chubby_Earthworm",14), + ("Baked_Yam",14), + ("Tropical_Banana",14), + ("Horror_Of_Tribe",14), + ("No_Recipient",14), + ("Old_Broom",14), + ("Silver_Knife_Of_Chaste",14), + ("Armlet_Of_Obedience",14), + ("Shining_Stone",14), + ("Contracts_In_Shadow",14), + ("Book_Of_Devil",14), + ("Pet_Incubator",14), + ("Gift_Box",114), + ("Center_Potion",14), + ("Awakening_Potion",14), + ("Berserk_Potion",14), + ("Heart_Of_Her",14), + ("Korea_Rice_Cake",14), + ("Gift_Box_1",14), + ("Gift_Box_2",14), + ("Gift_Box_3",14), + ("Gift_Box_4",14), + ("Handsei",14), + ("Poison_Bottle",14), + ("Gold_Pill",14), + ("Guard_",6), + "Tiara", + "Crown", + "Coronet", + "Angelic_Chain", + "Satanic_Chain", + "Sharp_Gear", + "Elven_Ears", + "Holy_Robe", + "Mage_Coat", + "An_Eye_Of_Dullahan", + "Safety_Ring", + "Critical_Ring", + "Ring_", + "Earring_", + "Necklace_", + "Glove_", + "Brooch_", + "Rosary_", + "Gemmed_Crown", + "Pair_Of_Red_Ribbon", + "Loard_Circlet", + "Bone_Helm", + "Corsair", + "Assassin_Mask", + "Horn_Of_Succubus", + "Inccubus_Horn", + "Spinx_Helm", + "Old_Card_Album", + "Dragon_Killer", + "Ginnungagap", + "Town_Sword_", + "Star_Dust_Blade", + "Gae_Bolg", + ("Various_Jur",2), + "Nail_Of_Loki", + "Bloody_Roar", + "Unholy_Touch", + "Hypnotist's_Staff_", + "Staff_Of_Wing", + "Luna_Bow", + "Dragon_Wing", + "Electric_Wire", + "Whip_Of_Red_Flame", + "Whip_Of_Ice_Piece", + "Whip_Of_Earth", + "Jump_Rope", + "Bladed_Whip", + "Guitar_Of_Passion", + "Guitar_Of_Blue_Solo", + "Guitar_Of_Vast_Land", + "Guitar_Of_Gentle_Breeze", + "Claw_Of_Garm", + "Legacy_Of_Dragon", + "Coward_", + "Windhawk", + "Queen's_Whip", + "Oriental_Lute", + "Diary_Of_Great_Sage", + "Hardback", + "Survival_Rod_", + "Survival_Rod2_", + "Ear_Of_Puppy", + "Angry_Mouth", + "Celestial_Robe", + "Pauldron", + "Fedora_", + "Super_Novice_Hat_", + "Galapago_Cap", + "Banana_Hat", + "Wing_Of_Eagle", + "Cursed_Lucky_Brooch", + "Shinobi's_Sash", + "Bloody_Iron_Ball", + "Hyper_Changer", + "Cookbook06", + "Cookbook07", + "Cookbook08", + "Cookbook09", + "Cookbook10", + "Dark_Crystal_Fragment", + "Long_Limb", + "Screw", + "Old_Pick", + "Old_Steel_Plate", + "Air_Pollutant", + "Fragment_Of_Crystal", + "Poisonous_Gas", + "Battered_Kettle", + "Tube", + "Fluorescent_Liquid", + "Headlamp", + "Piece_Of_Memory_Green", + "Piece_Of_Memory_Purple", + "Piece_Of_Memory_Blue", + "Piece_Of_Memory_Red", + "Red_Feather", + "Blue_Feather", + "Cursed_Seal", + "Tri_Headed_Dragon_Head", + "Treasure_Box", + "Dragonball_Green", + "Dragonball_Blue", + "Dragonball_Red", + "Dragonball_Yellow", + "Bloody_Page", + "Piece_Of_Bone_Armor", + "Scale_Of_Red_Dragon", + "Yellow_Spice", + "Sweet_Sauce", + "Plain_Sauce", + "Hot_Sauce", + "Red_Spice", + "Cooking_Oil", + "Cookbook01", + "Cookbook02", + "Cookbook03", + "Cookbook04", + "Cookbook05", + "Pot", + "Burnt_Parts", + "Pocket_Watch", + "Ice_Heart", + "Ice_Scale", + "Bloody_Rune", + "Rotten_Meat", + "Sticky_Poison", + "Suspicious_Hat", + "White_Mask", + ("Old_Violet_Box",103), + ("Old_White_Cloth",16), + ("Clattering_Skull",16), + ("Broken_Farming_Utensil",17), + "Inverse_Scale", + "Blood_Tears", + "Doom_Slayer", + "Heart_Breaker", + "Hurricane_Fury", + "Ahlspiess", + "Huuma_Calm_Mind", + "Burning_Bow", + "Frozen_Bow", + "Earth_Bow", + "Gust_Bow", + "Magma_Fist", + "Icicle_Fist", + "Electric_Fist", + "Seismic_Fist", + "Combo_Battle_Glove", + "Base_Guitar", + "Electric_Eel", + "Sea_Witch_Foot", + "Carrot_Whip", + "Bullet", + "Silver_Bullet", + "Shell_Of_Blood", + "Flare_Sphere", + "Lighting_Sphere", + "Poison_Sphere", + "Blind_Sphere", + "Freezing_Sphere", + "Gate_KeeperDD", + "Thunder_P", + "Long_Barrel", + ("Lever_Action_Rifle",2), + "Long_Barrel_" +) +Random_Quiver: ( + "Iron_Arrow_Container", + "Steel_Arrow_Container", + "Ori_Arrow_Container", + "Fire_Arrow_Container", + "Silver_Arrow_Container", + "Wind_Arrow_Container", + "Stone_Arrow_Container", + "Crystal_Arrow_Container", + "Shadow_Arrow_Container", + "Imma_Arrow_Container", + "Rusty_Arrow_Container", + ("Holy_Arrow_Quiver",2) +) +Set_Of_Taiming_Item: ( + "Orange_Juice", + "Bitter_Herb", + "Rainbow_Carrot", + "Earthworm_The_Dude", + "Rotten_Fish", + "Lusty_Iron", + "Monster_Juice", + "Sweet_Milk", + "Well_Dried_Bone", + "Singing_Flower", + "Dew_Laden_Moss", + "Deadly_Noxious_Herb", + "Fatty_Chubby_Earthworm", + "Baked_Yam", + "Tropical_Banana", + "Horror_Of_Tribe", + "No_Recipient", + "Old_Broom", + "Silver_Knife_Of_Chaste", + "Armlet_Of_Obedience", + "Shining_Stone", + "Contracts_In_Shadow", + "Book_Of_Devil", + "Heart_Of_Her", + "Prohibition_Red_Candle", + "Sway_Apron", + "Skull_Helm", + "Monster_Oxygen_Mask", + "Transparent_Headgear", + "Pacifier", + "Wig", + "Queen's_Hair_Ornament", + "Silk_Ribbon", + "Punisher", + "Wild_Flower", + "Battered_Pot", + "Stellar_Hairpin", + "Tiny_Egg_Shell", + "Backpack", + "Rocker_Glasses", + "Green_Lace", + "Golden_Bell", + "Bark_Shorts", + "Monkey_Circlet", + "Red_Muffler", + "Sword_Of_Grave_Keeper", + "Flaming_Ice", + "Tantanmen" +) +Accessory_Box: ( + ("Gold_Ring",14), + ("Mitten_Of_Presbyter",10), + ("Flower_Ring",14), + ("Necklace",12), + ("Necklace_",10), + ("Novice_Armlet",14), + ("Diamond_Ring",11), + ("Skul_Ring",14), + ("Thimble_Of_Archer",10), + ("Rosary",14), + ("Ring",10), + ("Matyr's_Flea_Guard",11), + ("Belt",10), + ("Brooch",12), + ("Nile_Rose_",10), + ("Silver_Ring",14), + ("Clip",12), + ("Earring",11), + ("Glove",11), + "Safety_Ring", + "Critical_Ring", + "Glove_", + "Ring_", + "Rosary_", + "Brooch_", + "Earring_", + ("Vesper_Core02",2), + ("Vesper_Core03",2), + ("Vesper_Core04",2), + "Thimble_Of_Archer_", + ("Red_Silk_Seal",2), + "Orleans_Glove", + "Vesper_Core01", + "Spiritual_Ring", + "Shinobi's_Sash", + "Hyper_Changer", + ("Lesser_Elemental_Ring",9), + "Expert_Ring", + "Librarian_Glove", + "Pocket_Watch_", + "Lunatic_Brooch", + "Iron_Wrist" +) +Wrapped_Mask: ( + ("Phantom_Of_Opera",10), + ("Mr_Scream",10), + ("Welding_Mask",10), + ("Goblini_Mask",10), + ("Gas_Mask",10), + ("Alarm_Mask",10), + ("Goblin_Mask_01",10), + ("Goblin_Mask_02",10), + ("Goblin_Mask_03",10), + ("Goblin_Mask_04",10), + ("Mr_Smile",9), + "Zherlthsh_Mask" +) +Bundle_Of_Magic_Scroll: ( + "Earth_Scroll_1_5", + "Cold_Scroll_1_3", + "Cold_Scroll_1_5", + "Fire_Scroll_1_3", + "Fire_Scroll_1_5", + "Wind_Scroll_1_3", + "Wind_Scroll_1_5", + "Ghost_Scroll_1_3", + "Ghost_Scroll_1_5", + "Fire_Scroll_2_1", + "Fire_Scroll_2_5", + "Fire_Scroll_3_1", + "Fire_Scroll_3_5", + "Cold_Scroll_2_1", + "Cold_Scroll_2_5", + "Holy_Scroll_1_3", + "Holy_Scroll_1_5" +) +Food_Package: ( + "Candy_Striper", + "Apple_Juice", + "Banana_Juice", + "Grape_Juice", + "Carrot_Juice", + "Ice_Cream", + "Well_Baked_Cookie", + "Yggdrasilberry", + "Fish_Slice", + "Cheese", + "Nice_Sweet_Potato", + "Popped_Rice", + "Shusi", + "Bun", + "Mojji", + "Rice_Cake", + "Seed_Of_Yggdrasil", + "Hash_Rice_Cake", + "Chocolate", + "HandMade_Chocolate", + "HandMade_Chocolate_", + "White_Chocolate", + "Rice_Ball", + "Tomyumkung", + "Prawn", + "Korea_Rice_Cake", + "Prickly_Fruit", + "Apple", + "Banana", + "Grape", + "Carrot", + "Sweet_Potato", + "Meat", + "Honey", + "Rice_Cake_Soup", + "Leaflet_Of_Hinal", + "Leaflet_Of_Aloe", + "Fruit_Of_Mastela", + "Milk", + "Lemon", + "Long_Rice_Cake", + "Piece_Of_Cake" +) +First_Aid_Kit: ( + ("Red_Potion",5), + ("Orange_Potion",5), + ("Yellow_Potion",5), + ("Slow_Down_Potion",5), + ("Green_Potion",5), + ("Red_Slim_Potion",5), + ("Yellow_Slim_Potion",5), + ("White_Slim_Potion",5), + ("Water_Of_Darkness",5), + ("Center_Potion",5), + ("Awakening_Potion",5), + ("Berserk_Potion",5), + ("Novice_Potion",5), + ("Anodyne",5), + ("Speed_Up_Potion",5) +) +Cookie_Bag: ( + ("Lucky_Candy",5), + ("Candy_Striper",5), + ("Lucky_Candy_Cane",5), + ("Well_Baked_Cookie",5), + ("Lucky_Cookie",5), + ("Piece_Of_Cake",5), + ("Rice_Ball",5), + "Sesame_Pastry", + "Honey_Pastry", + "Rainbow_Cake", + "Chocolate", + "HandMade_Chocolate", + "HandMade_Chocolate_", + "White_Chocolate", + "Chocolate_Drink", + ("Candy",4) +) +Egg_Boy: ( + ("Grape",299), + ("Rice_Ball",522), + ("Prohibition_Red_Candle",20), + ("Realgar_Wine",100), + ("Exorcize_Herb",50), + ("Crown",2), + "Inccubus_Horn" +) +Egg_Girl: ( + ("Grape",299), + ("Rice_Ball",522), + ("Sway_Apron",20), + ("Realgar_Wine",100), + ("Exorcize_Herb",50), + ("Tiara",2), + ("Hair_Protector",5), + "Horn_Of_Succubus" +) +Giftbox_China: ( + "Orange_Potion", + "Yellow_Potion", + "Green_Potion", + "Honey", + "Leaflet_Of_Hinal", + ("Leaflet_Of_Aloe",2), + "Panacea", + "Candy", + "Candy_Striper", + ("Old_Blue_Box",40), + ("Branch_Of_Dead_Tree",9), + "Anodyne", + "Aloebera", + "Yggdrasilberry", + "Seed_Of_Yggdrasil", + "Leaf_Of_Yggdrasil", + ("Portable_Furnace",5), + "Iron_Hammer", + "Golden_Hammer", + "Oridecon_Hammer", + "Ora_Ora", + "Animal_Blood", + "Hinalle", + "Aloe", + "Four_Leaf_Clover", + "Singing_Plant", + "Ment", + "Illusion_Flower", + "Emperium", + "Yellow_Gemstone", + "Red_Gemstone", + "Blue_Gemstone", + "Dark_Red_Jewel", + "Violet_Jewel", + "Skyblue_Jewel", + "Azure_Jewel", + "Scarlet_Jewel", + "Cardinal_Jewel", + "Cardinal_Jewel_", + "Red_Jewel", + "Blue_Jewel", + "White_Jewel", + "Golden_Jewel", + "Bluish_Green_Jewel", + "Crystal_Jewel", + "Crystal_Jewel_", + "Crystal_Jewel__", + "Crystal_Jewel___", + "Red_Frame", + "Blue_Porcelain", + "White_Platter", + "Black_Ladle", + "Pencil_Case", + "Stuffed_Doll", + "Poring_Doll", + "Chonchon_Doll", + "Spore_Doll", + "Wedding_Bouquet", + "Crystal_Mirror", + "Witherless_Rose", + "Frozen_Rose", + "Grasshopper_Doll", + "Monkey_Doll", + "Raccoondog_Doll", + "Oridecon_Stone", + "Elunium_Stone", + "Jellopy", + "Garlet", + "Scell", + "Zargon", + "Orcish_Voucher", + "Mementos", + "Voucher_Of_Orcish_Hero", + "Gold", + "Alchol", + "Detrimindexta", + "Karvodailnirol", + "Counteragent", + "Mixture", + "Scarlet_Dyestuffs", + "Lemon_Dyestuffs", + "Cobaltblue_Dyestuffs", + "Darkgreen_Dyestuffs", + "Orange_Dyestuffs", + "Violet_Dyestuffs", + "White_Dyestuffs", + "Black_Dyestuffs", + "Oridecon", + "Elunium", + "Anvil", + "Oridecon_Anvil", + "Golden_Anvil", + "Emperium_Anvil", + "Boody_Red", + "Crystal_Blue", + "Wind_Of_Verdure", + "Yellow_Live", + "Flame_Heart", + "Mistic_Frozen", + "Rough_Wind", + "Great_Nature", + "Iron", + "Steel", + "Star_Crumb", + "Sparkling_Dust", + "Iron_Ore", + "Coal", + "Patriotism_Marks", + "Hammer_Of_Blacksmith", + "Old_Magic_Book", + "Penetration", + "Frozen_Heart", + "Sacred_Marks", + "Phracon", + "Emveretarcon", + "Booby_Trap", + "Sword_", + "Falchion_", + "Blade_", + "Lapier_", + "Scimiter_", + "Katana_", + "Tsurugi_", + "Ring_Pommel_Saber_", + "Saber_", + "Hae_Dong_Gum_", + "Flamberge", + "Slayer_", + "Bastard_Sword_", + "Two_Hand_Sword_", + "Broad_Sword_", + "Claymore", + "Knife_", + "Cutter_", + "Main_Gauche_", + "Dirk_", + "Dagger_", + "Stiletto_", + "Gladius_", + "Damascus_", + "Jur_", + "Katar_", + "Jamadhar_", + "Axe_", + "Battle_Axe_", + "Hammer_", + "Buster_", + "Two_Handed_Axe_", + "Javelin_", + "Spear_", + "Pike_", + "Lance", + "Guisarme_", + "Glaive_", + "Partizan_", + "Trident_", + "Halberd_", + "Club_", + "Mace_", + "Smasher_", + "Flail_", + "Morning_Star_", + "Sword_Mace_", + "Chain_", + "Book", + "Bible", + "Rod_", + "Wand_", + "Staff_", + "Arc_Wand_", + "Mighty_Staff", + "Bow_", + "Composite_Bow_", + "CrossBow_", + "Arbalest", + "Kakkung", + "Hunter_Bow", + "Bow_Of_Roguemaster", + "Guard_", + "Buckler_", + "Shield_", + "Mirror_Shield_", + "Fancy_Flower", + "Ribbon_", + "Cat_Hairband", + "Flower_Hairband", + "Biretta_", + "Hat_", + "Turban_", + "Goggle_", + "Cap_", + "Helm_", + "Gemmed_Sallet_", + "Circlet_", + "Santa's_Hat", + "Big_Sis'_Ribbon", + "Coronet", + "Fillet", + "Snowy_Horn", + "Sharp_Gear", + "Pierrot_Nose", + "Gangster_Patch", + "Ganster_Mask", + "Centimental_Flower", + "Centimental_Leaf", + "Jack_A_Dandy", + "Stop_Post", + "Doctor_Cap", + "Red_Bandana", + "Eagle_Eyes", + "Bomb_Wick", + "Antler", + "Pirate_Bandana", + "Poo_Poo_Hat", + "Funeral_Costume", + "Masquerade", + "Pretend_Murdered", + "Star_Dust", + "Blinker", + "Binoculars", + "Green_Feeler", + "Viking_Helm", + "Cotton_Shirt_", + "Leather_Jacket_", + "Adventurere's_Suit_", + "Mantle_", + "Coat_", + "Mink_Coat", + "Padded_Armor_", + "Chain_Mail_", + "Plate_Armor_", + "Silk_Robe_", + "Scapulare_", + "Saint_Robe_", + "Wooden_Mail_", + "Tights_", + "Silver_Robe_", + "Thief_Clothes_", + "Ninja_Suit", + "Wedding_Dress", + "G_Strings", + "Sandals_", + "Shoes_", + "Chrystal_Pumps", + "Cuffs", + "Spiky_Heel", + "Hood_", + "Muffler_", + "Manteau_", + "Cape_Of_Ancient_Lord", + "Ragamuffin_Cape", + "Ring", + "Earring", + "Necklace", + "Glove", + "Brooch", + "Clip", + "Rosary", + "Skul_Ring", + "Gold_Ring", + "Silver_Ring", + "Flower_Ring", + "Diamond_Ring", + "Puppy_Love", + "Safety_Helmet", + "Indian_Hair_Piece", + "Fin_Helm", + "Egg_Shell" +) +Old_Bleu_Box: ( + ("Cold_Scroll_1_5",2), + ("Fire_Scroll_1_5",2), + ("Wind_Scroll_1_5",2), + ("Fire_Scroll_2_5",2), + ("Fire_Scroll_3_5",2), + ("Holy_Scroll_1_5",2), + ("Cold_Scroll_2_5",2), + ("Gift_Box",2), + ("Milk",2), + ("Well_Baked_Cookie",2) +) +Holy_Egg_2: ( + ("Oridecon",3), + ("Elunium",10), + ("White_Slim_Potion",30), + ("Blue_Potion",30), + ("Yggdrasilberry",3), + ("Seed_Of_Yggdrasil",2), + ("Leaf_Of_Yggdrasil",15), + ("Old_Card_Album",5), + "Drooping_Bunny" +) +Red_Box_: ( + ("Magic_Eyes",9), + ("Hibiscus",10), + ("Charming_Ribbon",10) +) +Hometown_Gift: ( + "Hearty_Rice_Cake", + "Salty_Rice_Cake", + "Lucky_Rice_Cake", + "Sesame_Pastry", + "Honey_Pastry", + "Rainbow_Cake", + "Korea_Rice_Cake" +) +Old_Yellow_Box: ( + "Cookie_Hat", + "Silver_Tiara_", + "Gold_Tiara_" +) +Old_Gift_Box: ( + ("Chinese_Crown_",14), + ("Tongue_Mask_",40), + ("Fallen_Leaves_",45) +) +Magic_Card_Album: ( + "Dark_Illusion_Card", + "Deviling_Card", + ("Dragon_Fly_Card",10), + ("Vagabond_Wolf_Card",10), + ("Mastering_Card",10), + "Maya_Puple_Card", + ("Mutant_Dragon_Card",10), + "Mysteltainn_Card", + "Vocal_Card", + ("Owl_Duke_Card",5), + ("Owl_Baron_Card",5), + "Archangeling_Card", + "Executioner_Card", + "Tirfing_Card", + ("Eclipse_Card",10), + ("Chepet_Card",10), + ("Choco_Card",10), + ("Cat_O_Nine_Tail_Card",5), + ("Kobold_Leader_Card",10), + ("Chimera_Card",10), + ("Toad_Card",10), + "Bloody_Knight_Card", + "Ungoliant_Card", + "Gemini_Card", + "Hydro_Card", + ("Tha_Maero_Card",3), + ("Tha_Odium_Card",3), + ("Tha_Despero_Card",3) +) +Masquerade_Ball_Box: ( + ("Drooping_Nine_Tail_",9), + "Soulless_Wing_", + ("Marvelous_Wig_",10), + ("Ati_Atihan_Hat_",10) +) +Louise_Costume_Box: ( + ("Red_Bag",16), + ("Cool_Summer_Outfit",2) +) +Xmas_Gift: ( + ("Fire_Cracker_Love",6), + ("Gift_Box",66), + ("Old_Bleu_Box",36), + ("Set_Of_Taiming_Item",6), + ("Wrapped_Mask",6), + ("Old_Blue_Box",24), + ("Bundle_Of_Magic_Scroll",12), + ("Buche_De_Noel",24), + ("Speed_Up_Potion",12), + ("Slow_Down_Potion",12), + ("Cookie_Bag",12), + ("Red_Bag",6), + ("First_Aid_Kit",12), + ("Crystal_Jewel__",12), + ("HandMade_Chocolate",18), + ("HandMade_Chocolate_",18), + ("Chocolate_Drink",18), + ("Santa's_Hat_",12), + ("Fire_Cracker_Xmas",4) +) +Tresure_Box_WoE: ( + ("Wind_Arrow_Container",23), + ("Stone_Arrow_Container",25), + ("Crystal_Arrow_Container",26), + ("Holy_Arrow_Quiver",7), + ("Bullet_Case",27), + ("Bullet_Case_Blood",27), + ("Bullet_Case_Silver",27), + ("Set_Of_Taiming_Item",12), + ("First_Aid_Kit",9), + ("Food_Package",36), + ("Bundle_Of_Magic_Scroll",9), + ("Old_Bleu_Box",8), + ("Cookie_Bag",48), + ("Hometown_Gift",6), + ("Cool_Summer_Outfit",22), + ("Union_Of_Tribe",6), + ("Wrapped_Mask",2), + ("Poison_Bottle",3), + ("Old_Blue_Box",6), + ("Crystal_Jewel__",9) +) +Masquerade_Ball_Box2: ( + ("Black_Bunny_Band",12), + ("Vanilmirth_Hat",10), + ("Cap_Of_Blindness",10), + "Dress_Hat" +) +Pierre_Treasurebox: ( + ("Scarlet_Dyestuffs",3), + ("Lemon_Dyestuffs",3), + ("Cobaltblue_Dyestuffs",3), + ("Darkgreen_Dyestuffs",3), + ("Orange_Dyestuffs",3), + ("Violet_Dyestuffs",3), + ("White_Dyestuffs",3), + ("Black_Dyestuffs",3), + ("Olivine",3), + ("Phlogopite",3), + ("Agate",3), + ("Muscovite",3), + ("Rose_Quartz",3), + ("Turquoise",3), + ("Citrine",3), + ("Pyroxene",3), + ("Biotite",3), + ("Str_Dish10",3), + ("Agi_Dish10",3), + ("Vit_Dish10",3), + ("Luk_Dish10",3), + ("Dex_Dish10",3), + ("Branch_Of_Dead_Tree",3), + ("Old_Violet_Box",5), + ("Gift_Box",3), + ("Old_Blue_Box",11), + ("Fire_Cracker",2), + "Bloody_Dead_Branch" +) +Cherish_Box: ( + ("Geographer_Band_",4), + ("Vacation_Hat_",5) +) +Cherish_Box_Ori: ( + ("Satellite_Hairband",2), + ("Pirate_Dagger",2), + ("Loki_Mask",2), + ("Ragnarok_Limited_Ed",3) +) +Splendid_Box: ( + "Imperial_Guard", + "Bone_Plate", + "Ebone_Armor", + "Krasnaya", + "Alca_Bringer", + "Chrome_Twohand_Sword", + "Krishna", + "Cakram", + "Durga", + "Vecer_Axe", + "Giant_Axe", + "Imperial_Spear", + "Rafini_Staff", + "Falken_Blitz", + "Elven_Bow", + "Green_Whistle", + "Stem_Whip", + "Krieg", + "Weihna", + "Black_Wing", + "Ruber", + "Erde", + "Red_Square_Bag", + "Carga_Mace", + "Red_Ether_Bag", + "Mystic_Bow" +) +Old_C_Album_Armor: ( + "Pupa_Card", + "Picky_Card", + "Picky__Card", + "Roda_Frog_Card", + "Thief_Bug_Card", + "Rocker_Card", + "Desert_Wolf_Babe_Card", + "Pecopeco_Card", + "Steel_Chonchon_Card", + "Cornutus_Card", + "Savage_Card", + "Sword_Fish_Card", + "Dokebi_Card", + "Pasana_Card", + "Sand_Man_Card", + "Marc_Card", + "Argiope_Card", + "Bathory_Card", + "Evil_Druid_Card", + "Goat_Card", + "Flying_Deleter_Card", + "Grizzly_Card", + "Nightmare_Terror_Card", + "Dark_Frame_Card", + "Demon_Pungus_Card", + "Disguise_Card", + "Wraith_Dead_Card", + "Loli_Ruri_Card", + "Rybio_Card", + "Majoruros_Card", + "Brilight_Card", + "Sasquatch_Card", + "Succubus_Card", + "Solider_Card", + "Skel_Prisoner_Card", + "Baby_Leopard_Card", + "Anolian_Card", + "Apocalips_Card", + "Wooden_Golem_Card", + "Giant_Spider_Card", + "Deleter_Card", + "Geographer_Card", + "Karakasa_Card", + "Kraben_Card", + "Cremy_Fear_Card", + "Clock_Card", + "Chimera_Card", + "Killer_Mantis_Card", + "Pest_Card", + "Waste_Stove_Card", + "Venomous_Card", + "Porcellio_Card", + "Obsidian_Card", + "Mineral_Card", + "Ygnizem_Card", + "Removal_Card", + "Venatu_Card", + "Dimik_Card", + "Archdam_Card", + "Novus__Card", + "Novus_Card", + "Ancient_Mimic_Card", + "Observation_Card", + "Shelter_Card", + "Aliza_Card", + "Alicel_Card", + "Skogul_Card", + "Frus_Card", + "Agav_Card", + "Echio_Card", + "Byorgue_Card", + "Banshee_Master_Card" +) +Old_C_Album_Helm: ( + "Stainer_Card", + "Coco_Card", + "Martin_Card", + "Elder_Wilow_Card", + "Giearth_Card", + "Ghoul_Card", + "Marduk_Card", + "Deviruchi_Card", + "Nightmare_Card", + "Grand_Peco_Card", + "Dark_Illusion_Card", + "Dryad_Card", + "Rideword_Card", + "Leib_Olmai_Card", + "Leaf_Cat_Card", + "Mystcase_Card", + "Stalactic_Golem_Card", + "C_Tower_Manager_Card", + "Archangeling_Card", + "Wicked_Nymph_Card", + "Wootan_Shooter_Card", + "Wootan_Fighter_Card", + "Incubus_Card", + "Giant_Honet_Card", + "Gibbet_Card", + "Carat_Card", + "Cramp_Card", + "Permeter_Card", + "Ungoliant_Card", + "Mole_Card", + "Gemini_Card", + "Seyren_Card", + "Magaleta_Card", + "Katrinn_Card", + "Acidus__Card", + "Vanberk_Card", + "Isilla_Card", + "Knocker_Card", + "Banshee_Card" +) +Old_C_Album_Acc: ( + "Kukre_Card", + "Tarou_Card", + "Poporing_Card", + "Worm_Tail_Card", + "Muka_Card", + "Smokie_Card", + "Poison_Spore_Card", + "Yoyo_Card", + "Vitata_Card", + "Zerom_Card", + "Pirate_Skel_Card", + "Phen_Card", + "Mantis_Card", + "Marine_Sphere_Card", + "Kobold_Card", + "Obeaune_Card", + "Horong_Card", + "Joker_Card", + "Gargoyle_Card", + "Galapago_Card", + "Rice_Cake_Boy_Card", + "Poison_Toad_Card", + "Raydric_Archer_Card", + "Wraith_Card", + "Lude_Card", + "Marin_Card", + "Mimic_Card", + "Violy_Card", + "Bon_Gun_Card", + "Blazzer_Card", + "Sageworm_Card", + "Stem_Worm_Card", + "Spring_Rabbit_Card", + "Sleeper_Card", + "Shinobi_Card", + "Wild_Ginseng_Card", + "Owl_Duke_Card", + "Owl_Baron_Card", + "Alligator_Card", + "Orc_Archer_Card", + "Evil_Cloud_Hermit_Card", + "Wind_Ghost_Card", + "Li_Me_Mang_Ryang_Card", + "Dancing_Dragon_Card", + "Tengu_Card", + "Greatest_General_Card", + "Cookie_Card", + "Quve_Card", + "Hylozoist_Card", + "See_Otter_Card", + "Blood_Butterfly_Card", + "Heater_Card", + "Anopheles_Card", + "Armaia_Card", + "Whikebain_Card", + "Erend_Card", + "Gremlin_Card", + "Beholder_Card", + "Green_Iguana_Card", + "Hydro_Card", + "Dragon_Egg_Card", + "Plasma_Card", + "Retribution_Card", + "Snowier_Card", + "Siroma_Card", + "Gazeti_Card", + "Galion_Card", + "Stapo_Card", + "Imp_Card", + "Ragged_Zombie_Card", + "Hell_Poodle_Card" +) +Old_C_Album_Shoes: ( + "Zombie_Card", + "Thief_Bug_Male_Card", + "Eggyra_Card", + "Matyr_Card", + "Sohee_Card", + "Verit_Card", + "Gajomart_Card", + "Antique_Firelock_Card", + "Gullinbursti_Card", + "Raggler_Card", + "Merman_Card", + "Megalith_Card", + "Mini_Demon_Card", + "Miyabi_Ningyo_Card", + "Skeleton_General_Card", + "Cookie_XMAS_Card", + "Iron_Fist_Card", + "Alarm_Card", + "Am_Mut_Card", + "Ancient_Worm_Card", + "Wild_Rose_Card", + "Explosion_Card", + "Zombie_Prisoner_Card", + "Cat_O_Nine_Tail_Card", + "Freezer_Card", + "Acidus_Card", + "Ferus__Card", + "Tha_Odium_Card", + "Ice_Titan_Card", + "Zombie_Slaughter_Card" +) +Old_C_Album_Shield: ( + "Andre_Egg_Card", + "Ambernite_Card", + "Horn_Card", + "Thara_Frog_Card", + "Orc_Warrior_Card", + "Megalodon_Card", + "BigFoot_Card", + "Argos_Card", + "Rafflesia_Card", + "Munak_Card", + "Petit__Card", + "Medusa_Card", + "Khalitzburg_Card", + "Anubis_Card", + "Mysteltainn_Card", + "Live_Peach_Tree_Card", + "Sting_Card", + "Increase_Soil_Card", + "Arclouse_Card", + "Ancient_Mummy_Card", + "Executioner_Card", + "Alice_Card", + "Tirfing_Card", + "Zherlthsh_Card", + "Tamruan_Card", + "Parasite_Card", + "Penomena_Card", + "High_Orc_Card", + "Teddy_Bear_Card", + "Tha_Despero_Card", + "Hodremlin_Card", + "Seeker_Card", + "Muscipular_Card", + "Flame_Skull_Card", + "Tatacho_Card", + "Aqua_Elemental_Card", + "Draco_Card", + "Luciola_Vespa_Card", + "Centipede_Card", + "Cornus_Card", + "Dark_Shadow_Card" +) +Old_C_Album_Weapon: ( + "Drops_Card", + "Poring__Card", + "Lunatic_Card", + "Pecopeco_Egg_Card", + "Savage_Babe_Card", + "Andre_Larva_Card", + "Hornet_Card", + "Farmiliar_Card", + "Plankton_Card", + "Skeleton_Card", + "Thief_Bug_Female_Card", + "Wolf_Card", + "Mandragora_Card", + "Hydra_Card", + "Snake_Card", + "Andre_Card", + "Vadon_Card", + "Marina_Card", + "Metaller_Card", + "Goblin_Card", + "Anacondaq_Card", + "Caramel_Card", + "Kaho_Card", + "Scorpion_Card", + "Drainliar_Card", + "Golem_Card", + "Magnolia_Card", + "Flora_Card", + "Desert_Wolf_Card", + "Orc_Skeleton_Card", + "Soldier_Skeleton_Card", + "Skel_Worker_Card", + "Archer_Skeleton_Card", + "Zenorc_Card", + "Requiem_Card", + "Mummy_Card", + "Strouf_Card", + "Hunter_Fly_Card", + "Side_Winder_Card", + "Petit_Card", + "Deviace_Card", + "Minorous_Card", + "Scorpion_King_Card", + "Knight_Of_Abyss_Card", + "Crab_Card", + "Goblin_Leader_Card", + "Steam_Goblin_Card", + "Goblin_Archer_Card", + "Gryphon_Card", + "Gig_Card", + "Neraid_Card", + "Dark_Priest_Card", + "The_Paper_Card", + "Dullahan_Card", + "Driller_Card", + "Diabolic_Card", + "Lava_Golem_Card", + "Rotar_Zairo_Card", + "Civil_Servant_Card", + "Mutant_Dragon_Card", + "Bloody_Murderer_Card", + "Stone_Shooter_Card", + "Assulter_Card", + "Aster_Card", + "Elder_Card", + "Orc_Lady_Card", + "Injustice_Card", + "Shellfish_Card", + "Zombie_Master_Card", + "Zipper_Bear_Card", + "Chepet_Card", + "Caterpillar_Card", + "Kobold_Leader_Card", + "Kobold_Archer_Card", + "Cruiser_Card", + "Kind_Of_Beetle_Card", + "Tri_Joint_Card", + "Panzer_Goblin_Card", + "Fur_Seal_Card", + "Fake_Angel_Card", + "Mobster_Card", + "Garm_Baby_Card", + "Phendark_Card", + "Pitman_Card", + "Metaling_Card", + "Hill_Wind_Card", + "Rawrel_Card", + "Eremes_Card", + "Harword_Card", + "Shecil_Card", + "Ferus_Card", + "Deathword_Card", + "Breeze_Card", + "Solace_Card", + "Tha_Maero_Card", + "Tha_Dolor_Card", + "Skeggiold_Card", + "Drosera_Card", + "Sword_Guardian_Card", + "Bow_Guardian_Card", + "Necromancer_Card", + "Centipede_Larva_Card", + "Hilsrion_Card", + "Bloody_Knight_Card" +) +Old_C_Album_Garment: ( + ("Dustiness_Card",32), + ("Orc_Zombie_Card",32), + ("Hode_Card",32), + ("Frilldora_Card",32), + ("Marse_Card",32), + ("Whisper_Card",32), + ("Myst_Card",32), + ("Jakk_Card",32), + ("Marionette_Card",32), + ("Isis_Card",32), + ("Baphomet__Card",32), + ("Daydric_Card",32), + ("Nine_Tail_Card",32), + "Deviling_Card", + ("Dragon_Tail_Card",32), + ("Dragon_Fly_Card",32), + "Vagabond_Wolf_Card", + "Mastering_Card", + "Wander_Man_Card", + "Vocal_Card", + ("Eclipse_Card",32), + ("Choco_Card",32), + ("Kapha_Card",32), + ("Whisper_Boss_Card",32), + "Toad_Card", + ("Punk_Card",32), + ("Harpy_Card",32), + ("Hyegun_Card",32), + ("Noxious_Card",32), + "Kavac_Card", + ("Chung_E_Card",32), + ("Orc_Baby_Card",32), + ("Aliot_Card",32), + ("Roween_Card",32), + ("Salamander_Card",32), + ("Kasa_Card",32), + ("Magmaring_Card",33), + ("Condor_Card",31) +) +//unknown carrier / unsupported +/*Candy_Holder: ( + ("Honey",9), + ("Candy",20), + ("Well_Baked_Cookie",15), + ("Piece_Of_Cake",10), + ("Bread",20), + "Old_Blue_Box", + "Yggdrasilberry", + "Old_Card_Album", + "Old_Violet_Box", + "Contracts_In_Shadow", + ("Niflheim_Ticket",10), + ("Pumpkin_Cake",5), + ("Pumpkin_Pie",5) +)*/ +High_Weapon_Box: ( + ("Mail_Breaker",5), + ("Weeder_Knife",5), + ("Mama's_Knife",5), + ("Assasin_Dagger",5), + ("Exercise",5), + ("Azoth",5), + ("Sucsamad",5), + ("Grimtooth_",5), + ("Princess_Knife",5), + ("Cursed_Dagger",5), + ("Counter_Dagger",5), + ("Holy_Dagger",5), + ("Krieg",5), + ("Weihna",5), + ("Black_Wing",5), + ("Blood_Tears",5), + ("Unholy_Touch",5), + ("Drill_Katar",5), + ("Krishna",5), + ("Cakram",5), + ("Cleaver",5), + ("Great_Axe",5), + ("Sabbath",5), + ("Bradium_Stonehammer",5), + ("Slaughter",5), + ("Tomahawk",5), + ("Vecer_Axe",5), + ("Ice_Falchon",7), + ("Fire_Brand",7), + ("Scissores_Sword",7), + ("Cutlas",7), + ("Solar_Sword",7), + ("Mysteltainn_",7), + ("Tale_Fing_",7), + ("Byeorrun_Gum",7), + ("Immaterial_Sword",7), + ("Star_Dust_Blade",7), + ("Muramasa",7), + ("Dragon_Slayer",7), + ("Schweizersabel",7), + ("Zweihander",7), + ("Katzbalger",7), + ("Zweihander_",7), + ("Muscle_Cutter",7), + ("Schweizersabel_",7), + ("Dragon_Slayer_",7), + ("Tae_Goo_Lyeon",7), + ("Bloody_Eater",7), + ("Veteran_Sword",7), + ("Ruber",5), + ("Krasnaya",5), + ("Gungnir",5), + ("Gelerdria",5), + ("Tjungkuletti",5), + ("Gungnir_",5), + ("Crescent_Scythe",5), + ("Bill_Guisarme",5), + ("Zephyrus",5), + ("Longinus's_Spear",5), + ("Brionac",5), + ("Hell_Fire",5), + ("Gae_Bolg",5), + ("Crescent_Scythe_",5), + ("Spectral_Spear",5), + ("Ahlspiess",5), + ("Spectral_Spear_",5), + ("Gae_Bolg_",5), + ("Zephyrus_",5), + ("Wizardy_Staff",5), + ("Staff_Of_Wing",5), + ("Walking_Stick",5), + ("Holy_Stick",5), + ("Dead_Tree_Cane",5), + ("Kronos",5), + ("Dea_Staff",5), + ("Divine_Cross",5), + ("Golden_Mace",5), + ("Long_Mace",5), + ("Quadrille",5), + ("Golden_Mace_",5), + ("Nemesis",5), + ("Erde",5), + ("Red_Square_Bag",5), + ("Red_Ether_Bag",5), + ("Book_Of_The_Apocalypse",5), + ("Girl's_Diary",5), + ("Legacy_Of_Dragon",5), + ("Hardback",5), + ("Bible_Of_Battlefield",5), + ("Kaiser_Knuckle",5), + ("Claw_Of_Garm",5), + ("Dragon_Wing",5), + ("Bow_Of_Minstrel",5), + ("Ixion_Wing",5), + ("Nepenthes_Bow",5), + ("Cursed_Lyre",5), + ("Falken_Blitz",5), + ("Mystic_Bow",5), + ("Electronic_Guitar",5), + ("Oriental_Lute",5), + ("Oriental_Lute_",5), + ("Harp_Of_Nepenthes",5), + ("Lariat",5), + ("Rapture_Rose",5), + ("Chemeti",5), + ("Bladed_Whip",5), + ("Electric_Eel",5), + ("Sea_Witch_Foot",5), + ("Queen's_Whip",5), + ("Carrot_Whip",5), + ("Queen's_Whip_",5), + ("Stem_Of_Nepenthes",5), + "Thorn_Staff", + "Eraser", + "Destruction_Rod", + "Infiltrator", + "Infiltrator_", + "Heart_Breaker", + "Hurricane_Fury", + "Right_Epsilon", + "Doom_Slayer", + ("Sword_Breaker",4), + //("14420",2), -- Unknown/Unsupported + ("Chrome_Sword",2), + ("Chrome_Twohand_Sword",2), + ("Excalibur",2), + ("Masamune",2), + ("Nagan",2), + ("Executioner_",2), + ("Executioner__",2), + ("Altas_Weapon",2), + ("Giant_Axe",2), + ("Guillotine",2), + ("Brood_Axe",2), + ("Wild_Beast_Claw",2), + ("Inverse_Scale",2), + ("Bloody_Roar",2), + ("Cardo",2), + ("Imperial_Spear",2), + ("Skewer",2), + ("Battle_Hook",2), + ("Mental_Stick",2), + "Doom_Slayer_", + "Hunting_Spear", + "Edge", + "Violet_Fear", + "Death_Guidance", + "House_Auger", + "Bazerald", + "Ancient_Dagger", + "Grand_Cross", + "Grand_Cross_", + "Death_Note", + "Berserk", + "Berserk_", + "Berserk_Guitar", + "Rosebine", + ("Forturn_Sword",2), + ("Combat_Knife",2), + ("Moonlight_Sword",2), + ("Spike",2), + ("Spike_",2), + ("Slash",2), + ("Sura_Rampage",2), + ("Bow_Of_Roguemaster",2), + ("Balistar",2), + ("Balistar_",2), + ("Bow_Of_Rudra",2), + ("Green_Whistle",2), + ("Stem_Whip",2), + "Agent_Katar", + "Guillotine_Katar", + "Ignus_Steel", + "End_Sectora", + "Cannon_Spear", + "Cold_Magic_Book", + "Light_of_Recovery", + "As-nail", + "Scarlet-nail", + "Bloody_Cross", + "Thief_Crossbow", + "Giant_Crossbow", + "Creeper_Bow" +) \ No newline at end of file diff --git a/db/re/item_group_db.txt b/db/re/item_group_db.txt deleted file mode 100644 index 0bc025291..000000000 --- a/db/re/item_group_db.txt +++ /dev/null @@ -1,6 +0,0 @@ -import: db/re/item_bluebox.txt -import: db/re/item_violetbox.txt -import: db/re/item_cardalbum.txt -import: db/item_findingore.txt -import: db/re/item_giftbox.txt -import: db/re/item_misc.txt diff --git a/db/re/item_misc.txt b/db/re/item_misc.txt deleted file mode 100644 index 053a80e60..000000000 --- a/db/re/item_misc.txt +++ /dev/null @@ -1,808 +0,0 @@ -// GroupID,ItemID,Rate -// -// Cookie Bag -7,529,5 //Candy -7,530,5 //Candy Cane -7,538,5 //Well-baked Cookie -7,539,5 //Piece of Cake -7,558,1 //Chocolate -7,559,1 //Hand-made Chocolate -7,560,1 //Hand-made White Chocolate -7,561,1 //White Chocolate -7,564,5 //Rice Ball -7,570,5 //Lucky Candy -7,571,5 //Lucky Candy Cane -7,572,5 //Lucky Cookie -7,573,1 //Chocolate Drink -7,12122,1 //Sesame Pastry -7,12123,1 //Honey Pastry -7,12124,1 //Rainbow Cake -// First Aid Kit -8,501,5 // Red Potion -8,502,5 // Orange Potion -8,503,5 // Yellow Potion -8,504,5 // White Potion -8,505,5 // Blue Potion -8,506,5 // Green Potion -8,545,5 // Condensed Red Potion -8,546,5 // Condensed Yellow Potion -8,547,5 // Condensed White Potion -8,569,5 // Novice Potion -8,605,5 // Anodyne -8,645,5 // Concentration Potion -8,656,5 // Awakening Potion -8,657,5 // Berserk Potion -8,678,1 // Poison Bottle -8,12016,5 // Speed Potion -8,12017,5 // Slow Potion -8,12020,5 // Cursed_Water -// Herbs -9,507,1 // Red Herb -9,508,1 // Yellow Herb -9,509,1 // White Herb -// Fruits -10,512,1 // Apple -10,513,1 // Banana -10,514,1 // Grape -10,515,1 // Carrot -10,516,1 // Potato -// Meat -11,517,1 // Meat -11,528,1 // Monster Food -// Candy -12,529,1 // Candy -12,530,1 // Candy Cane -// Juice -13,531,1 // Apple Juice -13,532,1 // Banana Juice -13,534,1 // Carrot Juice -// Fish -14,544,1 // Raw Fish -14,551,1 // Sushi -// Boxes -15,603,1 // Old Blue Box -15,617,1 // Old Purple Box -15,644,1 // Gift Box -// Gemstones -16,715,1 // Yellow Gemstone -16,716,1 // Red Gemstone -16,717,1 // Blue Gemstone -// Elemental Resist Potions -17,12118,1 // Fire Resist Potion -17,12119,1 // Cold Resist Potion -17,12120,1 // Earth Resist Potion -17,12121,1 // Thunder Resist Potion -// Ores -18,1002,30 // Iron_Ore -18,998,28 // Iron -18,993,26 // Yellow_Live -18,1003,24 // Coal -18,992,22 // Wind_Of_Verdure -18,1010,20 // Phracon -18,991,18 // Crystal_Blue -18,990,16 // Boody_Red -18,999,14 // Steel -18,1011,12 // Emveretarcon -18,757,10 // Elunium_Stone -18,756,9 // Oridecon_Stone -18,997,8 // Great_Nature -18,996,7 // Rough_Wind -18,995,6 // Mistic_Frozen -18,994,5 // Flame_Heart -18,985,4 // Elunium -18,984,3 // Oridecon -18,969,2 // Gold -18,714,1 // Emperium -// Food Types -19,526,5 // Royal_Jelly -19,12042,10 // Str_Dish02 -19,12057,10 // Agi_Dish02 -19,12053,10 // Vit_Dish03 -19,12062,10 // Dex_Dish02 -19,12068,10 // Luk_Dish03 -19,12047,10 // Int_Dish02 -19,531,30 // Apple_Juice -19,532,30 // Banana_Juice -19,533,30 // Grape_Juice -19,534,30 // Carrot_Juice -19,538,30 // Well_Baked_Cookie -19,536,50 // Ice_Cream -19,544,50 // Fish_Slice -19,548,50 // Cheese -19,551,50 // Shusi -19,553,50 // Bun -19,554,50 // Mojji -19,535,50 // Pumpkin -19,516,100 // Sweet_Potato -19,513,100 // Banana -19,512,600 // Apple -// Recovery Types -20,522,5 // Fruit_Of_Mastela -20,521,5 // Leaflet_Of_Aloe -20,520,10 // Leaflet_Of_Hinal -20,545,10 // Red_Slim_Potion -20,12118,10 // Resist_Earth -20,508,20 // Yellow_Herb -20,501,20 // Red_Potion -20,511,30 // Green_Herb -20,507,30 // Red_Herb -20,569,50 // Novice_Potion -20,549,50 // Nice_Sweet_Potato -20,529,100 // Candy -20,528,200 // Monster's_Feed -20,550,600 // Popped_Rice -// Minerals - Unused -21,714,1 // Emperium -21,756,1 // Rough Oridecon -21,757,1 // Rough Elunium -21,969,1 // Gold -21,984,1 // Oridecon -21,985,1 // Elunium -21,990,1 // Red Blood -21,991,1 // Crystal Blue -21,992,1 // Wind of Verdure -21,993,1 // Green Live -21,994,1 // Flame Heart -21,995,1 // Mystic Frozen -21,996,1 // Rough Wind -21,997,1 // Great Nature -21,998,1 // Iron -21,999,1 // Steel -21,1002,1 // Iron Ore -21,1003,1 // Coal -21,1010,1 // Phracon -21,1011,1 // Emveretarcon -// Set Of Taiming Item -22,619,1 // Unripe Apple -22,620,1 // Orange Juice -22,621,1 // Bitter Herb -22,622,1 // Rainbow Carrot -22,623,1 // Earthworm the Dude -22,624,1 // Rotten Fish -22,625,1 // Rusty Iron -22,626,1 // Monster Juice -22,627,1 // Sweet Milk -22,628,1 // Well-Dried Bone -22,629,1 // Singing Flower -22,630,1 // Dew Laden Moss -22,631,1 // Deadly Noxious Herb -22,632,1 // Fatty Chubby Earthworm -22,633,1 // Sweet Potato -22,634,1 // Tropical Banana -22,635,1 // Orc Trophy -22,636,1 // No Recipient -22,637,1 // Old Broom -22,638,1 // Silver Knife of Chastity -22,639,1 // Armlet of Obedience -22,640,1 // Shining Stone -22,641,1 // Contracts in Shadow -22,642,1 // Book of the Devil -22,659,1 // Her Heart -22,660,1 // Forbidden Red Candle -22,661,1 // Soft Apron -22,10001,1 // Skull Helm -22,10002,1 // Monster Oxygen Mask -22,10003,1 // Transparent Headgear -22,10004,1 // Pacifier -22,10005,1 // Wig -22,10006,1 // Queen's Hair Ornament -22,10007,1 // Silk Ribbon -22,10008,1 // Punisher -22,10009,1 // Wild Flower -22,10010,1 // Battered Pot -22,10011,1 // Stellar Hairpin -22,10012,1 // Tiny Egg Shell -22,10013,1 // Backpack -22,10014,1 // Rocker Glasses -22,10015,1 // Green Lace -22,10016,1 // Golden Bell -22,10017,1 // Bark Shorts -22,10018,1 // Monkey Circlet -22,10019,1 // Red Scarf -22,10020,1 // Grave Keeper's Sword -22,12373,1 // Boy's Pure Heart -22,12374,1 // Ice Fireworks -22,12395,1 // Tantan Noodle -// Bundle Of Magic Scroll -23,686,1 // Level 3 Earth Spike -23,687,1 // Level 5 Earth Spike -23,688,1 // Level 3 Cold Bolt -23,689,1 // Level 5 Cold Bolt -23,690,1 // Level 3 Fire Bolt -23,691,1 // Level 5 Fire Bolt -23,692,1 // Level 3 Lightening Bolt -23,693,1 // Level 5 Lightening Bolt -23,694,1 // Level 3 Soul Strike -23,695,1 // Level 5 Soul Strike -23,696,1 // Level 1 Fire Ball -23,697,1 // Level 5 Fire Ball -23,698,1 // Level 1 Fire Wall -23,699,1 // Level 5 Fire Wall -23,700,1 // Level 1 Frost Diver -23,12000,1 // Level 5 Frost Diver -23,12001,1 // Level 3 Heal -23,12002,1 // Level 5 Heal -// Random Quiver -24,12004,1 // Quiver -24,12005,1 // Iron Arrow Quiver -24,12006,1 // Steel Arrow Quiver -24,12007,1 // Oridecon Arrow Quiver -24,12008,1 // Fire Arrow Quiver -24,12009,1 // Silver Arrow Quiver -24,12010,1 // Wind Arrow Quiver -24,12011,1 // Stone Arrow Quiver -24,12012,1 // Crystal Arrow Quiver -24,12013,1 // Shadow Arrow Quiver -24,12014,1 // Immaterial Arrow Quiver -24,12015,1 // Rusty Arrow Quiver -24,12183,2 // Holy Arrow Quiver -// Wrapped Mask -25,2278,10 // Mr. Smile -25,2281,10 // Opera Masque -25,2288,10 // Mr. Scream -25,2292,10 // Welding Mask -25,2297,10 // Goblin Mask -25,5005,10 // Gas Mask -25,5086,10 // Alarm Mask -25,5087,10 // Poker Face -25,5088,10 // Surprised Mask -25,5089,10 // Annoyed Mask -25,5090,10 // Goblin Leader Mask -25,5121,1 // Zherlthsh Mask -25,5176,2 // Hahoe Mask -// Accessory Box -26,2601,10 // Ring -26,2602,11 // Earring -26,2603,12 // Necklace -26,2604,12 // Glove -26,2605,12 // Brooch -26,2607,12 // Clip -26,2608,14 // Rosary -26,2609,14 // Skull Ring -26,2610,14 // Gold Ring -26,2611,14 // Silver Ring -26,2612,14 // Flower Ring -26,2613,11 // Diamond Ring -26,2615,1 // Safety Ring -26,2616,1 // Critical Ring -26,2617,10 // Celebrant's Mitten -26,2618,11 // Matyr's Leash -26,2619,10 // Bow Thimble -26,2621,1 // Ring -26,2622,1 // Earring -26,2623,10 // Necklace -26,2624,1 // Glove -26,2625,1 // Brooch -26,2626,1 // Rosary -26,2627,10 // Belt -26,2628,14 // Novice Armlet -26,2654,1 // Shinobi Sash -26,2656,1 // Armor Charm -26,2658,10 // Nile Rose -26,2659,2 // Vesper Core 01 -26,2660,2 // Vesper Core 02 -26,2661,2 // Vesper Core 03 -26,2662,2 // Vesper Core 04 -26,2671,1 // Bow Thimble -26,2677,1 // Spiritual Ring -26,2680,9 // Ring of Minor Spirits -26,2700,2 // Red Silk of Seal -26,2701,1 // Glove of Orleans -26,2703,1 // Expert Ring -26,2716,1 // Librarian Glove -26,2717,1 // Pocket Watch -26,2718,1 // Lunatic Brooch -26,2719,1 // Iron Wrist -// jewels -27,715,100 // Yellow_Gemstone -27,716,100 // Red_Gemstone -27,717,100 // Blue_Gemstone -27,718,10 // Dark_Red_Jewel -27,719,10 // Violet_Jewel -27,720,10 // Skyblue_Jewel -27,721,10 // Azure_Jewel -27,722,10 // Scarlet_Jewel -27,723,10 // Cardinal_Jewel -27,724,10 // Cardinal_Jewel_ -27,725,10 // Red_Jewel -27,726,10 // Blue_Jewel -27,727,10 // White_Jewel -27,728,10 // Golden_Jewel -27,729,10 // Bluish_Green_Jewel -27,730,5 // Crystal_Jewel -27,731,4 // Crystal_Jewel_ -27,732,3 // Crystal_Jewel__ -27,733,27 // Crystal_Jewel___ -27,746,50 // Glass_Bead -// Egg Boy -32,514,300 // Grape -32,564,522 // Rice Ball -32,660,20 // Forbidden Red Candle -32,682,100 // Distilled Fighting Spirit -32,683,50 // Herb of Incantation -32,2274,5 // Ghost Bandana -32,5072,2 // Incubus Horn -// Egg Girl -33,514,300 // Grape -33,564,522 // Rice Ball -33,661,20 // Soft Apron -33,682,100 // Distilled Fighting Spirit -33,683,50 // Herb of Incantation -33,5042,5 // Bao Bao -33,5066,2 // Succubus Horn -// Lotto Box -35,7391,1 // Lotto Ball 31 -35,7392,1 // Lotto Ball 32 -35,7393,1 // Lotto Ball 33 -35,7394,1 // Lotto Ball 34 -35,7395,1 // Lotto Ball 35 -35,7396,1 // Lotto Ball 36 -35,7397,1 // Lotto Ball 37 -35,7398,1 // Lotto Ball 38 -35,7540,1 // Lotto Ball 39 -35,7541,1 // Lotto Ball 40 -// Food Package -36,512,1 // Apple -36,513,1 // Banana -36,514,1 // Grape -36,515,1 // Carrot -36,516,1 // Potato -36,517,1 // Meat -36,518,1 // Honey -36,519,1 // Milk -36,520,1 // Hinalle Leaflet -36,521,1 // Aloe Leaflet -36,522,1 // Mastela Fruit -36,526,1 // Royal Jelly -36,529,1 // Candy -36,530,1 // Candy Cane -36,531,1 // Apple Juice -36,532,1 // Banana Juice -36,533,1 // Grape Juice -36,534,1 // Carrot Juice -36,536,1 // Ice Cream -36,538,1 // Well-baked Cookie -36,539,1 // Piece of Cake -36,544,1 // Raw Fish -36,548,1 // Cheese -36,549,1 // Yam -36,550,1 // Rice Cake -36,551,1 // Sushi -36,553,1 // Bao -36,554,1 // Mochi -36,555,1 // Traditional Rice Cake -36,556,1 // Rice Cake Stick -36,557,1 // Neatly Sliced Rice Cake -36,558,1 // Chocolate -36,559,1 // Hand-made Chocolate -36,560,1 // Hand-made White Chocolate -36,561,1 // White Chocolate -36,564,1 // Rice Ball -36,566,1 // Tom Yum Goong -36,567,1 // Shrimp -36,568,1 // Lemon -36,576,1 // Prickly Fruit -36,607,1 // Yggdrasil Berry -36,608,1 // Yggdrasil Seed -36,663,1 // Songpyun -36,669,1 // Rice-Cake Soup -// Potions -37,501,1 // Red Potion -37,502,1 // Orange Potion -37,503,1 // Yellow Potion -37,504,1 // White Potion -// Red Box_ -38,5137,1 // Alice Doll -38,5138,9 // Magic Eyes -38,5139,10 // Lotus -38,5140,10 // Kawaii Ribbon -// Old Bleu Box -39,519,1 // Milk -39,538,1 // Well-baked Cookie -39,644,1 // Gift Box -39,687,1 // Level 5 Earth Spike -39,689,1 // Level 5 Cold Bolt -39,691,1 // Level 5 Fire Bolt -39,693,1 // Level 5 Lightening Bolt -39,697,1 // Level 5 Fire Ball -39,699,1 // Level 5 Fire Wall -39,12000,1 // Level 5 Frost Diver -39,12002,1 // Level 5 Heal -// Red Box -40,5099,1 // Neko Mimi -40,5137,11 // Alice Doll -40,5138,11 // Magic Eyes -40,5139,11 // Lotus -40,5140,11 // Kawaii Ribbon -40,5142,11 // Crescent Helm -40,5143,12 // Kabuki Mask -40,5152,1 // Phoenix Crown -40,5181,11 // Helm of Darkness -40,5182,1 // Puppy Hat -40,5183,11 // Nest Hat -40,5185,11 // Laurel Crown -40,5186,11 // Geographer Decoration -40,5187,10 // Twin Ribbon -// Green Box -41,573,100 // Chocolate Drink -41,607,99 // Yggdrasil Berry -41,608,100 // Yggdrasil Seed -41,5182,1 // Puppy Hat -41,12018,100 // Firecracker -41,12075,100 // Steamed Tongue -41,12080,100 // Dragon Breath Cocktail -41,12085,100 // Immortal Stew -41,12090,100 // Steamed Desert Scorpions -41,12095,100 // Hwergelmir's Tonic -41,12100,100 // Cooked Nine Tail -// Old Yellow Box -42,5259,1 // Elephant Hat -42,5260,1 // Cookie Hat -42,5261,1 // Silver Tiara -42,5262,1 // Golden Tiara -// Hometown Gift -45,663,1 // Korean Rice Cake -45,12122,1 // Sesame Pastry -45,12123,1 // Honey Pastry -45,12124,1 // Rainbow Cake -45,12195,1 // Plain Rice Cake -45,12196,1 // Hearty Rice Cake -45,12197,1 // Salty Rice Cake -45,12198,1 // Lucky Rice Cake -// Masquerade Ball Box -46,5296,10 // Drooping Nine Tail -46,5297,1 // Soul Wing -46,5298,10 // Dokebi's Wig -46,5299,10 // Pagdayaw -// Tresure Box WoE -47,603,6 // Old Blue Box -47,658,6 // Tribal Solidarity -47,678,3 // Poison Bottle -47,732,9 // 3carat Diamond -47,12010,24 // Wind Arrow Quiver -47,12011,25 // Stone Arrow Quiver -47,12012,26 // Crystal Arrow Quiver -47,12105,12 // Taming Gift Set -47,12107,2 // Wrapped Mask -47,12108,9 // Scroll Package -47,12110,9 // First Aid Kit -47,12111,36 // Bundle of Food -47,12130,48 // Cookie Bag -47,12149,27 // Bullet Casing -47,12150,27 // Shell of Blood Casing -47,12151,27 // Silver Bullet Casing -47,12183,7 // Holy Arrow Quiver -47,12194,6 // Present from Home -47,12260,22 // Summer Event Suit -47,12702,8 // Old Bleu Box -// Masquerade Ball Box2 -48,5211,1 // Ribbon Hat -48,5213,13 // Rabbit Ears -48,5289,10 // Vanilmirth Hat -48,5304,10 // Executioner Hood -// Easter Scroll -49,636,110 // No Recipient -49,637,110 // Old Broom -49,638,110 // Silver Knife of Chastity -49,639,110 // Armlet of Obedience -49,640,110 // Shining Stone -49,641,110 // Contracts in Shadow -49,642,110 // Book of the Devil -49,643,205 // Pet Incubator -49,659,110 // Her Heart -49,2264,1 // Munak Hat -49,2274,1 // Ghost Bandana -49,5046,1 // Bongun Hat -49,5167,1 // Munak Hat [1] -49,5168,1 // Bongun Hat [1] -// Pierre Treasurebox -50,603,11 // Old Blue Box -50,604,3 // Dead Branch -50,617,5 // Old Purple Box -50,644,3 // Gift Box -50,975,3 // Scarlet Dyestuff -50,976,3 // Lemon Dyestuff -50,978,3 // Cobaltblue Dyestuff -50,979,3 // Darkgreen Dyestuff -50,980,3 // Orange Dyestuff -50,981,3 // Violet Dyestuff -50,982,3 // White Dyestuff -50,983,3 // Black Dyestuff -50,7289,3 // Peridot -50,7290,3 // Phlogopite -50,7291,3 // Agate -50,7292,3 // Muscovite -50,7293,3 // Rose Quartz -50,7294,3 // Turquoise -50,7295,3 // Citrin -50,7296,3 // Pyroxene -50,7297,3 // Biotite -50,12018,3 // Firecracker -50,12075,3 // Steamed Tongue -50,12085,3 // Immortal Stew -50,12090,3 // Steamed Desert Scorpions -50,12095,3 // Hwergelmir's Tonic -50,12100,3 // Cooked Nine Tail -50,12103,1 // Bloody Branch -// Cherish Box -51,5454,1 // Puppy Hat -51,5455,4 // Decorative Geographer -51,5456,5 // Summer Hat -// Cherish Box Ori -52,2712,3 // Collector's Edition Book -52,5212,2 // Solar Panels -52,5256,1 // Valkyrie Feather Band -52,5305,2 // Pirate Dagger -52,5332,2 // Loki Mask -// Louise_Costume_Box -53,12132,18 // Red_Bag -53,12260,2 // Cool_Summer_Outfit -// Xmas_Gift -54,559,18 // Light_Orange_Pot -54,560,18 // HandMade_Chocolate_ -54,573,18 // Chocolate_Drink -54,603,24 // Old_Blue_Box -54,644,66 // Gift_Box -54,732,12 // Crystal_Jewel__ -54,5136,12 // Santa's_Hat_ -54,12016,12 // Speed_Up_Potion -54,12017,12 // Slow_Down_Potion -54,12105,6 // Set_Of_Taiming_Item -54,12107,6 // Wrapped_Mask -54,12108,12 // Bundle_Of_Magic_Scroll -54,12110,12 // First_Aid_Kit -54,12130,12 // Cookie_Bag -54,12132,6 // Red_Bag -54,12354,24 // Buche_De_Noel -54,12702,36 // Old_Bleu_Box -54,14546,6 // Fire_Cracker_Love -54,14550,6 // Fire_Cracker_Xmas -// Fruit Basket -55,512,6 // Apple -55,513,5 // Banana -55,514,4 // Grape -55,522,3 // Mastela Fruit -55,535,2 // Pumpkin -55,568,6 // Lemon -55,576,2 // Prickly Fruit -55,578,4 // Strawberry -55,582,3 // Orange -55,587,2 // Red Prickly Fruit -55,607,1 // Yggdrasil Berry -55,608,1 // Yggdrasil Seed -55,7164,5 // Solid Peach -55,7182,4 // Cacao -55,11520,5 // Mora Mandarin -55,12574,4 // Mora Berry -// Improved Coin Bag -56,6080,5 // Manuk Coin -56,6081,5 // Splendide Coin -56,6304,5 // Proof Of Sapha's Honor -56,6380,5 // Mora Village Coin -56,6418,1 // A Grade Coin -56,6419,2 // B Grade Coin -56,6420,1 // C Grade Coin -56,12636,8 // Malangdo Canned Specialties -// Intermediate Coin Bag -57,6080,4 // Manuk Coin -57,6081,4 // Splendide Coin -57,6304,4 // Proof Of Sapha's Honor -57,6380,4 // Mora Village Coin -57,6419,1 // B Grade Coin -57,6420,2 // C Grade Coin -57,6421,1 // D Grade Coin -57,12636,9 // Malangdo Canned Specialties -// Minor Coin Bag -58,6080,3 // Manuk Coin -58,6081,3 // Splendide Coin -58,6304,3 // Proof Of Sapha's Honor -58,6380,3 // Mora Village Coin -58,6420,1 // C Grade Coin -58,6421,2 // D Grade Coin -58,6422,1 // E Grade Coin -58,12636,10 // Malangdo Canned Specialties -// S Grade Coin Bag -59,6423,3 // Sea God's Wrath -59,6418,2 // A Grade Coin -59,6419,1 // B Grade Coin -// A Grade Coin Bag -60,6418,3 // A Grade Coin -60,6419,2 // B Grade Coin -60,6420,1 // C Grade Coin -// Advanced Weapons Box -61,1130,1 // Nagan -61,1131,1 // Ice_Falchon -61,1132,1 // Edge -61,1133,1 // Fire_Brand -61,1134,1 // Caesar's Sword -61,1135,1 // Cutlas -61,1136,1 // Solar_Sword -61,1137,1 // Excalibur -61,1138,1 // Mysteltainn -61,1139,1 // Tirfing -61,1140,1 // Byeollungum -61,1141,1 // Immaterial_Sword -61,1148,1 // Star_Dust_Blade -61,1164,1 // Muramasa -61,1165,1 // Masamune -61,1166,1 // Dragon_Slayer -61,1167,1 // Schweizersabel -61,1168,1 // Zweihander -61,1169,1 // Executioner -61,1170,1 // Katzbalger -61,1171,1 // Zweihander_ -61,1175,1 // Altas_Weapon -61,1176,1 // Muscle_Cutter -61,1178,1 // Schweizersabel_ -61,1179,1 // Executioner__ -61,1180,1 // Dragon_Slayer_ -61,1181,1 // Tae_Goo_Lyeon -61,1182,1 // Bloody_Eater -61,1185,1 // Violet_Fear -61,1186,1 // Death_Guidance -61,1188,1 // Veteran_Sword -61,1189,1 // Krasnaya -61,1196,1 // Chrome_Metal_Two-Hand_Sword -61,1223,1 // Forturn_Sword -61,1224,1 // Sword_Breaker -61,1225,1 // Mail_Breaker -61,1227,1 // Weeder_Knife -61,1228,1 // Combat_Knife -61,1229,1 // Kitchen_Knife -61,1230,1 // Ice_Pick -61,1231,1 // Bazerald -61,1232,1 // Assasin_Dagger -61,1233,1 // Exorciser -61,1234,1 // Moonlight_Dagger -61,1235,1 // Azoth -61,1236,1 // Sucsamad -61,1237,1 // Grimtooth -61,1240,1 // Princess_Knife -61,1241,1 // Cursed_Dagger -61,1242,1 // Counter_Dagger -61,1244,1 // Holy_Dagger -61,1261,1 // Infiltrator -61,1263,1 // Unholy_Touch -61,1265,1 // Bloody_Roar -61,1266,1 // Infiltrator_ -61,1268,1 // Wild_Beast_Claw -61,1269,1 // Inverse_Scale -61,1270,1 // Drill_Katar -61,1271,1 // Blood_Tears -61,1284,1 // Krishna -61,1285,1 // Chakram -61,1305,1 // Cleaver -61,1311,1 // Vecer_Axe -61,1363,1 // Bloody_Axe -61,1364,1 // Great_Axe -61,1365,1 // Sabbath -61,1366,1 // Light Epsilon -61,1367,1 // Slaughter -61,1368,1 // Tomahawk -61,1369,1 // Guillotine -61,1370,1 // Doom_Slayer -61,1371,1 // Doom_Slayer_ -61,1376,1 // Heart_Breaker -61,1377,1 // Hurricane_Fury -61,1385,1 // Bradium_Stonehammer -61,1387,1 // Giant_Axe -61,1413,1 // Gungnir -61,1414,1 // Gelerdria -61,1415,1 // Brocca -61,1416,1 // Tjungkuletti -61,1418,1 // Gungnir_ -61,1420,1 // Long_Horn -61,1421,1 // Battle_Hook -61,1422,1 // Hunting_Spear -61,1433,1 // Imperial_Spear -61,1466,1 // Crescent_Scythe -61,1467,1 // Bill_Guisarme -61,1468,1 // Zephyrus -61,1469,1 // Longinus's_Spear -61,1470,1 // Brionac -61,1471,1 // Hell_Fire -61,1473,1 // Wizardy_Staff -61,1474,1 // Gae_Bolg -61,1477,1 // Spectral_Spear -61,1478,1 // Ahlspiess, -61,1479,1 // Spectral_Spear_ -61,1480,1 // Gae_Bolg_ -61,1481,1 // Zephyrus_ -61,1484,1 // Cardo -61,1523,1 // Spike -61,1524,1 // Golden_Mace -61,1525,1 // Long_Mace -61,1527,1 // Quadrille -61,1528,1 // Grand_Cross -61,1538,1 // Spike_ -61,1539,1 // Golden_Mace_ -61,1540,1 // Grand_Cross_ -61,1541,1 // Nemesis -61,1557,1 // Book_Of_The_Apocalypse -61,1558,1 // Girl's_Diary -61,1559,1 // Legacy_Of_Dragon -61,1561,1 // Hardcover_Book -61,1562,1 // Battlefield_Textbook -61,1565,1 // Ledger of Death -61,1616,1 // Wing Staff -61,1629,1 // Gentleman's Staff -61,1631,1 // Holy_Stick -61,1636,1 // Thorn_Staff -61,1637,1 // Eraser -61,1643,1 // Dead_Tree_Cane -61,1654,1 // Mental_Stick -61,1719,1 // Bow_Of_Roguemaster -61,1720,1 // Bow_Of_Rudra -61,1722,1 // Ballista -61,1724,1 // Dragon_Wing -61,1725,1 // Bow_Of_Minstrel -61,1727,1 // Balistar_ -61,1737,1 // Ixion_Wing -61,1740,1 // Nepenthes_Bow -61,1741,1 // Cursed_Lyre -61,1745,1 // Falken_Blitz -61,1813,1 // Kaiser_Knuckle -61,1814,1 // Berserk -61,1815,1 // Claw_Of_Garm -61,1816,1 // Berserk_ -61,1830,1 // Great_King's_Dance -61,1913,1 // Electronic_Guitar -61,1918,1 // Oriental_Lute -61,1920,1 // Berserk_Guitar -61,1922,1 // Oriental_Lute_ -61,1926,1 // Harp_Of_Nepenthes -61,1930,1 // Green_Whistle -61,1962,1 // Lariat_Whip -61,1963,1 // Rapture_Rose -61,1964,1 // Chemeti_Whip -61,1969,1 // Blade_Whip -61,1970,1 // Queen's_Whip -61,1972,1 // Electric_Eel -61,1973,1 // Sea_Witch_Foot -61,1974,1 // Carrot_Whip -61,1976,1 // Queen's_Whip_ -61,1979,1 // Stem_Of_Nepenthes -61,1984,1 // Stem_Whip -61,1985,1 // Rose_Vine -61,2000,1 // Destruction_Rod -61,2001,1 // Divine_Cross -61,2004,1 // Kronos -61,2005,1 // Dea_Staff -61,13046,1 // Krieg -61,13047,1 // Weihna -61,13061,1 // Black_Wing -61,13062,1 // Ancient_Dagger -61,13421,1 // Ruber -61,13431,1 // Chrome_Metal_Sword -61,16000,1 // Erde -61,16001,1 // Red_Square_Bag -61,16010,1 // Red_Ether_Bag -61,18103,1 // Mystic_Bow -// Splendid_Box -62,1189,1 // Krasnaya -62,1191,1 // Alca Bringer -62,1196,1 // Two-Handed Chrome Metal Sword -62,1284,1 // Krishna -62,1285,1 // Chakram -62,1287,1 // Durga -62,1311,1 // Vecer Axe -62,1387,1 // Giant Axe -62,1433,1 // Imperial Spear -62,1649,1 // Laphine Staff -62,1745,1 // Falken Blitz -62,1746,1 // Elven Bow -62,1930,1 // Green Whistle -62,1984,1 // Stem Whip -62,2148,1 // Rosa Shield -62,2153,1 // Imperial Guard -62,13046,1 // Krieg -62,13047,1 // Weihna -62,13061,1 // Black Wing -62,13421,1 // Ruber -62,15000,1 // Bone Plate -62,15014,1 // Ebone Armor -62,16000,1 // Erde -62,16001,1 // Red Square Bag -62,16003,1 // Carga Mace -62,16010,1 // Red Ether Bag -62,18103,2 // Mystic Bow diff --git a/db/re/item_packages.conf b/db/re/item_packages.conf new file mode 100644 index 000000000..d0a13e290 --- /dev/null +++ b/db/re/item_packages.conf @@ -0,0 +1,10789 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//================= More Information ================= +// +//==================================================== +Special_Box: { + Wrapped_Mask: { + Rate: 3 + } + Poison_Bottle: { + Count: 2 + Rate: 10 + } + Set_Of_Taiming_Item: { + Rate: 5 + } + Cookie_Bag: { + Count: 2 + Rate: 100 + } + Mysterious_Can2: { + Count: 3 + Rate: 80 + } + Mysterious_PET_Bottle2: { + Count: 3 + Rate: 80 + } + Speed_Up_Potion: { + Count: 2 + Rate: 80 + } + Old_Blue_Box: { + Rate: 19 + } + Branch_Of_Dead_Tree: { + Count: 5 + Rate: 14 + } + First_Aid_Kit: { + Rate: 19 + } + Dried_Yggdrasilberry: { + Count: 3 + Rate: 70 + } + Angeling_Potion: { + Count: 3 + Rate: 70 + } + Ygnizem_Scroll: { + Count: 2 + Rate: 50 + } + Doppelganger_Scroll: { + Count: 2 + Rate: 50 + } + Wild_Rose_Scroll: { + Count: 2 + Rate: 60 + } + Gift_Box: { + Rate: 70 + } + Red_Bag: { + Count: 3 + Rate: 70 + } + Cool_Summer_Outfit: { + Count: 3 + Rate: 70 + } + Slow_Down_Potion: { + Count: 2 + Rate: 80 + } +} +Tresure_Box_WoE: { + Majestic_Goat_Repl: { + Rate: 5 + } + Jewel_Crown_Repl: { + Rate: 15 + } + Prontera_Army_Cap_Repl: { + Rate: 20 + } + Feather_Bonnet_Repl: { + Rate: 20 + } + Viking_Helm_Repl: { + Rate: 20 + } + Mysterious_Can: { + Count: 10 + Rate: 50 + } + Mysterious_PET_Bottle: { + Count: 10 + Rate: 50 + } + Mysterious_Can2: { + Count: 10 + Rate: 50 + } + Mysterious_PET_Bottle2: { + Count: 10 + Rate: 50 + } + Hometown_Gift: { + Count: 10 + Rate: 50 + } + Yggdrasilberry: { + Count: 5 + Rate: 30 + } + Seed_Of_Yggdrasil: { + Count: 10 + Rate: 50 + } + Dried_Yggdrasilberry: { + Count: 10 + Rate: 50 + } + Unripe_Fruit: { + Count: 5 + Rate: 50 + } + First_Aid_Kit: { + Count: 10 + Rate: 40 + } + Gift_Box: { + Count: 5 + Rate: 250 + } + Comp_Battle_Manual: { + Count: 3 + Rate: 20 + } + Old_Blue_Box: { + Count: 5 + Rate: 180 + } +} +RWC_Parti_Box: { + Wrapped_Mask: { + Rate: 3 + } + Poison_Bottle: { + Count: 2 + Rate: 10 + } + Set_Of_Taiming_Item: { + Rate: 5 + } + Cookie_Bag: { + Count: 2 + Rate: 90 + } + Mysterious_Can2: { + Count: 3 + Rate: 70 + } + Mysterious_PET_Bottle2: { + Count: 3 + Rate: 70 + } + Speed_Up_Potion: { + Count: 2 + Rate: 60 + } + Old_Violet_Box: { + Rate: 19 + } + Cat_Foot_Hairpin: { + Rate: 10 + } + Int_Dish10: { + Count: 2 + Rate: 35 + } + Vit_Dish10: { + Count: 2 + Rate: 35 + } + Agi_Dish10: { + Count: 2 + Rate: 35 + } + Dex_Dish10: { + Count: 2 + Rate: 35 + } + Luk_Dish10: { + Count: 2 + Rate: 35 + } + Str_Dish10: { + Count: 2 + Rate: 35 + } + Branch_Of_Dead_Tree: { + Count: 3 + Rate: 14 + } + Dried_Yggdrasilberry: { + Count: 3 + Rate: 70 + } + Angeling_Potion: { + Count: 3 + Rate: 50 + } + Ygnizem_Scroll: { + Count: 2 + Rate: 50 + } + Doppelganger_Scroll: { + Count: 2 + Rate: 50 + } + Wild_Rose_Scroll: { + Count: 2 + Rate: 50 + } + Old_Blue_Box: { + Rate: 50 + } + Hometown_Gift: { + Count: 2 + Rate: 99 + } + Pink_Drooping_Kitty: { + Rate: 10 + } + Red_Deviruchi_Cap: { + Rate: 10 + } +} +RWC_Final_Comp_Box: { + Comp_Battle_Manual: { + Random: false + Count: 2 + } + Comp_Insurance: { + Random: false + Count: 2 + } + Enriched_Slim_Pot: { + Random: false + Count: 30 + } + Rafini_Staff: { + Random: false + } + Round_Buckler: { + Random: false + } + Puente_Robe: { + Random: false + } + Claire_Suits: { + Random: false + } + Fricco_Shoes: { + Random: false + } + Rider_Insignia: { + Random: false + } + Undershirt_: { + Random: false + } + Muffler_: { + Random: false + } +} +Gift_Bundle: { + White_Slim_Potion: { + Random: false + Count: 30 + } + Seed_Of_Yggdrasil: { + Random: false + Count: 2 + } + GM_Handwriting: { + Random: false + } +} +Caracas_Ring_Box: { + Caracas_Ring: { + Random: false + Expire: 72 + } +} +Crumpled_Paper: { + Calender_January: { + Rate: 84 + } + Calender_February: { + Rate: 84 + } + Calender_March: { + Rate: 84 + } + Calender_April: { + Rate: 84 + } + Calender_May: { + Rate: 83 + } + Calender_June: { + Rate: 83 + } + Calender_July: { + Rate: 83 + } + Calender_August: { + Rate: 83 + } + Calender_September: { + Rate: 83 + } + Calender_October: { + Rate: 83 + } + Calender_November: { + Rate: 83 + } + Calender_December: { + Rate: 83 + } +} +Solo_Gift_Basket: { + Lovely_Choco_Tart: { + Random: false + Count: 5 + } + Cute_Strawberry_Choco: { + Random: false + Count: 3 + } + White_Chocolate: { + Random: false + Count: 3 + } + Chocolate_Drink: { + Random: false + Count: 4 + } + HandMade_Chocolate: { + Random: false + Count: 10 + } + HandMade_Chocolate_: { + Random: false + Count: 10 + } +} +Couple_Event_Basket: { + Fire_Cracker_Love: { + Random: false + Count: 10 + } + Fire_Cracker_Wday: { + Random: false + Count: 10 + } + /* not yet supported/unknown Fire_Cracker_Vday: { + Random: false + Count: 10 + }*/ + Fire_Cracker_Bday: { + Random: false + Count: 10 + } + Fire_Cracker_Xmas: { + Random: false + Count: 10 + } +} +GM_Warp_Box: { + Wing_Of_Fly: { + Count: 3 + Rate: 155 + } + Wing_Of_Butterfly: { + Count: 3 + Rate: 155 + } + Warp_Free_Ticket: { + Count: 3 + Rate: 150 + } + WOB_Rune: { + Count: 3 + Rate: 140 + } + WOB_Schwaltz: { + Count: 3 + Rate: 140 + } + WOB_Rachel: { + Count: 3 + Rate: 130 + } + WOB_Local: { + Count: 3 + Rate: 130 + } +} +Fortune_Cookie1: { + Bless_Word_Paper1: { + Rate: 100 + } + Bless_Word_Paper2: { + Rate: 100 + } + Bless_Word_Paper3: { + Rate: 100 + } + Bless_Word_Paper4: { + Rate: 100 + } + Bless_Word_Paper5: { + Rate: 100 + } + Bless_Word_Paper6: { + Rate: 100 + } + Bless_Word_Paper7: { + Rate: 100 + } + Bless_Word_Paper8: { + Rate: 100 + } + Bless_Word_Paper9: { + Rate: 100 + } + Bless_Word_Paper10: { + Rate: 100 + } +} +Fortune_Cookie2: { + Guidebook_Exchange: { + Random: false + Announce: true + } +} +Fortune_Cookie3: { + Free_Cash_Coupon: { + Random: false + Announce: true + } +} +New_Gift_Envelope: { + Honey_Pastry: { + Rate: 115 + } + Lucky_Cookie03: { + Count: 3 + Rate: 50 + } + Gingerbread: { + Count: 3 + Rate: 50 + } + Guyak_Pudding: { + Count: 10 + Rate: 150 + } + New_Year_Bun: { + Count: 10 + Rate: 250 + } + Charm_Of_Happiness: { + Count: 2 + Rate: 80 + } + Shaman_Hat_: { + Rate: 40 + } + Halohalo: { + Count: 2 + Rate: 80 + } + Branch_Of_Dead_Tree: { + Count: 2 + Rate: 80 + } + Traditional_Firecrack: { + Rate: 100 + } + Magic_Card_Album: { + Rate: 5 + } +} +Passion_FB_Hat_Box: { + Passion_FB_Hat: { + Random: false + } +} +Cool_FB_Hat_Box: { + Cool_FB_Hat: { + Random: false + } +} +Victory_FB_Hat_Box: { + Victory_FB_Hat: { + Random: false + } +} +Glory_FB_Hat_Box: { + Glory_FB_Hat: { + Random: false + Expire: 24 + } +} +Passion_Hat_Box2: { + Passion_FB_Hat: { + Random: false + Expire: 6 + } +} +Cool_Hat_Box2: { + Cool_FB_Hat: { + Random: false + Expire: 6 + } +} +Victory_Hat_Box2: { + Victory_FB_Hat: { + Random: false + Expire: 6 + } +} +Aspersio_5_Scroll_Box: { + Aspersio_5_Scroll: { + Random: false + Count: 10 + Named: true + } +} +Pet_Egg_Scroll_Box1: { + Pet_Egg_Scroll1: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box2: { + Pet_Egg_Scroll2: { + Random: false + Named: true + } +} +Pet_Egg_Scroll1: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Insurance: { + Count: 2 + Named: true + Rate: 200 + } + Enriched_Oridecon: { + Named: true + Rate: 80 + } + Kafra_Card: { + Count: 2 + Named: true + Rate: 300 + } + Adrenaline_Scroll: { + Count: 2 + Named: true + Rate: 300 + } + Neuralizer: { + Named: true + Rate: 10 + } + Red_Deviruchi_Cap: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll2: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 90 + } + Wind_Walk_10_Scroll: { + Count: 2 + Named: true + Rate: 150 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 200 + } + Aspersio_5_Scroll: { + Count: 2 + Named: true + Rate: 200 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Red_Wizardry_Hat: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll_Box3: { + Pet_Egg_Scroll3: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box4: { + Pet_Egg_Scroll4: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box5: { + Pet_Egg_Scroll5: { + Random: false + Named: true + } +} +Pet_Egg_Scroll3: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Insurance: { + Count: 2 + Named: true + Rate: 200 + } + Enriched_Oridecon: { + Named: true + Rate: 80 + } + Kafra_Card: { + Count: 2 + Named: true + Rate: 300 + } + Adrenaline_Scroll: { + Count: 2 + Named: true + Rate: 300 + } + Neuralizer: { + Named: true + Rate: 10 + } + Pink_Drooping_Kitty: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll4: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 90 + } + Wind_Walk_10_Scroll: { + Count: 2 + Named: true + Rate: 150 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 200 + } + Aspersio_5_Scroll: { + Count: 2 + Named: true + Rate: 200 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Pink_Fur_Hat: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll5: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 150 + } + Enriched_Elunium: { + Named: true + Rate: 135 + } + Token_Of_Siegfried: { + Count: 2 + Named: true + Rate: 200 + } + Giant_Fly_Wing: { + Count: 2 + Named: true + Rate: 300 + } + Mini_Propeller_: { + Named: true + Rate: 5 + } + Bubble_Gum: { + Named: true + Rate: 200 + } + White_Wizardry_Hat: { + Named: true + Rate: 10 + } +} +Infiltrator_Box: { + Infiltrator_C: { + Random: false + Expire: 168 + Named: true + } +} +Muramasa_Box: { + Muramasa_C: { + Random: false + Expire: 168 + Named: true + } +} +Excalibur_Box: { + Excalibur_C: { + Random: false + Expire: 168 + Named: true + } +} +Combat_Knife_Box: { + Combat_Knife_C: { + Random: false + Expire: 168 + Named: true + } +} +Counter_Dagger_Box: { + Counter_Dagger_C: { + Random: false + Expire: 168 + Named: true + } +} +Kaiser_Knuckle_Box: { + Kaiser_Knuckle_C: { + Random: false + Expire: 168 + Named: true + } +} +Pole_Axe_Box: { + Pole_Axe_C: { + Random: false + Expire: 168 + Named: true + } +} +Mighty_Staff_Box: { + Mighty_Staff_C: { + Random: false + Expire: 168 + Named: true + } +} +Right_Epsilon_Box: { + Right_Epsilon_C: { + Random: false + Expire: 168 + Named: true + } +} +Balistar_Box: { + Balistar_C: { + Random: false + Expire: 168 + Named: true + } +} +Diary_Of_Great_Sage_Box: { + Diary_Of_Great_Sage_C: { + Random: false + Expire: 168 + Named: true + } +} +Asura_Box: { + Asura_C: { + Random: false + Expire: 168 + Named: true + } +} +Apple_Of_Archer_Box: { + Apple_Of_Archer_C: { + Random: false + Expire: 168 + Named: true + } +} +Bunny_Band_Box: { + Bunny_Band_C: { + Random: false + Expire: 168 + Named: true + } +} +Sahkkat_Box: { + Sahkkat_C: { + Random: false + Expire: 168 + Named: true + } +} +Lord_Circlet_Box: { + Lord_Circlet_C: { + Random: false + Expire: 168 + Named: true + } +} +Elven_Ears_Box: { + Elven_Ears_C: { + Random: false + Expire: 168 + Named: true + } +} +Steel_Flower_Box: { + Steel_Flower_C: { + Random: false + Expire: 168 + Named: true + } +} +Critical_Ring_Box: { + Critical_Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Earring_Box: { + Earring_C: { + Random: false + Expire: 168 + Named: true + } +} +Ring_Box: { + Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Necklace_Box: { + Necklace_C: { + Random: false + Expire: 168 + Named: true + } +} +Glove_Box: { + Glove_C: { + Random: false + Expire: 168 + Named: true + } +} +Brooch_Box: { + Brooch_C: { + Random: false + Expire: 168 + Named: true + } +} +Rosary_Box: { + Rosary_C: { + Random: false + Expire: 168 + Named: true + } +} +Safety_Ring_Box: { + Safety_Ring_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core01_Box: { + Vesper_Core01_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core02_Box: { + Vesper_Core02_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core03_Box: { + Vesper_Core03_C: { + Random: false + Expire: 168 + Named: true + } +} +Vesper_Core04_Box: { + Vesper_Core04_C: { + Random: false + Expire: 168 + Named: true + } +} +Pet_Egg_Scroll_Box6: { + Pet_Egg_Scroll6: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box7: { + Pet_Egg_Scroll7: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box8: { + Pet_Egg_Scroll8: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box9: { + Pet_Egg_Scroll9: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box10: { + Pet_Egg_Scroll10: { + Random: false + Named: true + } +} +Pet_Egg_Scroll_Box11: { + Pet_Egg_Scroll11: { + Random: false + Named: true + } +} +Pet_Egg_Scroll6: { + Battle_Manual_Box: { + Named: true + Rate: 200 + } + Enriched_Elunium_Box: { + Named: true + Rate: 195 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 400 + } + Bubble_Gum_Box: { + Named: true + Rate: 200 + } + Pair_Of_Red_Ribbon_: { + Named: true + Rate: 2 + } + Drooping_Kitty_: { + Named: true + Rate: 1 + } + Orc_Hero_Helm_TW: { + Named: true + Rate: 1 + } + Magestic_Goat_TW: { + Named: true + Rate: 1 + } +} +Pet_Egg_Scroll7: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 80 + } + Insurance: { + Count: 2 + Named: true + Rate: 30 + } + Enriched_Oridecon: { + Count: 2 + Named: true + Rate: 120 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 190 + } + Megaphone_: { + Count: 5 + Named: true + Rate: 190 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 50 + } + Vit_Dish10: { + Count: 5 + Named: true + Rate: 200 + } + Bloody_Dead_Branch: { + Named: true + Rate: 120 + } + Succubus_Card: { + Named: true + Rate: 2 + } + Incubus_Card: { + Named: true + Rate: 2 + } + Smoking_Pipe_: { + Named: true + Rate: 5 + } + Pair_Of_Red_Ribbon_: { + Named: true + Rate: 9 + } +} +Pet_Egg_Scroll8: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 80 + } + Wind_Walk_10_Scroll: { + Count: 5 + Named: true + Rate: 60 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 120 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 244 + } + Neuralizer: { + Named: true + Rate: 1 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 10 + Named: true + Rate: 200 + } + Agi_Dish10: { + Count: 5 + Named: true + Rate: 100 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 30 + } + Silver_Tiara: { + Named: true + Rate: 3 + } + Magestic_Goat_TW: { + Named: true + Rate: 3 + } + Fish_On_Head_: { + Named: true + Rate: 9 + } +} +Pet_Egg_Scroll9: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 200 + } + Insurance: { + Count: 2 + Named: true + Rate: 50 + } + Enriched_Oridecon: { + Count: 2 + Named: true + Rate: 160 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 80 + } + Adrenaline_Scroll: { + Count: 5 + Named: true + Rate: 200 + } + Neuralizer: { + Named: true + Rate: 1 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 60 + } + Str_Dish10: { + Count: 5 + Named: true + Rate: 208 + } + Dark_Illusion_Card: { + Named: true + Rate: 5 + } + Dark_Lord_Card: { + Named: true + Rate: 1 + } + Orc_Hero_Helm_TW: { + Named: true + Rate: 5 + } + Bunny_Band_: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll10: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 100 + } + Wind_Walk_10_Scroll: { + Count: 5 + Named: true + Rate: 80 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 100 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 200 + } + Megaphone_: { + Count: 5 + Named: true + Rate: 160 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 100 + } + Yggdrasilberry: { + Count: 10 + Named: true + Rate: 152 + } + Int_Dish10: { + Count: 5 + Named: true + Rate: 100 + } + Injustice_Card: { + Named: true + Rate: 2 + } + Zherlthsh_Card: { + Named: true + Rate: 2 + } + Angelic_Chain_: { + Named: true + Rate: 2 + } + Satanic_Chain_: { + Named: true + Rate: 2 + } +} +Pet_Egg_Scroll11: { + Battle_Manual: { + Count: 2 + Named: true + Rate: 115 + } + Enriched_Elunium: { + Count: 2 + Named: true + Rate: 90 + } + Token_Of_Siegfried: { + Count: 5 + Named: true + Rate: 205 + } + Giant_Fly_Wing: { + Count: 10 + Named: true + Rate: 205 + } + Bubble_Gum: { + Count: 2 + Named: true + Rate: 115 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 55 + } + Dex_Dish10: { + Count: 5 + Named: true + Rate: 205 + } + Owl_Baron_Card: { + Named: true + Rate: 2 + } + Owl_Duke_Card: { + Named: true + Rate: 2 + } + Slipper: { + Named: true + Rate: 2 + } + Drooping_Kitty_: { + Named: true + Rate: 2 + } + Big_Golden_Bell_: { + Named: true + Rate: 2 + } +} +CP_Helm_Scroll_Box: { + CP_Helm_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Shield_Scroll_Box: { + CP_Shield_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Armor_Scroll_Box: { + CP_Armor_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +CP_Weapon_Scroll_Box: { + CP_Weapon_Scroll: { + Random: false + Named: true + } + Coating_Bottle: { + Random: false + Named: true + } +} +Repair_Scroll_Box: { + Repair_Scroll: { + Random: false + Named: true + } + Iron_Ore: { + Random: false + Named: true + } + Iron: { + Random: false + Named: true + } + Oridecon_Stone: { + Random: false + Named: true + } + Steel: { + Random: false + Named: true + } +} +Super_Pet_Egg1: { + Tiara: { + Named: true + Rate: 2 + } + Crown: { + Named: true + Rate: 2 + } + Loard_Circlet: { + Named: true + Rate: 1 + } + /* not yet supported/unknown Ear_Of_Angel: { + Named: true + Rate: 5 + }*/ + /* not yet supported/unknown Ear_Of_Devil: { + Named: true + Rate: 5 + }*/ + Flying_Angel: { + Named: true + Rate: 20 + } + Dark_Lord_Card: { + Named: true + Rate: 1 + } + Angeling_Card: { + Named: true + Rate: 2 + } + Ghostring_Card: { + Named: true + Rate: 2 + } + Nurse_Cap: { + Named: true + Rate: 80 + } + Centimental_Flower: { + Named: true + Rate: 45 + } + Tulip_Hairpin: { + Named: true + Rate: 50 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 85 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 170 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 230 + } +} +Super_Pet_Egg2: { + Golden_Gear: { + Named: true + Rate: 6 + } + Coronet: { + Named: true + Rate: 3 + } + Ghost_Bandana: { + Named: true + Rate: 6 + } + Horn_Of_Succubus: { + Named: true + Rate: 2 + } + Inccubus_Horn: { + Named: true + Rate: 2 + } + Archangeling_Card: { + Named: true + Rate: 10 + } + Knight_Of_Abyss_Card: { + Named: true + Rate: 3 + } + Pharaoh_Card: { + Named: true + Rate: 1 + } + Poring_Hat: { + Named: true + Rate: 80 + } + Centimental_Leaf: { + Named: true + Rate: 50 + } + First_Moon_Hair_Pin: { + Named: true + Rate: 40 + } + Cigar: { + Named: true + Rate: 20 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 160 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 227 + } +} +Super_Pet_Egg3: { + /* not yet supported/unknown Oldman: { + Named: true + Rate: 5 + }*/ + Fillet: { + Named: true + Rate: 6 + } + Smoking_Pipe: { + Named: true + Rate: 3 + } + Kafra_Band: { + Named: true + Rate: 1 + } + Hair_Protector: { + Named: true + Rate: 6 + } + Crescent_Scythe: { + Named: true + Rate: 10 + } + House_Auger: { + Named: true + Rate: 33 + } + Dark_Illusion_Card: { + Named: true + Rate: 2 + } + Drake_Card: { + Named: true + Rate: 2 + } + Maya_Card: { + Named: true + Rate: 2 + } + Ear_Mufs: { + Named: true + Rate: 100 + } + Pair_Of_Red_Ribbon: { + Named: true + Rate: 50 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 120 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 180 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 220 + } +} +Super_Pet_Egg4: { + Angelic_Chain: { + Named: true + Rate: 3 + } + Magestic_Goat: { + Named: true + Rate: 3 + } + Sharp_Gear: { + Named: true + Rate: 2 + } + Helm_Of_Angel: { + Named: true + Rate: 2 + } + Orc_Hero_Helm: { + Named: true + Rate: 4 + } + Doppelganger_Card: { + Named: true + Rate: 1 + } + Osiris_Card: { + Named: true + Rate: 2 + } + Phreeoni_Card: { + Named: true + Rate: 2 + } + Green_Feeler: { + Named: true + Rate: 70 + } + /* not yet supported/unknown Big_Sis: { + Named: true + Rate: 50 + }*/ + Mistic_Rose: { + Named: true + Rate: 36 + } + Well_Baked_Toast: { + Named: true + Rate: 35 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 130 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 170 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 230 + } +} +Super_Card_Pet_Egg1: { + Orc_Lady_Card: { + Named: true + Rate: 40 + } + Mummy_Card: { + Named: true + Rate: 30 + } + Marina_Card: { + Named: true + Rate: 80 + } + Desert_Wolf_Card: { + Named: true + Rate: 80 + } + Soldier_Skeleton_Card: { + Named: true + Rate: 17 + } + Magnolia_Card: { + Named: true + Rate: 40 + } + Andre_Card: { + Named: true + Rate: 7 + } + Mandragora_Card: { + Named: true + Rate: 40 + } + Vadon_Card: { + Named: true + Rate: 50 + } + Baphomet_Card: { + Named: true + Rate: 2 + } + Drainliar_Card: { + Named: true + Rate: 50 + } + Flying_Deleter_Card: { + Named: true + Rate: 20 + } + Nightmare_Terror_Card: { + Named: true + Rate: 8 + } + Pest_Card: { + Named: true + Rate: 20 + } + Marc_Card: { + Named: true + Rate: 20 + } + Dark_Frame_Card: { + Named: true + Rate: 10 + } + Deleter_Card: { + Named: true + Rate: 5 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 165 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 166 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 150 + } +} +Super_Card_Pet_Egg2: { + Orc_Load_Card: { + Named: true + Rate: 2 + } + Skel_Worker_Card: { + Named: true + Rate: 30 + } + Minorous_Card: { + Named: true + Rate: 55 + } + Garm_Baby_Card: { + Named: true + Rate: 18 + } + Goblin_Card: { + Named: true + Rate: 25 + } + Caramel_Card: { + Named: true + Rate: 70 + } + Scorpion_Card: { + Named: true + Rate: 5 + } + Flora_Card: { + Named: true + Rate: 35 + } + Hunter_Fly_Card: { + Named: true + Rate: 35 + } + Pecopeco_Egg_Card: { + Named: true + Rate: 40 + } + Hydra_Card: { + Named: true + Rate: 30 + } + Disguise_Card: { + Named: true + Rate: 30 + } + Rybio_Card: { + Named: true + Rate: 9 + } + Wraith_Dead_Card: { + Named: true + Rate: 20 + } + Majoruros_Card: { + Named: true + Rate: 18 + } + Pupa_Card: { + Named: true + Rate: 40 + } + Pecopeco_Card: { + Named: true + Rate: 40 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 168 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 165 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 166 + } +} +Super_Card_Pet_Egg3: { + Elder_Wilow_Card: { + Named: true + Rate: 70 + } + Deviruchi_Card: { + Named: true + Rate: 20 + } + Marduk_Card: { + Named: true + Rate: 40 + } + Carat_Card: { + Named: true + Rate: 45 + } + Choco_Card: { + Named: true + Rate: 30 + } + Pharaoh_Card: { + Named: true + Rate: 1 + } + Nine_Tail_Card: { + Named: true + Rate: 30 + } + Whisper_Card: { + Named: true + Rate: 10 + } + Frilldora_Card: { + Named: true + Rate: 20 + } + Dragon_Tail_Card: { + Named: true + Rate: 33 + } + Baphomet__Card: { + Named: true + Rate: 10 + } + Daydric_Card: { + Named: true + Rate: 35 + } + Harpy_Card: { + Named: true + Rate: 50 + } + Whisper_Boss_Card: { + Named: true + Rate: 10 + } + Thara_Frog_Card: { + Named: true + Rate: 50 + } + Executioner_Card: { + Named: true + Rate: 35 + } + Khalitzburg_Card: { + Named: true + Rate: 30 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 171 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 170 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 140 + } +} +Super_Card_Pet_Egg4: { + Thief_Bug_Male_Card: { + Named: true + Rate: 60 + } + Verit_Card: { + Named: true + Rate: 70 + } + Matyr_Card: { + Named: true + Rate: 25 + } + Sohee_Card: { + Named: true + Rate: 19 + } + Antique_Firelock_Card: { + Named: true + Rate: 40 + } + Blood_Butterfly_Card: { + Named: true + Rate: 38 + } + Mimic_Card: { + Named: true + Rate: 35 + } + Zerom_Card: { + Named: true + Rate: 38 + } + Phen_Card: { + Named: true + Rate: 10 + } + Kobold_Card: { + Named: true + Rate: 40 + } + Moonlight_Flower_Card: { + Named: true + Rate: 1 + } + Mantis_Card: { + Named: true + Rate: 45 + } + Smokie_Card: { + Named: true + Rate: 65 + } + Vitata_Card: { + Named: true + Rate: 10 + } + High_Orc_Card: { + Named: true + Rate: 3 + } + Penomena_Card: { + Named: true + Rate: 13 + } + Tirfing_Card: { + Named: true + Rate: 18 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 165 + } + Seed_Of_Yggdrasil: { + Count: 20 + Named: true + Rate: 165 + } + Zeny_Scroll: { + Count: 5 + Named: true + Rate: 140 + } +} +Vigorgra_Package1: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package2: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Vit_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package3: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Int_Dish10_: { + Random: false + Count: 2 + Named: true + } + Dex_Dish10_: { + Random: false + Count: 2 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 15 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package6: { + Battle_Manual: { + Random: false + Count: 2 + Named: true + } + Str_Dish10_: { + Random: false + Count: 2 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 2 + Named: true + } + Adrenaline_Scroll: { + Random: false + Count: 24 + Named: true + } + Aspersio_5_Scroll: { + Random: false + Count: 20 + Named: true + } + Holy_Water: { + Random: false + Count: 20 + Named: true + } + Kafra_Card: { + Random: false + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } +} +Vigorgra_Package7: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Str_Dish10_: { + Random: false + Count: 4 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package9: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Int_Dish10_: { + Random: false + Count: 4 + Named: true + } + Dex_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package10: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Int_Dish10_: { + Random: false + Count: 4 + Named: true + } + Vit_Dish10_: { + Random: false + Count: 4 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Blessing_10_Scroll: { + Random: false + Count: 30 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Vigorgra_Package12: { + Battle_Manual: { + Random: false + Count: 4 + Named: true + } + Str_Dish10_: { + Random: false + Count: 4 + Named: true + } + Agi_Dish10_: { + Random: false + Count: 4 + Named: true + } + Adrenaline_Scroll: { + Random: false + Count: 48 + Named: true + } + Aspersio_5_Scroll: { + Random: false + Count: 40 + Named: true + } + Holy_Water: { + Random: false + Count: 40 + Named: true + } + Kafra_Card: { + Random: false + Count: 2 + Named: true + } + Token_Of_Siegfried: { + Random: false + Count: 2 + Named: true + } +} +Pet_Egg_Scroll12: { + Poring_Box: { + Named: true + Rate: 80 + } + Vit_Dish10_: { + Count: 10 + Named: true + Rate: 150 + } + Old_Violet_Box: { + Named: true + Rate: 80 + } + Dex_Dish10_: { + Count: 10 + Named: true + Rate: 150 + } + Megaphone_: { + Count: 3 + Named: true + Rate: 150 + } + Kafra_Card: { + Count: 5 + Named: true + Rate: 180 + } + Luk_Dish10_: { + Count: 10 + Named: true + Rate: 180 + } + Elven_Ears: { + Named: true + Rate: 10 + } + Flying_Angel: { + Named: true + Rate: 10 + } + Zeny_Scroll: { + Named: true + Rate: 10 + } +} +Pet_Egg_Scroll13: { + Elephant_Hat: { + Named: true + Rate: 10 + } + Happy_Wig: { + Named: true + Rate: 10 + } + Enriched_Oridecon: { + Count: 5 + Named: true + Rate: 170 + } + Enriched_Elunium: { + Count: 5 + Named: true + Rate: 300 + } + Zeny_Scroll: { + Named: true + Rate: 10 + } + Yggdrasilberry: { + Count: 7 + Named: true + Rate: 100 + } + Fruit_Of_Mastela: { + Count: 15 + Named: true + Rate: 100 + } + Blue_Herb: { + Count: 8 + Named: true + Rate: 100 + } + Insurance: { + Count: 3 + Named: true + Rate: 100 + } + White_Slim_Potion: { + Count: 20 + Named: true + Rate: 100 + } +} +Pet_Egg_Scroll14: { + Hibiscus: { + Named: true + Rate: 10 + } + Charming_Ribbon: { + Named: true + Rate: 10 + } + Enriched_Oridecon: { + Count: 5 + Named: true + Rate: 150 + } + Enriched_Elunium: { + Count: 5 + Named: true + Rate: 250 + } + Zeny_Scroll: { + Named: true + Rate: 50 + } + Yggdrasilberry: { + Count: 7 + Named: true + Rate: 100 + } + Fruit_Of_Mastela: { + Count: 15 + Named: true + Rate: 100 + } + Grape_Juice: { + Count: 20 + Named: true + Rate: 100 + } + Insurance: { + Count: 3 + Named: true + Rate: 100 + } + White_Slim_Potion: { + Count: 20 + Named: true + Rate: 130 + } +} +Super_Pet_Egg5: { + Bird_Nest: { + Named: true + Rate: 15 + } + Fallen_Leaves: { + Named: true + Rate: 10 + } + Sheep_Hat: { + Named: true + Rate: 5 + } + Pumpkin_Hat: { + Named: true + Rate: 10 + } + Cyclops_Visor: { + Named: true + Rate: 6 + } + Alice_Doll: { + Named: true + Rate: 5 + } + Magic_Eyes: { + Named: true + Rate: 5 + } + Minstrel_Hat: { + Named: true + Rate: 5 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 216 + } +} +Super_Pet_Egg6: { + Marionette_Doll: { + Named: true + Rate: 5 + } + Gambler_Hat: { + Named: true + Rate: 10 + } + Elephant_Hat: { + Named: true + Rate: 10 + } + Baseball_Cap: { + Named: true + Rate: 5 + } + Silver_Tiara: { + Named: true + Rate: 5 + } + Joker_Jester_: { + Named: true + Rate: 6 + } + Headset_OST: { + Named: true + Rate: 5 + } + Chinese_Crown: { + Named: true + Rate: 5 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 226 + } +} +Super_Pet_Egg7: { + Candle: { + Named: true + Rate: 15 + } + Gold_Tiara: { + Named: true + Rate: 5 + } + Phrygian_Cap_: { + Named: true + Rate: 10 + } + Helm_Of_Darkness: { + Named: true + Rate: 5 + } + Puppy_Hat: { + Named: true + Rate: 10 + } + Romantic_White_Flower: { + Named: true + Rate: 8 + } + Hibiscus: { + Named: true + Rate: 5 + } + Charming_Ribbon: { + Named: true + Rate: 10 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 209 + } +} +Super_Pet_Egg8: { + Angeling_Hat: { + Named: true + Rate: 5 + } + Coppola: { + Named: true + Rate: 10 + } + Tongue_Mask: { + Named: true + Rate: 15 + } + Captain_Hat: { + Named: true + Rate: 5 + } + Laurel_Wreath: { + Named: true + Rate: 5 + } + Geographer_Band: { + Named: true + Rate: 5 + } + Twin_Ribbon: { + Named: true + Rate: 5 + } + Bird_Nest_Hat: { + Named: true + Rate: 10 + } + Steel: { + Count: 10 + Named: true + Rate: 53 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 90 + } + Old_Violet_Box: { + Count: 5 + Named: true + Rate: 150 + } + Yggdrasilberry: { + Count: 15 + Named: true + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 230 + } + Zeny_Scroll_Box: { + Count: 10 + Named: true + Rate: 217 + } +} +Pet_Egg_Scroll_E: { + Exorcize_Herb: { + Count: 10 + Named: true + Rate: 350 + } + Silk_Ribbon: { + Named: true + Rate: 130 + } + Realgar_Wine: { + Count: 10 + Named: true + Rate: 350 + } + Chung_E_Cake: { + Count: 10 + Named: true + Rate: 70 + } + Bok_Choy: { + Count: 10 + Named: true + Rate: 70 + } + Chung_E_Ticket: { + Named: true + Rate: 10 + } + Spring_Rabbit_Ticket: { + Named: true + Rate: 10 + } + Zeny_Scroll_Box: { + Named: true + Rate: 10 + } +} +Ramen_Hat_Box: { + Ramen_Hat: { + Random: false + Expire: 336 + Named: true + } +} +Mysterious_Travel_Sack1: { + Yellow_Baseball_Cap: { + Named: true + Rate: 1 + } + Valkyrie_Feather_Band: { + Named: true + Rate: 5 + } + Soulless_Wing: { + Named: true + Rate: 5 + } + Afro_Wig: { + Named: true + Rate: 1 + } + Happy_Wig: { + Named: true + Rate: 1 + } + Shiny_Wig: { + Named: true + Rate: 1 + } + Ring_Of_Water: { + Named: true + Rate: 2 + } + Ring_Of_Fire: { + Named: true + Rate: 2 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 2 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 5 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 5 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 5 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 200 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 200 + } + S_Def_Potion_Box30: { + Named: true + Rate: 200 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 205 + } +} +Mysterious_Travel_Sack2: { + Aussie_Flag_Hat: { + Named: true + Rate: 10 + } + Chullos: { + Named: true + Rate: 20 + } + Ati_Atihan_Hat: { + Named: true + Rate: 5 + } + Marcher_Hat: { + Named: true + Rate: 5 + } + Marvelous_Wig: { + Named: true + Rate: 100 + } + Fantastic_Wig: { + Named: true + Rate: 100 + } + Ring_Of_Wind: { + Named: true + Rate: 20 + } + Ring_Of_Earth: { + Named: true + Rate: 20 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 10 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 50 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 50 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 50 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 100 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 100 + } + S_Def_Potion_Box30: { + Named: true + Rate: 100 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 100 + } +} +Mysterious_Travel_Sack3: { + Kettle_Hat: { + Named: true + Rate: 20 + } + Deviling_Hat: { + Named: true + Rate: 10 + } + Pecopeco_Hairband: { + Named: true + Rate: 10 + } + Chick_Hat: { + Named: true + Rate: 50 + } + Vacation_Hat: { + Named: true + Rate: 30 + } + Ribbon_Black: { + Named: true + Rate: 60 + } + Ribbon_Yellow: { + Named: true + Rate: 50 + } + Ribbon_Green: { + Named: true + Rate: 50 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 10 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 50 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 50 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 50 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 100 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 100 + } + S_Def_Potion_Box30: { + Named: true + Rate: 100 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 100 + } +} +Mysterious_Travel_Sack4: { + Twin_Ribbon: { + Named: true + Rate: 2 + } + Ribbon_Of_Bride: { + Named: true + Rate: 2 + } + Charming_Ribbon: { + Named: true + Rate: 1 + } + Ribbon_Pink: { + Named: true + Rate: 2 + } + Ribbon_Orange: { + Named: true + Rate: 2 + } + Ribbon_White: { + Named: true + Rate: 2 + } + Red_Glasses: { + Named: true + Rate: 1 + } + Dun_Tele_Scroll1: { + Named: true + Rate: 1 + } + Dun_Tele_Scroll1_Box: { + Named: true + Rate: 5 + } + Shadow_Armor_S_Box10: { + Named: true + Rate: 5 + } + Holy_Armor_S_Box10: { + Named: true + Rate: 5 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 203 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 203 + } + S_Def_Potion_Box30: { + Named: true + Rate: 203 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 80 + } + Max_Weight_Up_Box: { + Named: true + Rate: 80 + } + Regeneration_Box10: { + Named: true + Rate: 203 + } +} +Magician_Card_Box: { + Blood_Butterfly_Card: { + Random: false + Named: true + } + Parasite_Card: { + Random: false + Named: true + } + Harpy_Card: { + Random: false + Named: true + } + Miyabi_Ningyo_Card: { + Random: false + Named: true + } + Wicked_Nymph_Card: { + Random: false + Named: true + } + Loli_Ruri_Card: { + Random: false + Named: true + } +} +Acolyte_Card_Box: { + Rideword_Card: { + Random: false + Named: true + } + Fur_Seal_Card: { + Random: false + Named: true + } + Live_Peach_Tree_Card: { + Random: false + Named: true + } + Geographer_Card: { + Random: false + Named: true + } + Cookie_Card: { + Random: false + Named: true + } +} +Archer_Card_Box: { + Cruiser_Card: { + Random: false + Named: true + } + Anolian_Card: { + Random: false + Named: true + } + Merman_Card: { + Random: false + Named: true + } + Dragon_Tail_Card: { + Random: false + Named: true + } + Alligator_Card: { + Random: false + Named: true + } +} +Swordman_Card_Box: { + Freezer_Card: { + Random: false + Named: true + } + Heater_Card: { + Random: false + Named: true + } + Solider_Card: { + Random: false + Named: true + } + Permeter_Card: { + Random: false + Named: true + } + Assulter_Card: { + Random: false + Named: true + } +} +Thief_Card_Box: { + Shinobi_Card: { + Random: false + Named: true + } + Wander_Man_Card: { + Random: false + Named: true + } + Wild_Rose_Card: { + Random: false + Named: true + } + The_Paper_Card: { + Random: false + Named: true + } + Dancing_Dragon_Card: { + Random: false + Named: true + } +} +Merchant_Card_Box: { + Mystcase_Card: { + Random: false + Named: true + } + Zipper_Bear_Card: { + Random: false + Named: true + } + Raggler_Card: { + Random: false + Named: true + } + Baby_Leopard_Card: { + Random: false + Named: true + } + Hylozoist_Card: { + Random: false + Named: true + } +} +Hard_Core_Set_Box: { + Battle_Manual: { + Random: false + Count: 10 + Named: true + } + Bubble_Gum: { + Random: false + Count: 10 + Named: true + } + Insurance: { + Random: false + Count: 10 + Named: true + } +} +Kitty_Set_Box: { + White_Drooping_Kitty: { + Random: false + Named: true + } + Blue_Drooping_Kitty: { + Random: false + Named: true + } + Pink_Drooping_Kitty: { + Random: false + Named: true + } + Yellow_Drooping_Kitty: { + Random: false + Named: true + } + Gray_Drooping_Kitty: { + Random: false + Named: true + } +} +Soft_Core_Set_Box: { + Battle_Manual: { + Random: false + Count: 5 + Named: true + } + Bubble_Gum: { + Random: false + Count: 5 + Named: true + } + Insurance: { + Random: false + Count: 5 + Named: true + } +} +Deviruchi_Set_Box: { + Red_Deviruchi_Cap: { + Random: false + Named: true + } + White_Deviruchi_Cap: { + Random: false + Named: true + } + Gray_Deviruchi_Cap: { + Random: false + Named: true + } +} +MVP_Hunt_Box: { + Convex_Mirror: { + Random: false + Count: 3 + Named: true + } + Token_Of_Siegfried: { + Random: false + Named: true + } + Bubble_Gum: { + Random: false + Named: true + } + Megaphone_: { + Random: false + Named: true + } +} +Brewing_Box: { + Dex_Dish10_: { + Random: false + Count: 10 + Named: true + } + Int_Dish10_: { + Random: false + Count: 10 + Named: true + } + Luk_Dish10_: { + Random: false + Count: 10 + Named: true + } +} +Xmas_Pet_Scroll: { + Fish_Head_Hat: { + Named: true + Rate: 1 + } + Santa_Poring_Hat: { + Named: true + Rate: 1 + } + Bell_Ribbon: { + Named: true + Rate: 1 + } + /* not yet supported/unknown Ear_Of_Angel: { + Named: true + Rate: 5 + }*/ + /* not yet supported/unknown Ear_Of_Devil: { + Named: true + Rate: 5 + }*/ + Flying_Angel: { + Named: true + Rate: 5 + } + Pecopeco_Hairband: { + Named: true + Rate: 2 + } + Nurse_Cap: { + Named: true + Rate: 20 + } + Centimental_Flower: { + Named: true + Rate: 20 + } + Tulip_Hairpin: { + Named: true + Rate: 80 + } + Old_Violet_Box: { + Count: 3 + Named: true + Rate: 100 + } + Yggdrasilberry: { + Count: 30 + Named: true + Rate: 110 + } + Leaf_Of_Yggdrasil: { + Count: 30 + Named: true + Rate: 100 + } + Crystal_Jewel: { + Count: 20 + Named: true + Rate: 100 + } + Crystal_Jewel__: { + Count: 10 + Named: true + Rate: 150 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 150 + } + Max_Weight_Up_Scroll: { + Count: 5 + Named: true + Rate: 50 + } +} +Lucky_Scroll08: { + Kafra_Card: { + Count: 15 + Named: true + Rate: 220 + } + Battle_Manual: { + Count: 5 + Named: true + Rate: 210 + } + Bubble_Gum: { + Count: 5 + Named: true + Rate: 210 + } + Token_Of_Siegfried_Box: { + Count: 15 + Named: true + Rate: 100 + } + Neuralizer: { + Named: true + Rate: 2 + } + Mini_Propeller_: { + Named: true + Rate: 1 + } + Branch_Of_Dead_Tree_Box: { + Named: true + Rate: 5 + } + Dark_Lord_Card: { + Named: true + Rate: 1 + } + Dark_Illusion_Card: { + Named: true + Rate: 1 + } + Angelic_Chain_: { + Named: true + Rate: 2 + } + Satanic_Chain_: { + Named: true + Rate: 3 + } + Magestic_Goat_TW: { + Named: true + Rate: 2 + } + Bunny_Band_: { + Named: true + Rate: 3 + } + Drooping_Kitty_: { + Named: true + Rate: 5 + } + Tulip_Hairpin: { + Named: true + Rate: 65 + } + Insurance_Package: { + Named: true + Rate: 60 + } + Leaf_Of_Yggdrasil: { + Count: 15 + Named: true + Rate: 110 + } +} +Br_SwordPackage: { + Plate_Armor_: { + Random: false + Named: true + } + Shield_: { + Random: false + Named: true + } + Boots_: { + Random: false + Named: true + } + Manteau_: { + Random: false + Named: true + } + Pupa_Card: { + Random: false + Named: true + } + Daydric_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Helm_: { + Random: false + Named: true + } + Iron_Cane: { + Random: false + Named: true + } +} +Br_MagePackage: { + Silk_Robe_: { + Random: false + Named: true + } + Guard_: { + Random: false + Named: true + } + Shoes_: { + Random: false + Named: true + } + Muffler_: { + Random: false + Named: true + } + Pupa_Card: { + Random: false + Named: true + } + Phen_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Wizardry_Hat: { + Random: false + Named: true + } +} +Br_AcolPackage: { + Saint_Robe_: { + Random: false + Named: true + } + Buckler_: { + Random: false + Named: true + } + Shoes_: { + Random: false + Named: true + } + Muffler_: { + Random: false + Named: true + } + Pupa_Card: { + Random: false + Named: true + } + Sohee_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Biretta_: { + Random: false + Named: true + } +} +Br_ArcherPackage: { + Tights_: { + Random: false + Named: true + } + Kakkung_: { + Random: false + Named: true + } + Boots_: { + Random: false + Named: true + } + Muffler_: { + Random: false + Named: true + } + Zerom_Card: { + Random: false + Named: true + } + Whisper_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Apple_Of_Archer: { + Random: false + Named: true + } +} +Br_MerPackage: { + Chain_Mail_: { + Random: false + Named: true + } + Buckler_: { + Random: false + Named: true + } + Boots_: { + Random: false + Named: true + } + Manteau_: { + Random: false + Named: true + } + Pupa_Card: { + Random: false + Named: true + } + Daydric_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Bankruptcy_Of_Heart: { + Random: false + Named: true + } +} +Br_ThiefPackage: { + Thief_Clothes_: { + Random: false + Named: true + } + Buckler_: { + Random: false + Named: true + } + Boots_: { + Random: false + Named: true + } + Manteau_: { + Random: false + Named: true + } + Matyr_Card: { + Random: false + Named: true + } + Whisper_Card: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Clip: { + Random: false + Named: true + } + Ghost_Bandana: { + Random: false + Named: true + } +} +Acidbomb_10_Box: { + Fire_Bottle: { + Random: false + Count: 10 + Named: true + } + Acid_Bottle: { + Random: false + Count: 10 + Named: true + } +} +Basic_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 25 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 10 + Named: true + } +} +Adv_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 50 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 20 + Named: true + } +} +Elite_Siege_Supply_Box: { + Siege_White_Potion: { + Random: false + Count: 100 + Named: true + } + Siege_Blue_Potion: { + Random: false + Count: 50 + Named: true + } +} +Sakura_Scroll: { + Angelic_Chain: { + Named: true + Rate: 2 + } + Satanic_Chain: { + Named: true + Rate: 2 + } + Snowy_Horn: { + Named: true + Rate: 2 + } + Mini_Propeller: { + Named: true + Rate: 1 + } + Osiris_Card: { + Named: true + Rate: 1 + } + Phreeoni_Card: { + Named: true + Rate: 1 + } + Green_Feeler: { + Named: true + Rate: 130 + } + Orc_Hero_Helm: { + Named: true + Rate: 2 + } + Battle_Manual: { + Count: 10 + Named: true + Rate: 170 + } + Insurance: { + Count: 10 + Named: true + Rate: 160 + } + Bubble_Gum: { + Count: 10 + Named: true + Rate: 160 + } + Kafra_Card: { + Count: 15 + Named: true + Rate: 190 + } + Seed_Of_Yggdrasil: { + Count: 50 + Named: true + Rate: 150 + } + Iron_Glove: { + Named: true + Rate: 25 + } + Kabuki_Mask: { + Named: true + Rate: 2 + } + Mistic_Rose: { + Named: true + Rate: 2 + } +} +Beholder_Ring_Box: { + Beholder_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Hallow_Ring_Box: { + Hallow_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Clamorous_Ring_Box: { + Clamorous_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Chemical_Ring_Box: { + Chemical_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Insecticide_Ring_Box: { + Insecticide_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Fisher_Ring_Box: { + Fisher_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Decussate_Ring_Box: { + Decussate_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Bloody_Ring_Box: { + Bloody_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Satanic_Ring_Box: { + Satanic_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Dragoon_Ring_Box: { + Dragoon_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Angel_Scroll: { + Angelic_Chain: { + Named: true + Rate: 5 + } + Dress_Of_Angel: { + Named: true + Rate: 100 + } + /* not yet supported/unknown Ear_Of_Angel: { + Named: true + Rate: 100 + }*/ + Kiss_Of_Angel: { + Named: true + Rate: 30 + } + Angeling_Hat: { + Named: true + Rate: 50 + } + Angeling_Hairpin: { + Named: true + Rate: 130 + } + Gold_Spirit_Chain: { + Named: true + Rate: 110 + } + Angeling_Card: { + Named: true + Rate: 30 + } + Blessing_10_Scroll_Box: { + Named: true + Rate: 420 + } + Archangeling_Card: { + Named: true + Rate: 20 + } +} +Devil_Scroll: { + Satanic_Chain: { + Named: true + Rate: 4 + } + Book_Of_Devil: { + Count: 5 + Named: true + Rate: 150 + } + /* not yet supported/unknown Ear_Of_Devil: { + Named: true + Rate: 100 + }*/ + Petite_DiablOfs_Wing: { + Named: true + Rate: 125 + } + Pet_Egg_Scroll1: { + Named: true + Rate: 180 + } + Deviling_Card: { + Named: true + Rate: 1 + } + Pet_Egg_Scroll_Box1: { + Named: true + Rate: 200 + } + Horn_Of_Succubus: { + Named: true + Rate: 45 + } + Inccubus_Horn: { + Named: true + Rate: 45 + } + Diabolic_Box: { + Named: true + Rate: 150 + } +} +Surprise_Scroll: { + Battle_Manual: { + Count: 5 + Named: true + Rate: 130 + } + Insurance: { + Count: 5 + Named: true + Rate: 130 + } + Bubble_Gum: { + Count: 10 + Named: true + Rate: 150 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 200 + } + Bloody_Dead_Branch: { + Named: true + Rate: 98 + } + Branch_Of_Dead_Tree: { + Count: 6 + Named: true + Rate: 130 + } + Guyak_Candy: { + Count: 10 + Named: true + Rate: 80 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 80 + } + Bell_Ribbon_Box: { + Named: true + Rate: 1 + } + Neuralizer: { + Named: true + Rate: 1 + } +} +July7_Scroll: { + Basic_Siege_Supply_Box: { + Random: false + Named: true + } + Underripe_Yggseed: { + Count: 10 + Named: true + Rate: 1500 + } + Str_Dish_Box: { + Named: true + Rate: 1500 + } + Bubble_Gum_Box: { + Named: true + Rate: 1550 + } + Battle_Manual_Box: { + Named: true + Rate: 1500 + } + Convex_Mirror_Box: { + Named: true + Rate: 1500 + } + /* not yet supported/unknown Eddga_Scroll: { + Named: true + Rate: 400 + }*/ + Token_Of_Siegfried_Box: { + Named: true + Rate: 1500 + } + Rabbit_Ribbon: { + Announce: true + Named: true + Rate: 150 + } + Rainbow: { + Announce: true + Named: true + Rate: 56 + } + Upd_Maya_Puple_Card: { + Announce: true + Named: true + Rate: 3 + } + Gold_Ingot_Poring_Hat: { + Announce: true + Named: true + Rate: 150 + } + Berzebub_Card: { + Announce: true + Named: true + Rate: 1 + } + Hair_Of_The_Strong: { + Announce: true + Named: true + Rate: 70 + } + Guarantee_Weapon_9Up: { + Announce: true + Named: true + Rate: 20 + } + Guarantee_Armor_9Up: { + Announce: true + Named: true + Rate: 20 + } + RWC2010_Indonesia: { + Announce: true + Named: true + Rate: 5 + } + Rocket_Helm_RWC: { + Announce: true + Named: true + Rate: 75 + } +} +Bacsojin_Scroll: { + Magical_Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Special_Moon_Cake: { + Count: 10 + Named: true + Rate: 150 + } + Tayelin_Doll_Hat: { + Named: true + Rate: 5 + } + Binit_Doll_Hat: { + Named: true + Rate: 5 + } + Debril_Doll_Hat: { + Named: true + Rate: 5 + } + Blessing_10_Scroll_Box: { + Named: true + Rate: 180 + } + Hibiscus: { + Named: true + Rate: 25 + } + Charming_Ribbon: { + Named: true + Rate: 30 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } + Slipper: { + Named: true + Rate: 14 + } + Insurance: { + Count: 5 + Named: true + Rate: 135 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 150 + } +} +Animal_Scroll: { + Tiger_Mask: { + Named: true + Rate: 5 + } + Guardian_Lion_Mask: { + Named: true + Rate: 5 + } + Luk_Dish10: { + Count: 5 + Named: true + Rate: 185 + } + Panda_Cap: { + Named: true + Rate: 5 + } + Brown_Bear_Cap: { + Named: true + Rate: 5 + } + Smokie_Hat: { + Named: true + Rate: 5 + } + Str_Dish08: { + Count: 5 + Named: true + Rate: 185 + } + Lazy_Raccoon: { + Named: true + Rate: 5 + } + Drooping_Bunny: { + Named: true + Rate: 5 + } + Int_Dish03: { + Count: 5 + Named: true + Rate: 185 + } + Elephant_Hat_: { + Named: true + Rate: 10 + } + Sea_Otter_Cap: { + Named: true + Rate: 10 + } + Vit_Dish09: { + Count: 5 + Named: true + Rate: 185 + } + Galapago_Cap: { + Named: true + Rate: 10 + } + Magestic_Goat_TW: { + Named: true + Rate: 5 + } + Fish_On_Head_: { + Named: true + Rate: 5 + } + Agi_Dish06: { + Count: 5 + Named: true + Rate: 185 + } +} +Heart_Scroll: { + Orleans_Glove: { + Named: true + Rate: 5 + } + Wool_Scarf: { + Named: true + Rate: 5 + } + Red_Glasses: { + Named: true + Rate: 15 + } + Str_Dish08: { + Count: 7 + Named: true + Rate: 200 + } + Vit_Dish10: { + Count: 5 + Named: true + Rate: 200 + } + Spiritual_Ring: { + Named: true + Rate: 1 + } + Agi_Dish09: { + Count: 5 + Named: true + Rate: 200 + } + Scarf_Belt: { + Named: true + Rate: 40 + } + Lesser_Elemental_Ring: { + Named: true + Rate: 5 + } + Luk_Dish07: { + Count: 8 + Named: true + Rate: 200 + } + Lion_Mask: { + Named: true + Rate: 20 + } + Fur_Hat: { + Named: true + Rate: 20 + } + Ulle_Cap: { + Named: true + Rate: 20 + } + Valkyrie_Feather_Band: { + Named: true + Rate: 4 + } + Winter_Hat: { + Named: true + Rate: 20 + } + Ear_Mufs: { + Named: true + Rate: 45 + } +} +New_Year_Scroll: { + Silver_Tiara: { + Named: true + Rate: 1 + } + Magic_Card_Album: { + Named: true + Rate: 5 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 180 + } + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 180 + } + Clothing_Dye_Coupon: { + Count: 2 + Named: true + Rate: 50 + } + Marcher_Hat: { + Named: true + Rate: 1 + } + Yggdrasilberry_Box_: { + Named: true + Rate: 100 + } + Dead_Tree_Branch_Box1: { + Named: true + Rate: 132 + } + Megaphone_Box: { + Named: true + Rate: 150 + } + Mini_Propeller_: { + Named: true + Rate: 1 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 100 + } + Old_Violet_Box: { + Count: 2 + Named: true + Rate: 100 + } +} +Valentine_Pledge_Box: { + Valentine_Pledge: { + Random: false + Expire: 8760 + Named: true + } +} +Ox_Tail_Scroll: { + Yggdrasilberry_Box_: { + Named: true + Rate: 1420 + } + Luk_Dish_Box: { + Named: true + Rate: 1420 + } + Kafra_Card_Box: { + Named: true + Rate: 1420 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 1420 + } + Insurance_Package: { + Named: true + Rate: 1420 + } + /* not yet supported/unknown Zealotus_Scroll: { + Count: 5 + Named: true + Rate: 300 + }*/ + Assumptio_5_Scroll_Box: { + Named: true + Rate: 1400 + } + Max_Weight_Up_Box: { + Named: true + Rate: 500 + } + /* not yet supported/unknown B_Dragon_Hat_Box: { + Announce: true + Named: true + Rate: 150 + }*/ + Rain_Cloud: { + Announce: true + Named: true + Rate: 87 + } + Gold_Ingot_Poring_Hat: { + Announce: true + Named: true + Rate: 3 + } + Maneater_Flower_Hat: { + Announce: true + Named: true + Rate: 150 + } + Chilly_Breath: { + Announce: true + Named: true + Rate: 100 + } + Choco_Stick_In_Mouth: { + Announce: true + Named: true + Rate: 100 + } + Eyes_Of_Ifrit: { + Announce: true + Named: true + Rate: 5 + } + Majoruros_Horn: { + Announce: true + Named: true + Rate: 100 + } + Sealed_D_Lord_Card: { + Announce: true + Named: true + Rate: 5 + } +} +Buddah_Scroll: { + Zeny_Scroll: { + Count: 7 + Named: true + Rate: 201 + } + S_Def_Potion_Box30: { + Named: true + Rate: 112 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 111 + } + B_Def_Potion_Box10: { + Named: true + Rate: 110 + } + B_Mdef_Potion_Box10: { + Named: true + Rate: 109 + } + Dun_Tele_Scroll_Box10: { + Named: true + Rate: 108 + } + Spark_Candy_Box10: { + Count: 7 + Named: true + Rate: 80 + } + Ati_Atihan_Hat_: { + Named: true + Rate: 50 + } + Drooping_Bunny: { + Named: true + Rate: 50 + } + Kabuki_Mask: { + Named: true + Rate: 49 + } + Deprotai_Doll_Hat: { + Named: true + Rate: 9 + } + Bright_Fury: { + Named: true + Rate: 8 + } + Secret_Medicine: { + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +Evil_Incarnation: { + Dead_Tree_Branch_Box2: { + Named: true + Rate: 224 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 124 + } + Int_Dish_Box: { + Named: true + Rate: 123 + } + Luk_Dish_Box: { + Named: true + Rate: 122 + } + Vit_Dish_Box: { + Named: true + Rate: 121 + } + Str_Dish_Box: { + Named: true + Rate: 120 + } + Romantic_White_Flower: { + Named: true + Rate: 47 + } + Love_Berry: { + Named: true + Rate: 46 + } + Minstrel_Hat: { + Named: true + Rate: 26 + } + Puppy_Hat: { + Named: true + Rate: 25 + } + Kafra_Band: { + Named: true + Rate: 10 + } + Majestic_Evil_Horn: { + Named: true + Rate: 9 + } + Secret_Medicine: { + Count: 2 + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +/* not yet supported/unknown F_Clover_Box_Mouth: { + Leaf_Clover_In_Mouth: { + Random: false + Named: true + } +}*/ +Mouth_Bubble_Gum_Box: { + Bubble_Gum_In_Mouth: { + Random: false + Named: true + } +} +/* not yet supported/unknown F_Clover_Box_Mouth2: { + Leaf_Clover_In_Mouth: { + Random: false + Expire: 2 + Named: true + } +}*/ +/* not yet supported/unknown F_Clover_Box_Mouth4: { + Leaf_Clover_In_Mouth: { + Random: false + Expire: 4 + Named: true + } +}*/ +BGum_Box_In_Mouth2: { + Bubble_Gum_In_Mouth: { + Random: false + Expire: 2 + Named: true + } +} +BGum_Box_In_Mouth4: { + Bubble_Gum_In_Mouth: { + Random: false + Expire: 4 + Named: true + } +} +Tw_October_Scroll: { + Magical_Moon_Cake: { + Count: 10 + Named: true + Rate: 191 + } + Charm_Of_Happiness: { + Count: 10 + Named: true + Rate: 150 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 130 + } + Luk_Dish_Box: { + Named: true + Rate: 106 + } + Vit_Dish_Box: { + Named: true + Rate: 105 + } + Str_Dish_Box: { + Named: true + Rate: 104 + } + Spark_Candy_Box10: { + Named: true + Rate: 103 + } + Mistic_Rose: { + Named: true + Rate: 50 + } + Bison_Horn: { + Named: true + Rate: 21 + } + Hyegun_Hat: { + Named: true + Rate: 20 + } + Fish_In_Mouth: { + Named: true + Rate: 9 + } + Black_Glasses: { + Named: true + Rate: 8 + } + Magic_Card_Album: { + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +My_Scroll1: { + Battle_Manual_Box: { + Named: true + Rate: 1450 + } + Agi_Dish_Box: { + Named: true + Rate: 1450 + } + Megaphone_Box: { + Named: true + Rate: 1450 + } + Spark_Candy_Box10: { + Named: true + Rate: 1450 + } + Dun_Tele_Scroll_Box10: { + Named: true + Rate: 1450 + } + Job_Manual50_Box: { + Named: true + Rate: 1406 + } + /* not yet supported/unknown Eddga_Scroll: { + Count: 5 + Named: true + Rate: 500 + }*/ + Bloody_Dead_Branch: { + Named: true + Rate: 300 + } + Hellomother_Hat: { + Announce: true + Named: true + Rate: 50 + } + King_Tiger_Doll_Hat_Box: { + Announce: true + Named: true + Rate: 120 + } + Red_Glasses: { + Announce: true + Named: true + Rate: 50 + } + Sealed_Bacsojin_Card: { + Announce: true + Named: true + Rate: 3 + } + Ancient_Civil_Man: { + Announce: true + Named: true + Rate: 150 + } + Poker_Card_In_Mouth: { + Announce: true + Named: true + Rate: 50 + } + Upd_Maya_Puple_Card: { + Announce: true + Named: true + Rate: 1 + } + Blacksmith_Blessing: { + Announce: true + Named: true + Rate: 120 + } +} +Tw_Nov_Scroll: { + Zeny_Scroll: { + Count: 10 + Named: true + Rate: 250 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 80 + } + Str_Dish_Box: { + Named: true + Rate: 80 + } + Agi_Dish_Box: { + Named: true + Rate: 80 + } + Int_Dish_Box: { + Named: true + Rate: 80 + } + Dex_Dish_Box: { + Named: true + Rate: 80 + } + Luk_Dish_Box: { + Named: true + Rate: 100 + } + Vit_Dish_Box: { + Named: true + Rate: 100 + } + Meteor_10_Scroll_Box: { + Named: true + Rate: 50 + } + Storm_10_Scroll_Box: { + Named: true + Rate: 25 + } + Vermilion_10_Scroll_Box: { + Named: true + Rate: 50 + } + /* not yet supported/unknown Necromencer: { + Named: true + Rate: 10 + }*/ + Anubis_Helm: { + Named: true + Rate: 10 + } + Miracle_Medicine: { + Named: true + Rate: 5 + } +} +My_Scroll2: { + Seed_Of_Yggdrasil: { + Count: 25 + Named: true + Rate: 125 + } + Regeneration_Box10: { + Named: true + Rate: 150 + } + B_Def_Potion_Box10: { + Named: true + Rate: 130 + } + Poison_Bottle_30_Box: { + Count: 3 + Named: true + Rate: 100 + } + S_Mdef_Potion_Box10: { + Named: true + Rate: 100 + } + /* not yet supported/unknown Tyr: { + Count: 2 + Named: true + Rate: 100 + }*/ + Insurance: { + Count: 6 + Named: true + Rate: 20 + } + Bubble_Gum: { + Count: 6 + Named: true + Rate: 75 + } + Glass_Of_Illusion_Box10: { + Named: true + Rate: 20 + } + Old_Card_Album: { + Count: 2 + Named: true + Rate: 98 + } + Job_Manual50: { + Count: 2 + Named: true + Rate: 49 + } + Max_Weight_Up_Scroll: { + Named: true + Rate: 20 + } + Miracle_Medicine: { + Named: true + Rate: 2 + } + House_Auger: { + Named: true + Rate: 10 + } + Rabbit_Bonnet: { + Named: true + Rate: 1 + } +} +Pr_Reset_Stone_Box: { + Premium_Reset_Stone: { + Random: false + } +} +FPr_Reset_Stone_Box: { + Premium_Reset_Stone: { + Random: false + } +} +Majestic_Devil_Scroll: { + Exorcize_Herb: { + Count: 10 + Named: true + Rate: 150 + } + Realgar_Wine: { + Count: 10 + Named: true + Rate: 130 + } + Mysterious_Travel_Sack2: { + Named: true + Rate: 130 + } + Old_Bleu_Box: { + Count: 5 + Named: true + Rate: 93 + } + Mental_Potion: { + Count: 2 + Named: true + Rate: 93 + } + Teleport_Box1: { + Count: 2 + Named: true + Rate: 93 + } + Insurance: { + Count: 6 + Named: true + Rate: 20 + } + Bubble_Gum: { + Count: 6 + Named: true + Rate: 80 + } + Box_Of_Sunlight: { + Count: 5 + Named: true + Rate: 80 + } + Max_Weight_Up_Scroll: { + Named: true + Rate: 20 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 80 + } + Magic_Card_Album: { + Named: true + Rate: 10 + } + Orleans_Glove: { + Named: true + Rate: 20 + } + Majestic_Evil_Horn: { + Named: true + Rate: 1 + } +} +/* not yet supported/unknown Life_Ribbon_Box: { + Life_Ribbon: { + Random: false + Named: true + } +}*/ +/* not yet supported/unknown Life_Ribbon_Box2: { + Life_Ribbon: { + Random: false + Expire: 2 + Named: true + } +}*/ +/* not yet supported/unknown Life_Ribbon_Box3: { + Life_Ribbon: { + Random: false + Expire: 4 + Named: true + } +}*/ +/* not yet supported/unknown Magic_Candy_Box10: { + Magic_Candy: { + Random: false + Count: 10 + Named: true + } +}*/ +RWC2010_SuitcaseA: { + Battle_Manual: { + Count: 5 + Named: true + Rate: 130 + } + Insurance: { + Count: 5 + Named: true + Rate: 130 + } + Bubble_Gum: { + Count: 10 + Named: true + Rate: 150 + } + Kafra_Card: { + Count: 10 + Named: true + Rate: 200 + } + Bloody_Dead_Branch: { + Named: true + Rate: 98 + } + Branch_Of_Dead_Tree: { + Count: 6 + Named: true + Rate: 130 + } + Guyak_Candy: { + Count: 10 + Named: true + Rate: 80 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 80 + } + RWC2010_Indonesia: { + Named: true + Rate: 1 + } + Neuralizer: { + Named: true + Rate: 1 + } +} +RWC2010_SuitcaseB: { + Zeny_Scroll: { + Count: 7 + Named: true + Rate: 201 + } + S_Def_Potion_Box30: { + Named: true + Rate: 112 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 111 + } + B_Def_Potion_Box10: { + Named: true + Rate: 110 + } + B_Mdef_Potion_Box10: { + Named: true + Rate: 109 + } + Dun_Tele_Scroll_Box10: { + Named: true + Rate: 108 + } + Spark_Candy_Box10: { + Count: 7 + Named: true + Rate: 80 + } + Ati_Atihan_Hat_: { + Named: true + Rate: 50 + } + Drooping_Bunny: { + Named: true + Rate: 50 + } + Kabuki_Mask: { + Named: true + Rate: 49 + } + Deprotai_Doll_Hat: { + Named: true + Rate: 9 + } + Garuda_Hat: { + Named: true + Rate: 8 + } + Secret_Medicine: { + Named: true + Rate: 2 + } + Miracle_Medicine: { + Named: true + Rate: 1 + } +} +Sagittarius_Scroll: { + /* not yet supported/unknown Crown_Of_Deceit_Box: { + Named: true + Rate: 1 + }*/ + Sagittarius_Crown_Box: { + Named: true + Rate: 10 + } + Neuralizer_Box: { + Named: true + Rate: 4 + } + Pinguicula_Corsage: { + Named: true + Rate: 45 + } + Turtle_Hat_Box: { + Named: true + Rate: 55 + } + Mandragora_Cap: { + Named: true + Rate: 35 + } + /* not yet supported/unknown Raven_Cap_Box: { + Named: true + Rate: 80 + }*/ + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + Mental_Potion: { + Named: true + Rate: 100 + } + Battle_Manual_Box5: { + Named: true + Rate: 170 + } + Bubble_Gum_Box5: { + Named: true + Rate: 130 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 160 + } + /* not yet supported/unknown Tyr: { + Named: true + Rate: 110 + }*/ +} +Sagittarius_Scr_Box: { + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } + Sagittarius_Scroll: { + Random: false + Named: true + } +} +Sagittar_Diadem_Scroll: { + Spiked_Scarf_Box: { + Named: true + Rate: 2 + } + Sagittarius_Scroll: { + Named: true + Rate: 10 + } + Neuralizer_Box: { + Named: true + Rate: 3 + } + Angelic_Ring: { + Named: true + Rate: 20 + } + Bone_Head: { + Named: true + Rate: 25 + } + /* not yet supported/unknown Fur_Seal_Hat_Box: { + Named: true + Rate: 80 + }*/ + /* not yet supported/unknown B_Dragon_Hat_Box: { + Named: true + Rate: 90 + }*/ + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + S_Mdef_Potion_Box30: { + Named: true + Rate: 100 + } + S_Def_Potion_Box30: { + Named: true + Rate: 100 + } + Battle_Manual_Box5: { + Named: true + Rate: 160 + } + Bubble_Gum_Box5: { + Named: true + Rate: 130 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 180 + } +} +Sagittar_Di_Scroll_Box: { + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } + Sagittar_Diadem_Scroll: { + Random: false + Named: true + } +} +Capri_Crown_Scroll: { + Santa_Poring_Hat_Box: { + Named: true + Rate: 1 + } + Linen_Glove: { + Named: true + Rate: 2 + } + Rainbow_Scarf_Box: { + Named: true + Rate: 5 + } + Capricorn_Crown_Box: { + Named: true + Rate: 10 + } + /* not yet supported/unknown Pizza_Hat_Box: { + Named: true + Rate: 35 + }*/ + Antonio_Card: { + Named: true + Rate: 37 + } + Red_Bag: { + Count: 10 + Named: true + Rate: 150 + } + Max_Weight_Up_Box: { + Named: true + Rate: 70 + } + Guyak_Candy: { + Count: 6 + Named: true + Rate: 130 + } + Guyak_Pudding: { + Count: 6 + Named: true + Rate: 150 + } + Adrenaline_Scroll_Box: { + Named: true + Rate: 70 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 100 + } + Enriched_Elunium_Box5: { + Named: true + Rate: 180 + } + Wind_Walk_10_Scroll_Box: { + Named: true + Rate: 60 + } +} +Capri_Crown_Scroll_Box: { + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } + Capri_Crown_Scroll: { + Random: false + Named: true + } +} +Capricon_Di_Scroll: { + Robo_Eye_Box: { + Named: true + Rate: 1 + } + Improved_Tights: { + Named: true + Rate: 3 + } + Capricorn_Diadem_Box: { + Named: true + Rate: 10 + } + Sprint_Shoes: { + Named: true + Rate: 26 + } + Cursed_Star: { + Named: true + Rate: 40 + } + King_Tiger_Doll_Hat_Box: { + Named: true + Rate: 60 + } + /* not yet supported/unknown Pirate: { + Named: true + Rate: 80 + }*/ + Max_Weight_Up_Box: { + Named: true + Rate: 10 + } + Med_Life_Potion_Box30: { + Named: true + Rate: 50 + } + Abrasive_Box5: { + Named: true + Rate: 80 + } + Guyak_Candy: { + Count: 5 + Named: true + Rate: 130 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 150 + } + Enriched_Oridecon_Box5: { + Named: true + Rate: 170 + } + Small_Life_Potion_Box30: { + Named: true + Rate: 10 + } +} +Capricon_Di_Scroll_Box: { + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } + Capricon_Di_Scroll: { + Random: false + Named: true + } +} +Aquarius_Diadem_Scroll: { + Mask_Of_Ifrit_Box: { + Named: true + Rate: 1 + } + Aquarius_Diadem: { + Named: true + Rate: 30 + } + Imp_Hat: { + Named: true + Rate: 5 + } + Neuralizer_Box: { + Named: true + Rate: 5 + } + Waterdrop_Brooch: { + Named: true + Rate: 17 + } + Dice_Hat_Box: { + Named: true + Rate: 25 + } + B_Def_Potion_Box50: { + Named: true + Rate: 60 + } + B_Mdef_Potion_Box50: { + Named: true + Rate: 60 + } + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + PhreeoniS: { + Named: true + Rate: 2 + } + Abrasive_Box5: { + Named: true + Rate: 155 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 210 + } + BGum_Box_In_Mouth4: { + Named: true + Rate: 155 + } + Box_Of_Sunlight: { + Count: 5 + Named: true + Rate: 175 + } +} +Aquarius_Di_Scroll_Box: { + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } + Aquarius_Diadem_Scroll: { + Random: false + Named: true + } +} +Lovely_Aquarius_Scroll: { + Bradium_Brooch: { + Named: true + Rate: 1 + } + Neuralizer_Box: { + Named: true + Rate: 4 + } + /* not yet supported/unknown Sleepr_Hat: { + Named: true + Rate: 9 + }*/ + Aquarius_Crown: { + Named: true + Rate: 50 + } + /* not yet supported/unknown Tucan_Hat_Box: { + Named: true + Rate: 35 + }*/ + GhostringS: { + Named: true + Rate: 1 + } + Mysterious_Dyestuff: { + Named: true + Rate: 50 + } + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + Spark_Candy_Box5: { + Named: true + Rate: 140 + } + Glass_Of_Illusion_Box5: { + Named: true + Rate: 130 + } + F_Clover_Box_Mouth4: { + Named: true + Rate: 150 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 170 + } + Bubble_Gum_Box5: { + Named: true + Rate: 140 + } + Fire_Cracker_Love_Box: { + Count: 2 + Named: true + Rate: 20 + } +} +Lovely_Aquarius_Box: { + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } + Lovely_Aquarius_Scroll: { + Random: false + Named: true + } +} +Pisces_Diadem_Scroll: { + /* not yet supported/unknown Ifrit: { + Named: true + Rate: 1 + }*/ + Bradium_Earing: { + Named: true + Rate: 2 + } + Pisces_Diadem: { + Named: true + Rate: 10 + } + Gryphon_Hat: { + Named: true + Rate: 5 + } + Vital_Tree_Shoes: { + Named: true + Rate: 10 + } + Neuralizer_Box: { + Named: true + Rate: 22 + } + Insurance_Package: { + Named: true + Rate: 60 + } + Orc_HeroS: { + Named: true + Rate: 50 + } + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 130 + } + Life_Ribbon_Box3: { + Named: true + Rate: 160 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 180 + } + Battle_Manual_Box5: { + Named: true + Rate: 200 + } + Yggdrasilberry_Box_: { + Named: true + Rate: 70 + } +} +Pisces_Diadem_Box: { + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } + Pisces_Diadem_Scroll: { + Random: false + Named: true + } +} +Energetic_Pisces_Scroll: { + Bradium_Ring: { + Named: true + Rate: 1 + } + Pisces_Crown: { + Named: true + Rate: 10 + } + Neuralizer_Box: { + Named: true + Rate: 5 + } + /* not yet supported/unknown Shark_Hat_Box: { + Named: true + Rate: 15 + }*/ + Kafra_Ring: { + Named: true + Rate: 20 + } + Pirate_Dagger_J: { + Named: true + Rate: 25 + } + Orc_LoadS: { + Named: true + Rate: 34 + } + Max_Weight_Up_Box: { + Named: true + Rate: 100 + } + Spark_Candy_Box5: { + Named: true + Rate: 100 + } + Underripe_Yggseed: { + Count: 6 + Named: true + Rate: 120 + } + Enriched_Elunium_Box5: { + Named: true + Rate: 130 + } + Guyak_Pudding: { + Count: 5 + Named: true + Rate: 190 + } + Enriched_Oridecon_Box5: { + Named: true + Rate: 150 + } + Ramen_Hat_Box: { + Named: true + Rate: 100 + } +} +Energetic_Pisces_Box: { + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } + Energetic_Pisces_Scroll: { + Random: false + Named: true + } +} +Aries_Scroll: { + Freyja_Boots: { + Announce: true + Rate: 5 + } + Magic_Card_Album: { + Announce: true + Rate: 45 + } + Aries_Crown: { + Announce: true + Rate: 50 + } + Aries_Diadem: { + Announce: true + Rate: 50 + } + Neuralizer_Box: { + Rate: 50 + } + Scuba_Mask: { + Rate: 150 + } + Acidus_Card: { + Rate: 200 + } + Pirate_Bandana_: { + Rate: 350 + } + Max_Weight_Up_Box: { + Rate: 500 + } + Enriched_Elunium_Box5: { + Rate: 1100 + } + Enriched_Oridecon_Box5: { + Rate: 1600 + } + S_Mdef_Potion_Box30: { + Rate: 1800 + } + S_Def_Potion_Box30: { + Rate: 1800 + } + Zeny_Scroll: { + Count: 10 + Rate: 2300 + } +} +Aries_Scroll_Box: { + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } + Aries_Scroll: { + Random: false + Named: true + } +} +/* not yet supported/unknown Boarding_Halter_Box: { + Boarding_Halter: { + Random: false + Expire: 168 + Named: true + } +}*/ +Taurus_Diadem_Scroll: { + Freyja_Crown: { + Announce: true + Rate: 1 + } + Owl_Baron_Card: { + Announce: true + Rate: 10 + } + Samurai_Mask: { + Announce: true + Rate: 85 + } + Taurus_Diadem: { + Announce: true + Rate: 100 + } + Mischievous_Fairy: { + Rate: 100 + } + /* not yet supported/unknown Ph: { + Rate: 200 + }*/ + Max_Weight_Up_Box: { + Rate: 500 + } + Job_Manual50_Box: { + Rate: 600 + } + Meteor_10_Scroll_Box: { + Rate: 800 + } + Mysterious_Travel_Sack1: { + Rate: 1100 + } + Battle_Manual_Box5: { + Rate: 1300 + } + Dun_Tele_Scroll_Box10: { + Rate: 1500 + } + /* not yet supported/unknown Tyr: { + Rate: 1700 + }*/ + Zeny_Scroll: { + Count: 10 + Rate: 2004 + } +} +Taurus_Di_Scroll_Box: { + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } + Taurus_Diadem_Scroll: { + Random: false + Named: true + } +} +Umbala_Spirit_Box2: { + Umbala_Spirit: { + Random: false + Expire: 168 + Named: true + } +} +F_Umbala_Spirit_Box2: { + Umbala_Spirit: { + Random: false + Expire: 168 + Named: true + } +} +Taurus_Crown_Scroll: { + Freyja_Cape: { + Announce: true + Rate: 1 + } + Centipede_Larva_Card: { + Announce: true + Rate: 50 + } + Umbala_Spirit_Box2: { + Announce: true + Rate: 100 + } + Taurus_Crown: { + Announce: true + Rate: 100 + } + Round_Eyes: { + Rate: 200 + } + Sunflower_: { + Rate: 245 + } + Poporing_Cap: { + Rate: 400 + } + Max_Weight_Up_Box: { + Rate: 500 + } + Mental_Potion: { + Rate: 1000 + } + Vermilion_10_Scroll_Box: { + Rate: 1000 + } + Mysterious_Travel_Sack2: { + Rate: 1100 + } + Bubble_Gum_Box5: { + Rate: 1500 + } + Small_Life_Potion_Box30: { + Rate: 1800 + } + Zeny_Scroll: { + Count: 10 + Rate: 2004 + } +} +Taurus_Crown_Scroll_Box: { + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } + Taurus_Crown_Scroll: { + Random: false + Named: true + } +} +Gemi_Diadem_Scroll: { + Salamander_Card: { + Rate: 1 + } + Freyja_Overcoat: { + Rate: 1 + } + /* not yet supported/unknown Boy: { + Rate: 44 + }*/ + Gemini_Diadem: { + Rate: 100 + } + Angel_Spirit: { + Rate: 100 + } + Gang_Scarf: { + Rate: 100 + } + Hard_Core_Set_Box: { + Rate: 350 + } + Max_Weight_Up_Box: { + Rate: 500 + } + Abrasive_Box10: { + Rate: 800 + } + Zeny_Scroll: { + Count: 15 + Rate: 1100 + } + Meteor_10_Scroll_Box: { + Rate: 1500 + } + Mysterious_Travel_Sack3: { + Rate: 1600 + } + Wind_Walk_10_Scroll_Box: { + Rate: 1800 + } + Wrapped_Mask: { + Rate: 2004 + } +} +Gemi_Diadem_Scroll_Box: { + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } + Gemi_Diadem_Scroll: { + Random: false + Named: true + } +} +Super_Pet_Egg1_2: { + Tiara: { + Rate: 70 + } + Crown: { + Rate: 70 + } + Loard_Circlet: { + Rate: 30 + } + /* not yet supported/unknown Ear_Of_Angel: { + Rate: 70 + }*/ + /* not yet supported/unknown Ear_Of_Devil: { + Rate: 60 + }*/ + Flying_Angel: { + Rate: 250 + } + Dark_Lord_Card: { + Rate: 1 + } + Angeling_Card: { + Rate: 2 + } + Ghostring_Card: { + Rate: 2 + } + Nurse_Cap: { + Rate: 890 + } + Centimental_Flower: { + Rate: 450 + } + Tulip_Hairpin: { + Rate: 700 + } + Old_Card_Album: { + Count: 2 + Rate: 950 + } + Old_Violet_Box: { + Count: 5 + Rate: 1500 + } + Yggdrasilberry: { + Count: 15 + Rate: 2000 + } + Seed_Of_Yggdrasil: { + Count: 30 + Rate: 2000 + } + Zeny_Scroll: { + Count: 10 + Rate: 955 + } +} +Super_Pet_Egg4_2: { + Angelic_Chain: { + Rate: 30 + } + Magestic_Goat: { + Rate: 35 + } + Sharp_Gear: { + Rate: 20 + } + Helm_Of_Angel: { + Rate: 20 + } + Orc_Hero_Helm: { + Rate: 40 + } + Doppelganger_Card: { + Rate: 1 + } + Osiris_Card: { + Rate: 1 + } + Phreeoni_Card: { + Rate: 1 + } + Green_Feeler: { + Rate: 720 + } + /* not yet supported/unknown Big_Sis: { + Rate: 500 + }*/ + Mistic_Rose: { + Rate: 370 + } + Well_Baked_Toast: { + Rate: 350 + } + Old_Card_Album: { + Count: 2 + Rate: 912 + } + Old_Violet_Box: { + Rate: 1300 + } + Yggdrasilberry: { + Count: 15 + Rate: 1700 + } + Seed_Of_Yggdrasil: { + Count: 30 + Rate: 1700 + } + Zeny_Scroll: { + Count: 10 + Rate: 2300 + } +} +Fire_Brand_Box: { + Fire_Brand_C: { + Random: false + Expire: 168 + Named: true + } +} +BR_Independence_Scroll: { + Brazilian_Emblem: { + Named: true + Rate: 5 + } + Acaraje: { + Count: 10 + Named: true + Rate: 50 + } + Br_Twin_Ribbon: { + Named: true + Rate: 20 + } + HE_Battle_Manual: { + Count: 10 + Named: true + Rate: 100 + } + Navel_Ring: { + Named: true + Rate: 30 + } + /* not yet supported/unknown Br_Beret: { + Named: true + Rate: 20 + }*/ + Ragged_Zombie_Card: { + Named: true + Rate: 1 + } + Job_Manual50: { + Count: 10 + Named: true + Rate: 100 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 100 + } + Big_Bun_Box: { + Named: true + Rate: 100 + } + Gold_Pill_1: { + Count: 10 + Named: true + Rate: 94 + } + Int_Dish10_: { + Count: 10 + Named: true + Rate: 50 + } + Durian: { + Count: 10 + Named: true + Rate: 100 + } + B_Mdef_Potion: { + Count: 10 + Named: true + Rate: 100 + } + All_In_One_Ring_Box: { + Named: true + Rate: 100 + } + /* not yet supported/unknown Carmen_Miranda: { + Named: true + Rate: 30 + }*/ +} +All_In_One_Ring_Box: { + All_In_One_Ring: { + Random: false + Expire: 168 + Named: true + } +} +Gemi_Crown_Scroll: { + Dark_Snake_Lord_Card: { + Rate: 1 + } + Elven_Ears_: { + Rate: 2 + } + Antique_Pipe: { + Rate: 47 + } + Neuralizer_Box: { + Rate: 50 + } + Gemini_Crown: { + Rate: 100 + } + /* not yet supported/unknown Hawkeyes: { + Rate: 100 + }*/ + Bulb_Hairband: { + Rate: 200 + } + Max_Weight_Up_Box: { + Rate: 500 + } + Glass_Of_Illusion_Box5: { + Rate: 800 + } + Mysterious_Travel_Sack4: { + Rate: 1300 + } + Zeny_Scroll: { + Count: 15 + Rate: 1500 + } + Adrenaline_Scroll_Box: { + Rate: 1600 + } + Lex_Aeterna_Scroll_Box: { + Rate: 1800 + } + MVP_Hunt_Box: { + Rate: 2000 + } +} +Gemi_Crown_Scroll_Box: { + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } + Gemi_Crown_Scroll: { + Random: false + Named: true + } +} +RWC_Special_Scroll: { + Party_Recruiter_Hat: { + Rate: 4 + } + Convex_Mirror: { + Rate: 150 + } + Megaphone_Box: { + Rate: 200 + } + Enriched_Elunium_Box: { + Rate: 50 + } + Enriched_Oridecon_Box: { + Rate: 50 + } + Daydric_Card: { + Rate: 2 + } + Pharaoh_Card: { + Rate: 2 + } + Marc_Card: { + Rate: 2 + } + Royal_Jelly_Box: { + Rate: 200 + } + Seed_Of_Yggdrasil: { + Count: 50 + Rate: 190 + } + Str_Dish_Box: { + Rate: 150 + } +} +RWC_Limited_Scroll: { + Fruit_Of_Mastela: { + Count: 30 + Rate: 200 + } + White_Slim_Potion: { + Count: 10 + Rate: 150 + } + Yggdrasilberry_Box: { + Rate: 150 + } + Guildsman_Recruiter: { + Rate: 4 + } + Megaphone_Box: { + Rate: 150 + } + Token_Of_Siegfried_Box: { + Rate: 100 + } + Royal_Jelly_Box: { + Rate: 200 + } + Insurance_Package: { + Rate: 44 + } + Ygnizem_Card: { + Rate: 1 + } + B_Ygnizem_Card: { + Count: 50 + Rate: 1 + } +} +Asgard_Scroll: { + Asgard_Blessing: { + Rate: 5 + } + /* not yet supported/unknown Odin: { + Rate: 5 + }*/ + /* not yet supported/unknown Valkyrja: { + Rate: 1 + }*/ + Yggdrasilberry: { + Count: 10 + Rate: 150 + } + Daydric_Card: { + Rate: 5 + } + Fricca_Circlet: { + Rate: 1 + } + Secret_Medicine: { + Rate: 2 + } + /* not yet supported/unknown Tyr: { + Count: 30 + Rate: 100 + }*/ + HE_Battle_Manual: { + Count: 10 + Rate: 100 + } + Valkyrie_Feather_Band: { + Rate: 20 + } + Isilla_Card: { + Rate: 1 + } + Spark_Candy: { + Count: 10 + Rate: 100 + } + Darkness_Helm: { + Rate: 20 + } + Guyak_Pudding: { + Count: 10 + Rate: 120 + } + Token_Of_Siegfried_Box: { + Rate: 120 + } + Regeneration_Box10: { + Rate: 100 + } + Lucky_Cookie02: { + Count: 30 + Rate: 150 + } +} +Ms_Cancer_Scroll: { + Garm_Card: { + Announce: true + Rate: 2 + } + Flame_Sprits_Armor_: { + Announce: true + Rate: 4 + } + Beach_Towel: { + Announce: true + Rate: 10 + } + Cancer_Diadem: { + Announce: true + Rate: 17 + } + Cancer_Crown: { + Announce: true + Rate: 17 + } + Flying_Angel: { + Announce: true + Rate: 50 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 100 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 500 + } + Boarding_Halter_Box: { + Rate: 1000 + } + BGum_Box_In_Mouth4: { + Rate: 1500 + } + HE_Battle_Manual: { + Count: 3 + Rate: 1200 + } + Guyak_Pudding: { + Count: 3 + Rate: 1400 + } + Kafra_Card: { + Count: 5 + Rate: 1700 + } + Megaphone_Box5: { + Rate: 2000 + } + Storm_10_Scroll_Box: { + Rate: 500 + } +} +RWC_Super_Scroll: { + Tao_Gunka_Card: { + Announce: true + Rate: 1 + } + Mistress_Card: { + Announce: true + Rate: 1 + } + Berzebub_Card: { + Announce: true + Rate: 1 + } + Black_Devil_Mask_: { + Announce: true + Rate: 2 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 15 + } + RWC2010_Indonesia: { + Announce: true + Rate: 50 + } + Yggdrasil_Crown: { + Announce: true + Rate: 70 + } + /* not yet supported/unknown Immuned_Shield: { + Announce: true + Rate: 80 + }*/ + RWC_2012_Ring: { + Announce: true + Rate: 250 + } + RWC_2012_Pendant: { + Announce: true + Rate: 250 + } + Hair_Of_The_Strong: { + Announce: true + Rate: 100 + } + /* not yet supported/unknown Cat_Ears_Beret: { + Announce: true + Rate: 100 + }*/ + Red_Bread_Hat: { + Announce: true + Rate: 100 + } + Garuda_Hat: { + Announce: true + Rate: 100 + } + /* not yet supported/unknown Upg_Clip_Box: { + Rate: 300 + }*/ + /* not yet supported/unknown Upg_Formal_Dress_Box: { + Rate: 1000 + }*/ + Blacksmith_Blessing: { + Count: 4 + Rate: 580 + } + Blacksmith_Blessing: { + Count: 2 + Rate: 1500 + } + Unbreak_Weap_Box: { + Rate: 2500 + } + Unbreak_Def_Box: { + Rate: 3000 + } +} +Leo_Scroll: { + Fallen_Bishop_Card: { + Announce: true + Rate: 1 + } + Wind_Sprits_Armor: { + Announce: true + Rate: 3 + } + Skin_Of_Ventus: { + Announce: true + Rate: 5 + } + Satanic_Chain_P: { + Announce: true + Rate: 17 + } + /* not yet supported/unknown Leo_Crown: { + Announce: true + Rate: 17 + }*/ + /* not yet supported/unknown Leo_Diadem: { + Announce: true + Rate: 17 + }*/ + Angeling_Wanna_Fly: { + Announce: true + Rate: 40 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 300 + } + F_Clover_Box_Mouth4: { + Announce: true + Rate: 500 + } + Guyak_Pudding: { + Count: 3 + Rate: 700 + } + /* not yet supported/unknown Siroma_Icetea: { + Rate: 900 + }*/ + Siegfried_Box5: { + Rate: 1000 + } + HE_Battle_Manual: { + Count: 2 + Rate: 1700 + } + Regeneration_Box5: { + Rate: 1600 + } + Zeny_Scroll: { + Count: 5 + Rate: 1400 + } + Yggdrasilberry_Box_: { + Rate: 1300 + } + Vermilion_10_Scroll_Box: { + Rate: 500 + } +} +Ms_Virgo_Scroll: { + Water_Sprits_Armor_: { + Announce: true + Rate: 3 + } + Piece_Of_Angent_Skin: { + Announce: true + Rate: 6 + } + L_Magestic_Goat: { + Announce: true + Rate: 12 + } + /* not yet supported/unknown Virgo_Crown: { + Announce: true + Rate: 17 + }*/ + /* not yet supported/unknown Virgo_Diadem: { + Announce: true + Rate: 17 + }*/ + Magic_Card_Album: { + Announce: true + Rate: 100 + } + Spark_Candy_Box5: { + Announce: true + Rate: 645 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 300 + } + Life_Ribbon_Box3: { + Rate: 800 + } + /* not yet supported/unknown Tyr: { + Rate: 1000 + }*/ + Int_Dish_Box: { + Rate: 1700 + } + /* not yet supported/unknown Carat_Dia: { + Rate: 1600 + }*/ + /* not yet supported/unknown Wug_Blood_Cocktail: { + Rate: 1800 + }*/ + HE_Battle_Manual: { + Count: 3 + Rate: 1500 + } + Meteor_10_Scroll_Box: { + Rate: 500 + } +} +Lucky_Egg_C6: { + Pierre_Treasurebox: { + Rate: 500 + } + Yggdrasilberry: { + Count: 5 + Rate: 500 + } + Underripe_Yggseed: { + Count: 10 + Rate: 500 + } + Psychic_ArmorS: { + Count: 2 + Rate: 500 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 700 + } + Comp_Insurance: { + Count: 3 + Rate: 700 + } + Comp_Bubble_Gum: { + Count: 2 + Rate: 700 + } + Comp_Battle_Manual: { + Count: 2 + Rate: 500 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1200 + } + White_Slim_Pot_Box2: { + Rate: 1200 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Old_Card_Album: { + Rate: 350 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 300 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 300 + } + Passion_FB_Hat: { + Announce: true + Rate: 300 + } + Cool_FB_Hat: { + Announce: true + Rate: 300 + } + Victory_FB_Hat: { + Announce: true + Rate: 300 + } + Glory_FB_Hat: { + Announce: true + Rate: 100 + } +} +Libra_Scroll: { + B_Katrinn_Card: { + Announce: true + Rate: 1 + } + Earth_Sprits_Armor_: { + Announce: true + Rate: 3 + } + /* not yet supported/unknown Bravery_Bag: { + Announce: true + Rate: 12 + }*/ + /* not yet supported/unknown Libra_Crown: { + Announce: true + Rate: 17 + }*/ + /* not yet supported/unknown Libra_Diadem: { + Announce: true + Rate: 17 + }*/ + Angeling_Hairpin: { + Announce: true + Rate: 30 + } + Magic_Card_Album: { + Announce: true + Rate: 70 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 400 + } + /* not yet supported/unknown Orc_LoadS_Box: { + Announce: true + Rate: 50 + }*/ + Boarding_Halter_Box: { + Rate: 600 + } + HE_Battle_Manual: { + Count: 5 + Rate: 1000 + } + Guyak_Pudding: { + Count: 4 + Rate: 1100 + } + Light_White_Pot_Box: { + Rate: 1200 + } + /* not yet supported/unknown Carat_Dia: { + Rate: 1300 + }*/ + /* not yet supported/unknown Drocera_Herb_Stew: { + Rate: 1700 + }*/ + Branch_Of_Dead_Tree_Box: { + Rate: 2500 + } +} +Hallo_Scroll: { + Witchs_Hat: { + Rate: 50 + } + Red_Deviruchi_Cap: { + Rate: 350 + } + Insurance_Package: { + Rate: 1350 + } + Charm_Of_Happiness: { + Rate: 1350 + } + Magic_Card_Album: { + Rate: 220 + } + Holy_Celestial_Axe_Box: { + Rate: 330 + } + Glass_Of_Illusion_Box5: { + Rate: 1350 + } + Shadow_Armor_S_Box30: { + Rate: 600 + } + Alice_Scroll: { + Count: 5 + Rate: 1350 + } + Ticket_Loli_Ruri: { + Rate: 1350 + } + Teddy_Bear_Card: { + Rate: 10 + } + Hallow_Ring_Box: { + Rate: 1300 + } + Zherlthsh_Mask: { + Rate: 140 + } + HE_Battle_Manual: { + Rate: 150 + } + Zeny_Scroll: { + Count: 30 + Rate: 100 + } +} +Ms_Scorpio_Scroll: { + Thanatos_Card: { + Announce: true + Rate: 1 + } + Bone_Plate: { + Announce: true + Rate: 3 + } + /* not yet supported/unknown Thanatos_Mal_Mask: { + Announce: true + Rate: 7 + }*/ + /* not yet supported/unknown Scorpio_Crown: { + Announce: true + Rate: 17 + }*/ + /* not yet supported/unknown Scorpio_Diadem: { + Announce: true + Rate: 17 + }*/ + Whike_Black_Tail: { + Announce: true + Rate: 160 + } + Miracle_Medicine: { + Announce: true + Rate: 15 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 300 + } + Orc_HeroS: { + Count: 10 + Announce: true + Rate: 80 + } + Mental_Potion: { + Rate: 600 + } + Guyak_Pudding: { + Count: 5 + Rate: 700 + } + HE_Battle_Manual: { + Count: 4 + Rate: 900 + } + /* not yet supported/unknown Minor_Brisket: { + Rate: 1100 + }*/ + Dex_Dish_Box: { + Rate: 1300 + } + Zeny_Scroll: { + Count: 5 + Rate: 2500 + } + Small_Life_Potion_Box: { + Rate: 2300 + } +} +TCG_Card_Scroll: { + TCG_Card: { + Random: false + } + Battle_Manual: { + Random: false + Count: 2 + } + Bubble_Gum: { + Random: false + Count: 2 + } + Insurance: { + Random: false + Count: 2 + } + Token_Of_Siegfried: { + Random: false + Count: 3 + } + Light_White_Pot: { + Random: false + Count: 25 + } +} +Boitata_Scroll: { + /* not yet supported/unknown Boitata_Armor: { + Announce: true + Rate: 5 + }*/ + Guarana_Candy: { + Count: 20 + Rate: 100 + } + Spark_Candy_Box10: { + Rate: 144 + } + Hell_Fire: { + Rate: 10 + } + Pharaoh_Card: { + Announce: true + Rate: 1 + } + HE_Battle_Manual: { + Count: 10 + Rate: 100 + } + Resist_Fire: { + Count: 10 + Rate: 80 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 20 + } + Dex_Dish_Box: { + Rate: 150 + } + Pill_: { + Count: 10 + Rate: 100 + } + Insurance_Package: { + Rate: 70 + } + Job_Manual50_Box: { + Rate: 100 + } + Zeny_Scroll: { + Count: 30 + Rate: 100 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 20 + } +} +/* item not unknown/supported - not yet available +Lucky_Egg_C2: { + Magic_Card_Album: { + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 900 + } + Poison_Bottle_Box2: { + Rate: 900 + } + Blue_Herb_Box2: { + Rate: 900 + } + Guarantee_Weapon_5Up: { + Rate: 200 + } + Guarantee_Armor_5Up: { + Rate: 200 + } + Sealed_Dracula_Card: { + Rate: 1 + } + Drake_Card: { + Rate: 1 + } + Cancer_Diadem: { + Rate: 150 + } + Cancer_Crown: { + Rate: 150 + } + Mini_Propeller_: { + Rate: 150 + } + Battle_Manual_Box: { + Announce: true + Rate: 1000 + } + Comp_Bubble_Gum: { + Rate: 800 + } + Comp_Insurance: { + Count: 3 + Announce: true + Rate: 800 + } + J_Aspersio_5_Scroll: { + Count: 5 + Announce: true + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Announce: true + Rate: 800 + } + Psychic_ArmorS: { + Count: 2 + Announce: true + Rate: 800 + } + Yggdrasilberry_Box_: { + Announce: true + Rate: 948 + } + Bogy_Horn: { + Announce: true + Rate: 150 + } + Flame_Sprits_Armor__: { + Announce: true + Rate: 150 + } + Jasper_Crest: { + Announce: true + Rate: 150 + } +}*/ +Lucky_Egg_C6: { + Yggdrasilberry_Box_: { + Rate: 928 + } + Battle_Manual_Box: { + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Fallen_Bishop_Card: { + Rate: 1 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Sealed_Gloom_Card: { + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Passion_FB_Hat: { + Announce: true + Rate: 50 + } + Cool_FB_Hat: { + Announce: true + Rate: 50 + } + Victory_FB_Hat: { + Announce: true + Rate: 20 + } + Glory_FB_Hat: { + Announce: true + Rate: 50 + } +} +/* item not unknown/supported - not yet available +Lucky_Egg_C9: { + Comp_Bubble_Gum: { + Count: 3 + Rate: 1500 + } + Battle_Manual_Box: { + Rate: 1459 + } + Comp_Insurance: { + Count: 3 + Rate: 1500 + } + White_Slim_Pot_Box2: { + Rate: 1500 + } + Poison_Bottle_Box2: { + Rate: 1500 + } + Dead_Tree_Branch_Box2: { + Rate: 1500 + } + Elven_Ears_: { + Announce: true + Rate: 10 + } + Holy_Marching_Hat_J: { + Announce: true + Rate: 300 + } + Auger_Of_Spirit: { + Announce: true + Rate: 20 + } + Orc_Hero_Card: { + Announce: true + Rate: 1 + } + Flying_Angel: { + Announce: true + Rate: 100 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 500 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 5 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 5 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C7: { + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Yggdrasilberry_Box_: { + Rate: 1043 + } + Underripe_Yggseed: { + Count: 10 + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Battle_Manual_Box: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Valkyrie_Helm: { + Announce: true + Rate: 50 + } + Ifrit_Card: { + Announce: true + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 2 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 2 + } + Mask_Of_Ifrit: { + Announce: true + Rate: 1 + } + Ifrit: { + Announce: true + Rate: 1 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C8: { + Yggdrasilberry_Box_: { + Rate: 900 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 95 + } + Dead_Tree_Branch_Box2: { + Rate: 1000 + } + Psychic_ArmorS: { + Count: 2 + Rate: 1000 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Battle_Manual_Box: { + Rate: 900 + } + Fruit_Of_Mastela_Box2: { + Rate: 900 + } + Poison_Bottle_Box2: { + Rate: 900 + } + White_Slim_Pot_Box2: { + Rate: 900 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Black_Devil_Mask_: { + Announce: true + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 25 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 2 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 2 + } + Drooping_Morocc_Minion: { + Announce: true + Rate: 150 + } + Wanderer: { + Announce: true + Rate: 150 + } +}*/ +/* item not unknown/supported - not yet available +Lucky_Egg_C10: { + Guarantee_Weapon_8Up: { + Announce: true + Rate: 5 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 5 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Evil_Marcher_Hat: { + Announce: true + Rate: 15 + } + Battle_Manual_Box: { + Rate: 500 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 1000 + } + Comp_Insurance: { + Count: 3 + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 100 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 200 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 200 + } + E_WOB_Rune: { + Count: 10 + Rate: 900 + } + E_WOB_Schwaltz: { + Count: 10 + Rate: 900 + } + E_WOB_Rachel: { + Count: 10 + Rate: 900 + } + E_WOB_Local: { + Count: 10 + Rate: 900 + } + RWC2010_Indonesia: { + Announce: true + Rate: 1 + } + Sealed_Kiel_Card: { + Announce: true + Rate: 1 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Sealed_B_Ygnizem_Card: { + Announce: true + Rate: 1 + } + Heart_Eye_Patch1: { + Announce: true + Rate: 150 + } + Heart_Eye_Patch2: { + Announce: true + Rate: 150 + } + Boy: { + Rate: 400 + } + Flaming_Ice: { + Rate: 400 + } + Tantanmen: { + Rate: 400 + } + Enchant_Book: { + Announce: true + Rate: 22 + } +}*/ +/* item not unknown/supported - not yet available +Wind_Type_Scroll: { + Gemini_Diadem: { + Announce: true + Rate: 100 + } + Gemini_Crown: { + Announce: true + Rate: 100 + } + Libra_Diadem: { + Announce: true + Rate: 50 + } + Libra_Crown: { + Announce: true + Rate: 100 + } + Aquarius_Diadem: { + Announce: true + Rate: 100 + } + Aquarius_Crown: { + Announce: true + Rate: 100 + } + Snowman_Hat_Box: { + Announce: true + Rate: 5 + } + Sunglasses_Bball_Hat: { + Announce: true + Rate: 234 + } + Hankie_In_Mouth: { + Announce: true + Rate: 50 + } + New_Style_Coupon_Box: { + Rate: 50 + } + Neuralizer_Box: { + Announce: true + Rate: 10 + } + Battle_Manual_Box: { + Rate: 1000 + } + Kafra_Card_Box: { + Rate: 1000 + } + Bloody_Dead_Branch: { + Rate: 500 + } + Spark_Candy_Box10: { + Rate: 1500 + } + Str_Dish_Box: { + Rate: 1200 + } + Int_Dish_Box: { + Rate: 1200 + } + Token_Of_Siegfried_Box: { + Rate: 1200 + } + Garm_Card: { + Announce: true + Rate: 1 + } + Fruit_Of_Mastela_Box2: { + Rate: 1500 + } +}*/ +/* item not unknown/supported - not yet available +LUcky_Egg_C3: { + Magic_Card_Album: { + Announce: true + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Poison_Bottle_Box2: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 800 + } + Chung_E_Pet_Coupon: { + Announce: true + Rate: 500 + } + Succu_Pet_Coupon: { + Announce: true + Rate: 500 + } + Imp_Pet_Coupon: { + Announce: true + Rate: 500 + } + Leo_Crown: { + Announce: true + Rate: 150 + } + Dress_Hat: { + Announce: true + Rate: 100 + } + Sunglasses_: { + Announce: true + Rate: 10 + } + Battle_Manual_Box: { + Rate: 489 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 800 + } + Comp_Insurance: { + Count: 3 + Rate: 800 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 800 + } + Underripe_Yggseed: { + Count: 10 + Rate: 800 + } + Psychic_ArmorS: { + Count: 2 + Rate: 800 + } + Yggdrasilberry_Box_: { + Rate: 800 + } + Upg_Buckler_Box: { + Announce: true + Rate: 100 + } + Flame_Sprits_Armor__: { + Announce: true + Rate: 200 + } + Sealed_Kiel_Card: { + Announce: true + Rate: 1 + } + Donut_In_Mouth: { + Announce: true + Rate: 150 + } + K_Rabbit_Bonnet: { + Announce: true + Rate: 50 + } +}*/ +Lucky_Egg_C4: { + White_Slim_Pot_Box2: { + Rate: 790 + } + Poison_Bottle_Box2: { + Rate: 720 + } + Blue_Herb_Box2: { + Rate: 720 + } + Battle_Manual_Box: { + Rate: 700 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 720 + } + Deviling_Card: { + Announce: true + Rate: 1 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 720 + } + Comp_Insurance: { + Count: 3 + Rate: 720 + } + Underripe_Yggseed: { + Count: 10 + Rate: 720 + } + Psychic_ArmorS: { + Count: 2 + Rate: 720 + } + Yggdrasilberry_Box_: { + Rate: 720 + } + Sealed_B_Ygnizem_Card: { + Announce: true + Rate: 1 + } + /* not yet supported/unknown Lunatic_Hat_Box: { + Announce: true + Rate: 200 + }*/ + /* not yet supported/unknown Necromencer: { + Announce: true + Rate: 200 + }*/ + Fried_Egg: { + Announce: true + Rate: 200 + } + /* not yet supported/unknown Sagittarius_Crown: { + Announce: true + Rate: 200 + }*/ + Savage_Baby_Hat: { + Announce: true + Rate: 198 + } + /* not yet supported/unknown Fur_Seal_Hat_Box: { + Announce: true + Rate: 200 + }*/ + Chung_E_Pet_Coupon: { + Announce: true + Rate: 500 + } + Succu_Pet_Coupon: { + Announce: true + Rate: 500 + } + Imp_Pet_Coupon: { + Announce: true + Rate: 500 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } +} +Lucky_Egg_C5: { + Yggdrasilberry_Box_: { + Rate: 900 + } + Underripe_Yggseed: { + Count: 10 + Rate: 900 + } + Psychic_ArmorS: { + Count: 2 + Rate: 900 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 900 + } + Vanberk_Card: { + Announce: true + Rate: 1 + } + Sealed_Ktullanux_Card: { + Announce: true + Rate: 1 + } + Comp_Bubble_Gum: { + Count: 3 + Rate: 900 + } + Comp_Insurance: { + Count: 3 + Rate: 900 + } + Battle_Manual_Box: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 800 + } + Poison_Bottle_Box2: { + Rate: 800 + } + White_Slim_Pot_Box2: { + Rate: 800 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + Magestic_Goat_: { + Announce: true + Rate: 150 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 1 + } + Delicious_Shaved_Ice: { + Announce: true + Rate: 299 + } + Fit_Pipe: { + Announce: true + Rate: 299 + } + /* not yet supported/unknown Gril: { + Announce: true + Rate: 299 + }*/ + Ring_Of_Flame_Lord: { + Announce: true + Rate: 50 + } + /* not yet supported/unknown Samambaia_Box: { + Announce: true + Rate: 200 + }*/ + Ring_Of_Resonance: { + Announce: true + Rate: 50 + } +} +Weather_Report_Box: { + /* not yet supported/unknown Fine_Sun: { + Random: false + }*/ + Rainbow: { + Random: false + } + Rain_Cloud: { + Random: false + } + /* not yet supported/unknown Lightning_Cloud: { + Random: false + }*/ +} +/* not yet supported/unknown +Comin_Actor_Box: { + Charlie_Beard: { + Random: false + } + Charlie_Hat: { + Random: false + } +}*/ +/* not yet supported/unknown +Hen_Set_Box: { + Chicken_Beak: { + Random: false + } + Cocks_Comb: { + Random: false + } +}*/ +Lucky_Egg_C: { + Sealed_Mistress_Card: { + Announce: true + Rate: 1 + } + Magic_Card_Album: { + Announce: true + Rate: 50 + } + White_Slim_Pot_Box2: { + Rate: 1500 + } + Poison_Bottle_Box2: { + Rate: 1500 + } + Blue_Herb_Box2: { + Rate: 1500 + } + Chung_E_Pet_Coupon: { + Rate: 1200 + } + Succu_Pet_Coupon: { + Rate: 1200 + } + Imp_Pet_Coupon: { + Rate: 1200 + } + Guarantee_Weapon_5Up: { + Rate: 200 + } + Guarantee_Armor_5Up: { + Rate: 200 + } + Crown_: { + Rate: 290 + } + Sharp_Gear_: { + Rate: 250 + } + Ribbon_Of_Bride: { + Announce: true + Rate: 50 + } + /* not yet supported/unknown Odin: { + Rate: 599 + }*/ + /* not yet supported/unknown Archangel_Wing: { + Announce: true + Rate: 50 + }*/ + Elven_Ears_: { + Announce: true + Rate: 10 + } + Rabbit_Earplug: { + Rate: 200 + } +} +/* item not unknown/supported - not yet available +Water_Type_Scroll: { + Cancer_Diadem: { + Announce: true + Rate: 150 + } + Cancer_Crown: { + Announce: true + Rate: 150 + } + Scorpio_Diadem: { + Announce: true + Rate: 60 + } + Scorpio_Crown: { + Announce: true + Rate: 60 + } + Pisces_Diadem: { + Announce: true + Rate: 110 + } + Pisces_Crown: { + Announce: true + Rate: 150 + } + Wizard_Left_Eye: { + Announce: true + Rate: 20 + } + Indi_Feather_Band: { + Announce: true + Rate: 266 + } + Unbreak_Weap_Box: { + Rate: 300 + } + Unbreak_Def_Box: { + Rate: 300 + } + Token_Of_Siegfried_Box: { + Rate: 1500 + } + Bubble_Gum_Box: { + Rate: 1500 + } + Magic_Card_Album: { + Rate: 100 + } + Agi_Dish_Box: { + Rate: 1900 + } + Dex_Dish_Box: { + Rate: 1900 + } + Donut_In_Mouth: { + Announce: true + Rate: 10 + } + Robo_Eye_Box: { + Announce: true + Rate: 20 + } + Sealed_TurtleG_Card: { + Announce: true + Rate: 1 + } + Sealed_Amon_Ra_Card: { + Announce: true + Rate: 3 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1500 + } +}*/ +/* item not unknown/supported - not yet available +Earth_Type_Scroll: { + Capricorn_Diadem: { + Announce: true + Rate: 150 + } + Capricorn_Crown: { + Announce: true + Rate: 150 + } + Virgo_Diadem: { + Announce: true + Rate: 150 + } + Virgo_Crown: { + Announce: true + Rate: 150 + } + Taurus_Diadem: { + Announce: true + Rate: 150 + } + Taurus_Crown: { + Announce: true + Rate: 150 + } + Teardrop: { + Announce: true + Rate: 50 + } + Abacus_In_Mouth: { + Announce: true + Rate: 300 + } + Unbreak_Weap_Box: { + Rate: 194 + } + Unbreak_Def_Box: { + Rate: 194 + } + Token_Of_Siegfried_Box: { + Rate: 1600 + } + Bubble_Gum_Box: { + Rate: 1600 + } + Battle_Manual_Box: { + Rate: 1600 + } + Balloon_Hat: { + Announce: true + Rate: 5 + } + Hexagon_Spectacles: { + Announce: true + Rate: 300 + } + Rabbit_Bonnet: { + Announce: true + Rate: 5 + } + Hen_Set_Box: { + Announce: true + Rate: 50 + } + Sealed_Knight_WS_Card: { + Announce: true + Rate: 1 + } + Sealed_Lady_Tanee_Card: { + Announce: true + Rate: 1 + } + Silvervine_Fruit_Box10: { + Rate: 1600 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1600 + } +} +/* item not unknown/supported - not yet available +Earth_Type_Scroll: { + Capricorn_Diadem: { + Announce: true + Rate: 150 + } + Capricorn_Crown: { + Announce: true + Rate: 150 + } + Virgo_Diadem: { + Announce: true + Rate: 150 + } + Virgo_Crown: { + Announce: true + Rate: 150 + } + Taurus_Diadem: { + Announce: true + Rate: 150 + } + Taurus_Crown: { + Announce: true + Rate: 150 + } + Teardrop: { + Announce: true + Rate: 50 + } + Abacus_In_Mouth: { + Announce: true + Rate: 300 + } + Unbreak_Weap_Box: { + Rate: 194 + } + Unbreak_Def_Box: { + Rate: 194 + } + Token_Of_Siegfried_Box: { + Rate: 1600 + } + Bubble_Gum_Box: { + Rate: 1600 + } + Battle_Manual_Box: { + Rate: 1600 + } + Balloon_Hat: { + Announce: true + Rate: 5 + } + Hexagon_Spectacles: { + Announce: true + Rate: 300 + } + Rabbit_Bonnet: { + Announce: true + Rate: 5 + } + Hen_Set_Box: { + Announce: true + Rate: 50 + } + Sealed_Knight_WS_Card: { + Announce: true + Rate: 1 + } + Sealed_Lady_Tanee_Card: { + Announce: true + Rate: 1 + } + Fruit_Of_Mastela_Box2: { + Rate: 1600 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1600 + } +}*/ +Splash_Scroll: { + /* not yet supported/unknown Songpyun_Box50: { + Rate: 1200 + }*/ + Love_Chick_Hat: { + Announce: true + Rate: 130 + } + Convex_Mirror_Box: { + Rate: 800 + } + Megaphone_Box: { + Rate: 700 + } + Job_Manual50_Box: { + Rate: 500 + } + Token_Of_Siegfried_Box: { + Rate: 800 + } + Splash_Hat: { + Announce: true + Named: true + Rate: 50 + } + Gryphon_Hat: { + Announce: true + Rate: 150 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 70 + } + Kafra_Card_Box: { + Rate: 800 + } + Psychic_ArmorS: { + Count: 10 + Rate: 500 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 150 + } + Yggdrasilberry_Box_: { + Rate: 600 + } + Enchant_Book: { + Announce: true + Rate: 500 + } + Str_Dish_Box: { + Rate: 1300 + } + Dex_Dish_Box: { + Rate: 1749 + } + B_Eremes_Card: { + Announce: true + Rate: 1 + } +} +/* item not unknown/supported - not yet available +Vocation_Scroll: { + HP_Increase_PotionL: { + Count: 30 + Rate: 1200 + } + Vit_Dish_Box: { + Rate: 1350 + } + Int_Dish_Box: { + Rate: 1350 + } + Boarding_Halter_Box: { + Rate: 200 + } + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + Psychic_ArmorS: { + Count: 10 + Rate: 500 + } + HD_Ori_Box10: { + Rate: 150 + } + Token_Of_Siegfried_Box: { + Rate: 1100 + } + Megaphone_Box: { + Rate: 1079 + } +// not yet supported/unknown Diabolic_Scroll: { +// Count: 5 +// Rate: 1100 +// } + Bloody_Dead_Branch: { + Announce: true + Rate: 580 + } + HD_Elu_Box10: { + Rate: 150 + } + Gang_Scarf: { + Announce: true + Rate: 45 + } + Sealed_Orc_Load_Card: { + Announce: true + Rate: 10 + } + Sealed_B_Magaleta_Card: { + Announce: true + Rate: 10 + } + Red_Bread_Hat: { + Announce: true + Rate: 5 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 10 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 10 + } + Incant_Samurai_Card: { + Announce: true + Rate: 1 + } + Neuralizer_Box: { + Announce: true + Rate: 50 + } +}*/ +/* item not unknown/supported - not yet available Wisdom_Scroll: { + White_Slim_Pot_Box2: { + Rate: 1100 + } + Blue_Herb_Box2: { + Rate: 1100 + } + Fruit_Of_Mastela_Box2: { + Rate: 1200 + } + Dead_Tree_Branch_Box2: { + Rate: 1100 + } + B_Def_Potion_Box30: { + Rate: 1100 + } + B_Mdef_Potion_Box30: { + Rate: 1100 + } + Diabolic_Scroll: { + Count: 5 + Rate: 1100 + } + Unbreak_Weap_Box: { + Rate: 100 + } + Unbreak_Def_Box: { + Rate: 100 + } + Enchant_Book: { + Announce: true + Rate: 500 + } + Battle_Manual_Box: { + Rate: 784 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 400 + } + Trident_Helmet: { + Announce: true + Rate: 150 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 5 + } + Sealed_B_Harword_Card: { + Announce: true + Rate: 15 + } + Randgris_Card: { + Announce: true + Rate: 1 + } + Turtle_Hat_Box: { + Announce: true + Rate: 100 + } + Snake_Head: { + Announce: true + Rate: 40 + } + Ghostring_Card: { + Announce: true + Rate: 5 + } +}*/ +/* item not unknown/supported - not yet available +Patron_Scroll: { + Agi_Dish_Box: { + Rate: 1300 + } + Luk_Dish_Box: { + Rate: 1300 + } + Yggdrasilberry_Box_: { + Rate: 1200 + } + Enchant_Book: { + Announce: true + Rate: 773 + } + Miracle_Medicine: { + Rate: 200 + } + Fruit_Of_Mastela_Box2: { + Rate: 1150 + } + Bubble_Gum_Box: { + Rate: 1100 + } + Storm_10_Scroll_Box: { + Rate: 1060 + } + Job_Manual50_Box: { + Rate: 500 + } + Songpyun_Box50: { + Rate: 1110 + } + Magic_Card_Album: { + Rate: 200 + } + Immuned_Shield: { + Announce: true + Rate: 30 + } + Sealed_Berz_Card: { + Announce: true + Rate: 1 + } + Sealed_Eddga_Card: { + Announce: true + Rate: 15 + } + Cat_Ears_Beret: { + Announce: true + Rate: 20 + } + Snowman_Hat_Box: { + Announce: true + Rate: 5 + } + Hankie_In_Mouth: { + Announce: true + Rate: 30 + } + Mistress_Card: { + Announce: true + Rate: 1 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 5 + } +}*/ +/* item not unknown/supported - not yet available +Heaven_Scroll: { + Yggdrasilberry_Box_: { + Rate: 1200 + } + Max_Weight_Up_Box: { + Rate: 280 + } + SP_Increase_PotionL: { + Count: 30 + Rate: 1200 + } + Insurance_Package: { + Rate: 850 + } + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + Accuracy_30_Scroll: { + Count: 10 + Rate: 1200 + } + Bubble_Gum_Box: { + Rate: 1075 + } + Enriched_Elunium_Box: { + Rate: 200 + } + Enriched_Oridecon_Box: { + Rate: 200 + } + Convex_Mirror_Box: { + Rate: 896 + } + Spark_Candy_Box10: { + Rate: 1200 + } + Tw_Frog_Hat: { + Announce: true + Rate: 150 + } + Carrot_In_Mouth: { + Announce: true + Rate: 78 + } + Puppy_Ears_Hat: { + Announce: true + Rate: 100 + } + Powder_Snow_Box: { + Announce: true + Rate: 1 + } + Sealed_B_Shecil_Card: { + Announce: true + Rate: 15 + } + Sealed_Apocalips_H_Card: { + Announce: true + Rate: 5 + } + Green_Apple_Hat: { + Announce: true + Rate: 150 + } + Enchant_Book: { + Announce: true + Rate: 100 + } +}*/ +Tw_Aug_Scroll: { + Yggdrasilberry_Box_: { + Rate: 1350 + } + Poison_Bottle_Box2: { + Rate: 1280 + } +/* Diabolic_Scroll: { + Count: 5 + Rate: 1300 + }*/ + Bubble_Gum_Box: { + Rate: 1300 + } + Battle_Manual_Box: { + Rate: 1130 + } + Enchant_Book: { + Announce: true + Rate: 800 + } + Psychic_ArmorS: { + Count: 10 + Rate: 1021 + } + Vit_Dish_Box: { + Rate: 1350 + } + Guarantee_Armor_5Up: { + Rate: 200 + } + Ninja_Scroll: { + Announce: true + Rate: 150 + } + Pink_Fur_Hat: { + Announce: true + Rate: 100 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 3 + } + Whisper_Boss_Card: { + Announce: true + Rate: 15 + } + Gloom_Under_Night_Card: { + Announce: true + Rate: 1 + } +} +Tw_Nov_Scroll2: { + Dex_Dish_Box: { + Rate: 1500 + } +/* Songpyun_Box50: { + Rate: 1200 + }*/ + Enchant_Book: { + Announce: true + Rate: 1100 + } + Megaphone_Box: { + Rate: 1200 + } + Token_Of_Siegfried_Box: { + Rate: 1200 + } + Yggdrasilberry_Box_: { + Rate: 884 + } + Vit_Dish_Box: { + Rate: 1500 + } + J_Aspersio_5_Scroll: { + Count: 10 + Rate: 600 + } + Psychic_ArmorS: { + Count: 10 + Rate: 600 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 80 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 50 + } + Candy_Hat: { + Announce: true + Rate: 50 + } + Sealed_D_Lord_Card: { + Announce: true + Rate: 5 + } + Sealed_F_Bishop_Card: { + Announce: true + Rate: 1 + } + Black_Knitted_Hat: { + Announce: true + Rate: 30 + } +} +Illusion_Nothing: { + /*Songpyun_Box50: { + Named: true + Rate: 1534 + }*/ + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 1500 + } + Agi_Dish_Box: { + Named: true + Rate: 1500 + } + Vit_Dish_Box: { + Named: true + Rate: 1500 + } +/* Diabolic_Scroll: { + Count: 5 + Named: true + Rate: 1500 + }*/ + Shadow_Armor_S_Box10: { + Named: true + Rate: 1500 + } + Sealed_Tao_Card: { + Announce: true + Named: true + Rate: 1 + } + Bloody_Dead_Branch: { + Announce: true + Named: true + Rate: 500 + } + Syringe_In_Mouth: { + Announce: true + Named: true + Rate: 100 + } + Guarantee_Weapon_8Up: { + Announce: true + Named: true + Rate: 50 + } + Guarantee_Armor_8Up: { + Announce: true + Named: true + Rate: 10 + } + Singing_Bird: { + Announce: true + Named: true + Rate: 130 + } + Round_Eyes: { + Announce: true + Named: true + Rate: 100 + } + Cat_Hat: { + Announce: true + Named: true + Rate: 70 + } + Weather_Report_Box: { + Announce: true + Named: true + Rate: 5 + } +} +Tw_Sep_Scroll: { + Int_Dish_Box: { + Rate: 1400 + } + Angeling_Pot_Box: { + Rate: 1477 + } + Dun_Tele_Scroll_Box10: { + Rate: 1500 + } + Kafra_Card_Box: { + Rate: 1200 + } + Holy_Armor_S_Box10: { + Rate: 1400 + } + Insurance_Package: { + Rate: 1200 + } + Job_Manual50_Box: { + Rate: 1200 + } + /* not yet supported/unknown Archangel_Wing: { + Announce: true + Rate: 10 + }*/ + Baby_Pacifier: { + Announce: true + Rate: 200 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 200 + } + Red_Hood: { + Announce: true + Rate: 149 + } + Sleeping_Kitty_Cat: { + Announce: true + Rate: 60 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 3 + } + B_Katrinn_Card: { + Announce: true + Rate: 1 + } +} +Flame_Light: { + Bubble_Gum_Box: { + Rate: 1400 + } + Str_Dish_Box: { + Rate: 1500 + } + Megaphone_Box: { + Rate: 1500 + } + Battle_Manual_Box: { + Rate: 1400 + } + Token_Of_Siegfried_Box: { + Rate: 1500 + } + Shadow_Armor_S_Box10: { + Rate: 1500 + } + Unbreak_Weap_Box: { + Announce: true + Rate: 175 + } + Unbreak_Def_Box: { + Announce: true + Rate: 175 + } + Max_Weight_Up_Box: { + Announce: true + Rate: 300 + } + Mike_Hat: { + Announce: true + Rate: 234 + } + Shaving_Cream: { + Announce: true + Rate: 250 + } + Deprotai_Doll_Hat: { + Announce: true + Rate: 50 + } + SLD_Garm_Card: { + Announce: true + Rate: 10 + } + Elven_Ears_: { + Announce: true + Rate: 3 + } + MVP_Basketball: { + Announce: true + Rate: 3 + } +} +Tw_Rainbow_Scroll: { + Vit_Dish_Box: { + Rate: 1400 + } + Int_Dish_Box: { + Rate: 1400 + } + Agi_Dish_Box: { + Rate: 1400 + } + Neko_Mimi_Kafra: { + Announce: true + Rate: 30 + } + Dex_Dish_Box: { + Rate: 1400 + } + /* not yet supported/unknown Diabolic_Scroll: { + Count: 5 + Rate: 1400 + }*/ + Unbreak_Def_Box: { + Announce: true + Rate: 200 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 500 + } + /* not yet supported/unknown HD_Bradium_Box5: { + Rate: 250 + }*/ + Unbreak_Weap_Box: { + Announce: true + Rate: 200 + } + Megaphone_Box: { + Rate: 1450 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 100 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 100 + } + Sunglasses_: { + Announce: true + Rate: 5 + } + Sealed_Ifrit_Card: { + Announce: true + Rate: 15 + } + Tao_Gunka_Card: { + Announce: true + Rate: 1 + } + Cowhide_Hat: { + Announce: true + Rate: 100 + } + Satanic_Chain_P: { + Announce: true + Rate: 5 + } + Censor_Bar: { + Announce: true + Named: true + Rate: 44 + } +} +Tw_Red_Scroll: { + White_Slim_Pot_Box2: { + Rate: 1100 + } + /* not yet supported/unknown Fruit_Of_Mastela_Box2: { + Rate: 1150 + }*/ + Kafra_Card_Box: { + Rate: 1050 + } + Token_Of_Siegfried_Box: { + Rate: 1050 + } + Bubble_Gum_Box: { + Rate: 1150 + } + Convex_Mirror_Box: { + Rate: 1100 + } + Battle_Manual_Box: { + Rate: 1100 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 150 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 147 + } + Psychic_ArmorS: { + Count: 10 + Rate: 500 + } + /* not yet supported/unknown Minor_Brisket: { + Count: 5 + Rate: 824 + }*/ + Job_Manual50_Box: { + Rate: 400 + } + Showy_High_Cap: { + Announce: true + Rate: 100 + } + Neuralizer: { + Announce: true + Rate: 10 + } + Sealed_Orc_Load_Card: { + Announce: true + Rate: 10 + } + Moonlight_Flower_Card: { + Announce: true + Rate: 1 + } + Krieger_Katar1: { + Announce: true + Rate: 3 + } + Leek_In_Mouth: { + Announce: true + Rate: 100 + } + Pink_Drooping_Kitty: { + Announce: true + Rate: 50 + } + Majestic_Evil_Horn: { + Announce: true + Rate: 5 + } +} +Tw_Orange_Scroll: { + Int_Dish_Box: { + Rate: 1100 + } + White_Slim_Pot_Box2: { + Rate: 1100 + } + Blue_Herb_Box2: { + Rate: 1000 + } + /* not yet supported/unknown Diabolic_Scroll: { + Count: 5 + Rate: 1100 + }*/ + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + Insurance_Package: { + Rate: 1100 + } + Aspersio_5_Scroll_Box: { + Rate: 1100 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 150 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 150 + } + B_Mdef_Potion_Box10: { + Rate: 590 + } + /* not yet supported/unknown Wug_Blood_Cocktail: { + Count: 5 + Rate: 788 + }*/ + Max_Weight_Up_Box: { + Announce: true + Rate: 400 + } + Hippo_Hat: { + Announce: true + Rate: 150 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 10 + } + SLD_Lord_Of_Death_Card: { + Announce: true + Rate: 10 + } + Doppelganger_Card: { + Announce: true + Rate: 1 + } + Krieger_Onehand_Axe1: { + Announce: true + Rate: 1 + } + Rose_Hairband: { + Announce: true + Rate: 100 + } + Bell_Ribbon: { + Announce: true + Rate: 40 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 10 + } +} +Tw_Yellow_Scroll: { + Agi_Dish_Box: { + Rate: 1100 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + J_Aspersio_5_Scroll_Box: { + Rate: 1200 + } + Guyak_Pudding: { + Count: 10 + Rate: 1100 + } + /* not yet supported/unknown Songpyun_Box50: { + Rate: 1100 + }*/ + Spark_Candy_Box10: { + Rate: 1100 + } + Insurance_Package: { + Rate: 1000 + } + Unbreak_Weap_Box: { + Announce: true + Rate: 148 + } + Unbreak_Def_Box: { + Announce: true + Rate: 148 + } + Psychic_ArmorS: { + Count: 10 + Rate: 550 + } + /* not yet supported/unknown Drocera_Herb_Stew: { + Count: 5 + Rate: 784 + }*/ + Bloody_Dead_Branch: { + Announce: true + Rate: 361 + } + Electric_Sunglass: { + Announce: true + Rate: 140 + } + SLD_B_Katrinn_Card: { + Announce: true + Rate: 10 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 120 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 80 + } + Krieger_Onehand_Spear1: { + Announce: true + Rate: 3 + } + Strawberry_In_Mouth: { + Announce: true + Rate: 50 + } + MVP_Basketball: { + Announce: true + Rate: 3 + } + RWC2010_Indonesia: { + Announce: true + Rate: 3 + } + Lord_Of_Death_Card: { + Announce: true + Rate: 1 + } + SLD_Lord_Of_Death_Card: { + Announce: true + Rate: 5 + } + Knight_Of_Abyss_Card: { + Announce: true + Rate: 10 + } + Lord_of_Death: { + Announce: true + Rate: 15 + } + Guarantee_Weapon_6Up: { + Announce: true + Rate: 25 + } + Guarantee_Armor_6Up: { + Announce: true + Rate: 25 + } + Pole_Axe: { + Announce: true + Rate: 50 + } + House_Auger: { + Announce: true + Rate: 74 + } + Guarantee_Weapon_5Up: { + Announce: true + Rate: 100 + } + Guarantee_Armor_5Up: { + Announce: true + Rate: 100 + } + War_Axe: { + Announce: true + Rate: 120 + } + Ring_: { + Announce: true + Rate: 150 + } + Iron_Driver: { + Announce: true + Rate: 150 + } + Max_Weight_Up_Box: { + Rate: 325 + } + Enriched_Elunium_Box5: { + Rate: 600 + } + Enriched_Oridecon_Box5: { + Rate: 600 + } + Shadow_Armor_S_Box10: { + Rate: 1100 + } + /* not yet supported/unknown Carat_Dia: { + Rate: 1075 + }*/ + /* not yet supported/unknown Petti_Tail_Noodle: { + Count: 5 + Rate: 1100 + }*/ + /* not yet supported/unknown Diabolic_Scroll: { + Count: 5 + Rate: 1100 + }*/ + HE_Battle_Manual: { + Count: 4 + Rate: 1100 + } + Guyak_Pudding: { + Count: 10 + Rate: 1075 + } + Siegfried_Box5: { + Rate: 1100 + } + Tao_Gunka_Card: { + Announce: true + Rate: 1 + } + Sealed_Tao_Card: { + Announce: true + Rate: 5 + } + Ungoliant_Card: { + Announce: true + Rate: 15 + } + Sealed_B_Ygnizem_Card: { + Announce: true + Rate: 50 + } + Mini_Glasses_: { + Announce: true + Rate: 3 + } + /* not yet supported/unknown Bravery_Bag: { + Announce: true + Rate: 15 + }*/ + Fancy_Phantom_Mask: { + Announce: true + Rate: 50 + } + Tiraya_Bonnet: { + Announce: true + Rate: 200 + } + Bizofnil_Wing_Deco: { + Announce: true + Rate: 265 + } + Max_Weight_Up_Box: { + Rate: 350 + } + /* not yet supported/unknown HD_Bradium_Box5: { + Rate: 450 + }*/ + /* not yet supported/unknown HD_Carnium_Box5: { + Rate: 450 + }*/ + Life_Ribbon_Box3: { + Rate: 1000 + } + Assumptio_5_Scroll_Box: { + Rate: 1000 + } + /* not yet supported/unknown Carat_Dia: { + Rate: 1000 + }*/ + HE_Battle_Manual: { + Count: 5 + Rate: 500 + } + Med_Life_Potion_Box: { + Rate: 1000 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Guyak_Pudding: { + Count: 10 + Rate: 902 + } + /* not yet supported/unknown Songpyun_Box50: { + Rate: 600 + }*/ + /* not yet supported/unknown HP_Increase_PotionL: { + Count: 30 + Rate: 500 + }*/ + Spark_Candy_Box10: { + Rate: 644 + } + B_Katrinn_Card: { + Announce: true + Rate: 1 + } + Sealed_Berz_Card: { + Announce: true + Rate: 3 + } + SLD_B_Katrinn_Card: { + Announce: true + Rate: 10 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 20 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 20 + } + Robo_Eye: { + Announce: true + Rate: 45 + } + Rainbow_Scarf: { + Announce: true + Rate: 53 + } + Alchemy_Glove: { + Announce: true + Rate: 100 + } + Orleans_Necklace: { + Announce: true + Rate: 78 + } + Orleans_Glove: { + Announce: true + Rate: 120 + } + Balloon_Hat: { + Announce: true + Rate: 150 + } + Orleans_Gown: { + Announce: true + Rate: 200 + } + Orleans_Server: { + Announce: true + Rate: 250 + } + Enchant_Book: { + Rate: 350 + } + HD_Ori_Box5: { + Rate: 500 + } + HD_Elu_Box5: { + Rate: 500 + } + Blue_Herb_Box2: { + Rate: 600 + } + Blessing_10_Scroll_Box: { + Rate: 1200 + } + Guyak_Pudding: { + Count: 10 + Rate: 1200 + } + Megaphone_Box: { + Rate: 1000 + } + Psychic_ArmorS: { + Count: 5 + Rate: 1200 + } + Zeny_Scroll: { + Count: 15 + Rate: 1200 + } + HE_Battle_Manual: { + Count: 3 + Rate: 1200 + } + Lady_Tanee_Card: { + Announce: true + Rate: 1 + } + Sealed_Lady_Tanee_Card: { + Announce: true + Rate: 4 + } + Incubus_Card: { + Announce: true + Rate: 20 + } + Succubus_Card: { + Announce: true + Rate: 30 + } + Asgard_Blessing: { + Announce: true + Rate: 10 + } + YinYang_Earring: { + Announce: true + Rate: 100 + } + Spiked_Scarf: { + Announce: true + Rate: 25 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 20 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 20 + } + Sura_Rampage: { + Announce: true + Rate: 70 + } + Headband_Of_Power: { + Announce: true + Rate: 500 + } + Superb_Fish_Box50: { + Announce: true + Rate: 100 + } + Max_Weight_Up_Box: { + Rate: 200 + } + Guyak_Pudding: { + Count: 10 + Rate: 1000 + } + /* not yet supported/unknown Fruit_Of_Mastela_Box2: { + Rate: 800 + }*/ + Mental_Potion: { + Rate: 700 + } + /* not yet supported/unknown Wug_Blood_Cocktail: { + Count: 5 + Rate: 1000 + }*/ + /* not yet supported/unknown Savage_BBQ: { + Count: 5 + Rate: 1000 + }*/ + Psychic_ArmorS: { + Count: 5 + Rate: 500 + } + Underripe_Yggseed: { + Count: 10 + Rate: 900 + } + Regeneration_Box10: { + Rate: 1000 + } + Int_Dish_Box: { + Rate: 1000 + } + Str_Dish_Box: { + Rate: 1000 + } + Fallen_Bishop_Card: { + Announce: true + Rate: 1 + } + SLD_Dark_Snake_Card: { + Announce: true + Rate: 5 + } + Deviling_Card: { + Announce: true + Rate: 10 + } + Ghostring_Card: { + Announce: true + Rate: 25 + } + Black_Glasses_: { + Announce: true + Rate: 2 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 15 + } + Satanic_Chain_P: { + Announce: true + Rate: 25 + } + Devil_Whisper: { + Announce: true + Rate: 40 + } + /* not yet supported/unknown Ear_Of_Angel: { + Announce: true + Rate: 80 + }*/ + Evil_Marcher_Hat: { + Announce: true + Rate: 150 + } + Rune_Boots: { + Announce: true + Rate: 100 + } + Evil_Mask: { + Announce: true + Rate: 100 + } + Eyes_Of_Darkness: { + Announce: true + Rate: 200 + } + Helm_Of_Darkness: { + Announce: true + Rate: 80 + } + Darkness_Helm: { + Announce: true + Rate: 100 + } + Unbreak_Weap_Box: { + Rate: 300 + } + Blue_Herb_Box2: { + Rate: 1267 + } + /* not yet supported/unknown Diabolic_Scroll: { + Count: 5 + Rate: 1500 + }*/ + HE_Battle_Manual: { + Count: 3 + Rate: 1500 + } + /* not yet supported/unknown Boy: { + Rate: 1500 + }*/ + Psychic_ArmorS: { + Count: 5 + Rate: 1500 + } + Shadow_Armor_S_Box10: { + Rate: 1500 + } + Maya_Card: { + Announce: true + Rate: 1 + } + Sealed_B_Magaleta_Card: { + Announce: true + Rate: 9 + } + Angeling_Card: { + Announce: true + Rate: 15 + } + Archangeling_Card: { + Announce: true + Rate: 25 + } + Guarantee_Armor_8Up: { + Announce: true + Rate: 25 + } + Guarantee_Weapon_8Up: { + Announce: true + Rate: 25 + } + Elven_Ears_: { + Announce: true + Rate: 5 + } + /* not yet supported/unknown Archangel_Wing: { + Announce: true + Rate: 50 + }*/ + White_Feather: { + Announce: true + Rate: 80 + } + B_Feather_Beret: { + Announce: true + Rate: 100 + } + Flying_Angel: { + Announce: true + Rate: 150 + } + Angel_Spirit: { + Announce: true + Rate: 50 + } + /* not yet supported/unknown Ear_Of_Angel: { + Announce: true + Rate: 200 + }*/ + Unbreak_Def_Box: { + Rate: 300 + } + Job_Manual50_Box: { + Rate: 500 + } + /* not yet supported/unknown Fruit_Of_Mastela_Box2: { + Rate: 1000 + }*/ + Inc_Agi_10_Scroll_Box: { + Rate: 965 + } + Kafra_Card_Box: { + Rate: 1100 + } + Guyak_Pudding: { + Count: 10 + Rate: 1000 + } + Holy_Armor_S_Box10: { + Rate: 1100 + } + HE_Battle_Manual: { + Count: 3 + Rate: 1100 + } + J_Aspersio_5_Scroll: { + Count: 5 + Rate: 1100 + } + /* not yet supported/unknown Gril: { + Rate: 1100 + }*/ + Orc_Load_Card: { + Announce: true + Rate: 1 + } + Sealed_Atroce_Card: { + Announce: true + Rate: 5 + } + Sealed_Kiel_Card: { + Announce: true + Rate: 3 + } + Sealed_D_Lord_Card: { + Announce: true + Rate: 30 + } + Black_Devil_Mask_: { + Announce: true + Rate: 2 + } + Horn_Of_Ancient: { + Announce: true + Rate: 10 + } + /* not yet supported/unknown Love_Rabbit_Hood: { + Announce: true + Rate: 130 + }*/ + /* not yet supported/unknown Remover_Hat: { + Announce: true + Rate: 150 + }*/ + Inccubus_Horn: { + Announce: true + Rate: 50 + } + Horn_Of_Succubus: { + Announce: true + Rate: 50 + } + Majestic_Evil_Horn: { + Announce: true + Rate: 50 + } + Bloody_Dead_Branch: { + Announce: true + Rate: 100 + } + F_Clover_Box_Mouth4: { + Rate: 950 + } + All_In_One_Ring_Box: { + Rate: 169 + } + Max_Weight_Up_Box: { + Rate: 250 + } + Boarding_Halter_Box: { + Rate: 550 + } + Convex_Mirror_Box5: { + Rate: 800 + } + Yggdrasilberry_Box_: { + Rate: 1200 + } + Underripe_Yggseed: { + Count: 10 + Rate: 1250 + } + Psychic_ArmorS: { + Count: 5 + Rate: 1250 + } + White_Slim_Pot_Box2: { + Rate: 1500 + } + Dead_Tree_Branch_Box2: { + Rate: 1500 + } + Gloom_Under_Night_Card: { + Announce: true + Rate: 1 + } + Maya_Puple_Card: { + Announce: true + Rate: 2 + } + Sealed_Samurai_Card: { + Announce: true + Rate: 5 + } + Sealed_Pharaoh_Card: { + Announce: true + Rate: 10 + } + Sunglasses_: { + Announce: true + Rate: 2 + } + /* not yet supported/unknown Mercury_Helm: { + Announce: true + Rate: 10 + }*/ + Sakura_Coronet: { + Announce: true + Rate: 50 + } + King_Prawn_Hat: { + Announce: true + Rate: 200 + } + Lucky_Clover: { + Announce: true + Rate: 100 + } + /* not yet supported/unknown Prison_Uniform: { + Announce: true + Rate: 150 + }*/ + Little_Feather_Hat: { + Announce: true + Rate: 100 + } + Buffalo_Horn: { + Announce: true + Rate: 250 + } + Superb_Fish_Box50: { + Rate: 100 + } + Abrasive_Box5: { + Rate: 800 + } + Blue_Herb_Box2: { + Rate: 1000 + } + /* not yet supported/unknown Carat_Dia: { + Rate: 1500 + }*/ + Guyak_Pudding: { + Count: 10 + Rate: 800 + } + /* not yet supported/unknown Diabolic_Scroll: { + Count: 10 + Rate: 800 + }*/ + HE_Battle_Manual: { + Count: 5 + Rate: 1250 + } + Siegfried_Box5: { + Rate: 1370 + } + /* not yet supported/unknown Fruit_Of_Mastela_Box2: { + Rate: 1500 + }*/ +} +Challenge_Kit: { + Blessing_10_Scroll: { + Random: false + Count: 20 + Named: true + } + Inc_Agi_10_Scroll: { + Random: false + Count: 20 + Named: true + } +} +/* item not unknown/supported - not yet available +Tw_April_Scroll: { + Str_Dish_Box: { + Rate: 1500 + } + Luk_Dish_Box: { + Rate: 1500 + } + Vit_Dish_Box: { + Rate: 1500 + } + S_Mdef_Potion_Box30: { + Rate: 1300 + } + S_Def_Potion_Box30: { + Rate: 1300 + } + Holy_Armor_S_Box10: { + Rate: 1300 + } + Shadow_Armor_S_Box10: { + Rate: 1300 + } + Turtle_General_Card: { + Announce: true + Rate: 1 + } + RWC2010_Indonesia: { + Announce: true + Rate: 6 + } + Neuralizer_Box: { + Announce: true + Rate: 3 + } + Fallen_Angel_Wing: { + Announce: true + Rate: 10 + } + Spiked_Scarf_Box: { + Announce: true + Rate: 50 + } + Rainbow_Scarf_Box: { + Announce: true + Rate: 50 + } + Fish_Head_Hat_Box: { + Announce: true + Rate: 180 + } +}*/ +Tw_October_Scroll: { + Max_Weight_Up_Box: { + Named: true + Rate: 432 + } + Token_Of_Siegfried_Box: { + Named: true + Rate: 1350 + } + Int_Dish_Box: { + Named: true + Rate: 1350 + } + Bubble_Gum_Box: { + Named: true + Rate: 1350 + } + Spark_Candy_Box10: { + Named: true + Rate: 1350 + } + Guyak_Pudding: { + Count: 10 + Named: true + Rate: 1350 + } + Dun_Tele_Scroll_Box10: { + Named: true + Rate: 1350 + } + Job_Manual50_Box: { + Named: true + Rate: 650 + } + Black_Knitted_Hat: { + Announce: true + Named: true + Rate: 120 + } + Candy_Hat: { + Announce: true + Named: true + Rate: 120 + } + Drooping_Morocc_Minion: { + Announce: true + Named: true + Rate: 120 + } + Dress_Hat: { + Announce: true + Named: true + Rate: 120 + } + Sealed_Mistress_Card: { + Announce: true + Named: true + Rate: 2 + } + Asgard_Blessing: { + Announce: true + Named: true + Rate: 15 + } + Ant_Buyanne_Card: { + Announce: true + Named: true + Rate: 1 + } + Guarantee_Armor_7Up: { + Announce: true + Named: true + Rate: 100 + } + Guarantee_Weapon_7Up: { + Announce: true + Named: true + Rate: 100 + } + Comin_Actor_Box: { + Announce: true + Named: true + Rate: 120 + } +} +Summer_Scroll3: { + Underripe_Yggseed: { + Count: 10 + Rate: 1500 + } + Megaphone_Box: { + Rate: 1500 + } + Vit_Dish_Box: { + Rate: 1500 + } + Holy_Armor_S_Box10: { + Rate: 1500 + } + Token_Of_Siegfried_Box: { + Rate: 1300 + } + Int_Dish_Box: { + Rate: 1500 + } + Unbreak_Weap_Box: { + Announce: true + Rate: 150 + } + Unbreak_Def_Box: { + Announce: true + Rate: 150 + } + Scuba_Mask: { + Announce: true + Rate: 275 + } + Sugared_Fruit_Stick: { + Announce: true + Rate: 275 + } + Dress_Hat: { + Announce: true + Rate: 275 + } + Asgard_Blessing: { + Announce: true + Rate: 10 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 5 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 45 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 10 + } + Maya_Puple_Card: { + Announce: true + Rate: 3 + } + Sealed_Tao_Card: { + Announce: true + Rate: 1 + } + B_Eremes_Card: { + Announce: true + Rate: 1 + } +} +/* not yet supported/unknown C_Wing_Of_Fly_3Day_Box: { + C_Wing_Of_Fly: { + Random: false + Expire: 72 + Named: true + } +}*/ +RWC_2012_Set_Box: { + RWC_2012_Ring: { + Random: false + Named: true + } + RWC_2012_Pendant: { + Random: false + Named: true + } + C_Wing_Of_Fly_3Day_Box: { + Random: false + Named: true + } +} +/* item not unknown/supported - not yet available +Ex_Def_Potion_Box: { + Ex_Def_Potion: { + Random: false + Count: 5 + Named: true + } + RWC_Scroll_2012: { + Random: false + Named: true + } +}*/ +/* item not unknown/supported - not yet available +RWC_Scroll_2012: { + RWC_Inicializer: { + Rate: 1000 + } + Guarantee_Armor_7Up: { + Announce: true + Rate: 90 + } + Guarantee_Weapon_7Up: { + Announce: true + Rate: 90 + } + Guarantee_Armor_9Up: { + Announce: true + Rate: 5 + } + Guarantee_Weapon_9Up: { + Announce: true + Rate: 5 + } + White_Slim_Pot_Box2: { + Rate: 1000 + } + Poison_Bottle_Box2: { + Rate: 1000 + } + Bubble_Gum_Box5: { + Rate: 1500 + } + Carat_Dia: { + Rate: 1000 + } + Battle_Manual_Box5: { + Rate: 1500 + } + Old_C_Album_Weapon: { + Rate: 500 + } + Old_C_Album_Acc: { + Rate: 500 + } + Branch_Of_Dead_Tree: { + Count: 3 + Rate: 1000 + } + Magic_Card_Album: { + Announce: true + Rate: 100 + } + RWC_Memory_Staff: { + Announce: true + Rate: 150 + } + RWC_Memory_Mace: { + Announce: true + Rate: 150 + } + RWC_Memory_Knife: { + Announce: true + Rate: 150 + } + Rainbow_Feather_Deco: { + Announce: true + Rate: 150 + } + C_Rainbow_Feather_Deco: { + Announce: true + Rate: 110 + } +}*/ +/* item not unknown/supported - not yet available +Old_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 400 + } + Splendide_Coin: { + Rate: 200 + } + Manuk_Coin: { + Rate: 100 + } + Sapa_Feat_Cert: { + Rate: 80 + } + Mora_Coin: { + Rate: 50 + } + Anger_Seagod: { + Rate: 1 + } + Cgrade_Coin: { + Rate: 74 + } + Dgrade_Coin: { + Rate: 95 + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Manuk_Coin: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Mora_Coin: { + Random: false + } + Agrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Manuk_Coin: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Mora_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +High_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Agrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Sapa_Feat_Cert: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Mid_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Bgrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Manuk_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Low_Coin_Pocket: { + Malang_Sp_Can: { + Rate: 600 + } + Sapa_Feat_Cert: { + Rate: 300 + } + Cgrade_Coin: { + Rate: 100 + } + Malang_Sp_Can: { + Random: false + } + Mora_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Manuk_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Splendide_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Sgrade_Pocket: { + Agrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Agrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Anger_Seagod: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Agrade_Pocket: { + Agrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Bgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Cgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Bgrade_Pocket: { + Bgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Cgrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Cgrade_Pocket: { + Cgrade_Coin: { + Random: false + } + Dgrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Egrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Dgrade_Pocket: { + Dgrade_Coin: { + Random: false + } + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + Count: 2 + } + Egrade_Coin: { + Random: false + Count: 2 + } + Malang_Sp_Can: { + Random: false + } + Dgrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Egrade_Pocket: { + Egrade_Coin: { + Random: false + } + Malang_Sp_Can: { + Random: false + Count: 2 + } + Egrade_Coin: { + Random: false + Count: 2 + } + Malang_Sp_Can: { + Random: false + } + Egrade_Coin: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box: { + Ptotection_Seagod: { + Random: false + Expire: 23 + } +}*/ +/* item not unknown/supported - not yet available +Hairtail_Box1: { + Hairtail: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Hairtail_Box2: { + Hairtail: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Spearfish_Box1: { + Spearfish_: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Spearfish_Box2: { + Spearfish_: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Saurel_Box1: { + Saurel: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Saurel_Box2: { + Saurel: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Tuna_Box1: { + Tuna: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Tuna_Box2: { + Tuna: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Malang_Crab_Box1: { + Malang_Snow_Crab: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Malang_Crab_Box2: { + Malang_Snow_Crab: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Brindle_Eel_Box1: { + Brindle_Eel: { + Random: false + } +}*/ +/* item not unknown/supported - not yet available +Brindle_Eel_Box2: { + Brindle_Eel: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box2: { + Ptotection_Seagod: { + Random: false + Expire: 168 + } +}*/ +/* item not unknown/supported - not yet available +Ptotection_Seagod_Box3: { + Ptotection_Seagod: { + Random: false + Expire: 360 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box: { + Octopus_Hunt_Stick: { + Random: false + Expire: 23 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box2: { + Octopus_Hunt_Stick: { + Random: false + Expire: 72 + } +}*/ +/* item not unknown/supported - not yet available +Octo_Hstick_Box3: { + Octopus_Hunt_Stick: { + Random: false + Expire: 168 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box10: { + Silvervine: { + Random: false + Count: 10 + } + Malang_Sp_Can: { + Random: false + Count: 30 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box40: { + Silvervine: { + Random: false + Count: 40 + } + Malang_Sp_Can: { + Random: false + Count: 120 + } +}*/ +/* not yet supported/unknown Silvervine_Fruit_Box4: { + Silvervine: { + Random: false + Count: 4 + } + Malang_Sp_Can: { + Random: false + Count: 12 + } +}*/ +/* not yet supported/unknown Malang_Woe_Encard_Box: { + Ptotection_Seagod_Box: { + Random: false + } + Octo_Hstick_Box: { + Random: false + } +}*/ \ No newline at end of file diff --git a/db/re/item_violetbox.txt b/db/re/item_violetbox.txt deleted file mode 100644 index ef8bd163d..000000000 --- a/db/re/item_violetbox.txt +++ /dev/null @@ -1,928 +0,0 @@ -// Old Violet Box Obtainable Items Database -// -// Structure of Database: -// GroupID,ItemID,Rate - -2,501,14 // Red Potion -2,502,14 // Orange Potion -2,503,14 // Yellow Potion -2,504,14 // White Potion -2,505,14 // Blue Potion -2,506,14 // Green Potion -2,507,14 // Red Herb -2,508,14 // Yellow Herb -2,509,14 // White Herb -2,510,14 // Blue Herb -2,511,14 // Green Herb -2,512,14 // Apple -2,513,14 // Banana -2,514,14 // Grape -2,515,14 // Carrot -2,516,14 // Potato -2,517,14 // Meat -2,518,14 // Honey -2,519,14 // Milk -2,520,14 // Hinalle Leaflet -2,521,14 // Aloe Leaflet -2,522,14 // Mastela Fruit -2,523,14 // Holy Water -2,525,14 // Panacea -2,526,14 // Royal Jelly -2,528,14 // Monster Food -2,529,14 // Candy -2,530,14 // Candy Cane -2,531,14 // Apple Juice -2,532,14 // Banana Juice -2,533,14 // Grape Juice -2,534,14 // Carrot Juice -2,535,14 // Pumpkin -2,536,14 // Ice Cream -2,537,14 // Pet Food -2,538,14 // Well-baked Cookie -2,539,14 // Piece of Cake -2,544,14 // Raw Fish -2,545,14 // Condensed Red Potion -2,546,14 // Condensed Yellow Potion -2,547,14 // Condensed White Potion -2,548,14 // Cheese -2,549,14 // Yam -2,550,14 // Rice Cake -2,551,14 // Sushi -2,553,14 // Bao -2,555,14 // Traditional Rice Cake -2,558,14 // Chocolate -2,561,14 // White Chocolate -2,601,14 // Fly Wing -2,602,14 // Butterfly Wing -2,604,214 // Dead Branch -2,605,14 // Anodyne -2,606,14 // Aloevera -2,607,14 // Yggdrasil Berry -2,608,14 // Yggdrasil Seed -2,609,14 // Amulet -2,610,14 // Yggdrasil Leaf -2,611,14 // Magnifier -2,612,14 // Mini Furnace -2,613,14 // Iron Hammer -2,614,14 // Golden Hammer -2,615,14 // Oridecon Hammer -2,616,1 // Old Card Album -2,617,103 // Old Purple Box -2,618,14 // Worn Out Scroll -2,619,14 // Unripe Apple -2,620,14 // Orange Juice -2,621,14 // Bitter Herb -2,622,14 // Rainbow Carrot -2,623,14 // Earthworm the Dude -2,624,14 // Rotten Fish -2,625,14 // Rusty Iron -2,626,14 // Monster Juice -2,627,14 // Sweet Milk -2,628,14 // Well-Dried Bone -2,629,14 // Singing Flower -2,630,14 // Dew Laden Moss -2,631,14 // Deadly Noxious Herb -2,632,14 // Fatty Chubby Earthworm -2,633,14 // Sweet Potato -2,634,14 // Tropical Banana -2,635,14 // Orc Trophy -2,636,14 // No Recipient -2,637,14 // Old Broom -2,638,14 // Silver Knife of Chastity -2,639,14 // Armlet of Obedience -2,640,14 // Shining Stone -2,641,14 // Contracts in Shadow -2,642,14 // Book of the Devil -2,643,14 // Pet Incubator -2,644,114 // Gift Box -2,645,14 // Concentration Potion -2,656,14 // Awakening Potion -2,657,14 // Berserk Potion -2,659,14 // Her Heart -2,663,14 // Songpyun -2,664,14 // Gift Box -2,665,14 // Gift Box -2,666,14 // Gift Box -2,667,14 // Gift Box -2,668,14 // Red_Envelope -2,678,14 // Poison Bottle -2,679,14 // Pilule -2,701,14 // Ora Ora -2,702,14 // Animal Gore -2,703,14 // Hinalle -2,704,14 // Aloe -2,705,14 // Clover -2,706,14 // Four Leaf Clover -2,707,14 // Singing Plant -2,708,14 // Ment -2,710,14 // Illusion Flower -2,711,14 // Shoot -2,712,14 // Flower -2,713,14 // Empty Bottle -2,715,14 // Yellow Gemstone -2,716,14 // Red Gemstone -2,717,14 // Blue Gemstone -2,718,14 // Garnet -2,719,14 // Amethyst -2,720,14 // Aquamarine -2,721,14 // Emerald -2,722,14 // Pearl -2,723,14 // Ruby -2,724,14 // Cursed Ruby -2,725,14 // Sardonyx -2,726,14 // Sapphire -2,727,14 // Opal -2,728,14 // Topaz -2,729,14 // Zircon -2,730,14 // 1carat Diamond -2,731,14 // 2carat Diamond -2,732,14 // 3carat Diamond -2,733,14 // Cracked Diamond -2,734,14 // Red Frame -2,735,14 // Chung Jah -2,736,14 // China -2,737,14 // Black Ladle -2,738,14 // Pencil Case -2,739,14 // Rouge -2,740,14 // Puppet -2,741,14 // Poring Doll -2,742,14 // Chonchon Doll -2,743,14 // Spore Doll -2,744,14 // Bouquet -2,745,14 // Wedding Bouquet -2,746,14 // Glass Bead -2,747,14 // Crystal Mirror -2,748,14 // Witherless Rose -2,749,14 // Frozen Rose -2,750,14 // Baphomet Doll -2,751,14 // Osiris Doll -2,752,14 // Grasshopper Doll -2,753,14 // Yoyo Doll -2,754,14 // Raccoon Doll -2,901,14 // Danggie -2,902,14 // Tree Root -2,903,14 // Reptile Tongue -2,904,14 // Scorpion Tail -2,905,14 // Stem -2,906,14 // Pointed Scale -2,907,14 // Resin -2,908,14 // Spawn -2,909,14 // Jellopy -2,910,14 // Garlet -2,911,14 // Scell -2,912,14 // Zargon -2,913,14 // Tooth of Bat -2,914,14 // Fluff -2,915,14 // Chrysalis -2,916,14 // Feather of Birds -2,917,14 // Talon -2,918,14 // Sticky Webfoot -2,919,14 // Animal Skin -2,920,14 // Wolf Claw -2,921,14 // Mushroom Spore -2,922,14 // Orc's Fang -2,923,14 // Evil Horn -2,924,14 // Powder of Butterfly -2,925,14 // Bill of Birds -2,926,14 // Snake Scale -2,928,14 // Insect Feeler -2,929,14 // Immortal Heart -2,930,14 // Rotten Bandage -2,931,14 // Orcish Voucher -2,932,14 // Skel-Bone -2,934,14 // Memento -2,935,14 // Shell -2,936,14 // Scale Shell -2,937,14 // Venom Canine -2,938,14 // Sticky Mucus -2,939,14 // Bee Sting -2,940,14 // Grasshopper's Leg -2,941,14 // Nose Ring -2,942,14 // Yoyo Tail -2,943,14 // Solid Shell -2,944,14 // Horseshoe -2,945,14 // Raccoon Leaf -2,946,14 // Snail's Shell -2,947,14 // Horn -2,948,14 // Bear's Footskin -2,949,14 // Feather -2,950,14 // Heart of Mermaid -2,951,14 // Fin -2,952,14 // Cactus Needle -2,953,14 // Stone Heart -2,954,14 // Shining Scale -2,955,14 // Worm Peeling -2,956,14 // Gill -2,957,14 // Decayed Nail -2,958,14 // Horrendous Mouth -2,959,14 // Stinky Scale -2,960,14 // Nipper -2,961,14 // Conch -2,962,14 // Tentacle -2,963,14 // Sharp Scale -2,964,14 // Crab Shell -2,965,14 // Clam Shell -2,966,14 // Clam Flesh -2,967,14 // Turtle Shell -2,968,14 // Heroic Emblem -2,969,14 // Gold -2,971,14 // Detrimindexta -2,972,14 // Karvodailnirol -2,973,14 // Counteragent -2,974,14 // Mixture -2,975,14 // Scarlet Dyestuff -2,976,14 // Lemon Dyestuff -2,978,14 // Cobaltblue Dyestuff -2,979,14 // Darkgreen Dyestuff -2,980,14 // Orange Dyestuff -2,981,14 // Violet Dyestuff -2,982,14 // White Dyestuff -2,983,14 // Black Dyestuff -2,986,14 // Anvil -2,987,14 // Oridecon Anvil -2,988,14 // Golden Anvil -2,989,14 // Emperium Anvil -2,990,14 // Red Blood -2,991,14 // Crystal Blue -2,992,14 // Wind of Verdure -2,993,14 // Green Live -2,994,14 // Flame Heart -2,995,14 // Mystic Frozen -2,996,14 // Rough Wind -2,997,14 // Great Nature -2,998,14 // Iron -2,999,14 // Steel -2,1000,14 // Star Crumb -2,1001,14 // Star Dust -2,1002,14 // Iron Ore -2,1003,14 // Coal -2,1004,14 // Chivalry Emblem -2,1005,14 // Hammer of Blacksmith -2,1006,14 // Old Magicbook -2,1007,14 // Necklace of Wisdom -2,1008,14 // Necklace of Oblivion -2,1009,14 // Hand of God -2,1010,14 // Phracon -2,1011,14 // Emveretarcon -2,1012,14 // Frill -2,1013,14 // Rainbow Shell -2,1014,14 // Ant Jaw -2,1015,14 // Tongue -2,1016,14 // Rat Tail -2,1017,14 // Mole Whiskers -2,1018,14 // Mole Claw -2,1019,14 // Trunk -2,1020,14 // Black Hair -2,1021,14 // Dokebi Horn -2,1022,14 // Nine Tails -2,1023,14 // Fish Tail -2,1024,14 // Squid Ink -2,1025,14 // Cobweb -2,1026,14 // Acorn -2,1027,14 // Porcupine Quill -2,1028,14 // Mane -2,1029,14 // Tiger Skin -2,1031,14 // Mantis Scythe -2,1032,14 // Maneater Blossom -2,1033,14 // Maneater Root -2,1034,14 // Blue Hair -2,1035,14 // Dragon Canine -2,1036,14 // Dragon Scale -2,1037,14 // Dragon Tail -2,1038,14 // Little Evil Horn -2,1039,14 // Little Evil Wing -2,1040,14 // Elder Pixie's Moustache -2,1041,14 // Lantern -2,1042,14 // Bug Leg -2,1043,14 // Orc Claw -2,1044,14 // Zenorc's Fang -2,1045,14 // Cultish Masque -2,1046,14 // Scorpion Nipper -2,1047,14 // Dead Medusa -2,1048,14 // Horrendous Hair -2,1049,14 // Skirt of Virgin -2,1050,14 // Tendon -2,1051,14 // Detonator -2,1052,14 // Single Cell -2,1053,14 // Ancient Tooth -2,1054,14 // Ancient Lips -2,1055,14 // Earthworm Peeling -2,1056,14 // Grit -2,1057,14 // Moth Dust -2,1058,14 // Moth Wings -2,1059,14 // Fabric -2,1060,14 // Golden Hair -2,1061,14 // Witched Starsand -2,1062,14 // Jack o' Pumpkin -2,1063,14 // Fang -2,1064,14 // Reins -2,1065,14 // Trap -2,1066,14 // Fine-grained Trunk -2,1067,14 // Solid Trunk -2,1068,14 // Barren Trunk -2,1088,14 // Morocc Solution -2,1089,14 // Payon Solution -2,1092,14 // Empty Test Tube -2,1093,14 // Empty Potion Bottle -2,1094,14 // Short Daenggie -2,1095,14 // Clock Hand -2,1096,14 // Round Shell -2,1097,14 // Worn Out Page -2,1098,14 // Manacles -2,1099,14 // Worn-out Prison Uniform -2,1102,7 // Sword -2,1105,7 // Falchion -2,1108,7 // Blade -2,1111,7 // Rapier -2,1114,7 // Scimitar -2,1117,7 // Katana -2,1120,7 // Tsurugi -2,1124,7 // Orcish sword -2,1125,7 // Ring Pommel Saber -2,1127,7 // Saber -2,1128,7 // Haedonggum -2,1129,7 // Flamberge -2,1147,1 // Town Sword -2,1148,1 // Star Dust Blade -2,1152,7 // Slayer -2,1155,7 // Bastard Sword -2,1158,7 // Two-Handed Sword -2,1162,7 // Broad Sword -2,1163,7 // Claymore -2,1202,7 // Knife -2,1205,7 // Cutter -2,1208,7 // Main Gauche -2,1211,7 // Dirk -2,1214,7 // Dagger -2,1217,7 // Stiletto -2,1220,7 // Gladius -2,1226,7 // Damascus -2,1243,7 // Novice Main Gauche -2,1251,7 // Jur -2,1253,7 // Katar -2,1255,7 // Jamadhar -2,1256,7 // Katar of Frozen Icicle -2,1257,7 // Katar of Quaking -2,1258,7 // Katar of Raging Blaze -2,1259,7 // Katar of Piercing Wind -2,1262,1 // Loki's Nail -2,1263,1 // Unholy Touch -2,1264,2 // Specialty Jur -2,1265,1 // Bloody Roar -2,1269,1 // Inverse Scale -2,1271,1 // Blood Tears -2,1302,7 // Axe -2,1304,7 // Orcish Axe -2,1307,1 // Windhawk -2,1352,7 // Battle Axe -2,1355,7 // Hammer -2,1358,7 // Buster -2,1361,7 // Two-Handed Axe -2,1370,1 // Doom Slayer -2,1376,1 // Heart Breaker -2,1377,1 // Hurricane Fury -2,1402,7 // Javelin -2,1405,7 // Spear -2,1408,7 // Pike -2,1411,7 // Lance -2,1452,7 // Guisarme -2,1455,7 // Glaive -2,1458,7 // Partizan -2,1461,7 // Trident -2,1464,7 // Halberd -2,1472,7 // Soul Staff -2,1474,1 // Gae Bolg -2,1478,1 // Ahlspiess -2,1502,7 // Club -2,1505,7 // Mace -2,1508,7 // Smasher -2,1511,7 // Flail -2,1514,7 // Morning Star -2,1517,7 // Sword Mace -2,1520,7 // Chain -2,1522,7 // Stunner -2,1550,7 // Book -2,1551,7 // Bible -2,1552,7 // Tablet -2,1553,7 // Book of Billows -2,1554,7 // Book of Mother Earth -2,1555,7 // Book of the Blazing Sun -2,1556,7 // Book of Gust of Wind -2,1558,7 // Girl's Diary -2,1559,1 // Legacy of Dragon -2,1560,1 // Sage's Diary -2,1561,1 // Hardcover Book -2,1602,7 // Rod -2,1605,7 // Wand -2,1608,7 // Staff -2,1611,7 // Arc Wand -2,1613,7 // Mighty Staff -2,1614,7 // Wand of Occult -2,1615,7 // Evil Bone Wand -2,1616,1 // Wing Staff -2,1618,1 // Survivor's Rod -2,1620,1 // Survivor's Rod -2,1622,1 // Hypnotist's Staff -2,1702,7 // Bow -2,1705,7 // Composite Bow -2,1708,7 // Great Bow -2,1711,7 // Crossbow -2,1715,7 // Arbalest -2,1716,7 // Gakkung Bow -2,1718,7 // Hunter Bow -2,1723,1 // Luna Bow -2,1724,1 // Dragon Wing -2,1730,1 // Burning Bow -2,1731,1 // Frozen Bow -2,1732,1 // Earth Bow -2,1733,1 // Gust Bow -2,1750,14 // Arrow -2,1751,14 // Silver Arrow -2,1752,14 // Fire Arrow -2,1753,14 // Steel Arrow -2,1754,14 // Crystal Arrow -2,1755,14 // Arrow of Wind -2,1756,14 // Stone Arrow -2,1757,14 // Immaterial Arrow -2,1758,14 // Stun Arrow -2,1759,14 // Frozen Arrow -2,1760,14 // Flash Arrow -2,1761,14 // Cursed Arrow -2,1762,14 // Rusty Arrow -2,1763,14 // Poison Arrow -2,1764,14 // Sharp Arrow -2,1765,14 // Oridecon Arrow -2,1767,14 // Shadow Arrow -2,1768,14 // Sleep Arrow -2,1769,14 // Mute Arrow -2,1770,14 // Iron Arrow -2,1802,7 // Waghnak -2,1804,7 // Knuckle Duster -2,1806,7 // Studded Knuckles -2,1808,7 // Fist -2,1810,7 // Claw -2,1812,7 // Finger -2,1815,1 // Hatii Claw -2,1818,1 // Magma Fist -2,1819,1 // Icicle Fist -2,1820,1 // Electric Fist -2,1821,1 // Seismic Fist -2,1822,1 // Combo Battle Glove -2,1902,7 // Violin -2,1904,7 // Mandolin -2,1906,7 // Lute -2,1908,7 // Guitar -2,1910,7 // Harp -2,1912,7 // Gumoongoh -2,1914,1 // Burning Passion Guitar -2,1915,1 // Loner's Guitar -2,1916,1 // Green Acre Guitar -2,1917,1 // Gentle Breeze Guitar -2,1918,1 // Oriental Lute -2,1919,1 // Base Guitar -2,1951,7 // Rope -2,1953,7 // Whip -2,1955,7 // Wire Whip -2,1957,7 // Rante Whip -2,1959,7 // Tail Whip -2,1961,7 // Whip -2,1965,1 // Red Flame Whip -2,1966,1 // Icicle Whip -2,1967,1 // Gaia Whip -2,1968,1 // Skipping Rope -2,1969,1 // Blade Whip -2,1970,1 // Queen's Whip -2,1971,1 // Electric Wire -2,1972,1 // Electric Eel -2,1973,1 // Sea Witch's Foot -2,1974,1 // Carrot Whip -2,2102,7 // Guard -2,2104,7 // Buckler -2,2106,7 // Shield -2,2108,7 // Mirror Shield -2,2109,7 // Memory Book -2,2112,7 // Novice Guard -2,2201,7 // Sunglasses -2,2203,7 // Glasses -2,2205,7 // Diver Goggles -2,2206,7 // Wedding Veil -2,2207,7 // Fancy Flower -2,2208,7 // Ribbon -2,2209,7 // Ribbon -2,2210,7 // Hair Band -2,2211,7 // Bandana -2,2212,7 // Eye Patch -2,2213,7 // Kitty Band -2,2214,7 // Bunny Band -2,2215,7 // Flower Band -2,2216,7 // Biretta -2,2217,7 // Biretta -2,2218,7 // Flu Mask -2,2220,7 // Hat -2,2221,7 // Hat -2,2222,7 // Turban -2,2223,7 // Turban -2,2224,7 // Goggles -2,2225,7 // Goggles -2,2226,7 // Cap -2,2227,7 // Cap -2,2228,7 // Helm -2,2229,7 // Helm -2,2230,7 // Gemmed Sallet -2,2231,7 // Gemmed Sallet -2,2232,7 // Circlet -2,2233,7 // Circlet -2,2236,7 // Santa Hat -2,2239,7 // Monocle -2,2241,7 // Grandpa Beard -2,2242,7 // Purple Glasses -2,2243,7 // Geek Glasses -2,2244,7 // Big Ribbon -2,2245,7 // Sweet Gent -2,2246,7 // Golden Gear -2,2247,7 // Romantic Gent -2,2248,7 // Western Grace -2,2249,1 // Coronet -2,2250,7 // Cute Ribbon -2,2251,7 // Monk Hat -2,2252,7 // Wizard Hat -2,2253,7 // Sunflower -2,2254,1 // Angel Wing -2,2255,1 // Evil Wing -2,2257,7 // Unicorn Horn -2,2258,1 // Spiky Band -2,2259,7 // Mini Propeller -2,2260,7 // Mini Glasses -2,2261,7 // Army Cap -2,2262,7 // Clown Nose -2,2263,7 // Zorro Masque -2,2265,7 // Gangster Mask -2,2266,7 // Iron Cain -2,2267,7 // Cigarette -2,2268,7 // Pipe -2,2269,7 // Romantic Flower -2,2270,7 // Romantic Leaf -2,2271,7 // Jack be Dandy -2,2274,1 // Ghost Bandana -2,2275,7 // Red Bandana -2,2276,7 // Angled Glasses -2,2277,7 // Nurse Cap -2,2278,7 // Mr. Smile -2,2279,7 // Bomb Wick -2,2282,7 // Halo -2,2285,7 // Apple of Archer -2,2286,1 // Elven Ears -2,2287,7 // Pirate Bandana -2,2288,7 // Mr. Scream -2,2289,7 // Poo Poo Hat -2,2290,7 // Funeral Hat -2,2291,7 // Masquerade -2,2294,7 // Stellar -2,2295,7 // Blinker -2,2297,7 // Goblin Mask -2,2298,7 // Green Feeler -2,2299,7 // Orc Helm -2,2302,7 // Cotton Shirt -2,2304,7 // Jacket -2,2306,7 // Adventurer's Suit -2,2308,7 // Mantle -2,2310,7 // Coat -2,2311,7 // Mink Coat -2,2313,7 // Padded Armor -2,2315,7 // Chain Mail -2,2317,7 // Full Plate -2,2318,7 // Lord's Clothes -2,2320,7 // Formal Suit -2,2322,7 // Silk Robe -2,2324,7 // Scapulare -2,2326,7 // Saint's Robe -2,2327,1 // Holy Robe -2,2329,7 // Wooden Mail -2,2331,7 // Tights -2,2333,7 // Silver Robe -2,2334,1 // Mage Coat -2,2336,7 // Thief Clothes -2,2337,7 // Ninja Suit -2,2339,7 // Pantie -2,2340,7 // Novice Breastplate -2,2352,7 // Tattered Novice Ninja Suit -2,2402,7 // Sandals -2,2404,7 // Shoes -2,2406,7 // Boots -2,2407,7 // Crystal Pumps -2,2408,7 // Shackles -2,2409,7 // High Heels -2,2411,7 // Greaves -2,2414,7 // Novice Slippers -2,2502,7 // Hood -2,2504,7 // Muffler -2,2506,7 // Manteau -2,2507,7 // Ancient Cape -2,2508,7 // Ragamuffin Manteau -2,2510,7 // Somber Novice Hood -2,2513,1 // Heavenly Maiden Robe -2,2514,1 // Pauldron -2,2515,1 // Eagle Wing -2,2601,7 // Ring -2,2602,7 // Earring -2,2603,7 // Necklace -2,2604,7 // Glove -2,2605,7 // Brooch -2,2607,7 // Clip -2,2608,7 // Rosary -2,2609,7 // Skull Ring -2,2610,7 // Gold Ring -2,2611,7 // Silver Ring -2,2612,7 // Flower Ring -2,2613,7 // Diamond Ring -2,2614,1 // Eye of Dullahan -2,2615,1 // Safety Ring -2,2616,1 // Critical Ring -2,2617,7 // Celebrant's Mitten -2,2618,7 // Matyr's Leash -2,2621,1 // Ring -2,2622,1 // Earring -2,2623,1 // Necklace -2,2624,1 // Glove -2,2625,1 // Brooch -2,2626,1 // Rosary -2,2627,7 // Belt -2,2628,7 // Novice Armlet -2,2652,1 // Goddess of Fortune's Cursed Brooch -2,2654,1 // Shinobi Sash -2,2655,1 // Bloodied Shackle Ball -2,2656,1 // Armor Charm -2,5002,1 // Jewel Crown -2,5003,7 // Joker Jester -2,5005,7 // Gas Mask -2,5006,7 // Machoman's Glasses -2,5007,1 // Grand Circlet -2,5009,7 // Safety Helmet -2,5010,7 // Indian Fillet -2,5011,7 // Aerial -2,5014,7 // Fin Helm -2,5015,7 // Egg Shell -2,5017,1 // Bone Helm -2,5030,7 // Panda Hat -2,5035,7 // Poring Hat -2,5037,7 // Nutshell -2,5053,1 // Sphinx Hat -2,5055,7 // Novice False Eggshell -2,5066,1 // Succubus Horn -2,5072,1 // Incubus Horn -2,5085,1 // Small Ribbons -2,5088,7 // Surprised Mask -2,5089,7 // Annoyed Mask -2,5090,7 // Goblin Leader Mask -2,5111,1 // Galapago Cap -2,5113,1 // Angry Snarl -2,5116,1 // Banana Hat -2,5118,1 // Puppy Headband -2,5119,1 // Super Novice Hat -2,5120,1 // Bucket Hat -2,7001,14 // Mould Powder -2,7002,14 // Ogre Tooth -2,7003,14 // Anolian Skin -2,7004,14 // Mud Lump -2,7005,14 // Skull -2,7006,14 // Wing of Red Bat -2,7007,14 // Claw of Rat -2,7008,14 // Stiff Horn -2,7009,14 // Glitter Shell -2,7010,14 // Tail of Steel Scorpion -2,7011,14 // Claw of Monkey -2,7012,14 // Tough Scalelike Stem -2,7013,14 // Coral Reef -2,7014,14 // Old Portrait -2,7015,14 // Memory Bookmark -2,7016,14 // Bent Spoon -2,7026,14 // Key of the Clock Tower -2,7027,14 // Key of the Underground -2,7030,14 // Claw of Desert Wolf -2,7031,14 // Old Frying Pan -2,7032,14 // Piece of Egg Shell -2,7033,14 // Poison Spore -2,7034,14 // Red Stocking -2,7035,14 // Matchstick -2,7036,14 // Fang of Garm -2,7038,14 // Yarn -2,7041,14 // Fine Grit -2,7047,14 // Alice's Apron -2,7048,14 // Talon of Griffon -2,7049,14 // Stone -2,7053,14 // Cyfar -2,7054,14 // Brigan -2,7059,14 // Free Ticket for Kafra Storage -2,7060,14 // Free Ticket for Kafra Transportation -2,7061,14 // Free Ticket for the Cart Service -2,7063,14 // Soft Feather -2,7064,14 // Wing of Dragonfly -2,7065,14 // Sea-Otter Fur -2,7066,14 // Ice Cubic -2,7067,14 // Stone Fragment -2,7068,14 // Burnt Tree -2,7069,14 // Destroyed Armor -2,7070,14 // Broken Shell -2,7071,14 // Tattered Clothes -2,7072,14 // Old Shuriken -2,7093,14 // Cogwheel -2,7094,14 // Fragment -2,7095,14 // Metal Fragment -2,7096,14 // Lava -2,7097,14 // Burning Heart -2,7098,14 // Live Coal -2,7099,14 // Worn-out Magic Scroll -2,7100,14 // Sharp Leaf -2,7101,14 // Peco Peco Feather -2,7106,14 // Antelope Horn -2,7107,14 // Antelope Skin -2,7108,14 // Piece of Shield -2,7109,14 // Shining Spear Blade -2,7110,14 // Broken Sword -2,7111,14 // Slick Paper -2,7112,14 // Sharp Paper -2,7113,14 // Broken Pharaoh Emblem -2,7114,14 // Masque of Tutankhamen -2,7115,14 // Harpy Feather -2,7116,14 // Harpy Talon -2,7117,14 // Torn Magic Book -2,7118,14 // Torn Scroll -2,7119,14 // Bacillus -2,7120,14 // Burning Horseshoe -2,7121,14 // Honey Pot -2,7122,14 // Burning Hair -2,7123,14 // Dragon Skin -2,7124,14 // Sand Clump -2,7125,14 // Scorpion Claw -2,7126,14 // Large Jellopy -2,7134,14 // Medicine Bowl -2,7135,14 // Fire Bottle -2,7136,14 // Acid Bottle -2,7137,14 // Plant Bottle -2,7138,14 // Marine Sphere Bottle -2,7139,14 // Glistening Coat -2,7149,14 // Yellow Plate -2,7150,14 // Piece of Bamboo -2,7151,14 // Oil Paper -2,7152,14 // Glossy Hair -2,7153,14 // Worn-out Kimono -2,7154,14 // Poisonous Powder -2,7155,14 // Poisonous Toad Skin -2,7156,14 // Broken Shuriken -2,7157,14 // Dark Mask -2,7158,14 // Broken Liquor Jar -2,7159,14 // Tengu Nose -2,7161,14 // Black Bear Skin -2,7162,14 // Cloud Crumb -2,7163,14 // Hard Feeler -2,7164,14 // Solid_Peach -2,7165,14 // Transparent Celestial Robe -2,7166,14 // Soft Silk -2,7167,14 // Strange Steel Piece -2,7168,14 // Giant Butterfly Wing -2,7169,14 // Ba_Gua -2,7171,14 // Leopard Skin -2,7172,14 // Leopard Claw -2,7174,14 // Wrapping Lace -2,7175,14 // Wrapping Paper -2,7182,14 // Cacao -2,7186,14 // Thin Trunk -2,7187,14 // Festival Mask -2,7188,14 // Brown_Root -2,7189,14 // Wooden Heart -2,7190,14 // Solid Husk -2,7191,14 // Lamp -2,7192,14 // Vane -2,7193,14 // Sprout -2,7194,14 // Soft Blade of Grass -2,7195,14 // Slingshot -2,7196,14 // Shoulder Protector -2,7197,14 // Tough Vines -2,7198,14 // Huge Leaf -2,7200,14 // Elastic Band -2,7201,14 // Log -2,7202,14 // Pincher of Beetle -2,7203,14 // Strong Branch -2,7205,14 // Piece of Black Cloth -2,7206,14 // Black Cat Doll -2,7207,14 // Old Manteau -2,7208,14 // Rusty Kitchen Knife -2,7209,14 // Helm of Dullahan -2,7210,14 // Armor Piece of Dullahan -2,7211,14 // Fragment of Rossata Stone -2,7212,14 // Hung Doll -2,7213,14 // Needle Packet -2,7214,14 // Bat Cage -2,7215,14 // Broken Needle -2,7216,14 // Red Muffler -2,7217,14 // Spool -2,7218,14 // Decomposed Rope -2,7219,14 // Striped Sock -2,7220,14 // Ectoplasm -2,7221,14 // Tangled Chains -2,7222,14 // Wooden Gnarl -2,7223,14 // Contorted Self-Portrait -2,7225,14 // Pumpkin Lantern -2,7262,14 // Folding Fan of Cat Ghost -2,7263,14 // Cat's Eye -2,7264,14 // Dry Sand -2,7265,14 // Dragon Horn -2,7266,14 // Denture from Dragon Mask -2,7267,14 // Tiger Panty -2,7268,14 // Little Ghost Doll -2,7269,14 // Pinafore -2,7270,14 // Nursing_Bottle -2,7315,1 // Dark Crystal Fragment -2,7316,1 // Insect Leg -2,7317,1 // Rusty Screw -2,7318,1 // Old Pick -2,7319,1 // Used Iron Plate -2,7320,1 // Dust Pollutant -2,7321,1 // Crystal Fragment -2,7322,1 // Toxic Gas -2,7323,1 // Battered Kettle -2,7325,1 // Flexible Tube -2,7326,1 // Fluorescent Liquid -2,7327,1 // Flashlight -2,7436,1 // Fragment of Agony -2,7437,1 // Fragment of Misery -2,7438,1 // Fragment of Hatred -2,7439,1 // Fragment of Despair -2,7440,1 // Red Feather -2,7441,1 // Blue Feather -2,7442,1 // Cursed Seal -2,7443,1 // Three-Headed Dragon's Head -2,7444,1 // Treasure Box -2,7445,1 // Green Bijou -2,7446,1 // Blue Bijou -2,7447,1 // Red Bijou -2,7448,1 // Yellow Bijou -2,7449,1 // Bloody Page -2,7450,1 // Skeletal Armor Piece -2,7451,1 // Fire Dragon Scale -2,7452,1 // Yellow Spice -2,7453,1 // Sweet Sauce -2,7454,1 // Savory Sauce -2,7455,1 // Spicy Sauce -2,7456,1 // Red Spice -2,7457,1 // Cooking Oil -2,7472,1 // Level 1 Cookbook -2,7473,1 // Level 2 Cookbook -2,7474,1 // Level 3 Cookbook -2,7475,1 // Level 4 Cookbook -2,7476,1 // Level 5 Cookbook -2,7477,1 // Level 6 Cookbook -2,7478,1 // Level 7 Cookbook -2,7479,1 // Level 8 Cookbook -2,7480,1 // Level 9 Cookbook -2,7481,1 // Level 10 Cookbook -2,7482,1 // Pot -2,7512,1 // Burnt Part -2,7513,1 // Pocket Watch -2,7561,1 // Glacial Heart -2,7562,1 // Ice Scale -2,7563,1 // Bloody Rune -2,7564,1 // Rotten Meat -2,7565,1 // Sticky Poison -2,7567,1 // Suspicious Hat -2,7568,1 // White Mask -2,7751,17 // Old White Cloth -2,7752,16 // Clattering Skull -2,7753,17 // Broken Farming Utensil -2,10001,7 // Skull Helm -2,10002,7 // Monster Oxygen Mask -2,10003,7 // Transparent Headgear -2,10004,7 // Pacifier -2,10005,7 // Wig -2,10006,7 // Queen's Hair Ornament -2,10007,7 // Silk Ribbon -2,10008,7 // Punisher -2,10009,7 // Wild Flower -2,10010,7 // Battered Pot -2,10011,7 // Stellar Hairpin -2,10012,7 // Tiny Egg Shell -2,10013,7 // Backpack -2,10014,7 // Rocker Glasses -2,10015,7 // Green Lace -2,10016,7 // Golden Bell -2,10017,7 // Bark Shorts -2,10018,7 // Monkey Circlet -2,10019,7 // Red Scarf -2,10020,7 // Grave Keeper's Sword -2,13001,1 // Dragon Killer -2,13002,1 // Ginnungagap -2,13004,1 // Cowardice Blade -2,13163,1 // Long Barrel -2,13164,1 // Long Barrel -2,13167,1 // Gate Keeper-DD -2,13168,1 // Thunder P -2,13170,2 // Lever Action Rifle -2,13200,1 // Bullet -2,13201,1 // Silver Bullet -2,13202,1 // Bloody Shell -2,13203,1 // Flare Sphere -2,13204,1 // Lightning Sphere -2,13205,1 // Poison Sphere -2,13206,1 // Blind Sphere -2,13207,1 // Freezing Sphere -2,13304,1 // Huuma Calm Mind diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index 3cb3fe63e..c766ce364 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -127,7 +127,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (599, 'Light_Orange_Pot', 'Light Orange Potion', 0, 200, 100, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemheal rand(105,145),0;', '', ''), (601, 'Wing_Of_Fly', 'Fly Wing', 2, 60, 30, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",1;', '', ''), (602, 'Wing_Of_Butterfly', 'Butterfly Wing', 2, 300, 150, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",3;', '', ''), -(603, 'Old_Blue_Box', 'Old Blue Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_BlueBox),1;', '', ''), +(603, 'Old_Blue_Box', 'Old Blue Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 603,1;', '', ''), (604, 'Branch_Of_Dead_Tree', 'Dead Branch', 2, 50, 25, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-1,1,"";', '', ''), (605, 'Anodyne', 'Anodyne', 2, 2000, 1000, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "SM_ENDURE",1;', '', ''), (606, 'Aloebera', 'Aloevera', 2, 1500, 750, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "SM_SELFPROVOKE",1;', '', ''), @@ -140,9 +140,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (613, 'Iron_Hammer', 'Iron Hammer', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'produce 1;', '', ''), (614, 'Golden_Hammer', 'Golden Hammer', 2, 3000, 1500, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'produce 2;', '', ''), (615, 'Oridecon_Hammer', 'Oridecon Hammer', 2, 5000, 2500, 400, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'produce 3;', '', ''), -(616, 'Old_Card_Album', 'Old Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_CardAlbum),1;', '', ''), -(617, 'Old_Violet_Box', 'Old Purple Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_VioletBox),1;', '', ''), -(618, 'Worn_Out_Scroll', 'Worn Out Scroll', 2, 50, 25, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_ScrollBox),1;', '', ''), +(616, 'Old_Card_Album', 'Old Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 616,1;', '', ''), +(617, 'Old_Violet_Box', 'Old Purple Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 617,1;', '', ''), +(618, 'Worn_Out_Scroll', 'Worn Out Scroll', 2, 50, 25, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (619, 'Unripe_Apple', 'Unripe Apple', 2, 1000, 500, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1002;', '', ''), (620, 'Orange_Juice', 'Orange Juice', 2, 1500, 750, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1113;', '', ''), (621, 'Bitter_Herb', 'Bitter Herb', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1031;', '', ''), @@ -168,7 +168,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (641, 'Contracts_In_Shadow', 'Contract in Shadow', 2, 100, 50, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1109;', '', ''), (642, 'Book_Of_Devil', 'Book of the Devil', 2, 1800, 900, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1101;', '', ''), (643, 'Pet_Incubator', 'Pet Incubator', 2, 3000, 1500, 30, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'bpet;', '', ''), -(644, 'Gift_Box', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox),1;', '', ''), +(644, 'Gift_Box', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 644,1;', '', ''), (645, 'Center_Potion', 'Concentration Potion', 2, 800, 400, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_ATTHASTE_POTION1,1800000,0;', '', ''), (656, 'Awakening_Potion', 'Awakening Potion', 2, 1500, 750, 150, 0, 0, 0, 0, 4294442735, 7, 2, 0, 0, 40, 0, 0, 'sc_start SC_ATTHASTE_POTION2,1800000,0;', '', ''), (657, 'Berserk_Potion', 'Berserk Potion', 2, 3000, 1500, 200, 0, 0, 0, 0, 31868582, 7, 2, 0, 0, 85, 0, 0, 'sc_start SC_ATTHASTE_POTION3,1800000,0;', '', ''), @@ -178,10 +178,10 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (661, 'Sway_Apron', 'Soft Apron', 2, 20000, 10000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1275;', '', ''), (662, 'Inspector_Certificate', 'Authoritative Badge', 2, 1450, 725, 30, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_MOVHASTE_HORSE,180000,0;', '', ''), (663, 'Korea_Rice_Cake', 'Korean Rice Cake', 0, 1, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 10,0;', '', ''), -(664, 'Gift_Box_1', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_1),1;', '', ''), -(665, 'Gift_Box_2', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_2),1;', '', ''), -(666, 'Gift_Box_3', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_3),1;', '', ''), -(667, 'Gift_Box_4', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_4),1;', '', ''), +(664, 'Gift_Box_1', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 664,1;', '', ''), +(665, 'Gift_Box_2', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 665,1;', '', ''), +(666, 'Gift_Box_3', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 666,1;', '', ''), +(667, 'Gift_Box_4', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 667,1;', '', ''), (668, 'Handsei', 'Red Envelope', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'set Zeny,Zeny+rand(1000,10000);', '', ''), (669, 'Rice_Cake_Soup', 'Tempting Rice-Cake Soup', 0, 500, 250, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal -100,-100;', '', ''), (670, 'Gold_Coin_Moneybag', 'Bag of Gold Coins', 3, 100000, 50000, 400, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), @@ -445,9 +445,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (1075, 'Merchant_Voucher_3', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1076, 'Merchant_Voucher_4', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1077, 'Merchant_Voucher_5', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), -(1078, 'Merchant_Voucher_6', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''); +(1078, 'Merchant_Voucher_6', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), +(1079, 'Merchant_Voucher_7', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''); INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1079, 'Merchant_Voucher_7', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1080, 'Merchant_Voucher_8', 'Voucher', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1081, 'Merchant_Box_1', 'Delivery Box', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1082, 'Merchant_Box_2', 'Delivery Box', 3, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -509,8 +509,8 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (1139, 'Tale_Fing_', 'Tirfing', 4, 20, 10, 1000, 200, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 1, 2, 'bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000;', '', ''), (1140, 'Byeorrun_Gum', 'Byeollungum', 4, 20, 10, 900, 150, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 1, 2, 'bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,50; bonus bAllStats,2;', '', ''), (1141, 'Immaterial_Sword', 'Immaterial Sword', 4, 20, 10, 900, 140, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 1, 2, 'bonus bAtkEle,Ele_Ghost; bonus2 bSPVanishRate,30,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0;', '', ''), -(1142, 'Jewel_Sword', 'Jeweled Sword', 4, 20, 10, 2200, 104, 0, 1, 0, 414946, 7, 2, 2, 3, 68, 1, 2, 'bonus2 bAddMonsterDropItemGroup,IG_Jewel,100;', '', ''), -(1143, 'Gaia_Sword', 'Gaia Sword', 4, 20, 10, 2500, 140, 0, 1, 0, 414946, 7, 2, 2, 3, 74, 1, 2, 'bonus2 bAddMonsterDropItemGroup,IG_Ore,30;', '', ''), +(1142, 'Jewel_Sword', 'Jeweled Sword', 4, 20, 10, 2200, 104, 0, 1, 0, 414946, 7, 2, 2, 3, 68, 1, 2, 'bonus bAddMonsterDropChainItem,ITMCHAIN_GEM;', '', ''), +(1143, 'Gaia_Sword', 'Gaia Sword', 4, 20, 10, 2500, 140, 0, 1, 0, 414946, 7, 2, 2, 3, 74, 1, 2, 'bonus bAddMonsterDropChainItem,ITMCHAIN_ORE;', '', ''), (1144, 'Sasimi', 'Sashimi', 4, 20, 10, 1400, 75, 0, 1, 0, 414946, 7, 2, 2, 3, 48, 1, 2, 'bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,RC_Fish,4000;', '', ''), (1145, 'Holy_Avenger', 'Holy Avenger', 4, 450000, 225000, 1350, 125, 0, 1, 0, 16384, 7, 2, 2, 3, 75, 1, 2, 'bonus bAtkEle,Ele_Holy; bonus bVit,2;', '', ''), (1146, 'Town_Sword', 'Town Sword', 4, 42000, 21000, 800, 100, 0, 1, 1, 1, 7, 2, 2, 3, 30, 1, 2, '', '', ''), @@ -758,9 +758,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (1476, 'Crescent_Scythe_', 'Crescent Scythe', 4, 20, 10, 2500, 180, 0, 3, 1, 16514, 7, 2, 34, 4, 48, 1, 5, 'bonus bCritical,30; bonus bHit,10;', '', ''), (1477, 'Spectral_Spear', 'Spectral Spear', 4, 20, 10, 2000, 170, 0, 3, 0, 16514, 7, 2, 34, 4, 75, 1, 5, 'bonus2 bAddEle,Ele_Dark,20; bonus2 bAddRace,RC_Demon,20; bonus2 bAddRace,RC_Undead,20; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; bonus3 bAddEff,Eff_Confusion,10000,ATF_SELF|ATF_SHORT; bonus bHPGainValue,50;', '', ''), (1478, 'Ahlspiess', 'Ahlspiess', 4, 20, 10, 1000, 120, 0, 3, 0, 16512, 7, 2, 34, 4, 65, 1, 5, 'bonus bIgnoreDefRace,RC_NonBoss; bonus bIgnoreDefRace,RC_Boss; bonus2 bAddRace,RC_DemiHuman,10; bonus3 bAutoSpell,"KN_PIERCE",5,30;', '', ''), -(1479, 'Spectral_Spear_', 'Spectral Spear', 4, 20, 10, 2000, 170, 0, 3, 1, 16514, 7, 2, 34, 4, 75, 1, 5, 'bonus2 bAddEle,Ele_Dark,20; bonus2 bAddRace,RC_Demon,20; bonus2 bAddRace,RC_Undead,20; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; bonus3 bAddEff,Eff_Confusion,10000,ATF_SELF|ATF_SHORT; bonus bHPGainValue,50;', '', ''); +(1479, 'Spectral_Spear_', 'Spectral Spear', 4, 20, 10, 2000, 170, 0, 3, 1, 16514, 7, 2, 34, 4, 75, 1, 5, 'bonus2 bAddEle,Ele_Dark,20; bonus2 bAddRace,RC_Demon,20; bonus2 bAddRace,RC_Undead,20; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; bonus3 bAddEff,Eff_Confusion,10000,ATF_SELF|ATF_SHORT; bonus bHPGainValue,50;', '', ''), +(1480, 'Gae_Bolg_', 'Gae Bolg', 4, 20, 10, 2000, 160, 0, 3, 2, 16514, 7, 2, 34, 4, 60, 1, 5, 'bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Boss,10;', '', ''); INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1480, 'Gae_Bolg_', 'Gae Bolg', 4, 20, 10, 2000, 160, 0, 3, 2, 16514, 7, 2, 34, 4, 60, 1, 5, 'bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Boss,10;', '', ''), (1481, 'Zephyrus_', 'Zephyrus', 4, 20, 10, 2000, 170, 0, 3, 3, 16514, 7, 2, 34, 4, 48, 1, 5, 'bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,"MG_THUNDERSTORM",3,100;', '', ''), (1482, 'BF_Lance1', 'Assaulter Lance', 4, 0, 0, 0, 160, 0, 3, 0, 16514, 7, 2, 34, 3, 80, 1, 5, 'bonus bStr,2; bonus2 bAddRace,RC_DemiHuman,25; bonus bIgnoreDefRace,RC_DemiHuman; bonus bUnbreakableWeapon,0;', '', ''), (1483, 'Ivory_Lance', 'Ivory Lance', 4, 20, 10, 1000, 160, 0, 3, 1, 16514, 2, 2, 34, 3, 50, 1, 5, 'bonus bAgi,2; bonus bAspdRate,3; bonus2 bAddEff,Eff_Bleeding,100; bonus3 bAutoSpell,"LK_JOINTBEAT",1,100; skill "KN_SPEARSTAB",5;', '', ''), @@ -1049,9 +1049,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (1972, 'Electric_Eel', 'Electric Eel', 4, 20, 10, 2000, 100, 0, 2, 2, 524288, 2, 0, 2, 4, 70, 1, 14, 'bonus bAtkEle,Ele_Wind; bonus bInt,2; bonus bAgi,2; bonus3 bAutoSpell,"WZ_JUPITEL",3,20; if(getrefine()>0) bonus3 bAutoSpell,"CG_ARROWVULCAN",getrefine(),50;', '', ''), (1973, 'Sea_Witch_Foot', 'Sea Witch''s Foot', 4, 20, 10, 1500, 110, 0, 2, 1, 524288, 2, 0, 2, 4, 70, 1, 14, 'bonus bSPGainValue,5; bonus4 bAutoSpellWhenHit,"WZ_FROSTNOVA",3,50,1; bonus3 bAutoSpell,"NPC_WIDESILENCE",2,100;', '', ''), (1974, 'Carrot_Whip', 'Carrot Whip', 4, 20, 10, 1300, 185, 0, 2, 0, 524288, 2, 0, 2, 4, 70, 1, 14, 'if(getrefine()>0) bonus3 bAutoSpell,"AL_INCAGI",getrefine(),10;', '', ''), -(1975, 'Queen_Is_Whip', 'Queen Is Whip', 4, 20, 10, 0, 120, 0, 2, 0, 524288, 7, 0, 2, 1, 0, 0, 14, 'bonus2 bAddRace,RC_Boss,50; bonus2 bAddRace,RC_NonBoss,50;', '', ''); +(1975, 'Queen_Is_Whip', 'Queen Is Whip', 4, 20, 10, 0, 120, 0, 2, 0, 524288, 7, 0, 2, 1, 0, 0, 14, 'bonus2 bAddRace,RC_Boss,50; bonus2 bAddRace,RC_NonBoss,50;', '', ''), +(1976, 'Queen''s_Whip_', 'Queen''s Whip', 4, 20, 10, 1100, 150, 0, 2, 2, 524288, 7, 0, 2, 4, 65, 1, 14, 'bonus2 bSkillAtk,"CG_ARROWVULCAN",10; bonus2 bSkillAtk,"DC_THROWARROW",10;', '', ''); INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1976, 'Queen''s_Whip_', 'Queen''s Whip', 4, 20, 10, 1100, 150, 0, 2, 2, 524288, 7, 0, 2, 4, 65, 1, 14, 'bonus2 bSkillAtk,"CG_ARROWVULCAN",10; bonus2 bSkillAtk,"DC_THROWARROW",10;', '', ''), (1977, 'BF_Whip1', 'Valorous Battle Lariat', 4, 20, 10, 0, 50, 0, 2, 0, 524288, 7, 0, 2, 3, 80, 1, 14, 'bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0;', '', ''), (1978, 'BF_Whip2', 'Brave Battle Lariat', 4, 20, 10, 0, 50, 0, 2, 0, 524288, 7, 0, 2, 3, 80, 1, 14, 'bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bSkillAtk,"CG_ARROWVULCAN",20; bonus bUnbreakableWeapon,0;', '', ''), (1979, 'Stem_Of_Nepenthes', 'Stem of Nepenthes', 4, 20, 10, 1000, 120, 0, 2, 2, 524288, 2, 0, 2, 4, 60, 1, 14, 'bonus bInt,2; if( getrefine()>=9 ) { bonus3 bAddEffOnSkill,"DC_THROWARROW",Eff_Freeze,2000; } else { bonus3 bAddEffOnSkill,"DC_THROWARROW",Eff_Freeze,1000; }', '', ''), @@ -1315,7 +1315,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (2414, 'Novice_Boots', 'Novice Slippers', 5, 1, 0, 1, 0, 2, 0, 0, 1, 7, 2, 64, 0, 0, 0, 0, '', '', ''), (2415, 'Slipper', 'Bunny Slipper', 5, 34000, 17000, 300, 0, 3, 0, 1, 4294967294, 7, 0, 64, 0, 30, 1, 0, 'bonus bLuk,3; bonus bMdef,3;', '', ''), (2416, 'Novice_Shoes', 'Novice Shoes', 5, 35000, 17500, 500, 0, 2, 0, 1, 1, 7, 2, 64, 0, 40, 1, 0, 'bonus bMaxHPrate,5;', '', ''), -(2417, 'Fricco_Shoes', 'Fricco''s Shoes', 5, 30000, 15000, 500, 0, 3, 0, 0, 4294967294, 7, 2, 64, 0, 65, 1, 0, 'bonus bAgi,2; bonus2 bAddItemHealRate,IG_Potion,20;', '', ''), +(2417, 'Fricco_Shoes', 'Fricco''s Shoes', 5, 30000, 15000, 500, 0, 3, 0, 0, 4294967294, 7, 2, 64, 0, 65, 1, 0, 'bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;', '', ''), (2418, 'Vidar''s_Boots', 'Vidar''s Boots', 5, 30000, 15000, 650, 0, 4, 0, 0, 4294967294, 7, 2, 64, 0, 65, 1, 0, 'bonus bMaxHPrate,9; bonus bMaxSPrate,9;', '', ''), (2419, 'Goibne''s_Combat_Boots', 'Goibne''s Greaves', 5, 30000, 15000, 700, 0, 4, 0, 0, 4294967294, 7, 2, 64, 0, 54, 1, 0, 'bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;', '', ''), (2420, 'Angel''s_Arrival', 'Angel''s Reincarnation', 5, 10000, 5000, 300, 0, 2, 0, 1, 1, 7, 2, 64, 0, 25, 1, 0, 'bonus bMaxHP,100;', '', ''), @@ -1752,9 +1752,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4149, 'Gargoyle_Card', 'Gargoyle Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12028,RC_Insect,100;', '', ''), (4150, 'Goat_Card', 'Goat Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; }', '', ''), (4151, 'Gajomart_Card', 'Gajomart Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;', '', ''), -(4152, 'Galapago_Card', 'Galapago Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300;', '', ''), +(4152, 'Galapago_Card', 'Galapago Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Apple_Juice,50; bonus2 bAddItemHealRate,Banana_Juice,50; bonus2 bAddItemHealRate,Carrot_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, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30;', '', ''), -(4154, 'Rice_Cake_Boy_Card', 'Dumpling Child Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;', '', ''), +(4154, 'Rice_Cake_Boy_Card', 'Dumpling Child Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Candy,50; bonus2 bAddItemHealRate,Candy_Striper,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;', '', ''), (4155, 'Goblin_Leader_Card', 'Goblin Leader Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus2 bAddRace2,1,30;', '', ''), (4156, 'Steam_Goblin_Card', 'Goblin Steamrider Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7;', '', ''), (4157, 'Goblin_Archer_Card', 'Goblin Archer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7;', '', ''), @@ -1815,7 +1815,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4212, 'Bon_Gun_Card', 'Bongun Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus3 bAutoSpell,"SM_BASH",1,20; bonus2 bAddSkillBlow,"SM_BASH",5; bonus2 bAddDefClass,1026,-100;', '', ''), (4213, 'Brilight_Card', 'Brilight Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Silence,600;', '', ''), (4214, 'Bloody_Murderer_Card', 'Bloody Murderer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7;', '', ''), -(4215, 'Blazzer_Card', 'Blazer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddMonsterDropItemGroup,IG_Food,600;', '', ''), +(4215, 'Blazzer_Card', 'Blazer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus bAddMonsterDropChainItem,ITMCHAIN_FOOD;', '', ''), (4216, 'Sasquatch_Card', 'Sasquatch Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Freeze,600;', '', ''), (4217, 'Live_Peach_Tree_Card', 'Enchanted Peach Tree Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 'bonus3 bAutoSpell,"AL_HEAL",1+9*(getskilllv("AL_HEAL")==10),20;', '', ''), (4218, 'Succubus_Card', 'Succubus Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus bVit,-3; bonus bHPrecovRate,-20; bonus bMaxHP,1000;', '', ''), @@ -1827,12 +1827,12 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4224, 'Stem_Worm_Card', 'Stem Worm Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12032,RC_Brute,100;', '', ''), (4225, 'Stone_Shooter_Card', 'Stone Shooter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bBaseAtk,10; bonus bHit,10;', '', ''), (4226, 'Sting_Card', 'Sting Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 'bonus bDef,2; if(getrefine()>8) bonus bMdef,5;', '', ''), -(4227, 'Spring_Rabbit_Card', 'Spring Rabbit Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItem,517,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200;', '', ''), +(4227, 'Spring_Rabbit_Card', 'Spring Rabbit Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Meat,50; bonus2 bAddItemHealRate,528,50; bonus3 bAddMonsterDropItem,Meat,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200;', '', ''), (4228, 'Sleeper_Card', 'Sleeper Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12031,RC_Fish,100;', '', ''), (4229, 'C_Tower_Manager_Card', 'Tower Keeper Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 'bonus bInt,1; bonus bCastrate,-5;', '', ''), (4230, 'Shinobi_Card', 'Shinobi Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus bAgi,1; bonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100;', '', ''), (4231, 'Increase_Soil_Card', 'Mi Gao Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 'bonus2 bSubRace2,5,50;', '', ''), -(4232, 'Wild_Ginseng_Card', 'Hermit Plant Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100;', '', ''), +(4232, 'Wild_Ginseng_Card', 'Hermit Plant Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Red_Herb,50; bonus2 bAddItemHealRate,Yellow_Herb,50; bonus2 bAddItemHealRate,White_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100;', '', ''), (4233, 'Baby_Leopard_Card', 'Baby Leopard Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus bLuk,3; if(BaseClass==Job_Merchant) bonus bUnbreakableArmor,0;', '', ''), (4234, 'Anolian_Card', 'Anolian Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION")==10),30;', '', ''), (4235, 'Cookie_XMAS_Card', 'Christmas Cookie Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 'bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10;', '', ''), @@ -1882,7 +1882,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4279, 'Deleter_Card', 'Earth Deleter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus bSPrecovRate,-100; bonus bSPGainValue,10;', '', 'heal 0,-100;'), (4280, 'Geographer_Card', 'Geographer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus3 bAutoSpellWhenHit,"AL_BLESSING",2+8*(getskilllv("AL_BLESSING")==10),30;', '', ''), (4281, 'Zipper_Bear_Card', 'Zipper Bear Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass==Job_Merchant) bonus bUnbreakableWeapon,0;', '', ''), -(4282, 'Tengu_Card', 'Tengu Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddMonsterDropItemGroup,IG_Recovery,600;', '', ''), +(4282, 'Tengu_Card', 'Tengu Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus bAddMonsterDropChainItem,ITMCHAIN_HEAL;', '', ''), (4283, 'Greatest_General_Card', 'Greatest General Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus3 bAutoSpell,"MO_CALLSPIRITS",5,2+18*(BaseClass==Job_Acolyte);', '', ''), (4284, 'Chepet_Card', 'Chepet Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus4 bAutoSpell,"AL_HEAL",5,50,1;', '', ''), (4285, 'Choco_Card', 'Choco Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 'bonus bFlee2,5; bonus bFlee,10;', '', ''), @@ -1926,7 +1926,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4323, 'Garm_Baby_Card', 'Hatii Babe Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus3 bAutoSpell,"MG_FROSTDIVER",3,50;', '', ''), (4324, 'Garm_Card', 'Hatii Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Freeze,5000;', '', ''), (4325, 'Harpy_Card', 'Harpy Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 'bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",5;', '', ''), -(4326, 'See_Otter_Card', 'Sea-Otter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300;', '', ''), +(4326, 'See_Otter_Card', 'Sea-Otter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Sushi,50; bonus2 bAddItemHealRate,Fish_Slice,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300;', '', ''), (4327, 'Blood_Butterfly_Card', 'Bloody Butterfly Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 'bonus bCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,"MG_FIREWALL",5;', '', ''), (4328, 'Hyegun_Card', 'Yao Jun Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 'bonus bFlee,15; bonus bCritical,1;', '', ''), (4329, 'Phendark_Card', 'Phendark Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus2 bSPGainRace,RC_DemiHuman,5;', '', 'heal 0,-5;'), @@ -2003,9 +2003,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (4400, 'Aliza_Card', 'Aliza Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus3 bAutoSpellWhenHit,"DC_WINKCHARM",1,50+50*(BaseJob==Job_Dancer);', '', ''), (4401, 'Alicel_Card', 'Alicel Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus bFlee,10; bonus bDef,-5;', '', ''), (4402, 'Aliot_Card', 'Aliot Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 'if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) { bonus bStr,2; bonus bMaxHPrate,5; } if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) { bonus bInt,2; bonus bMaxSPrate,5; }', '', ''), -(4403, 'Kiel_Card', 'Kiel-D-01 Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 'bonus bDelayRate,-30;', '', ''), -(4404, 'Skogul_Card', 'Skogul Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus3 bAddEffWhenHit,Eff_Bleeding,3000,ATF_TARGET|ATF_SELF;', '', ''); +(4403, 'Kiel_Card', 'Kiel-D-01 Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 'bonus bDelayRate,-30;', '', ''); INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(4404, 'Skogul_Card', 'Skogul Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus3 bAddEffWhenHit,Eff_Bleeding,3000,ATF_TARGET|ATF_SELF;', '', ''), (4405, 'Frus_Card', 'Frus Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 'bonus bMagicDamageReturn,getrefine()*2; if(BaseClass==Job_Mage) bonus bMdef,3;', '', ''), (4406, 'Skeggiold_Card', 'Skeggiold Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus2 bMagicAddRace,RC_Demon,2;', '', ''), (4407, 'Randgris_Card', 'Randgris Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 'bonus bUnbreakableWeapon,0; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus3 bAutoSpell,"SA_DISPELL",1,50;', '', ''), @@ -2742,7 +2742,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (5738, 'Snowman_Hat', 'Snowman Hat', 5, 20, 10, 300, 0, 4, 0, 1, 4294967295, 7, 2, 256, 0, 1, 1, 616, 'bonus bStr,1; bonus bInt,1; bonus bMdef,3; bonus2 bSubEle,Ele_Water,7; bonus2 bAddMonsterDropItem,530,100; bonus2 bAddMonsterDropItem,12354,300; if(getrefine()>7) { bonus5 bAutoSpellwhenhit,"BA_FROSTJOKER",5,20,BF_WEAPON|BF_MAGIC,0; } else { bonus5 bAutoSpellwhenhit,"BA_FROSTJOKER",1,20,BF_WEAPON|BF_MAGIC,0; }', '', ''), (5741, 'Im_Egg_Shell_Hat', 'Eternal Egg Shell', 5, 20, 10, 0, 0, 1, 0, 0, 4294967295, 7, 2, 256, 0, 10, 1, 101, '', '', ''), (5742, 'Rudolf_Santa_Hat', 'Rudolph Santa Hat', 5, 20, 10, 400, 0, 5, 0, 0, 4294967295, 7, 2, 256, 0, 10, 1, 619, 'bonus bLuk,1;', '', ''), -(5770, 'Splash_Hat', 'Splash Hat', 5, 20, 10, 100, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 1, 349, 'autobonus "{ sc_start SC_WINDWEAPON, 180000, 1; }", 3, 180000, BF_WEAPON, "{ specialeffect2 EF_ENHANCE; }";', '', ''), +(5770, 'Splash_Hat', 'Splash Hat', 5, 20, 10, 100, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 1, 349, 'autobonus "{ sc_start SC_PROPERTYWIND, 180000, 1; }", 3, 180000, BF_WEAPON, "{ specialeffect2 EF_ENHANCE; }";', '', ''), (5771, 'Family_Hat', 'Family Hat', 5, 20, 10, 100, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 1, 109, 'bonus bDex,1; bonus bMdef,1;', '', ''), (5775, 'Choco_Donut_In_Mouth', 'Choco Donut In Mouth', 5, 20, 10, 50, 0, 1, 0, 0, 4294967295, 7, 2, 1, 0, 1, 0, 653, '', '', ''), (5781, 'Persika', 'Persika', 5, 20, 10, 100, 0, 0, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 659, '', '', ''), @@ -4315,22 +4315,22 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12020, 'Water_Of_Darkness', 'Cursed Water', 2, 2, 1, 30, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",8;', '', ''), (12021, 'Pork_Belly', 'Pork', 0, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemheal rand(70,99),0;', '', ''), (12022, 'Spareribs', 'Galbi', 0, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemheal rand(70,99),0;', '', ''), -(12023, 'Giftbox_China', 'Wrapped Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBoxChina),1;', '', ''), +(12023, 'Giftbox_China', 'Wrapped Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12023,1;', '', ''), (12024, 'Red_Pouch_Of_Surprise', 'Red Pouch', 2, 50, 25, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-4,1,"";', '', ''), -(12025, 'Egg_Boy', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_EggBoy),1;', '', ''), -(12026, 'Egg_Girl', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_EggGirl),1;', '', ''), +(12025, 'Egg_Boy', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12025,1;', '', ''), +(12026, 'Egg_Girl', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12026,1;', '', ''), (12027, 'Giggling_Box', 'Giggling Box', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0;', '', ''), (12028, 'Box_Of_Thunder', 'Box of Thunder', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_MOVHASTE_HORSE,20000,0;', '', ''), (12029, 'Gloomy_Box', 'Box of Gloom', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "AC_CONCENTRATION",1;', '', ''), (12030, 'Box_Of_Grudge', 'Box of Resentment', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_PLUSATTACKPOWER,60000,20;', '', ''), (12031, 'Sleepy_Box', 'Box of Drowsiness', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_PLUSMAGICPOWER,60000,20;', '', ''), (12032, 'Box_Of_Storm', 'Box of Storms', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",2;', '', ''), -(12033, 'Box_Of_Sunlight', 'Box of Sunlight', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_Intravision,30000,0;', '', ''), +(12033, 'Box_Of_Sunlight', 'Box of Sunlight', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_CLAIRVOYANCE,30000,0;', '', ''), (12034, 'Painting_Box', 'Box of Panting', 2, 1000, 500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0;', '', ''), (12035, 'Lotto_Box01', 'Lotto Box 01', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem rand(7361,7370),1;', '', ''), (12036, 'Lotto_Box02', 'Lotto Box 02', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem rand(7371,7380),1;', '', ''), (12037, 'Lotto_Box03', 'Lotto Box 03', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem rand(7381,7390),1;', '', ''), -(12038, 'Lotto_Box04', 'Lotto Box 04', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_LottoBox),1;', '', ''), +(12038, 'Lotto_Box04', 'Lotto Box 04', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12038,1;', '', ''), (12039, 'Lotto_Box05', 'Lotto Box 05', 2, 0, 0, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem rand(7542,7546),1;', '', ''), (12040, 'Stone_Of_Intelligence_', 'Stone of Sage', 2, 100000, 50000, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'homevolution;', '', ''), (12041, 'Str_Dish01', 'Fried Grasshopper Legs', 0, 2000, 1000, 60, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;', '', ''), @@ -4396,14 +4396,14 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12101, 'Citron', 'Citron', 0, 20, 10, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12102, 'Meat_Skewer', 'Grilled Skewer', 0, 20, 10, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12103, 'Bloody_Dead_Branch', 'Bloody Branch', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-3,1,"";', '', ''), -(12104, 'Random_Quiver', 'Random Quiver', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Quiver),1;', '', ''), -(12105, 'Set_Of_Taiming_Item', 'Taming Gift Set', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1;', '', ''), -(12106, 'Accessory_Box', 'Jewelry Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Accesory),1;', '', ''), -(12107, 'Wrapped_Mask', 'Wrapped Mask', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Mask),1;', '', ''), -(12108, 'Bundle_Of_Magic_Scroll', 'Scroll Package', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1;', '', ''), +(12104, 'Random_Quiver', 'Random Quiver', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12104,1;', '', ''), +(12105, 'Set_Of_Taiming_Item', 'Taming Gift Set', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12105,1; getrandgroupitem 12105,1; getrandgroupitem 12105,1;', '', ''), +(12106, 'Accessory_Box', 'Jewelry Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12106,1;', '', ''), +(12107, 'Wrapped_Mask', 'Wrapped Mask', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12107,1;', '', ''), +(12108, 'Bundle_Of_Magic_Scroll', 'Scroll Package', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1;', '', ''), (12109, 'Poring_Box', 'Poring Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-2,1,"";', '', ''), -(12110, 'First_Aid_Kit', 'First Aid Kit', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1;', '', ''), -(12111, 'Food_Package', 'Bundle of Food', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1;', '', ''), +(12110, 'First_Aid_Kit', 'First Aid Kit', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1;', '', ''), +(12111, 'Food_Package', 'Bundle of Food', 2, 10000, 5000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1;', '', ''), (12112, 'Tropical_Sograt', 'Tropical Sograt', 2, 1000, 500, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_Curse,10000,1;', '', ''), (12113, 'Vermilion_The_Beach', 'Vermilion on the Beach', 2, 1000, 500, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_Stun,10000,1;', '', ''), (12114, 'Elemental_Fire', 'Elemental Converter', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",4;', '', ''), @@ -4414,16 +4414,16 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12119, 'Resist_Water', 'Coldproof Potion', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start4 SC_ARMOR_ELEMENT,1200000,20,0,0,-15;', '', ''), (12120, 'Resist_Earth', 'Earthproof Potion', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start4 SC_ARMOR_ELEMENT,1200000,0,20,-15,0;', '', ''), (12121, 'Resist_Wind', 'Thunderproof Potion', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start4 SC_ARMOR_ELEMENT,1200000,0,-15,0,20;', '', ''), -(12122, 'Sesame_Pastry', 'Sesame Pastry', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_BASICHIT,1200000,30;', '', ''); +(12122, 'Sesame_Pastry', 'Sesame Pastry', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_BASICHIT,1200000,30;', '', ''), +(12123, 'Honey_Pastry', 'Honey Pastry', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_BASICAVOIDANCE,1200000,30;', '', ''); INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(12123, 'Honey_Pastry', 'Honey Pastry', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_BASICAVOIDANCE,1200000,30;', '', ''), (12124, 'Rainbow_Cake', 'Rainbow Cake', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_BATKFOOD,1200000,10; sc_start SC_MATKFOOD,120000,10;', '', ''), (12125, 'Outdoor_Cooking_Kits', 'Outdoor Cooking Kit', 2, 500, 250, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'cooking 11;', '', ''), (12126, 'Indoor_Cooking_Kits', 'Home Cooking Kit', 2, 1000, 500, 30, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'cooking 12;', '', ''), (12127, 'High_end_Cooking_Kits', 'Professional Cooking Kit', 2, 2000, 1000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'cooking 13;', '', ''), (12128, 'Imperial_Cooking_Kits', 'Royal Cooking Kit', 2, 5000, 2500, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'cooking 14;', '', ''), (12129, 'Fantastic_Cooking_Kits', 'Fantastic Cooking Kit', 2, 10000, 5000, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'cooking 15;', '', ''), -(12130, 'Cookie_Bag', 'Cookie Bag', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1;', '', ''), +(12130, 'Cookie_Bag', 'Cookie Bag', 2, 2, 1, 70, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12130,1; getrandgroupitem 12130,1; getrandgroupitem 12130,1;', '', ''), (12131, 'Lucky_Potion', 'Lucky Potion', 0, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12132, 'Red_Bag', 'Santa''s Bag', 2, 0, 0, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_Xmas,600000,0;', '', ''), (12133, 'Ice_Cream_', 'McDonald''s Ice Cone', 0, 0, 0, 80, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; }', '', ''), @@ -4479,15 +4479,15 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12183, 'Holy_Arrow_Quiver', 'Holy Arrow Quiver', 2, 2, 1, 250, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 1772,500;', '', ''), (12184, 'Mercenary_Red_Potion', 'Mercenary Red Potion', 2, 500, 250, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_heal 1000,0;', '', ''), (12185, 'Mercenary_Blue_Potion', 'Mercenary Blue Potion', 2, 1000, 500, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_heal 0,100;', '', ''), -(12186, 'Red_Box', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_RedBox),1;', '', ''), -(12187, 'Green_Box', 'Old Green Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GreenBox),1;', '', ''), +(12186, 'Red_Box', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12186,1;', '', ''), +(12187, 'Green_Box', 'Old Green Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12187,1;', '', ''), (12188, 'Magical_Moon_Cake', 'Grace Moon Cake', 0, 20, 10, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 50,50;', '', ''), -(12189, 'Red_Box_', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_RedBox_2),1;', '', ''), +(12189, 'Red_Box_', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12189,1;', '', ''), (12190, 'Moon_Cake', 'Moon Cake', 2, 2, 1, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12191, 'Special_Moon_Cake', 'Special Moon Cake', 2, 2, 1, 500, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12192, 'Pumpkin_Pie', 'Pumpkin Pie', 0, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 5,5;', '', ''), (12193, 'Brezel', 'Pretzel', 2, 20, 10, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12194, 'Hometown_Gift', 'Hometown Gift', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1;', '', ''), +(12194, 'Hometown_Gift', 'Hometown Gift', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12194,1; getrandgroupitem 12194,1; getrandgroupitem 12194,1;', '', ''), (12195, 'Plain_Rice_Cake', 'Plain Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 0,20;', '', ''), (12196, 'Hearty_Rice_Cake', 'Hearty Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 50,0;', '', ''), (12197, 'Salty_Rice_Cake', 'Salty Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 10,10;', '', ''), @@ -4530,15 +4530,15 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12237, 'Choco_Lump', 'Junky Chocolate', 2, 0, 0, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_BLOODING,18000,0;', '', ''), (12238, 'New_Year_Rice_Cake_1', 'New Year Rice Cake', 2, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;', '', ''), (12239, 'New_Year_Rice_Cake_2', 'New Year Rice Cake', 2, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;', '', ''), -(12240, 'Old_Yellow_Box', 'Old Yellow Box', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_YellowBox),1;', '', ''), +(12240, 'Old_Yellow_Box', 'Old Yellow Box', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12240,1;', '', ''), (12241, 'M_Center_Potion', 'Mercenary Concentration Potion', 2, 800, 400, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION1,1800000,0;', '', ''), (12242, 'M_Awakening_Potion', 'Mercenary Awakening Potion', 2, 1500, 750, 150, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION2,1800000,0;', '', ''), (12243, 'M_Berserk_Potion', 'Mercenary Berserk Potion', 2, 3000, 1500, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION3,1800000,0;', '', ''), -(12244, 'Old_Gift_Box', 'Old Gift Box', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_OldGiftBox),1;', '', ''), +(12244, 'Old_Gift_Box', 'Old Gift Box', 2, 20, 10, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12244,1;', '', ''), (12245, 'Green_Ale_US', 'Green Ale', 0, 5000, 2500, 500, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 100,0;', '', ''), -(12246, 'Magic_Card_Album', 'Mystical Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_MagicCardAlbum),1;', '', ''), +(12246, 'Magic_Card_Album', 'Mystical Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12246,1;', '', ''), (12247, 'Halohalo', 'Halo-Halo', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 20, 0, 0, 'sc_start SC_INCALLSTATUS,600000,3;', '', ''), -(12248, 'Masquerade_Ball_Box', 'Fancy Ball Box', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Masquerade),1;', '', ''), +(12248, 'Masquerade_Ball_Box', 'Fancy Ball Box', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12248,1;', '', ''), (12249, 'Payroll_Of_Kafra_', 'Payment Statement for Kafra Employee', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12250, 'Str_Dish10_M', 'Steamed Tongue', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,3600000,10; percentheal 20,20;', '', ''), (12251, 'Agi_Dish10_M', 'Steamed Desert Scorpions', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_AGI,3600000,10; percentheal 15,5;', '', ''), @@ -4571,12 +4571,12 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12278, 'Alice_Scroll', 'Alice Scroll', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_create 2060,1800000;', '', ''), (12279, 'Undead_Element_Scroll', 'Undead Elemental Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20;', '', ''), (12280, 'Holy_Element_Scroll', 'Holy Elemental Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_BENEDICTIO; sc_start SC_BENEDICTIO,300000,1;', '', ''), -(12281, 'Tresure_Box_WoE', 'Event Treasure Box', 2, 20, 10, 150, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Tresure_Box_WoE),1;', '', ''), +(12281, 'Tresure_Box_WoE', 'Event Treasure Box', 2, 20, 10, 150, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12281,1;', '', ''), (12282, 'Internet_Cafe1', 'Internet Cafe1', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_INCALLSTATUS,5400000,3; sc_start SC_PLUSATTACKPOWER,5400000,15; sc_start SC_PLUSMAGICPOWER,5400000,15;', '', ''), (12283, 'Internet_Cafe2', 'Internet Cafe2', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_INCSTR,5400000,8; sc_start SC_INCDEX,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,32; sc_start SC_INCFLEE,5400000,5;', '', ''), (12284, 'Internet_Cafe3', 'Internet Cafe3', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_PLUSMAGICPOWER,5400000,40;', '', ''), (12285, 'Internet_Cafe4', 'Internet Cafe4', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,24; sc_start SC_PLUSMAGICPOWER,5400000,24;', '', ''), -(12286, 'Masquerade_Ball_Box2', 'Masquerade Ball Box2', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Masquerade_2),1;', '', ''), +(12286, 'Masquerade_Ball_Box2', 'Masquerade Ball Box2', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12286,1;', '', ''), (12287, 'Love_Angel', 'Love Angel Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'setfont 1;', '', ''), (12288, 'Squirrel', 'Squirrel Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'setfont 2;', '', ''), (12289, 'Gogo', 'Gogo Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'setfont 3;', '', ''), @@ -4588,7 +4588,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12295, 'PC_Bang_Coin_Box2', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 2739,1;', '', ''), (12296, 'PC_Bang_Coin_Box3', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 2738,1;', '', ''), (12297, 'PC_Bang_Coin_Box4', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 2738,2;', '', ''), -(12298, 'SP_Potion', 'SP Consumption Reduction Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_SPCOST_RATE,3600000,15;', '', ''), +(12298, 'SP_Potion', 'SP Consumption Reduction Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_ATKER_BLOOD,3600000,15;', '', ''), (12299, 'Mega_Resist_Potion', 'Mega Resist Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_COMMONSC_RESIST,3600000,10;', '', ''), (12300, 'Wild_Rose_Scroll', 'Wild Rose Contract', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_create 1965,1800000;', '', ''), (12301, 'Doppelganger_Scroll', 'Doppelganger Contract', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'mercenary_create 1966,1800000;', '', ''), @@ -4624,12 +4624,12 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12331, 'Ginseng', 'Ginseng', 0, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 6,0;', '', ''), (12332, 'Fruit_Juice', 'Fruit Juice', 0, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 0,6;', '', ''), (12333, 'Ansila', 'Ancilla', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 0,15;', '', ''), -(12334, 'Cherish_Box', 'Treasure Edition Helm Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Cherish_Box),1;', '', ''), +(12334, 'Cherish_Box', 'Treasure Edition Helm Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12334,1;', '', ''), (12335, 'Yummy_Skewered_Dish', 'Grilled Delicious Skewer', 0, 1000, 500, 350, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 60,60;', '', ''), (12336, 'Baked_Mushroom', 'Grilled Mushroom', 0, 500, 250, 300, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 30,30;', '', ''), (12337, 'Grilled_Sausage', 'Grilled Sausages', 0, 300, 150, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'percentheal 20,20;', '', ''), (12338, 'Grilled_Corn', 'Grilled Corn', 2, 100, 50, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_INCSTR,180000,2; sc_start SC_INCINT,180000,2; sc_start SC_INCAGI,180000,2;', '', ''), -(12339, 'Cherish_Box_Ori', 'Treasure Edition Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Cherish_Box_Ori),1;', '', ''), +(12339, 'Cherish_Box_Ori', 'Treasure Edition Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12339,1;', '', ''), (12340, 'Mysterious_Rice_Powder', 'Chewy Rice Powder', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1815;', '', ''), (12341, 'Special_Alloy_Trap_Box', 'Special Alloy Trap Box', 2, 30000, 15000, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 7940,100;', '', ''), (12342, 'Manuk''s_Opportunity', 'Manuk''s Opportunity', 2, 0, 0, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_POTION_BERSERK; sc_start SC_MANU_ATK,600000,10;', '', ''), @@ -4643,10 +4643,10 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12350, 'Angeling_Potion', 'Angeling Potion', 2, 20, 10, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,120000,5; itemskill "AL_ANGELUS",5;', '', ''), (12351, 'Shout_Megaphone', 'Scream Megaphone', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "MC_LOUD",1;', '', ''), (12352, 'Dun_Tele_Scroll3', 'Dungeon Teleport Scroll 3', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12353, 'Tiny_Waterbottle', 'Small Bottle', 2, 800, 400, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_WATERWEAPON,90000,1;', '', ''), +(12353, 'Tiny_Waterbottle', 'Small Bottle', 2, 800, 400, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_PROPERTYWATER,90000,1;', '', ''), (12354, 'Buche_De_Noel', 'Buche De Noel', 2, 2, 1, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7;', '', ''), -(12355, 'Xmas_Gift', 'Xmas Gift', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Xmas_Gift),1;', '', ''), -(12356, 'Louise_Costume_Box', 'Louise Costume Box', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Louise_Costume_Box),1;', '', ''), +(12355, 'Xmas_Gift', 'Xmas Gift', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12355,1;', '', ''), +(12356, 'Louise_Costume_Box', 'Louise Costume Box', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12356,1;', '', ''), (12357, 'Shiny_Wing_Gown', 'Shiny Wing Gown', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1630;', '', ''), (12358, 'Fan_Of_Wind', 'Fan Of Wind', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1513;', '', ''), (12359, 'Very_Soft_Plant', 'Very Soft Plant', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'pet 1586;', '', ''), @@ -4742,11 +4742,11 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12449, 'F_Luk_Dish10_', 'F Luk Dish10 ', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12450, 'F_Vit_Dish10_', 'F Vit Dish10 ', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12451, 'F_WOB_Rune', 'F WOB Rune', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12452, 'F_WOB_Schwaltz', 'F WOB Schwaltz', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''); -INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(12452, 'F_WOB_Schwaltz', 'F WOB Schwaltz', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12453, 'F_WOB_Rachel', 'F WOB Rachel', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12454, 'F_WOB_Local', 'F WOB Local', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12456, 'F_Greed_Scroll', 'F Greed Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), +(12456, 'F_Greed_Scroll', 'F Greed Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''); +INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (12457, 'F_Glass_Of_Illusion', 'F Glass Of Illusion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12458, 'F_Abrasive', 'F Abrasive', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12459, 'F_Med_Life_Potion', 'F Med Life Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), @@ -4764,7 +4764,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12472, 'F_Convex_Mirror', 'F Convex Mirror', 2, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12473, 'RWC_Parti_Box', 'RWC Parti Box', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12474, 'RWC_Final_Comp_Box', 'RWC Final Comp Box', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12475, 'Cure_Free', 'Cure Free', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_end SC_SILENCE; sc_end SC_BLOODING; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_ORCISH; sc_end SC_CHANGEUNDEAD; itemheal 500,0;', '', ''), +(12475, 'Cure_Free', 'Cure Free', 2, 20, 10, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_end SC_SILENCE; sc_end SC_BLOODING; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_ORCISH; sc_end SC_PROPERTYUNDEAD; itemheal 500,0;', '', ''), (12476, 'PCBang_Coupon_Box3', 'PCBang Coupon Box3', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12477, 'Gift_Bundle', 'Gift Bundle', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12478, 'Chance_Box', 'Chance Box', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), @@ -4873,7 +4873,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12581, 'Vending_Search_Scroll2', 'Universal Catalog Gold', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'searchstores 10,1;', '', ''), (12591, 'Vending_Search_Scroll3', 'Universal Catalog Bronze', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'searchstores 10,1;', '', ''), (12701, 'Old_Blue_Box_F', 'Old Blue Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12702, 'Old_Bleu_Box', 'Old Navy Box', 2, 0, 0, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_BleuBox),1; getrandgroupitem(IG_BleuBox),1;', '', ''), +(12702, 'Old_Bleu_Box', 'Old Navy Box', 2, 0, 0, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12702,1; getrandgroupitem 12702,1;', '', ''), (12703, 'Holy_Egg_2', 'Holy Egg', 2, 0, 0, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12704, 'Elixir_Of_Life', 'Elixir of Life', 0, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 85, 0, 0, 'percentheal 100,0;', '', ''), (12705, 'Noble_Nameplate', 'Noble Nameplate', 2, 0, 0, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 90, 0, 0, 'sc_start SC_CASH_PLUSEXP,1800000,100;', '', ''), @@ -4885,7 +4885,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (12711, 'Pretzel', 'Pretzel', 0, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemheal rand(50,90),0;', '', ''), (12712, 'Green_Beer', 'Green Beer', 2, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12713, 'Monster_Extract', 'Monster Extract', 2, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), -(12714, 'Easter_Scroll', 'Easter Scroll', 2, 1, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Easter_Scroll),1;', '', ''), +(12714, 'Easter_Scroll', 'Easter Scroll', 2, 1, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12714,1;', '', ''), (12715, 'Black_Treasure_Box', 'Black Treasure Box', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12716, 'Indian_Rice_Cake', 'Indian Rice Cake', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), (12717, 'Poison_Paralysis', 'Paralyze', 0, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'if(rand(10000)<10) sc_start SC_PARALYSE,300000,0;', '', ''), @@ -5107,11 +5107,11 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (13107, 'Wasteland_Outlaw', 'Wasteland''s Outlaw', 4, 20, 10, 580, 68, 0, 7, 2, 16777216, 7, 2, 34, 3, 70, 1, 17, 'bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14;', '', ''), (13108, 'BF_Pistol1', 'Soldier Revolver', 4, 0, 0, 0, 70, 0, 7, 0, 16777216, 7, 2, 34, 3, 80, 1, 17, 'bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; autobonus "{ bonus bAspdRate,100; }",10,3000,BF_WEAPON,"{ specialeffect2 EF_POTION_BERSERK; }"; bonus bUnbreakableWeapon,0;', '', ''), (13109, 'Wasteland_Outlaw_C', 'Wasteland Outlaw', 4, 20, 10, 0, 100, 0, 7, 0, 16777216, 7, 2, 34, 3, 0, 0, 17, 'bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatkRate,10;', '', ''), -(13110, 'Krieger_Pistol1', 'Glorious Pistol', 4, 0, 0, 0, 80, 0, 7, 0, 16777216, 7, 2, 34, 4, 80, 1, 17, 'bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine()>5){ bonus2 bAddRace,RC_DemiHuman,pow(getrefine()-4,2); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) { bonus4 bAutoSpellOnSkill,"GS_RAPIDSHOWER","GS_GLITTERING",1,1000; bonus2 bSkillAtk,"GS_RAPIDSHOWER",getrefine()*2; }', '', ''); -INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(13110, 'Krieger_Pistol1', 'Glorious Pistol', 4, 0, 0, 0, 80, 0, 7, 0, 16777216, 7, 2, 34, 4, 80, 1, 17, 'bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine()>5){ bonus2 bAddRace,RC_DemiHuman,pow(getrefine()-4,2); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) { bonus4 bAutoSpellOnSkill,"GS_RAPIDSHOWER","GS_GLITTERING",1,1000; bonus2 bSkillAtk,"GS_RAPIDSHOWER",getrefine()*2; }', '', ''), (13112, 'P_Revolver1', 'Eden Revlover I', 4, 0, 0, 0, 4, 0, 7, 0, 16777216, 7, 2, 34, 1, 26, 0, 17, 'bonus bHit,-5;', '', ''), (13113, 'P_Revolver2', 'Eden Revlover II', 4, 0, 0, 0, 60, 0, 7, 0, 16777216, 7, 2, 34, 1, 40, 0, 17, 'bonus bHit,-5;', '', ''), -(13150, 'Branch', 'Branch', 4, 3000, 1500, 500, 50, 0, 9, 3, 16777216, 7, 2, 34, 1, 1, 1, 18, '', '', ''), +(13150, 'Branch', 'Branch', 4, 3000, 1500, 500, 50, 0, 9, 3, 16777216, 7, 2, 34, 1, 1, 1, 18, '', '', ''); +INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (13151, 'The_Cyclone', 'Cyclone', 4, 17500, 8750, 700, 120, 0, 9, 1, 16777216, 7, 2, 34, 2, 24, 1, 18, 'bonus bHit,10; bonus bCritical,10;', '', ''), (13152, 'The_Cyclone_', 'Cyclone', 4, 17500, 8750, 700, 120, 0, 9, 2, 16777216, 7, 2, 34, 2, 24, 1, 18, 'bonus bHit,10; bonus bCritical,10;', '', ''), (13153, 'Dusk', 'Dusk', 4, 23500, 11750, 750, 150, 0, 9, 1, 16777216, 7, 2, 34, 2, 56, 1, 18, 'bonus bHit,10; bonus bCritical,10;', '', ''), @@ -5402,11 +5402,11 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (13676, 'Drooping_Kitty_Box1', 'Refined Drooping Cat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5279,1209600;', '', ''), (13677, 'Magestic_Goat_Box1', 'Refined Majestic Goat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5280,1209600;', '', ''), (13678, 'Deviruchi_Cap_Box1', 'Refined Deviruchi Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5281,1209600;', '', ''), -(13679, 'Executioner_Box1', 'Refined Executioner Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1174,604800;', '', ''); -INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(13679, 'Executioner_Box1', 'Refined Executioner Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1174,604800;', '', ''), (13680, 'Brood_Axe_Box1', 'Refined Bloody Axe Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1373,604800;', '', ''), (13681, 'Tomahawk_Box1', 'Refined Tomahawk Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1374,604800;', '', ''), -(13682, 'Bow_Of_Rudra_Box1', 'Refined Rudra Bow Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1729,604800;', '', ''), +(13682, 'Bow_Of_Rudra_Box1', 'Refined Rudra Bow Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1729,604800;', '', ''); +INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (13683, 'Cutlas_Box1', 'Refined Cutlus Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 13402,604800;', '', ''), (13684, 'Solar_Sword_Box1', 'Refined Solar Sword Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 13403,604800;', '', ''), (13685, 'Sword_Breaker_Box1', 'Refined Swordbreaker Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 13024,604800;', '', ''), @@ -5735,11 +5735,11 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (14023, 'F_Toast_Box', 'Crunch Toast Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5391,604800;', '', ''), (14024, 'F_Robo_Eye_Box', 'Robo Eye Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5325,1;', '', ''), (14025, 'F_Twin_Ribbon_Box', 'Maiden''s Twin Ribbon Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5187,1;', '', ''), -(14027, 'F_Fish_Head_Hat_Box', 'Fish Head Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5380,1;', '', ''); -INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(14027, 'F_Fish_Head_Hat_Box', 'Fish Head Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5380,1;', '', ''), (14028, 'F_Santa_Poring_Hat_Box', 'SantaPoring Cap Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5381,1;', '', ''), (14029, 'F_Bell_Ribbon_Box', 'Bell Ribbon Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5382,1;', '', ''), -(14030, 'F_Mimic_Scroll_Box5', 'Mimic Summoning 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 12276,5;', '', ''), +(14030, 'F_Mimic_Scroll_Box5', 'Mimic Summoning 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 12276,5;', '', ''); +INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (14031, 'F_Disguise_Scroll_Box5', 'Disguise Summoning 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 12277,5;', '', ''), (14032, 'F_Alice_Scroll_Box5', 'Alice Summoning 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 12278,5;', '', ''), (14033, 'F_Mimic_Scroll_Box10', 'Mimic Summoning 10 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 12276,10;', '', ''), @@ -6054,22 +6054,22 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (14534, 'Small_Life_Potion', 'Small Life Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 320; sc_start4 SC_S_LIFEPOTION,600000,-5,5,0,0;', '', ''), (14535, 'Med_Life_Potion', 'Medium Life Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 320; sc_start4 SC_L_LIFEPOTION,600000,-7,4,0,0;', '', ''), (14536, 'Abrasive', 'Abrasive', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 182; sc_start SC_CRITICALPERCENT,300000,30;', '', ''), -(14537, 'Regeneration_Potion', 'Regeneration Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 348; sc_start SC_INCHEALRATE,1800000,20;', '', ''), +(14537, 'Regeneration_Potion', 'Regeneration Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 348; sc_start SC_HEALPLUS,1800000,20;', '', ''), (14538, 'Glass_Of_Illusion', 'Glass of Illusion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_STEAL; sc_start SC_INCFLEE2,60000,20;', '', ''), -(14539, 'Shadow_Armor_S', 'Shadow Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_CLOAKING; sc_start4 SC_ELEMENTALCHANGE,1800000,1,Ele_Dark,1,0;', '', ''), -(14540, 'Holy_Armor_S', 'Holy Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 91; sc_start4 SC_ELEMENTALCHANGE,1800000,1,Ele_Holy,1,0;', '', ''), -(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_DEF_RATE,60000,3;', '', ''), -(14542, 'B_Def_Potion', 'Big Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_DEF_RATE,180000,3;', '', ''), -(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_MDEF_RATE,60000,3;', '', ''), -(14544, 'B_Mdef_Potion', 'Big Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_MDEF_RATE,180000,3;', '', ''), +(14539, 'Shadow_Armor_S', 'Shadow Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_CLOAKING; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Dark,1,0;', '', ''), +(14540, 'Holy_Armor_S', 'Holy Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 91; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Holy,1,0;', '', ''), +(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,60000,3;', '', ''), +(14542, 'B_Def_Potion', 'Big Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,180000,3;', '', ''), +(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,60000,3;', '', ''), +(14544, 'B_Mdef_Potion', 'Big Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,180000,3;', '', ''), (14545, 'Battle_Manual_X3', 'Field Manual 300%', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_CASH_PLUSEXP,1800000,300;', '', ''), (14546, 'Fire_Cracker_Love', 'I Love You Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''), (14547, 'Fire_Cracker_Wday', 'Whiteday Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''), -(14548, 'Fire_Cracker_Valentine', 'Valentine''s Day Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''); -INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(14548, 'Fire_Cracker_Valentine', 'Valentine''s Day Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''), (14549, 'Fire_Cracker_Bday', 'Birthday Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''), (14550, 'Fire_Cracker_Xmas', 'Xmas Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''), -(14551, 'Str_Dish01_', 'Fried Grasshopper Legs', 0, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;', '', ''), +(14551, 'Str_Dish01_', 'Fried Grasshopper Legs', 0, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;', '', ''); +INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (14552, 'Str_Dish02_', 'Seasoned Sticky Webfoot', 0, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,2; percentheal 5,0;', '', ''), (14553, 'Str_Dish03_', 'Bomber Steak', 0, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,3; percentheal 5,0;', '', ''), (14554, 'Int_Dish01_', 'Grape Juice Herbal Tea', 0, 2, 1, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_INT,1200000,1; percentheal 0,5;', '', ''), @@ -6114,7 +6114,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (14593, 'Magic_Power_Scroll', 'Mystical Amplification Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "HW_MAGICPOWER",10;', '', ''), (14594, 'Quagmire_Scroll', 'Quagmire Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "WZ_QUAGMIRE",5;', '', ''), (14595, 'Unsealed_Magic_Spell', 'Unsealed Magic Spell', 2, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'warp "yuno_fild09",255,127;', '', ''), -(14596, 'Pierre_Treasurebox', 'Pierre''s Treasure Box', 2, 0, 0, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1;', '', ''), +(14596, 'Pierre_Treasurebox', 'Pierre''s Treasure Box', 2, 0, 0, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1;', '', ''), (14597, 'PhreeoniS', 'Phreeoni Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_ITEMSCRIPT,180000,4121;', '', ''), (14598, 'GhostringS', 'Ghostring Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_ITEMSCRIPT,60000,4047;', '', ''), (14599, 'Greed_Scroll_C', 'Greed Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''), @@ -6166,7 +6166,7 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy (18539, 'Skull_Cap', 'Skull Cap', 5, 40, 20, 200, 0, 5, 0, 1, 4294967295, 7, 2, 256, 0, 10, 1, 713, 'bonus bMatkRate,2; if(getrefine() >= 5) { bonus bMatkRate,3; } if(getrefine() >= 7) { bonus bMatkRate,3; }', '', ''), (18595, 'Horn_Of_Ancient', 'Horn of Ancient', 5, 40, 20, 200, 0, 8, 0, 1, 4294967295, 7, 2, 256, 0, 50, 1, 757, 'autobonus "{ bonus bBaseAtk,100; }",5,10000,0,"{ specialeffect2 EF_POTION_BERSERK; }";', '', ''), (18596, 'Sprout_Hat', 'Sprout Hat', 5, 20, 10, 200, 0, 4, 0, 0, 4294967295, 7, 2, 256, 0, 70, 1, 758, 'skill "WZ_HEAVENDRIVE",3;', '', ''), -(18597, 'Mercury_Riser', 'Mercury Riser', 5, 40, 20, 200, 0, 10, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 759, 'bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2;', '', ''), +(18597, 'Mercury_Riser', 'Mercury Riser', 5, 40, 20, 200, 0, 10, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 759, 'bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2; }', '', ''), (18600, 'Cat_Ear_Beret', 'Cat Ear Beret', 5, 20, 10, 100, 0, 5, 0, 0, 4294967295, 7, 2, 256, 0, 0, 1, 761, 'bonus bAtkRate,5; if(getrefine() > 5 && getrefine() <= 12) { bonus2 bAddRace,RC_DemiHuman,(getrefine() - 5); bonus2 bSubRace,RC_DemiHuman,(getrefine() - 5); } if(getrefine() > 12) { bonus2 bAddRace,RC_DemiHuman,7; bonus2 bSubRace,RC_DemiHuman,7; }', '', ''), (18612, 'White_Musang_Hat', 'White Musang Hat', 5, 40, 20, 200, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 0, 1, 770, 'bonus bStr,2; bonus bVit,2; bonus bLuk,1; bonus bUnbreakableHelm,0;', '', ''), (18613, 'Black_Musang_Hat', 'Black Musang Hat', 5, 40, 20, 200, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 0, 1, 771, 'bonus bInt,2; bonus bDex,2; bonus bAgi,1; bonus bUnbreakableHelm,0;', '', ''), diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index a9fa3f65f..b57fbf5e6 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -129,7 +129,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (599, 'Light_Orange_Pot', 'Light Orange Potion', 0, 200, 100, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemheal rand(105,145),0;', '', ''), (601, 'Wing_Of_Fly', 'Fly Wing', 2, 60, 30, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",1;', '', ''), (602, 'Wing_Of_Butterfly', 'Butterfly Wing', 2, 300, 150, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",3;', '', ''), -(603, 'Old_Blue_Box', 'Old Blue Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_BlueBox),1;', '', ''), +(603, 'Old_Blue_Box', 'Old Blue Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 603,1;', '', ''), (604, 'Branch_Of_Dead_Tree', 'Dead Branch', 2, 50, 25, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-1,1,"";', '', ''), (605, 'Anodyne', 'Anodyne', 2, 2000, 1000, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "SM_ENDURE",1;', '', ''), (606, 'Aloebera', 'Aloevera', 2, 1500, 750, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "SM_SELFPROVOKE",1;', '', ''), @@ -142,8 +142,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (613, 'Iron_Hammer', 'Iron Hammer', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'produce 1;', '', ''), (614, 'Golden_Hammer', 'Golden Hammer', 2, 3000, 1500, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'produce 2;', '', ''), (615, 'Oridecon_Hammer', 'Oridecon Hammer', 2, 5000, 2500, 400, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'produce 3;', '', ''), -(616, 'Old_Card_Album', 'Old Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_CardAlbum),1;', '', ''), -(617, 'Old_Violet_Box', 'Old Purple Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_VioletBox),1;', '', ''), +(616, 'Old_Card_Album', 'Old Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 615,1;', '', ''), +(617, 'Old_Violet_Box', 'Old Purple Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 617,1;', '', ''), (618, 'Worn_Out_Scroll', 'Worn Out Scroll', 2, 50, 25, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (619, 'Unripe_Apple', 'Unripe Apple', 2, 1000, 500, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1002;', '', ''), (620, 'Orange_Juice', 'Orange Juice', 2, 1500, 750, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1113;', '', ''), @@ -170,7 +170,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (641, 'Contracts_In_Shadow', 'Contract in Shadow', 2, 100, 50, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1109;', '', ''), (642, 'Book_Of_Devil', 'Book of the Devil', 2, 1800, 900, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1101;', '', ''), (643, 'Pet_Incubator', 'Pet Incubator', 2, 3000, 1500, 30, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'bpet;', '', ''), -(644, 'Gift_Box', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox),1;', '', ''), +(644, 'Gift_Box', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 644,1;', '', ''), (645, 'Center_Potion', 'Concentration Potion', 2, 800, 400, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_ATTHASTE_POTION1,1800000,4;', '', ''), (656, 'Awakening_Potion', 'Awakening Potion', 2, 1500, 750, 150, 0, 0, 0, 0, 0, 4294442735, 7, 2, 0, 0, 40, 0, 0, 0, 'sc_start SC_ATTHASTE_POTION2,1800000,6;', '', ''), (657, 'Berserk_Potion', 'Berserk Potion', 2, 3000, 1500, 200, 0, 0, 0, 0, 0, 31868582, 7, 2, 0, 0, 85, 0, 0, 0, 'sc_start SC_ATTHASTE_POTION3,1800000,9;', '', ''), @@ -180,10 +180,10 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (661, 'Sway_Apron', 'Soft Apron', 2, 20000, 10000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1275;', '', ''), (662, 'Inspector_Certificate', 'Authoritative Badge', 2, 1450, 725, 30, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_MOVHASTE_HORSE,180000,0;', '', ''), (663, 'Korea_Rice_Cake', 'Korean Rice Cake', 0, 1, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 10,0;', '', ''), -(664, 'Gift_Box_1', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_1),1;', '', ''), -(665, 'Gift_Box_2', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_2),1;', '', ''), -(666, 'Gift_Box_3', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_3),1;', '', ''), -(667, 'Gift_Box_4', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBox_4),1;', '', ''), +(664, 'Gift_Box_1', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 664,1;', '', ''), +(665, 'Gift_Box_2', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 665,1;', '', ''), +(666, 'Gift_Box_3', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 666,1;', '', ''), +(667, 'Gift_Box_4', 'Gift Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 667,1;', '', ''), (668, 'Handsei', 'Red Envelope', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'set Zeny,Zeny+rand(1000,10000);', '', ''), (669, 'Rice_Cake_Soup', 'Tempting Rice-Cake Soup', 0, 500, 250, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal -100,-100;', '', ''), (670, 'Gold_Coin_Moneybag', 'Bag of Gold Coins', 3, 100000, 50000, 400, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -423,9 +423,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (1051, 'Detonator', 'Detonator', 3, 450, 225, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1052, 'Single_Cell', 'Single Cell', 3, 46, 23, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1053, 'Tooth_Of_Ancient_Fish', 'Ancient Tooth', 3, 548, 274, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), -(1054, 'Lip_Of_Ancient_Fish', 'Ancient Lips', 3, 1000, 500, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''); +(1054, 'Lip_Of_Ancient_Fish', 'Ancient Lips', 3, 1000, 500, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), +(1055, 'Earthworm_Peeling', 'Earthworm Peeling', 3, 196, 98, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1055, 'Earthworm_Peeling', 'Earthworm Peeling', 3, 196, 98, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1056, 'Grit', 'Grit', 3, 306, 153, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1057, 'Moth_Dust', 'Moth Dust', 3, 138, 69, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (1058, 'Wing_Of_Moth', 'Moth Wings', 3, 200, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -511,8 +511,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (1139, 'Tale_Fing_', 'Tirfing', 4, 20, 10, 1000, 200, 0, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 0, 1, 2, 'bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000;', '', ''), (1140, 'Byeorrun_Gum', 'Byeollungum', 4, 20, 10, 900, 150, 0, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 0, 1, 2, 'bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,50; bonus bAllStats,2;', '', ''), (1141, 'Immaterial_Sword', 'Immaterial Sword', 4, 20, 10, 900, 140, 0, 0, 1, 0, 414946, 7, 2, 2, 4, 40, 0, 1, 2, 'bonus bAtkEle,Ele_Ghost; bonus2 bSPVanishRate,30,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0;', '', ''), -(1142, 'Jewel_Sword', 'Jeweled Sword', 4, 20, 10, 2200, 104, 0, 0, 1, 0, 414946, 7, 2, 2, 3, 68, 0, 1, 2, 'bonus2 bAddMonsterDropItemGroup,IG_Jewel,100;', '', ''), -(1143, 'Gaia_Sword', 'Gaia Sword', 4, 20, 10, 2500, 140, 0, 0, 1, 0, 414946, 7, 2, 2, 3, 74, 0, 1, 2, 'bonus2 bAddMonsterDropItemGroup,IG_Ore,30;', '', ''), +(1142, 'Jewel_Sword', 'Jeweled Sword', 4, 20, 10, 2200, 104, 0, 0, 1, 0, 414946, 7, 2, 2, 3, 68, 0, 1, 2, 'bonus bAddMonsterDropChainItem,ITMCHAIN_GEM;', '', ''), +(1143, 'Gaia_Sword', 'Gaia Sword', 4, 20, 10, 2500, 140, 0, 0, 1, 0, 414946, 7, 2, 2, 3, 74, 0, 1, 2, 'bonus bAddMonsterDropChainItem,ITMCHAIN_ORE;', '', ''), (1144, 'Sasimi', 'Sashimi', 4, 20, 10, 1400, 75, 0, 0, 1, 0, 414946, 7, 2, 2, 3, 48, 0, 1, 2, 'bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,RC_Fish,4000;', '', ''), (1145, 'Holy_Avenger', 'Holy Avenger', 4, 450000, 225000, 1350, 125, 0, 0, 1, 0, 16384, 7, 2, 2, 3, 75, 0, 1, 2, 'bonus bAtkEle,Ele_Holy; bonus bVit,2;', '', ''), (1146, 'Town_Sword', 'Town Sword', 4, 42000, 21000, 800, 100, 0, 0, 1, 1, 1, 7, 2, 2, 3, 30, 0, 1, 2, '', '', ''), @@ -736,9 +736,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (1405, 'Spear_', 'Spear', 4, 1700, 850, 850, 44, 0, 0, 3, 4, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''), (1406, 'Spear__', 'Spear', 4, 1700, 850, 850, 44, 0, 0, 3, 0, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''), (1407, 'Pike', 'Pike', 4, 3450, 1725, 1000, 60, 0, 0, 3, 3, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''), -(1408, 'Pike_', 'Pike', 4, 3450, 1725, 1000, 60, 0, 0, 3, 4, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''); +(1408, 'Pike_', 'Pike', 4, 3450, 1725, 1000, 60, 0, 0, 3, 4, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''), +(1409, 'Pike__', 'Pike', 4, 3450, 1725, 1000, 60, 0, 0, 3, 0, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1409, 'Pike__', 'Pike', 4, 3450, 1725, 1000, 60, 0, 0, 3, 0, 16514, 7, 2, 2, 1, 4, 0, 1, 4, '', '', ''), (1410, 'Lance', 'Lance', 4, 60000, 30000, 2500, 185, 0, 0, 3, 0, 16514, 7, 2, 34, 3, 33, 0, 1, 5, '', '', ''), (1411, 'Lance_', 'Lance', 4, 60000, 30000, 2500, 185, 0, 0, 3, 0, 16514, 7, 2, 34, 3, 33, 0, 1, 5, '', '', ''), (1412, 'Lance__', 'Lance', 4, 60000, 30000, 2500, 185, 0, 0, 3, 0, 16514, 7, 2, 34, 3, 33, 0, 1, 5, '', '', ''), @@ -1011,9 +1011,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (1750, 'Arrow', 'Arrow', 10, 1, 0, 1, 25, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, '', '', ''), (1751, 'Silver_Arrow', 'Silver Arrow', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Holy;', '', ''), (1752, 'Fire_Arrow', 'Fire Arrow', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Fire;', '', ''), -(1753, 'Steel_Arrow', 'Steel Arrow', 10, 4, 2, 2, 40, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, '', '', ''); +(1753, 'Steel_Arrow', 'Steel Arrow', 10, 4, 2, 2, 40, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, '', '', ''), +(1754, 'Crystal_Arrow', 'Crystal Arrow', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Water;', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(1754, 'Crystal_Arrow', 'Crystal Arrow', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Water;', '', ''), (1755, 'Arrow_Of_Wind', 'Arrow of Wind', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Wind;', '', ''), (1756, 'Stone_Arrow', 'Stone Arrow', 10, 3, 1, 2, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Earth;', '', ''), (1757, 'Immatrial_Arrow', 'Immaterial Arrow', 10, 3, 1, 1, 30, 0, 0, 0, 0, 661576, 7, 2, 32768, 0, 1, 0, 0, 1, 'bonus bAtkEle,Ele_Ghost;', '', ''), @@ -1175,10 +1175,10 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (2118, 'Arm_Guard_', 'Arm Guard', 5, 10000, 5000, 150, 0, 0, 50, 0, 1, 33554432, 7, 2, 32, 0, 20, 0, 1, 1, '', '', ''), (2119, 'Improved_Arm_Guard', 'Advanced Arm Guard', 5, 40000, 20000, 150, 0, 0, 45, 0, 0, 33554432, 7, 2, 32, 0, 50, 0, 1, 1, 'bonus bMdef,5;', '', ''), (2120, 'Improved_Arm_Guard_', 'Advanced Arm Guard', 5, 40000, 20000, 150, 0, 0, 45, 0, 1, 33554432, 7, 2, 32, 0, 50, 0, 1, 1, 'bonus bMdef,5;', '', ''), -(2121, 'Memorize_Book_', 'Memory Book', 5, 20, 10, 1000, 0, 0, 25, 0, 1, 8454660, 7, 2, 32, 0, 0, 0, 1, 5, 'bonus bInt,1; bonus bMdef,2; };', '', ''), +(2121, 'Memorize_Book_', 'Memory Book', 5, 20, 10, 1000, 0, 0, 25, 0, 1, 8454660, 7, 2, 32, 0, 0, 0, 1, 5, 'bonus bInt,1; bonus bMdef,2;', '', ''), (2122, 'Platinum_Shield', 'Platinum Shield', 5, 20, 10, 1200, 0, 0, 95, 0, 0, 4294967294, 2, 2, 32, 0, 68, 0, 1, 4, 'bonus bMdef,5; bonus2 bSubSize,Size_Medium,15; bonus2 bSubSize,Size_Large,15; bonus2 bSubRace,RC_Undead,10; bonus5 bAutoSpellWhenHit,"NPC_MAGICMIRROR",2,150,BF_MAGIC,0;', '', ''), (2123, 'Orleans_Server', 'Orleans''s Server', 5, 20, 10, 1000, 0, 0, 75, 0, 1, 4294967294, 2, 2, 32, 0, 55, 0, 1, 4, 'bonus bMdef,2; bonus bMagicDamageReturn,5;', '', ''), -(2124, 'Thorny_Buckler', 'Thorny Buckler', 5, 20, 10, 1000, 0, 0, 85, 0, 1, 4294967294, 2, 2, 32, 0, 55, 0, 1, 2, 'bonus bMdef,2; }', '', ''), +(2124, 'Thorny_Buckler', 'Thorny Buckler', 5, 20, 10, 1000, 0, 0, 85, 0, 1, 4294967294, 2, 2, 32, 0, 55, 0, 1, 2, 'bonus bMdef,2;', '', ''), (2125, 'Strong_Shield', 'Strong Shield', 5, 20, 10, 2500, 0, 0, 90, 0, 1, 4294967294, 2, 2, 32, 0, 75, 0, 1, 4, 'bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;', '', ''), (2126, 'Guyak_Shield', 'Guyak Shield', 5, 20, 10, 700, 0, 0, 3, 0, 0, 4294967294, 7, 2, 32, 0, 1, 0, 1, 2, 'bonus bMdef,2; bonus bMagicDamageReturn,2; autobonus2 "{ bonus bShortWeaponDamageReturn,5; }",20,1000,BF_WEAPON,"{ specialeffect2 EF_REFLECTSHIELD; }";', '', ''), (2127, 'Secular_Mission', 'Secular Mission', 5, 20, 10, 0, 0, 0, 10, 0, 0, 4294967295, 7, 2, 32, 0, 0, 0, 0, 4, 'bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25;', '', ''), @@ -1191,7 +1191,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (2134, 'Shield_Of_Naga', 'Shield of Naga', 5, 20, 10, 500, 0, 0, 35, 0, 1, 13631360, 2, 2, 32, 0, 70, 0, 1, 2, 'bonus bMdef,3; autobonus2 "{ bonus bShortWeaponDamageReturn,(getrefine()*3); }",10,5000,BF_WEAPON,"{ specialeffect2 EF_GUARD; }";', '', ''), (2135, 'Shadow_Guard', 'Shadow Guard', 5, 20, 10, 800, 0, 0, 52, 0, 1, 131072, 2, 2, 32, 0, 70, 0, 1, 2, '', '', ''), (2136, 'Cracked_Buckler', 'Cracked Buckler', 5, 0, 0, 0, 0, 0, 5, 0, 0, 4294967295, 7, 2, 32, 0, 0, 0, 0, 2, 'bonus bAgi,2; bonus2 bAddEle,Ele_Neutral,-10; bonus3 bAutoSpellWhenHit,"PR_KYRIE",10,10; bonus bMdef,1;', '', ''), -(2137, 'Valkyrja''s_Shield_C', 'Neo Valkyrja''s Shield', 5, 0, 0, 0, 0, 0, 5, 0, 0, 4294967294, 2, 2, 32, 0, 95, 0, 0, 4, 'bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5; }', '', ''), +(2137, 'Valkyrja''s_Shield_C', 'Neo Valkyrja''s Shield', 5, 0, 0, 0, 0, 0, 5, 0, 0, 4294967294, 2, 2, 32, 0, 95, 0, 0, 4, 'bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;', '', ''), (2138, 'Bradium_Shield', 'Bradium Shield', 5, 20, 10, 1800, 0, 0, 98, 0, 1, 13631360, 2, 2, 32, 0, 65, 0, 1, 3, 'bonus2 bSkillAtk,"CR_SHIELDBOOMERANG",60; bonus bAgi,-1; bonus bMaxHP,500;', '', ''), (2139, 'Flame_Thrower', 'Flame Thrower', 5, 20000, 10000, 2000, 0, 0, 60, 0, 0, 1024, 7, 2, 32, 0, 99, 0, 0, 1, '', '', ''), (2140, 'Energy_Rune_Guard', 'Energy Rune Guard', 5, 20, 10, 0, 0, 0, 70, 0, 1, 128, 7, 2, 32, 0, 99, 0, 1, 4, 'bonus bMaxSPrate,2;', '', ''), @@ -1306,9 +1306,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (2273, 'Doctor_Cap', 'Doctor Band', 5, 20, 10, 100, 0, 0, 5, 0, 0, 4294967294, 7, 2, 256, 0, 0, 0, 1, 60, 'bonus bInt,1;', '', ''), (2274, 'Ghost_Bandana', 'Ghost Bandana', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967294, 7, 2, 256, 0, 0, 0, 1, 61, 'bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;', '', ''), (2275, 'Red_Bandana', 'Red Bandana', 5, 20, 10, 100, 0, 0, 4, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 62, '', '', ''), -(2276, 'Eagle_Eyes', 'Angled Glasses', 5, 20, 10, 100, 0, 0, 2, 0, 0, 4294967295, 7, 2, 512, 0, 0, 0, 0, 63, '', '', ''); +(2276, 'Eagle_Eyes', 'Angled Glasses', 5, 20, 10, 100, 0, 0, 2, 0, 0, 4294967295, 7, 2, 512, 0, 0, 0, 0, 63, '', '', ''), +(2277, 'Nurse_Cap', 'Nurse Cap', 5, 20, 10, 100, 0, 0, 4, 0, 0, 33040, 7, 2, 256, 0, 0, 0, 1, 64, 'bonus bInt,1;', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES -(2277, 'Nurse_Cap', 'Nurse Cap', 5, 20, 10, 100, 0, 0, 4, 0, 0, 33040, 7, 2, 256, 0, 0, 0, 1, 64, 'bonus bInt,1;', '', ''), (2278, 'Mr_Smile', 'Mr. Smile', 5, 60, 30, 100, 0, 0, 1, 0, 0, 4294967295, 7, 2, 513, 0, 0, 0, 0, 65, '', '', ''), (2279, 'Bomb_Wick', 'Bomb Wick', 5, 20, 10, 100, 0, 0, 1, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 0, 66, '', '', ''), (2280, 'Sahkkat', 'Sakkat', 5, 20, 10, 300, 0, 0, 4, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 67, 'bonus bAgi,1;', '', ''), @@ -1443,7 +1443,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (2414, 'Novice_Boots', 'Novice Slippers', 5, 1, 0, 1, 0, 0, 5, 0, 0, 1, 7, 2, 64, 0, 0, 0, 0, 0, '', '', ''), (2415, 'Slipper', 'Bunny Slipper', 5, 34000, 17000, 300, 0, 0, 3, 0, 1, 4294967294, 7, 0, 64, 0, 30, 0, 1, 0, 'bonus bLuk,3; bonus bMdef,3;', '', ''), (2416, 'Novice_Shoes', 'Novice Shoes', 5, 35000, 17500, 500, 0, 0, 8, 0, 1, 1, 7, 2, 64, 0, 40, 0, 1, 0, 'bonus bMaxHPrate,5;', '', ''), -(2417, 'Fricco_Shoes', 'Fricco''s Shoes', 5, 30000, 15000, 500, 0, 0, 12, 0, 0, 4294967294, 7, 2, 64, 0, 65, 0, 1, 0, 'bonus bAgi,2; bonus2 bAddItemHealRate,IG_Potion,20;', '', ''), +(2417, 'Fricco_Shoes', 'Fricco''s Shoes', 5, 30000, 15000, 500, 0, 0, 12, 0, 0, 4294967294, 7, 2, 64, 0, 65, 0, 1, 0, 'bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;', '', ''), (2418, 'Vidar''s_Boots', 'Vidar''s Boots', 5, 30000, 15000, 650, 0, 0, 13, 0, 0, 4294967294, 7, 2, 64, 0, 65, 0, 1, 0, 'bonus bMaxHPrate,9; bonus bMaxSPrate,9;', '', ''), (2419, 'Goibne''s_Combat_Boots', 'Goibne''s Greaves', 5, 30000, 15000, 700, 0, 0, 13, 0, 0, 4294967294, 7, 2, 64, 0, 54, 0, 1, 0, 'bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;', '', ''), (2420, 'Angel''s_Arrival', 'Angel''s Reincarnation', 5, 10000, 5000, 300, 0, 0, 8, 0, 1, 1, 7, 2, 64, 0, 25, 0, 1, 0, 'bonus bMaxHP,100;', '', ''), @@ -2100,9 +2100,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4149, 'Gargoyle_Card', 'Gargoyle Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12028,RC_Insect,100;', '', ''), (4150, 'Goat_Card', 'Goat Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; }', '', ''), (4151, 'Gajomart_Card', 'Gajomart Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;', '', ''), -(4152, 'Galapago_Card', 'Galapago Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300;', '', ''), +(4152, 'Galapago_Card', 'Galapago Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Apple_Juice,50; bonus2 bAddItemHealRate,Banana_Juice,50; bonus2 bAddItemHealRate,Carrot_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, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30;', '', ''), -(4154, 'Rice_Cake_Boy_Card', 'Dumpling Child Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;', '', ''), +(4154, 'Rice_Cake_Boy_Card', 'Dumpling Child Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Candy,50; bonus2 bAddItemHealRate,Candy_Striper,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;', '', ''), (4155, 'Goblin_Leader_Card', 'Goblin Leader Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus2 bAddRace2,1,30;', '', ''), (4156, 'Steam_Goblin_Card', 'Goblin Steamrider Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7;', '', ''), (4157, 'Goblin_Archer_Card', 'Goblin Archer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7;', '', ''), @@ -2163,7 +2163,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4212, 'Bon_Gun_Card', 'Bongun Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus3 bAutoSpell,"SM_BASH",1,20; bonus2 bAddSkillBlow,"SM_BASH",5; bonus2 bAddDefClass,1026,-100;', '', ''), (4213, 'Brilight_Card', 'Brilight Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Silence,600;', '', ''), (4214, 'Bloody_Murderer_Card', 'Bloody Murderer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7;', '', ''), -(4215, 'Blazzer_Card', 'Blazer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddMonsterDropItemGroup,IG_Food,600;', '', ''), +(4215, 'Blazzer_Card', 'Blazer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus bAddMonsterDropChainItem,ITMCHAIN_FOOD;', '', ''), (4216, 'Sasquatch_Card', 'Sasquatch Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Freeze,600;', '', ''), (4217, 'Live_Peach_Tree_Card', 'Enchanted Peach Tree Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 'bonus3 bAutoSpell,"AL_HEAL",1+9*(getskilllv("AL_HEAL")==10),20;', '', ''), (4218, 'Succubus_Card', 'Succubus Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bVit,-3; bonus bHPrecovRate,-20; bonus bMaxHP,1000;', '', ''), @@ -2175,12 +2175,12 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4224, 'Stem_Worm_Card', 'Stem Worm Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12032,RC_Brute,100;', '', ''), (4225, 'Stone_Shooter_Card', 'Stone Shooter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bBaseAtk,10; bonus bHit,10;', '', ''), (4226, 'Sting_Card', 'Sting Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 'bonus bDef,2; if(getrefine()>8) bonus bMdef,5;', '', ''), -(4227, 'Spring_Rabbit_Card', 'Spring Rabbit Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItem,517,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200;', '', ''), +(4227, 'Spring_Rabbit_Card', 'Spring Rabbit Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Meat,50; bonus2 bAddItemHealRate,528,50; bonus3 bAddMonsterDropItem,Meat,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200;', '', ''), (4228, 'Sleeper_Card', 'Sleeper Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus3 bAddMonsterDropItem,12031,RC_Fish,100;', '', ''), (4229, 'C_Tower_Manager_Card', 'Tower Keeper Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 0, 'bonus bInt,1; bonus bVariableCastrate,-5;', '', ''), (4230, 'Shinobi_Card', 'Shinobi Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus bAgi,1; bonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100;', '', ''), (4231, 'Increase_Soil_Card', 'Mi Gao Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 'bonus2 bSubRace2,5,50;', '', ''), -(4232, 'Wild_Ginseng_Card', 'Hermit Plant Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100;', '', ''), +(4232, 'Wild_Ginseng_Card', 'Hermit Plant Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Red_Herb,50; bonus2 bAddItemHealRate,Yellow_Herb,50; bonus2 bAddItemHealRate,White_Herb,50; bonus3 bAddMonsterDropItem,507,RC_Plant,300; bonus3 bAddMonsterDropItem,508,RC_Plant,200; bonus3 bAddMonsterDropItem,509,RC_Plant,100;', '', ''), (4233, 'Baby_Leopard_Card', 'Baby Leopard Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bLuk,3; if(BaseClass==Job_Merchant) bonus bUnbreakableArmor,0;', '', ''), (4234, 'Anolian_Card', 'Anolian Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION")==10),30;', '', ''), (4235, 'Cookie_XMAS_Card', 'Christmas Cookie Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 'bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10;', '', ''), @@ -2230,11 +2230,11 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4279, 'Deleter_Card', 'Earth Deleter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bSPrecovRate,-100; bonus bSPGainValue,10;', '', 'heal 0,-100;'), (4280, 'Geographer_Card', 'Geographer Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus3 bAutoSpellWhenHit,"AL_BLESSING",2+8*(getskilllv("AL_BLESSING")==10),30;', '', ''), (4281, 'Zipper_Bear_Card', 'Zipper Bear Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass==Job_Merchant) bonus bUnbreakableWeapon,0;', '', ''), -(4282, 'Tengu_Card', 'Tengu Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddMonsterDropItemGroup,IG_Recovery,600;', '', ''), +(4282, 'Tengu_Card', 'Tengu Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus bAddMonsterDropChainItem,ITMCHAIN_HEAL;', '', ''), (4283, 'Greatest_General_Card', 'Greatest General Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus3 bAutoSpell,"MO_CALLSPIRITS",5,2+18*(BaseClass==Job_Acolyte);', '', ''), -(4284, 'Chepet_Card', 'Chepet Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus4 bAutoSpell,"AL_HEAL",5,50,1;', '', ''), -(4285, 'Choco_Card', 'Choco Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'bonus bFlee2,5; bonus bFlee,10;', '', ''); +(4284, 'Chepet_Card', 'Chepet Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus4 bAutoSpell,"AL_HEAL",5,50,1;', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(4285, 'Choco_Card', 'Choco Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'bonus bFlee2,5; bonus bFlee,10;', '', ''), (4286, 'Karakasa_Card', 'Karakasa Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Confusion,300+600*(readparam(bStr)>=77);', '', ''), (4287, 'Kapha_Card', 'Kapha Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'if(getrefine()<6) bonus bMdef,8;', '', ''), (4288, 'Carat_Card', 'Carat Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 0, 'bonus bInt,2; if(getrefine()>8) bonus bMaxSP,150;', '', ''), @@ -2275,7 +2275,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4323, 'Garm_Baby_Card', 'Hatii Babe Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus3 bAutoSpell,"MG_FROSTDIVER",3,50;', '', ''), (4324, 'Garm_Card', 'Hatii Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus2 bAddEffWhenHit,Eff_Freeze,5000;', '', ''), (4325, 'Harpy_Card', 'Harpy Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",5;', '', ''), -(4326, 'See_Otter_Card', 'Sea-Otter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300;', '', ''), +(4326, 'See_Otter_Card', 'Sea-Otter Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus2 bAddItemHealRate,Sushi,50; bonus2 bAddItemHealRate,Fish_Slice,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300;', '', ''), (4327, 'Blood_Butterfly_Card', 'Bloody Butterfly Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 'bonus bVariableCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,"MG_FIREWALL",5;', '', ''), (4328, 'Hyegun_Card', 'Yao Jun Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'bonus bFlee,15; bonus bCritical,1;', '', ''), (4329, 'Phendark_Card', 'Phendark Card', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 'bonus2 bSPGainRace,RC_DemiHuman,5;', '', 'heal 0,-5;'), @@ -2508,10 +2508,10 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (4706, 'Strength7', 'STR+7', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bStr,7;', '', ''), (4707, 'Strength8', 'STR+8', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bStr,8;', '', ''), (4708, 'Strength9', 'STR+9', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bStr,9;', '', ''), -(4709, 'Strength10', 'STR+10', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bStr,10;', '', ''), -(4710, 'Inteligence1', 'INT+1', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,1;', '', ''), -(4711, 'Inteligence2', 'INT+2', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,2;', '', ''); +(4709, 'Strength10', 'STR+10', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bStr,10;', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(4710, 'Inteligence1', 'INT+1', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,1;', '', ''), +(4711, 'Inteligence2', 'INT+2', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,2;', '', ''), (4712, 'Inteligence3', 'INT+3', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,3;', '', ''), (4713, 'Inteligence4', 'INT+4', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,4;', '', ''), (4714, 'Inteligence5', 'INT+5', 6, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 'bonus bInt,5;', '', ''), @@ -3236,7 +3236,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (5569, 'Gemini_Diadem', 'Gemini Diadem', 5, 20, 10, 300, 0, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 1, 550, 'bonus bAgi,2; bonus bMatkRate,2; if(getrefine()>6) { bonus bMdef,7; bonus bMAtkRate,8; bonus2 bSubEle,Ele_Wind,5; }', '', ''), (5570, 'Gemini_Crown', 'Gemini Crown', 5, 20, 10, 300, 0, 0, 6, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 1, 551, 'bonus bAgi,2; bonus bBaseAtk,2; bonus bMdef,5; if(getrefine()>6) { bonus bDef,1; bonus bMatk,15; bonus bFlee,10; bonus2 bSubEle,Ele_Wind,5; }', '', ''), (5572, 'Savage_Baby_Hat', 'Savage Babe Hat', 5, 20, 10, 100, 0, 0, 1, 0, 1, 4294967295, 7, 2, 256, 0, 30, 0, 1, 553, 'bonus bVit,2; bonus2 bAddEff,Eff_Stun,500; bonus2 bSubRace,RC_Brute,-10;', '', ''), -(5573, 'Bogy_Horn', 'Dokebi Horn', 5, 20, 10, 100, 0, 0, 1, 0, 1, 4294967295, 7, 2, 256, 0, 75, 0, 1, 554, 'bonus2 bAddMonsterDropItemGroup,IG_Jewel,100; bonus3 bAutoSpell,"MC_MAMMONITE",5,70;', '', ''), +(5573, 'Bogy_Horn', 'Dokebi Horn', 5, 20, 10, 100, 0, 0, 1, 0, 1, 4294967295, 7, 2, 256, 0, 75, 0, 1, 554, 'bonus bAddMonsterDropChainItem,ITMCHAIN_GEM; bonus3 bAutoSpell,"MC_MAMMONITE",5,70;', '', ''), (5574, 'Pencil_In_Mouth', 'Well-Chewed Pencil', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1, 0, 10, 0, 0, 555, 'bonus bdex,2; bonus bHitRate,3;', '', ''), (5575, 'Onigiri_Hat', 'Rice Ball Hat', 5, 20, 10, 100, 0, 0, 6, 0, 1, 4294967295, 7, 2, 256, 0, 30, 0, 0, 556, '', '', ''), (5577, 'Dark_Knight_MaskB', 'Dark Knight Mask', 5, 0, 0, 3000, 0, 0, 5, 0, 0, 4294967295, 7, 2, 769, 0, 80, 0, 1, 479, 'bonus bStr,3;', '', ''), @@ -3396,7 +3396,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (5767, 'Samurai_Mask', 'Samurai Mask', 5, 20, 10, 300, 0, 0, 1, 0, 0, 4294967295, 7, 2, 1, 0, 50, 0, 0, 644, 'bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1;', '', ''), (5768, 'Sakura_Coronet', 'Sakura Coronet', 5, 20, 10, 800, 0, 0, 1, 0, 1, 4294967295, 7, 2, 256, 0, 1, 0, 1, 645, 'bonus bMdef,3; bonus bMaxSP,25;', '', ''), (5769, 'Gold_Angel_Sculpture', 'Gold Angel Sculpture', 5, 100, 50, 0, 0, 0, 2, 0, 0, 4294967295, 7, 2, 256, 0, 70, 0, 0, 646, 'skill "RG_GRAFFITI",1;', '', ''), -(5770, 'Splash_Hat', 'Splash Hat', 5, 20, 10, 100, 0, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 0, 1, 349, 'autobonus "{ sc_start SC_WINDWEAPON,180000,1; }",3,180000,BF_WEAPON,"{ specialeffect2 EF_ENHANCE; }";', '', ''), +(5770, 'Splash_Hat', 'Splash Hat', 5, 20, 10, 100, 0, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 0, 1, 349, 'autobonus "{ sc_start SC_PROPERTYWIND,180000,1; }",3,180000,BF_WEAPON,"{ specialeffect2 EF_ENHANCE; }";', '', ''), (5771, 'Family_Hat', 'Family Hat', 5, 20, 10, 100, 0, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 1, 0, 1, 109, 'bonus bDex,1; bonus bMdef,1; bonus bMaxHPrate,2; bonus bMaxSPrate,2; skill "PR_MAGNIFICAT",1;', '', ''), (5775, 'Choco_Donut_In_Mouth', 'Choco Donut In Mouth', 5, 20, 10, 50, 0, 0, 1, 0, 0, 4294967295, 7, 2, 1, 0, 1, 0, 0, 653, 'bonus bMaxHP,50;', '', ''), (5776, 'Blazing_Sun', 'Blazing Sun', 5, 0, 0, 500, 0, 0, 0, 0, 0, 4294967295, 7, 2, 256, 0, 1, 0, 1, 654, 'bonus2 bVariableCastrate,"MG_FIREBOLT",-5; bonus2 bSkillAtk,"MG_FIREBOLT",5; bonus2 bVariableCastrate,"MG_FIREBALL",-5; bonus2 bSkillAtk,"MG_FIREBALL",5; bonus2 bSkillAtk,"MG_FIREWALL",3; bonus2 bSkillAtk,"WZ_METEOR",3; bonus bUseSPrate,5;', '', ''), @@ -5221,23 +5221,23 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12020, 'Water_Of_Darkness', 'Cursed Water', 2, 2, 1, 30, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",8;', '', ''), (12021, 'Pork_Belly', 'Pork', 0, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemheal rand(70,99),0;', '', ''), (12022, 'Spareribs', 'Galbi', 0, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemheal rand(70,99),0;', '', ''), -(12023, 'Giftbox_China', 'Wrapped Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GiftBoxChina),1;', '', ''); +(12023, 'Giftbox_China', 'Wrapped Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12023,1;', '', ''); INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (12024, 'Red_Pouch_Of_Surprise', 'Red Pouch', 2, 50, 25, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-4,1,"";', '', ''), -(12025, 'Egg_Boy', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_EggBoy),1;', '', ''), -(12026, 'Egg_Girl', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_EggGirl),1;', '', ''), +(12025, 'Egg_Boy', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12025,1;', '', ''), +(12026, 'Egg_Girl', 'Dano Festival Egg', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12026,1;', '', ''), (12027, 'Giggling_Box', 'Giggling Box', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0;', '', ''), (12028, 'Box_Of_Thunder', 'Box of Thunder', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_MOVHASTE_HORSE,20000,0;', '', ''), (12029, 'Gloomy_Box', 'Box of Gloom', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "AC_CONCENTRATION",1;', '', ''), (12030, 'Box_Of_Grudge', 'Box of Resentment', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_PLUSATTACKPOWER,60000,20;', '', ''), (12031, 'Sleepy_Box', 'Box of Drowsiness', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_PLUSMAGICPOWER,60000,20;', '', ''), (12032, 'Box_Of_Storm', 'Box of Storms', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",2;', '', ''), -(12033, 'Box_Of_Sunlight', 'Box of Sunlight', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_Intravision,30000,0;', '', ''), +(12033, 'Box_Of_Sunlight', 'Box of Sunlight', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_CLAIRVOYANCE,30000,0;', '', ''), (12034, 'Painting_Box', 'Box of Panting', 2, 1000, 500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0;', '', ''), (12035, 'Lotto_Box01', 'Lotto Box 01', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem rand(7361,7370),1;', '', ''), (12036, 'Lotto_Box02', 'Lotto Box 02', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem rand(7371,7380),1;', '', ''), (12037, 'Lotto_Box03', 'Lotto Box 03', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem rand(7381,7390),1;', '', ''), -(12038, 'Lotto_Box04', 'Lotto Box 04', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_LottoBox),1;', '', ''), +(12038, 'Lotto_Box04', 'Lotto Box 04', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12038,1;', '', ''), (12039, 'Lotto_Box05', 'Lotto Box 05', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem rand(7542,7546),1;', '', ''), (12040, 'Stone_Of_Intelligence_', 'Stone of Sage', 2, 100000, 50000, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'homevolution;', '', ''), (12041, 'Str_Dish01', 'Fried Grasshopper Legs', 0, 2000, 1000, 60, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;', '', ''), @@ -5303,14 +5303,14 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12101, 'Citron', 'Citron', 0, 20, 10, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12102, 'Meat_Skewer', 'Grilled Skewer', 0, 20, 10, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12103, 'Bloody_Dead_Branch', 'Bloody Branch', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-3,1,"";', '', ''), -(12104, 'Random_Quiver', 'Random Quiver', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Quiver),1;', '', ''), -(12105, 'Set_Of_Taiming_Item', 'Taming Gift Set', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1; getrandgroupitem(IG_Taming),1;', '', ''), -(12106, 'Accessory_Box', 'Jewelry Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Accesory),1;', '', ''), -(12107, 'Wrapped_Mask', 'Wrapped Mask', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Mask),1;', '', ''), -(12108, 'Bundle_Of_Magic_Scroll', 'Scroll Package', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1; getrandgroupitem(IG_Scroll),1;', '', ''), +(12104, 'Random_Quiver', 'Random Quiver', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12104,1;', '', ''), +(12105, 'Set_Of_Taiming_Item', 'Taming Gift Set', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12105,1; getrandgroupitem 12105,1; getrandgroupitem 12105,1;', '', ''), +(12106, 'Accessory_Box', 'Jewelry Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12106,1;', '', ''), +(12107, 'Wrapped_Mask', 'Wrapped Mask', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12107,1;', '', ''), +(12108, 'Bundle_Of_Magic_Scroll', 'Scroll Package', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1; getrandgroupitem 12108,1;', '', ''), (12109, 'Poring_Box', 'Poring Box', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'monster "this",-1,-1,"--ja--",-2,1,"";', '', ''), -(12110, 'First_Aid_Kit', 'First Aid Kit', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1; getrandgroupitem(IG_FirstAid),1;', '', ''), -(12111, 'Food_Package', 'Bundle of Food', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1; getrandgroupitem(IG_FoodBag),1;', '', ''), +(12110, 'First_Aid_Kit', 'First Aid Kit', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1; getrandgroupitem 12110,1;', '', ''), +(12111, 'Food_Package', 'Bundle of Food', 2, 10000, 5000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1;', '', ''), (12112, 'Tropical_Sograt', 'Tropical Sograt', 2, 1000, 500, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_Curse,10000,1;', '', ''), (12113, 'Vermilion_The_Beach', 'Vermilion on the Beach', 2, 1000, 500, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_Stun,10000,1;', '', ''), (12114, 'Elemental_Fire', 'Elemental Converter', 2, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "ITEM_ENCHANTARMS",4;', '', ''), @@ -5329,7 +5329,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12127, 'High_end_Cooking_Kits', 'Professional Cooking Kit', 2, 2000, 1000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'cooking 13;', '', ''), (12128, 'Imperial_Cooking_Kits', 'Royal Cooking Kit', 2, 5000, 2500, 70, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'cooking 14;', '', ''), (12129, 'Fantastic_Cooking_Kits', 'Fantastic Cooking Kit', 2, 10000, 5000, 70, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'cooking 15;', '', ''), -(12130, 'Cookie_Bag', 'Cookie Bag', 2, 2, 1, 70, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1; getrandgroupitem(IG_CookieBag),1;', '', ''), +(12130, 'Cookie_Bag', 'Cookie Bag', 2, 2, 1, 70, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12130,1; getrandgroupitem 12130,1; getrandgroupitem 12130,1;', '', ''), (12131, 'Lucky_Potion', 'Lucky Potion', 0, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12132, 'Red_Bag', 'Santa''s Bag', 2, 0, 0, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_Xmas,600000,0;', '', ''), (12133, 'Ice_Cream_', 'McDonald''s Ice Cone', 0, 0, 0, 80, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; }', '', ''), @@ -5385,15 +5385,15 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12183, 'Holy_Arrow_Quiver', 'Holy Arrow Quiver', 2, 2, 1, 250, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 1772,500;', '', ''), (12184, 'Mercenary_Red_Potion', 'Mercenary Red Potion', 2, 500, 250, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_heal 1000,0;', '', ''), (12185, 'Mercenary_Blue_Potion', 'Mercenary Blue Potion', 2, 1000, 500, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_heal 0,100;', '', ''), -(12186, 'Red_Box', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_RedBox),1;', '', ''), -(12187, 'Green_Box', 'Old Green Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_GreenBox),1;', '', ''), +(12186, 'Red_Box', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12186,1;', '', ''), +(12187, 'Green_Box', 'Old Green Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12187,1;', '', ''), (12188, 'Magical_Moon_Cake', 'Grace Moon Cake', 0, 20, 10, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 50,50;', '', ''), -(12189, 'Red_Box_', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_RedBox_2),1;', '', ''), +(12189, 'Red_Box_', 'Old Red Box', 2, 50000, 25000, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12189,1;', '', ''), (12190, 'Moon_Cake', 'Moon Cake', 2, 2, 1, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12191, 'Special_Moon_Cake', 'Special Moon Cake', 2, 2, 1, 500, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12192, 'Pumpkin_Pie', 'Pumpkin Pie', 0, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 5,5;', '', ''), (12193, 'Brezel', 'Pretzel', 2, 20, 10, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12194, 'Hometown_Gift', 'Hometown Gift', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1; getrandgroupitem(IG_HometownGift),1;', '', ''), +(12194, 'Hometown_Gift', 'Hometown Gift', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12194,1; getrandgroupitem 12194,1; getrandgroupitem 12194,1;', '', ''), (12195, 'Plain_Rice_Cake', 'Plain Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 0,20;', '', ''), (12196, 'Hearty_Rice_Cake', 'Hearty Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 50,0;', '', ''), (12197, 'Salty_Rice_Cake', 'Salty Rice Cake', 0, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 10,10;', '', ''), @@ -5436,15 +5436,15 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12237, 'Choco_Lump', 'Junky Chocolate', 2, 0, 0, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_BLOODING,18000,0;', '', ''), (12238, 'New_Year_Rice_Cake_1', 'New Year Rice Cake', 2, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;', '', ''), (12239, 'New_Year_Rice_Cake_2', 'New Year Rice Cake', 2, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;', '', ''), -(12240, 'Old_Yellow_Box', 'Old Yellow Box', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_YellowBox),1;', '', ''), +(12240, 'Old_Yellow_Box', 'Old Yellow Box', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12240,1;', '', ''), (12241, 'M_Center_Potion', 'Mercenary Concentration Potion', 2, 800, 400, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION1,1800000,0;', '', ''), (12242, 'M_Awakening_Potion', 'Mercenary Awakening Potion', 2, 1500, 750, 150, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION2,1800000,0;', '', ''), (12243, 'M_Berserk_Potion', 'Mercenary Berserk Potion', 2, 3000, 1500, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_sc_start SC_ATTHASTE_POTION3,1800000,0;', '', ''), -(12244, 'Old_Gift_Box', 'Old Gift Box', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_OldGiftBox),1;', '', ''), +(12244, 'Old_Gift_Box', 'Old Gift Box', 2, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12244,1;', '', ''), (12245, 'Green_Ale_US', 'Green Ale', 0, 5000, 2500, 500, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 100,0;', '', ''), -(12246, 'Magic_Card_Album', 'Mystical Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_MagicCardAlbum),1;', '', ''), +(12246, 'Magic_Card_Album', 'Mystical Card Album', 2, 10000, 5000, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12246,1;', '', ''), (12247, 'Halohalo', 'Halo-Halo', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 20, 0, 0, 0, 'sc_start SC_INCALLSTATUS,600000,3;', '', ''), -(12248, 'Masquerade_Ball_Box', 'Fancy Ball Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Masquerade),1;', '', ''), +(12248, 'Masquerade_Ball_Box', 'Fancy Ball Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12248,1;', '', ''), (12249, 'Payroll_Of_Kafra_', 'Payment Statement for Kafra Employee', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12250, 'Str_Dish10_M', 'Steamed Tongue', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_STR,3600000,10; percentheal 20,20;', '', ''), (12251, 'Agi_Dish10_M', 'Steamed Desert Scorpions', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_AGI,3600000,10; percentheal 15,5;', '', ''), @@ -5477,12 +5477,12 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12278, 'Alice_Scroll', 'Alice Scroll', 2, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_create 2060,1800000;', '', ''), (12279, 'Undead_Element_Scroll', 'Undead Elemental Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20;', '', ''), (12280, 'Holy_Element_Scroll', 'Holy Elemental Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_BENEDICTIO; sc_start SC_BENEDICTIO,300000,1;', '', ''), -(12281, 'Tresure_Box_WoE', 'Event Treasure Box', 2, 20, 10, 150, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Tresure_Box_WoE),1;', '', ''), +(12281, 'Tresure_Box_WoE', 'Event Treasure Box', 2, 20, 10, 150, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (12282, 'Internet_Cafe1', 'Internet Cafe1', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCALLSTATUS,5400000,3; sc_start SC_PLUSATTACKPOWER,5400000,15; sc_start SC_PLUSMAGICPOWER,5400000,15;', '', ''), (12283, 'Internet_Cafe2', 'Internet Cafe2', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCSTR,5400000,8; sc_start SC_INCDEX,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,32; sc_start SC_INCFLEE,5400000,5;', '', ''), (12284, 'Internet_Cafe3', 'Internet Cafe3', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_PLUSMAGICPOWER,5400000,40;', '', ''), (12285, 'Internet_Cafe4', 'Internet Cafe4', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_PLUSATTACKPOWER,5400000,24; sc_start SC_PLUSMAGICPOWER,5400000,24;', '', ''), -(12286, 'Masquerade_Ball_Box2', 'Masquerade Ball Box2', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Masquerade_2),1;', '', ''), +(12286, 'Masquerade_Ball_Box2', 'Masquerade Ball Box2', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12286,1;', '', ''), (12287, 'Love_Angel', 'Love Angel Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'setfont 1;', '', ''), (12288, 'Squirrel', 'Squirrel Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'setfont 2;', '', ''), (12289, 'Gogo', 'Gogo Magic Powder', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'setfont 3;', '', ''), @@ -5494,7 +5494,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12295, 'PC_Bang_Coin_Box2', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2739,1;', '', ''), (12296, 'PC_Bang_Coin_Box3', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2738,1;', '', ''), (12297, 'PC_Bang_Coin_Box4', 'PC-Room Coin Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2738,2;', '', ''), -(12298, 'SP_Potion', 'SP Consumption Reduction Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_SPCOST_RATE,3600000,15;', '', ''), +(12298, 'SP_Potion', 'SP Consumption Reduction Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_ATKER_BLOOD,3600000,15;', '', ''), (12299, 'Mega_Resist_Potion', 'Mega Resist Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_COMMONSC_RESIST,3600000,10;', '', ''), (12300, 'Wild_Rose_Scroll', 'Wild Rose Contract', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_create 1965,1800000;', '', ''), (12301, 'Doppelganger_Scroll', 'Doppelganger Contract', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_create 1966,1800000;', '', ''), @@ -5521,22 +5521,22 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12322, 'Chocolate_Pie', 'Chocolate Pie', 0, 0, 0, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 5,5;', '', ''), (12323, 'N_Fly_Wing', 'Novice Fly Wing', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",1;', '', ''), (12324, 'N_Butterfly_Wing', 'Novice Butterfly Wing', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "AL_TELEPORT",3;', '', ''), -(12325, 'N_Magnifier', 'Novice Magnifier', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "MC_IDENTIFY",1;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(12325, 'N_Magnifier', 'Novice Magnifier', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "MC_IDENTIFY",1;', '', ''), (12326, 'J_Firecracker', 'Large Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12327, 'Charm_Of_Luck', 'Charm Of Luck', 2, 1000, 500, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(12327, 'Charm_Of_Luck', 'Charm Of Luck', 2, 1000, 500, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (12328, 'Charm_Of_Happiness', 'Charm Of Happiness', 2, 1800, 900, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCLUK,3600000,20;', '', ''), (12329, 'Recall_MaleGM', 'Summon Male GameMaster Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_create 2000,1800000;', '', ''), (12330, 'Recall_FemaleGM', 'Summon Female GameMaster Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'mercenary_create 2001,1800000;', '', ''), (12331, 'Ginseng', 'Ginseng', 0, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 6,0;', '', ''), (12332, 'Fruit_Juice', 'Fruit Juice', 0, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 0,6;', '', ''), (12333, 'Ansila', 'Ancilla', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 0,15;', '', ''), -(12334, 'Cherish_Box', 'Treasure Edition Helm Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Cherish_Box),1;', '', ''), +(12334, 'Cherish_Box', 'Treasure Edition Helm Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12334,1;', '', ''), (12335, 'Yummy_Skewered_Dish', 'Grilled Delicious Skewer', 0, 1000, 500, 350, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 60,60;', '', ''), (12336, 'Baked_Mushroom', 'Grilled Mushroom', 0, 500, 250, 300, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 30,30;', '', ''), (12337, 'Grilled_Sausage', 'Grilled Sausages', 0, 300, 150, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 20,20;', '', ''), (12338, 'Grilled_Corn', 'Grilled Corn', 2, 100, 50, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_INCSTR,180000,2; sc_start SC_INCINT,180000,2; sc_start SC_INCAGI,180000,2;', '', ''), -(12339, 'Cherish_Box_Ori', 'Treasure Edition Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Cherish_Box_Ori),1;', '', ''), +(12339, 'Cherish_Box_Ori', 'Treasure Edition Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12339,1;', '', ''), (12340, 'Mysterious_Rice_Powder', 'Chewy Rice Powder', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1815;', '', ''), (12341, 'Special_Alloy_Trap_Box', 'Special Alloy Trap Box', 2, 30000, 15000, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 7940,100;', '', ''), (12342, 'Manuk''s_Opportunity', 'Manuk''s Opportunity', 2, 0, 0, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_POTION_BERSERK; sc_start SC_MANU_ATK,600000,10;', '', ''), @@ -5550,10 +5550,10 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12350, 'Angeling_Potion', 'Angeling Potion', 2, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,120000,5; itemskill "AL_ANGELUS",5;', '', ''), (12351, 'Shout_Megaphone', 'Scream Megaphone', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "MC_LOUD",1;', '', ''), (12352, 'Dun_Tele_Scroll3', 'Dungeon Teleport Scroll 3', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12353, 'Tiny_Waterbottle', 'Small Bottle', 2, 800, 400, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_WATERWEAPON,90000,1;', '', ''), +(12353, 'Tiny_Waterbottle', 'Small Bottle', 2, 800, 400, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_PROPERTYWATER,90000,1;', '', ''), (12354, 'Buche_De_Noel', 'Buche De Noel', 2, 2, 1, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7;', '', ''), -(12355, 'Xmas_Gift', 'Xmas Gift', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Xmas_Gift),1;', '', ''), -(12356, 'Louise_Costume_Box', 'Louise Costume Box', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Louise_Costume_Box),1;', '', ''), +(12355, 'Xmas_Gift', 'Xmas Gift', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12355,1;', '', ''), +(12356, 'Louise_Costume_Box', 'Louise Costume Box', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12356,1;', '', ''), (12357, 'Shiny_Wing_Gown', 'Shiny Wing Gown', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1630;', '', ''), (12358, 'Fan_Of_Wind', 'Fan Of Wind', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1513;', '', ''), (12359, 'Very_Soft_Plant', 'Very Soft Plant', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 1586;', '', ''), @@ -5669,7 +5669,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12471, 'F_Adrenaline_Scroll', 'F Adrenaline Scroll', 2, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12472, 'F_Convex_Mirror', 'F Convex Mirror', 2, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12473, 'RWC_Parti_Box', 'RWC Parti Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12474, 'RWC_Final_Comp_Box', 'RWC Final Comp Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(12474, 'RWC_Final_Comp_Box', 'RWC Final Comp Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem(12474);', '', ''), (12475, 'Cure_Free', 'Cure Free', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_end SC_SILENCE; sc_end SC_BLOODING; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_ORCISH; sc_end SC_CHANGEUNDEAD; itemheal 500,0;', '', ''), (12476, 'PCBang_Coupon_Box3', 'PCBang Coupon Box3', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12477, 'Gift_Bundle', 'Gift Bundle', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -5737,7 +5737,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12539, 'Splendid_Box', 'Splendid Box', 2, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12540, 'GM_Warp_Box', 'GM Warp Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12541, 'Fortune_Cookie1', 'Fortune Cookie1', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12542, 'Fortune_Cookie2', 'Fortune Cookie2', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(12542, 'Fortune_Cookie2', 'Fortune Cookie2', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (12543, 'Fortune_Cookie3', 'Fortune Cookie3', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12544, 'Mystic_Tree_Branch', 'Mystic Tree Branch', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12545, 'Lucky_Egg_C5', 'Lucky Egg C5', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -5768,7 +5768,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12570, 'Cheer_Scarf8_Box', 'Cheer Scarf8 Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12571, 'Cheer_Scarf10_Box', 'Cheer Scarf10 Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12572, 'Cheer_Scarf10_Box2', 'Cheer Scarf10 Box2', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12573, 'Fruit_Basket', 'Fruit Basket', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Fruit_Basket),1; getrandgroupitem(IG_Fruit_Basket),1; getrandgroupitem(IG_Fruit_Basket),1;', '', ''), +(12573, 'Fruit_Basket', 'Fruit Basket', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12573,1; getrandgroupitem 12573,1; getrandgroupitem 12573,1;', '', ''), (12574, 'Mora_Berry', 'Mora Berry', 2, 0, 0, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemheal 0,rand(50,65);', '', ''), (12575, 'Arrow_Of_Elf_Cntr', 'Arrow Of Elf Cntr', 2, 500, 250, 250, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 1773,500;', '', ''), (12576, 'Hunting_Arrow_Cntr', 'Hunting Arrow Cntr', 2, 500, 250, 250, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 1774,500;', '', ''), @@ -5780,26 +5780,41 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12591, 'Vending_Search_Scroll3', 'Universal Catalog Bronze', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'searchstores 10,1;', '', ''), (12601, 'Fresh_Watermelon_Juice', 'Fresh Watermelon Juice', 0, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 5,5;', '', ''), (12612, 'Old_Coin_Bag', 'Old Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12613, 'Improved_Coin_Bag', 'Improved Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1; getrandgroupitem(IG_Improved_Coin_Bag),1;', '', ''), -(12614, 'Intermediate_Coin_Bag', 'Intermediate Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1; getrandgroupitem(IG_Intermediate_Coin_Bag),1;', '', ''), -(12615, 'Minor_Coin_Bag', 'Minor Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1; getrandgroupitem(IG_Minor_Coin_Bag),1;', '', ''), -(12616, 'S_Grade_Coin_Bag', 'S Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_S_Grade_Coin_Bag),1; getrandgroupitem(IG_S_Grade_Coin_Bag),1; getrandgroupitem(IG_S_Grade_Coin_Bag),1;', '', ''), -(12617, 'A_Grade_Coin_Bag', 'A Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_A_Grade_Coin_Bag),1; getrandgroupitem(IG_A_Grade_Coin_Bag),1; getrandgroupitem(IG_A_Grade_Coin_Bag),1;', '', ''), +(12613, 'Improved_Coin_Bag', 'Improved Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12613,1; getrandgroupitem 12613,1; getrandgroupitem 12613,1; getrandgroupitem 12613,1;', '', ''), +(12614, 'Intermediate_Coin_Bag', 'Intermediate Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12614,1; getrandgroupitem 12614,1; getrandgroupitem 12614,1; getrandgroupitem 12614,1;', '', ''), +(12615, 'Minor_Coin_Bag', 'Minor Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12615,1; getrandgroupitem 12615, 1; getrandgroupitem 12615,1; getrandgroupitem 12615,1;', '', ''), +(12616, 'S_Grade_Coin_Bag', 'S Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12616,1; getrandgroupitem 12616,1; getrandgroupitem 12616,1;', '', ''), +(12617, 'A_Grade_Coin_Bag', 'A Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12617,1; getrandgroupitem 12617,1; getrandgroupitem 12617,1;', '', ''), (12618, 'B_Grade_Coin_Bag', 'B Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12619, 'C_Grade_Coin_Bag', 'C Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12620, 'D_Grade_Coin_Bag', 'D Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12621, 'E_Grade_Coin_Bag', 'E Grade Coin Bag', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12622, 'Reins_Of_Mount', 'Reins Of Mount', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'setmounting();', '', ''), -(12623, 'Advanced_Weapons_Box', 'Advanced Weapons Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Advanced_Weapons_Box),1;', '', ''), +(12623, 'Advanced_Weapons_Box', 'Advanced Weapons Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12623,1;', '', ''), (12624, 'Delicious_Jelly', 'Delicious Jelly', 0, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'percentheal 3,3;', '', ''), (12636, 'Malangdo_Canned_Specialties', 'Malangdo Canned Specialties', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'warp "malangdo",140,114;', '', ''), (12642, 'Terra_Mars_100_Box', 'Terra_Mars_100_Box', 0, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 504,100;', '', ''), (12646, 'Fried_Octopus_Legs', 'Fried Octopus Legs', 2, 20, 10, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), (12647, 'Sea_Ink', 'Sea Ink', 2, 20, 10, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', ''), +(12658, 'Transformation_Scroll(Deviruchi)', 'Transformation Scroll(Deviruchi)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1109,0,0,0;', '', ''), +(12659, 'Transformation_Scroll(Raydric)', 'Transformation Scroll(Raydric)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1276,0,0,0;', '', ''), +(12660, 'Transformation_Scroll(Mavka)', 'Transformation Scroll(Mavka)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1884,0,0,0;', '', ''), +(12661, 'Transformation_Scroll(Marduk)', 'Transformation Scroll(Marduk)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1140,0,0,0;', '', ''), +(12662, 'Transformation_Scroll(Banshee)', 'Transformation Scroll(Banshee)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1867,0,0,0;', '', ''), +(12663, 'Transformation_Scroll(Poring)', 'Transformation Scroll(Poring)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0;', '', ''), +(12664, 'Transformation_Scroll(Golem)', 'Transformation Scroll(Golem)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0;', '', ''), +(12690, 'Old_C_Album_Helm', 'Old Card Album Helm', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12691, 'Old_C_Album_Armor', 'Old Card Album Armor', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12692, 'Old_C_Album_Shield', 'Old Card Album Shield', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12693, 'Old_C_Album_Garment', 'Old Card Album Garment', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12694, 'Old_C_Album_Shoes', 'Old Card Album Shoes', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12695, 'Old_C_Album_Acc', 'Old Card Album Acc', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12698, 'Old_C_Album_Weapon', 'Old Card Album Weapon', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 1, 0, 0, 0, '', '', ''), +(12818, 'High_Weapon_Box', 'High Weapon Box', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 100, 0, 0, 0, '', '', ''), (12699, 'Tikbalang_Belt', 'Tikbalang Belt', 2, 20, 10, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'pet 2313;', '', ''), (12700, 'Upside_Down_Shirt', 'Upside Down Shirt', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'warp "malaya",242,211;', '', ''), (12701, 'Old_Blue_Box_F', 'Old Blue Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12702, 'Old_Bleu_Box', 'Old Navy Box', 2, 0, 0, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_BleuBox),1; getrandgroupitem(IG_BleuBox),1;', '', ''), +(12702, 'Old_Bleu_Box', 'Old Navy Box', 2, 0, 0, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12702,1; getrandgroupitem 12702,1;', '', ''), (12703, 'Holy_Egg_2', 'Holy Egg', 2, 0, 0, 50, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12704, 'Elixir_Of_Life', 'Elixir of Life', 0, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 85, 0, 0, 0, 'percentheal 100,0;', '', ''), (12705, 'Noble_Nameplate', 'Noble Nameplate', 2, 0, 0, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 90, 0, 0, 0, 'sc_start SC_CASH_PLUSEXP,1800000,100;', '', ''), @@ -5811,7 +5826,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12711, 'Pretzel', 'Pretzel', 0, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemheal rand(50,90),0;', '', ''), (12712, 'Green_Beer', 'Green Beer', 2, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12713, 'Monster_Extract', 'Monster Extract', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12714, 'Easter_Scroll', 'Easter Scroll', 2, 1, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Easter_Scroll),1;', '', ''), +(12714, 'Easter_Scroll', 'Easter Scroll', 2, 1, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 12714,1;', '', ''), (12715, 'Black_Treasure_Box', 'Black Treasure Box', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12716, 'Indian_Rice_Cake', 'Indian Rice Cake', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12717, 'Poison_Paralysis', 'Paralyze', 0, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(rand(10000)<10) sc_start SC_PARALYSE,300000,0;', '', ''), @@ -5861,7 +5876,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12761, 'Bubble_Gum_Yellow', 'Bubble Gum Yellow', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12762, 'Bubble_Gum_Orange', 'Bubble Gum Orange', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12763, 'Bubble_Gum_Red', 'Bubble Gum Red', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(12764, 'Fools_Day_Box_Tw', 'Fools Day Box Tw', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(12764, 'Fools_Day_Box_Tw', 'Fools Day Box Tw', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (12765, 'Summer_Knight_Box', 'Summer Knight Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12766, 'Reward_Job_BM25', 'Reward Job BM25', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12767, 'Passion_FB_Hat_Box', 'Passion FB Hat Box', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -5874,8 +5890,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (12775, 'Ancient_Spirit_Amulet', 'Ancient Spirit Amulet', 2, 20, 10, 600, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (12786, 'Change_Slot_Card', 'Character Position Change Coupon', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'set SlotChange, SlotChange + 1;', '', ''), (12790, 'Char_Rename_Card', 'Character Name Change Coupon', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'set CharRename, CharRename + 1;', '', ''), -(12848, 'Falcon_Flute', 'Falcon Flute', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(getskilllv("HT_FALCON")) { if(checkoption(Option_Wug)||checkoption(Option_Wugrider)) end; if(checkfalcon()==1) { setfalcon 0; } else { setfalcon 1; } }', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(12848, 'Falcon_Flute', 'Falcon Flute', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'if(getskilllv("HT_FALCON")) { if(checkoption(Option_Wug)||checkoption(Option_Wugrider)) end; if(checkfalcon()==1) { setfalcon 0; } else { setfalcon 1; } }', '', ''), (12900, 'Battle_Manual_Box', 'Battle Manual Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12208,10;', '', ''), (12901, 'Insurance_Package', 'Insurance Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12209,10;', '', ''), (12902, 'Bubble_Gum_Box', 'Bubble Gum Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12210,10;', '', ''), @@ -6159,15 +6174,15 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13301, 'Huuma_Giant_Wheel', 'Huuma Giant Wheel Shuriken', 4, 40000, 20000, 2500, 50, 0, 0, 1, 3, 33554432, 7, 2, 34, 4, 42, 0, 1, 22, 'bonus bUnbreakableWeapon,0; bonus2 bAddEff,Eff_Bleeding,100;', '', ''), (13302, 'Huuma_Giant_Wheel_', 'Huuma Giant Wheel Shuriken', 4, 40000, 20000, 2500, 50, 0, 0, 1, 4, 33554432, 7, 2, 34, 4, 42, 0, 1, 22, 'bonus bUnbreakableWeapon,0; bonus2 bAddEff,Eff_Bleeding,100;', '', ''), (13303, 'Huuma_Blaze', 'Huuma Blaze Shuriken', 4, 78000, 39000, 1500, 185, 0, 0, 1, 0, 33554432, 7, 2, 34, 4, 55, 0, 1, 22, 'bonus bUnbreakableWeapon,0; bonus bAtkEle,Ele_Fire; bonus bDex,-2; bonus3 bAutoSpell,"MG_FIREBALL",5,30;', '', ''), -(13304, 'Huuma_Calm_Mind', 'Huuma Calm Mind', 4, 20, 10, 1550, 112, 0, 0, 1, 2, 33554432, 7, 2, 34, 3, 70, 0, 1, 22, 'bonus bUnbreakableWeapon,0; bonus2 bSkillAtk,"NJ_HUUMA",30; bonus bNoCastCancel,0;', '', ''), +(13304, 'Huuma_Calm_Mind', 'Huuma Calm Mind', 4, 20, 10, 1550, 112, 0, 0, 1, 2, 33554432, 7, 2, 34, 3, 70, 0, 1, 22, 'bonus bUnbreakableWeapon,0; bonus2 bSkillAtk,"NJ_HUUMA",30; bonus bNoCastCancel,0;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (13305, 'BF_Huuma_Shuriken1', 'Brave Huuma Front Shuriken', 4, 20, 10, 0, 55, 0, 0, 1, 0, 33554432, 7, 2, 34, 3, 80, 0, 1, 22, 'bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0;', '', ''), (13306, 'BF_Huuma_Shuriken2', 'Valorous Huuma Front Shuriken', 4, 20, 10, 0, 55, 0, 0, 1, 0, 33554432, 7, 2, 34, 3, 80, 0, 1, 22, 'bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; autobonus "{ bonus2 bSkillAtk,\\"NJ_HUUMA\\",100; bonus2 bSkillAtk,\\"NJ_ISSEN\\",100; }",50,10000,BF_WEAPON,"{specialeffect2 EF_POTION_BERSERK; }"; bonus bUnbreakableWeapon,0;', '', ''), (13307, 'Krieger_Huuma_Shuriken1', 'Glorious Shuriken', 4, 20, 10, 0, 55, 90, 0, 1, 0, 33554432, 7, 2, 34, 4, 80, 0, 1, 22, 'bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bMatkRate,15; autobonus "{ bonus2 bSkillAtk,\\"NJ_HUUMA\\",100; bonus2 bSkillAtk,\\"NJ_ISSEN\\",100; }",50,10000; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,pow(((getrefine()>14)?14:getrefine())-3,2); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) { bonus5 bAutoSpellOnSkill,"NJ_ISSEN","AL_HEAL",10,1000,1; bonus4 bAutoSpellOnSkill,"NJ_HUUMA","NPC_CRITICALWOUND",2,200; }', '', ''), (13308, 'Huuma_Blaze_I', 'Huuma Blaze Shuriken', 4, 0, 0, 0, 230, 0, 0, 1, 0, 33554432, 7, 2, 34, 4, 0, 0, 0, 22, 'bonus bUnbreakableWeapon,0; bonus bAtkEle,Ele_Fire; bonus bDex,2;', '', ''), (13309, 'Huuma_Giant_Wheel_C', 'Huuma Giant Wheel Shuriken', 4, 0, 0, 0, 99, 0, 0, 1, 0, 33554432, 7, 2, 34, 4, 1, 0, 0, 22, '', '', ''), (13310, 'P_Huuma_Suriken1', 'P.Huuma Suriken I', 4, 0, 0, 0, 170, 0, 0, 1, 0, 33554432, 7, 2, 34, 3, 60, 0, 0, 22, 'bonus bMatk,50;', '', ''), -(13311, 'Sword_Huuma_Shuriken', 'Sword Huuma Shuriken', 4, 5000, 2500, 1500, 170, 0, 0, 1, 0, 33554432, 8, 2, 34, 3, 99, 0, 1, 22, 'bonus bStr,3;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(13311, 'Sword_Huuma_Shuriken', 'Sword Huuma Shuriken', 4, 5000, 2500, 1500, 170, 0, 0, 1, 0, 33554432, 8, 2, 34, 3, 99, 0, 1, 22, 'bonus bStr,3;', '', ''), (13312, 'Prototype_Huuma_Shuriken', 'Prototype Huuma Shuriken', 4, 0, 0, 3000, 0, 0, 0, 1, 0, 33554432, 8, 2, 34, 4, 99, 0, 1, 22, '', '', ''), (13313, 'Flower_Huuma_Shuriken', 'Flower Huuma Shuriken', 4, 100000, 50000, 1500, 150, 0, 0, 1, 2, 33554432, 8, 2, 34, 3, 110, 0, 1, 22, 'bonus bMatk,50; bonus bAtkEle,Ele_Fire;', '', ''), (13314, 'Wave_Huuma_Shuriken', 'Wave Huuma Shuriken', 4, 100000, 50000, 1500, 200, 0, 0, 1, 0, 33554432, 8, 2, 34, 4, 110, 0, 1, 22, 'bonus bMatk,50; bonus bAtkEle,Ele_Water;', '', ''), @@ -6468,7 +6483,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13761, 'Empty_Bottle_Box', 'Empty Bottle Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 713,500;', '', ''), (13762, 'In_Royal_Jelly_Box', 'Royal Jelly Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 526,70;', '', ''), (13763, '5_Anniversary_Coin_Box', 'Coin Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2709,1;', '', ''), -(13764, 'Battle_Manual_Box_TW', 'Beginner''s Field Manual 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 7803,5;', '', ''), +(13764, 'Battle_Manual_Box_TW', 'Beginner''s Field Manual 5 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 7803,5;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (13765, 'Certificate_TW_Box', 'Certificate Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 7804,1;', '', ''), (13766, 'Nagan_Box', 'Refined Nagan Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 13407,604800;', '', ''), (13767, 'Skewer_Box', 'Refined Brocca Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 1424,604800;', '', ''), @@ -6481,8 +6497,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13774, 'Immaterial_Sword_Box', 'Refined Immaterial Sword Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 13409,604800;', '', ''), (13775, 'Unholy_Touch_Box', 'Refined Unholy Touch Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 1274,604800;', '', ''), (13776, 'Cloak_Of_Survival_Box', 'Refined Survivor''s Manteau Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 2535,1209600;', '', ''), -(13777, 'Masquerade_Box', 'Refined Masquerade Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 5326,1209600;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(13777, 'Masquerade_Box', 'Refined Masquerade Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 5326,1209600;', '', ''), (13778, 'Orc_Hero_Helm_Box', 'Refined Helmet of Orc Hero Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 5327,1209600;', '', ''), (13779, 'Evil_Wing_Ears_Box', 'Refined Wing of Diablo Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 5328,1209600;', '', ''), (13780, 'Dark_Blindfold_Box', 'Refined Dark Blinder Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 5329,1209600;', '', ''), @@ -6616,7 +6631,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13908, 'Deviruchi_Set_Box', 'XM Deviruchi Set Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5227,1; getitem 5228,1; getitem 5229,1;', '', ''), (13909, 'MVP_Hunt_Box', 'MVP Hunting Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 7621,1; getitem 12210,1; getitem 12221,1; getitem 12214,3;', '', ''), (13910, 'Brewing_Box', 'XM Brewing Set Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12204,10; getitem 12205,10; getitem 12206,10;', '', ''), -(13911, 'Christmas_Pet_Scroll', 'Christmas Pet Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(13911, 'Xmas_Pet_Scroll', 'Christmas Pet Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (13912, 'Pty_Blessing_Box', 'Party Blessing 10 Scroll Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14588,10;', '', ''), (13913, 'Pty_Inc_Agi_Box', 'Party Increase Agi 10 Scroll Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14589,10;', '', ''), (13914, 'Pty_Assumptio_Box', 'Party Assumptio 5 Scroll Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14590,10;', '', ''), @@ -6629,7 +6644,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13922, 'Rabbit_Ear_Hat_Box', 'Bunny Top Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5378,1;', '', ''), (13923, 'Darkness_Helm_Box', 'Dark Randgris Helm Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5373,1;', '', ''), (13924, 'L_Orc_Hero_Helm_Box', 'Orc Hero Headdress Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5375,1;', '', ''), -(13925, 'Year_Of_Mouse_Scroll', '... GoodLuck Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(13925, 'Lucky_Scroll08', '... GoodLuck Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (13926, 'Crusader_Card_Box', 'Crusader Card Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 4371,1; getitem 4311,1; getitem 4319,1; getitem 4331,1;', '', ''), (13927, 'Alchemist_Card_Box', 'Alchemist Card Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 4281,1; getitem 4233,1; getitem 4343,1; getitem 4186,1; getitem 4036,1;', '', ''), (13928, 'Rogue_Card_Box', 'Rogue Card Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 4039,1; getitem 4210,1; getitem 4257,1; getitem 4230,1; getitem 4348,1;', '', ''), @@ -6648,12 +6663,12 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (13942, 'Love_Angel_Box_1m', 'Love Angel Magic Powder Box 30 Days', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14009,1;', '', ''), (13943, 'Squirrel_Box_1m', 'Squirrel Magic Powder Box 30 Days', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14010,1;', '', ''), (13944, 'Gogo_Box_1m', 'Gogo Magic Powder Box 30 Days', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14011,1;', '', ''), -(13945, 'BRO_SM_Package', 'Brazil Swordsman Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2317,1; getitem 2106,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 2229,1; getitem 2266,1;', '', ''), -(13946, 'BRO_MG_Package', 'Brazil Magician Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2322,1; getitem 2102,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4077,1; getitem 2607,2; getitem 5027,1;', '', ''), -(13947, 'BRO_AC_Package', 'Brazil Acolyte Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2326,1; getitem 2104,1; getitem 2404,1; getitem 2504,1; getitem 4003,1; getitem 4100,1; getitem 2607,2; getitem 2217,1;', '', ''), -(13948, 'BRO_AR_Package', 'Brazil Archer package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2331,1; getitem 1716,1; getitem 2406,1; getitem 2504,1; getitem 4064,1; getitem 4102,1; getitem 2607,2; getitem 2285,1;', '', ''), -(13949, 'BRO_MC_Package', 'Brazil Merchant Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2315,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 5021,1;', '', ''), -(13950, 'BRO_TF_Package', 'Brazil Thief Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2336,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4097,1; getitem 4102,1; getitem 2607,2; getitem 2274,1;', '', ''), +(13945, 'Br_SwordPackage', 'Brazil Swordsman Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(13946, 'Br_MagePackage', 'Brazil Magician Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(13947, 'Br_AcolPackage', 'Brazil Acolyte Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(13948, 'Br_ArcherPackage', 'Brazil Archer package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(13949, 'Br_MerPackage', 'Brazil Merchant Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(13950, 'Br_ThiefPackage', 'Brazil Thief Package', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (13951, 'Wasteland_Outlaw_Box', 'Western Outlaw Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 13109,604800;', '', ''), (13952, 'Lever_Action_Rifle_Box', 'Lever Action Rifle Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 13170,604800;', '', ''), (13953, 'All_In_One_Ring_Box', 'All In One Ring Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 2741,604800;', '', ''), @@ -6788,7 +6803,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14083, 'FS_Def_Potion_Box30', 'Small Physical Defense Potion 30 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14541,30;', '', ''), (14084, 'FS_Def_Potion_Box50', 'Small Physical Defense Potion 50 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14541,50;', '', ''), (14085, 'FB_Def_Potion_Box10', 'Big Defense Potion 10 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14542,10;', '', ''), -(14086, 'FB_Def_Potion_Box30', 'Large Physical Defense Potion 30 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14542,30;', '', ''), +(14086, 'FB_Def_Potion_Box30', 'Large Physical Defense Potion 30 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14542,30;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (14087, 'FB_Def_Potion_Box50', 'Large Physical Defense Potion 50 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14542,50;', '', ''), (14088, 'FS_Mdef_Potion_Box10', 'Small Magic Defense Potion 10 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14543,10;', '', ''), (14089, 'FS_Mdef_Potion_Box30', 'Small Magical Defense Potion 30 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14543,30;', '', ''), @@ -6796,8 +6812,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14091, 'FB_Mdef_Potion_Box10', 'Big Magic Defense Potion 10 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14544,10;', '', ''), (14092, 'FB_Mdef_Potion_Box30', 'Large Magical Defense Potion 30 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14544,30;', '', ''), (14093, 'FB_Mdef_Potion_Box50', 'Large Magical Defense Potion 50 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14544,50;', '', ''), -(14094, 'F_Flying_Angel_Box', 'Flying Angel Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5210,1;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(14094, 'F_Flying_Angel_Box', 'Flying Angel Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5210,1;', '', ''), (14095, 'F_Cat_Hat_Box', 'Neko Mimi Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5099,1;', '', ''), (14096, 'F_M_F_H_Box', 'Moonlight Flower Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5214,1;', '', ''), (14097, 'F_Chick_Hat_Box', 'Baby Chick Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5283,1;', '', ''), @@ -6932,7 +6947,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14226, 'Quagmire_Scroll_Box50', 'Quagmire Scroll 50 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14594,50;', '', ''), (14227, 'Healing_Staff_Box', 'Healing Staff Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 1638,604800;', '', ''), (14228, 'Praxinus_Box', 'Praccsinos Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 2752,604800;', '', ''), -(14229, 'Cherry_Blossom_Scroll', 'Cherry Blossom Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(14229, 'Sakura_Scroll', 'Cherry Blossom Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (14230, 'Note_Headphones_Box', 'Note Headphones Box', 18, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5151,1;', '', ''), (14231, 'Novice_Breastplate_Boxes', 'Novice Breastplate Boxes', 18, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (14232, 'Yggdrasilberry_Box_', 'Yggdrasil Berry 10 Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 607,10;', '', ''), @@ -7001,9 +7016,12 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14295, 'Mercenary_Contract_Box10', 'Mercenary Contract Box 10ea', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 6050,10;', '', ''), (14296, 'Angel_Scroll', 'Angel Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (14297, 'Devil_Scroll', 'Devil Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(14298, 'Surprise_Scroll', 'Surprise Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (14300, 'Mask_Of_Ifrit_Box', 'Mask Of Ifrit Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5420,1;', '', ''), (14301, 'Ifrit''s_Ear_Box', 'Ears Of Ifrit Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5421,1;', '', ''), (14304, 'Scuba_Mask_Box', 'Scuba Mask Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 5397,1;', '', ''), +(14306, 'RWC_Special_Scroll', 'RWC Special Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), +(14307, 'RWC_Limited_Scroll', 'RWC Limited Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (14314, 'Phreeoni_Scroll_Box', 'Phreeoni Scroll Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14597,10;', '', ''), (14315, 'Ghostring_Scroll_Box', 'Ghostring Scroll Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 14598,10;', '', ''), (14316, 'July7_Scroll', 'July7 Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -7061,14 +7079,14 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14534, 'Small_Life_Potion', 'Small Life Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 320; sc_start4 SC_S_LIFEPOTION,600000,-5,5,0,0;', '', ''), (14535, 'Med_Life_Potion', 'Medium Life Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 320; sc_start4 SC_L_LIFEPOTION,600000,-7,4,0,0;', '', ''), (14536, 'Abrasive', 'Abrasive', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 182; sc_start SC_CRITICALPERCENT,300000,30;', '', ''), -(14537, 'Regeneration_Potion', 'Regeneration Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 348; sc_start SC_INCHEALRATE,1800000,20;', '', ''), +(14537, 'Regeneration_Potion', 'Regeneration Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 348; sc_start SC_HEALPLUS,1800000,20;', '', ''), (14538, 'Glass_Of_Illusion', 'Glass of Illusion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_STEAL; sc_start SC_INCFLEE2,60000,20;', '', ''), -(14539, 'Shadow_Armor_S', 'Shadow Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_CLOAKING; sc_start4 SC_ELEMENTALCHANGE,1800000,1,Ele_Dark,1,0;', '', ''), -(14540, 'Holy_Armor_S', 'Holy Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 91; sc_start4 SC_ELEMENTALCHANGE,1800000,1,Ele_Holy,1,0;', '', ''), -(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_DEF_RATE,60000,3;', '', ''), -(14542, 'B_Def_Potion', 'Big Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_DEF_RATE,180000,3;', '', ''), -(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_MDEF_RATE,60000,3;', '', ''), -(14544, 'B_Mdef_Potion', 'Big Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_MDEF_RATE,180000,3;', '', ''), +(14539, 'Shadow_Armor_S', 'Shadow Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_CLOAKING; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Dark,1,0;', '', ''), +(14540, 'Holy_Armor_S', 'Holy Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 91; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Holy,1,0;', '', ''), +(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,60000,3;', '', ''), +(14542, 'B_Def_Potion', 'Big Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,180000,3;', '', ''), +(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,60000,3;', '', ''), +(14544, 'B_Mdef_Potion', 'Big Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,180000,3;', '', ''), (14545, 'Battle_Manual_X3', 'Field Manual 300%', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_CASH_PLUSEXP,1800000,300;', '', ''), (14546, 'Fire_Cracker_Love', 'I Love You Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'end;', '', ''), (14547, 'Fire_Cracker_Wday', 'Whiteday Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'end;', '', ''), @@ -7104,7 +7122,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14577, 'Vit_Dish05_', 'Spicy Fried Bao', 0, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_VIT,1200000,5; percentheal 10,0;', '', ''), (14578, 'Agi_Dish05_', 'Steamed Bat Wing in Pumpkin', 0, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_AGI,1200000,5; percentheal 6,2;', '', ''), (14579, 'Dex_Dish05_', 'Green Salad', 0, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_DEX,1200000,5; percentheal 5,5;', '', ''), -(14580, 'Luk_Dish05_', 'Fried Scorpion Tails', 0, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_LUK,1200000,5; percentheal 5,2;', '', ''), +(14580, 'Luk_Dish05_', 'Fried Scorpion Tails', 0, 2, 1, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_FOOD_LUK,1200000,5; percentheal 5,2;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (14581, 'Dun_Tele_Scroll2', 'Dungeon Teleport Scroll II', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'callfunc "F_CashDungeon";', '', ''), (14582, 'WOB_Rune', 'Yellow Butterfly Wing', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'callfunc "F_CashCity",1;', '', ''), (14583, 'WOB_Schwaltz', 'Green Butterfly Wing', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'callfunc "F_CashCity",2;', '', ''), @@ -7115,13 +7134,12 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (14588, 'Pty_Blessing_Scroll', 'Party Blessing 10 Scroll', 2, 10, 5, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "CASH_BLESSING",10;', '', ''), (14589, 'Pty_Inc_Agi_Scroll', 'Party Increase Agi 10 Scroll', 2, 10, 5, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "CASH_INCAGI",10;', '', ''), (14590, 'Pty_Assumptio_Scroll', 'Party Assumptio 5 Scroll', 2, 10, 5, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "CASH_ASSUMPTIO",5;', '', ''), -(14591, 'Siege_Teleport_Scroll', 'WoE Teleport Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'callfunc "F_CashSeigeTele";', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(14591, 'Siege_Teleport_Scroll', 'WoE Teleport Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'callfunc "F_CashSeigeTele";', '', ''), (14592, 'Job_Manual50', 'JOB Battle Manual', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_CASH_PLUSONLYJOBEXP,1800000,50;', '', ''), (14593, 'Magic_Power_Scroll', 'Mystical Amplification Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "HW_MAGICPOWER",10;', '', ''), (14594, 'Quagmire_Scroll', 'Quagmire Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'itemskill "WZ_QUAGMIRE",5;', '', ''), (14595, 'Unsealed_Magic_Spell', 'Unsealed Magic Spell', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'warp "yuno_fild09",255,127;', '', ''), -(14596, 'Pierre_Treasurebox', 'Pierre''s Treasure Box', 2, 0, 0, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1; getrandgroupitem(IG_Pierre_Treasurebox),1;', '', ''), +(14596, 'Pierre_Treasurebox', 'Pierre''s Treasure Box', 2, 0, 0, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1;', '', ''), (14597, 'PhreeoniS', 'Phreeoni Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_ITEMSCRIPT,180000,4121;', '', ''), (14598, 'GhostringS', 'Ghostring Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'sc_start SC_ITEMSCRIPT,60000,4047;', '', ''), (14599, 'Greed_Scroll_C', 'Greed Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -7328,6 +7346,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (16775, 'Sagittarius_Scroll', 'Sagittarius Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (16776, 'Universal_Catalog_Gold_Box10', 'Universal Catalog Gold 10 Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12581,10;', '', ''), (16777, 'Universal_Catalog_Gold_Box50', 'Universal Catalog Gold 50 Box', 2, 0, 0, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12581,50;', '', ''), +(16826, 'Sagittarius_Scr_Box', 'Sagittarius Scroll Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (16972, 'Weather_Report_Box', 'Weather Report Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (16973, 'Yellow_Hat_Box', 'Yellow Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 19515,1;', '', ''), (16974, 'Comin_Actor_Box', 'Comin Actor Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -7374,13 +7393,13 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (17030, 'St_Pat_Hat_box', 'St Pat Hat box', 18, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18565,1;', '', ''), (17035, 'Energetic_Pisces_Scroll', 'Energetic Pisces Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17036, 'Energetic_Pisces_Box', 'Energetic Pisces Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17037, 'Trans_Box_Devi', 'Trans Box Devi', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17038, 'Trans_Box_Ray_Arch', 'Trans Box Ray Arch', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17039, 'Trans_Box_Mavka', 'Trans Box Mavka', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17040, 'Trans_Box_Marduk', 'Trans Box Marduk', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17041, 'Trans_Box_Banshee', 'Trans Box Banshee', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(17037, 'Trans_Box_Devi', 'Trans Box Devi', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12658,10;', '', ''), +(17038, 'Trans_Box_Ray_Arch', 'Trans Box Ray Arch', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12659,10;', '', ''), +(17039, 'Trans_Box_Mavka', 'Trans Box Mavka', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12660,10;', '', ''), +(17040, 'Trans_Box_Marduk', 'Trans Box Marduk', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12661,10;', '', ''), +(17041, 'Trans_Box_Banshee', 'Trans Box Banshee', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12662,10;', '', ''), (17042, 'Trans_Box_Poring', 'Trans Box Poring', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12663,10;', '', ''), -(17043, 'Trans_Box_Golem', 'Trans Box Golem', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), +(17043, 'Trans_Box_Golem', 'Trans Box Golem', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 12664,10;', '', ''), (17050, 'Aries_Scroll', 'Aries Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17051, 'Aries_Scroll_Box', 'Aries Scroll Box', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17052, 'Holy_Mom_Blaze_Box', 'Holy Mom Blaze Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 6472,1;', '', ''), @@ -7434,7 +7453,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (17117, 'Aries_Scroll', 'Aries Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17120, 'Taurus_Scroll', 'Taurus Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17121, 'Starry_Scroll', 'Starry Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), -(17122, 'Immuned_Shield_Box', 'Immuned Shield Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2168,1;', '', ''), +(17122, 'Immuned_Shield_Box', 'Immuned Shield Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 2168,1;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (17123, 'Black_Devil_Mask_Box', 'Black Devil Mask Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18599,1;', '', ''), (17124, 'Cat_Ears_Beret_Box', 'Cat Ears Beret Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18600,1;', '', ''), (17125, 'Red_Bread_Hat_Box', 'Red Bread Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18601,1;', '', ''), @@ -7447,9 +7467,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (17143, 'Ms_Scorpio_Scroll', 'Ms Scorpio Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), (17146, 'Dep_Alice_Hat_Box', 'Dep Alice Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18630,1;', '', ''), (17147, 'Ribbon_Chef_Hat_Box', 'Ribbon Chef Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18631,1;', '', ''), -(17152, 'Bridal_Ribbon_Box', 'Bridal Ribbon Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18636,1;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(17152, 'Bridal_Ribbon_Box', 'Bridal Ribbon Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 18636,1;', '', ''), (17155, 'Upg_Huuma_Shuriken_Box', 'Upg Huuma Shuriken Box', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'rentitem 13316,86400;', '', ''), +(17156, 'TCG_Card_Scroll', 'TCG Card Scroll', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'packageitem();', '', ''), (17157, 'Vital_Flower_Box', 'Vital Flower Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 6113,10;', '', ''), (17158, 'Flame_Gemstone_Box', 'Flame Gemstone Box', 18, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, 'getitem 6114,10;', '', ''), (17162, 'Boarding_Halter_Box7', 'Boarding Halter Box7', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 0, '', '', ''), @@ -7592,7 +7612,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (18594, 'Magni_Cap_', 'Magni Cap', 5, 30000, 15000, 1000, 0, 0, 9, 0, 1, 4294967294, 7, 2, 256, 0, 0, 0, 1, 250, 'bonus bStr,2;', '', ''), (18595, 'Horn_Of_Ancient', 'Horn of Ancient', 5, 40, 20, 200, 0, 0, 8, 0, 1, 4294967295, 7, 2, 256, 0, 50, 0, 1, 757, 'autobonus "{ bonus bBaseAtk,100; }",5,10000,0,"{ specialeffect2 EF_POTION_BERSERK; }";', '', ''), (18596, 'Sprout_Hat', 'Sprout Hat', 5, 20, 10, 200, 0, 0, 4, 0, 0, 4294967295, 7, 2, 256, 0, 70, 0, 1, 758, 'skill "WZ_HEAVENDRIVE",3;', '', ''), -(18597, 'Mercury_Riser', 'Mercury Riser', 5, 40, 20, 200, 0, 0, 10, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 0, 759, 'bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2;', '', ''), +(18597, 'Mercury_Riser', 'Mercury Riser', 5, 40, 20, 200, 0, 0, 10, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 0, 759, 'bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2; }', '', ''), (18598, 'Mini_Tree_J', 'Mini Tree J', 5, 20, 10, 50, 0, 0, 0, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 0, 727, 'bonus bMdef,20;', '', ''), (18599, 'Black_Devil_Mask', 'Black Devil Mask', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 512, 0, 0, 0, 0, 760, 'bonus bAllStats,2;', '', ''), (18600, 'Cat_Ear_Beret', 'Cat Ear Beret', 5, 20, 10, 100, 0, 0, 5, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 761, 'bonus bAtkRate,5; if(getrefine() > 5 && getrefine() <= 12) { bonus2 bAddRace,RC_DemiHuman,(getrefine() - 5); bonus2 bSubRace,RC_DemiHuman,(getrefine() - 5); } if(getrefine() > 12) { bonus2 bAddRace,RC_DemiHuman,7; bonus2 bSubRace,RC_DemiHuman,7; }', '', ''), @@ -7770,7 +7790,8 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (19537, 'C_Gryphon_Hat', 'Costume Gryphon Hat', 5, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 1, 0, 0, 591, 'bonus bUnbreakableHelm,0;', '', ''), (19538, 'Full_Moon', 'Full Moon', 5, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 1, 0, 0, 780, 'bonus bUnbreakableHelm,0;', '', ''), (19539, 'C_Hairband_Of_Reginleif', 'Hairband Of Reginleif', 5, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 256, 0, 1, 0, 0, 468, 'bonus bAllStats,1;', '', ''), -(19540, 'C_Rabbit_Earplugs', 'Costume Rabbit Earplugs', 5, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 768, 0, 1, 0, 0, 515, 'bonus bAgi,1; bonus bFlee,2;', '', ''), +(19540, 'C_Rabbit_Earplugs', 'Costume Rabbit Earplugs', 5, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 768, 0, 1, 0, 0, 515, 'bonus bAgi,1; bonus bFlee,2;', '', ''); +INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES (19541, 'C_Romantic_White_Flower', 'Costume Romantic White Flower', 5, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 4096, 0, 1, 0, 0, 259, 'bonus bUnbreakableHelm,0;', '', ''), (19542, 'C_Devil_Whisper', 'Costume Devil Whisper', 5, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 2048, 0, 1, 0, 0, 712, 'bonus bUnbreakableHelm,0;', '', ''), (19543, 'Oliver_Wolf_Hood', 'Oliver Wold Hood', 5, 20, 10, 300, 0, 0, 0, 0, 1, 4294967295, 7, 2, 1024, 0, 70, 0, 0, 849, 'bonus bUnbreakableHelm,0;', '', ''), @@ -7782,8 +7803,7 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_ (19549, 'C_Magestic_Goat', 'Costume Magestic Goat', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 100, 0, 0, 41, 'bonus bUnbreakableHelm,0;', '', ''), (19550, 'C_Blush', 'Costume Blush', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 2048, 0, 100, 0, 0, 125, 'bonus bUnbreakableHelm,0;', '', ''), (19551, 'C_Elven_Ears', 'Costume Elven Ears', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 2048, 0, 100, 0, 0, 73, 'bonus bUnbreakableHelm,0;', '', ''), -(19552, 'C_Centimental_Flower', 'Costume Centimental Flower', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 4096, 0, 100, 0, 0, 56, 'bonus bUnbreakableHelm,0;', '', ''); -INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES +(19552, 'C_Centimental_Flower', 'Costume Centimental Flower', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 4096, 0, 100, 0, 0, 56, 'bonus bUnbreakableHelm,0;', '', ''), (19553, 'C_Assassin_Mask_', 'Costume Assassin Mask', 5, 20, 10, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 4096, 0, 100, 0, 0, 180, 'bonus bUnbreakableHelm,0;', '', ''), (19573, 'C_Heart_Wing_Hairband', 'Costume Heart Wing Hairband', 5, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 1, 0, 1, 733, '', '', ''), (19587, 'C_King_Poring_Hat', 'Costume King Poring Hat', 5, 0, 0, 100, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 1, 0, 0, 905, 'bonus bUnbreakableHelm,0;', '', ''), diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 52192ebdc..a1bc52924 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1145,8 +1145,8 @@ ACMD(item) if (number <= 0) number = 1; - if ((item_data = itemdb_searchname(item_name)) == NULL && - (item_data = itemdb_exists(atoi(item_name))) == NULL) + if ((item_data = itemdb->search_name(item_name)) == NULL && + (item_data = itemdb->exists(atoi(item_name))) == NULL) { clif->message(fd, msg_txt(19)); // Invalid item ID or name. return false; @@ -1203,8 +1203,8 @@ ACMD(item2) number = 1; item_id = 0; - if ((item_data = itemdb_searchname(item_name)) != NULL || - (item_data = itemdb_exists(atoi(item_name))) != NULL) + if ((item_data = itemdb->search_name(item_name)) != NULL || + (item_data = itemdb->exists(atoi(item_name))) != NULL) item_id = item_data->nameid; if (item_id > 500) { @@ -2128,8 +2128,8 @@ ACMD(produce) return false; } - if ( (item_data = itemdb_searchname(item_name)) == NULL && - (item_data = itemdb_exists(atoi(item_name))) == NULL ) { + if ( (item_data = itemdb->search_name(item_name)) == NULL && + (item_data = itemdb->exists(atoi(item_name))) == NULL ) { clif->message(fd, msg_txt(170)); //This item is not an equipment. return false; } @@ -2548,7 +2548,7 @@ ACMD(makeegg) return false; } - if ((item_data = itemdb_searchname(message)) != NULL) // for egg name + if ((item_data = itemdb->search_name(message)) != NULL) // for egg name id = item_data->nameid; else if ((id = mobdb_searchname(message)) != 0) // for monster name @@ -3395,7 +3395,7 @@ ACMD(idsearch) sprintf(atcmd_output, msg_txt(77), item_name); // The reference result of '%s' (name: id): clif->message(fd, atcmd_output); - match = itemdb_searchname_array(item_array, MAX_SEARCH, item_name); + match = itemdb->search_name_array(item_array, MAX_SEARCH, item_name); if (match > MAX_SEARCH) { sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, match); clif->message(fd, atcmd_output); @@ -3582,7 +3582,7 @@ ACMD(partyrecall) ACMD(reloaditemdb) { nullpo_retr(-1, sd); - itemdb_reload(); + itemdb->reload(); clif->message(fd, msg_txt(97)); // Item database has been reloaded. return true; @@ -5798,8 +5798,8 @@ ACMD(autolootitem) if (action < 3) // add or remove { - if ((item_data = itemdb_exists(atoi(message))) == NULL) - item_data = itemdb_searchname(message); + if ((item_data = itemdb->exists(atoi(message))) == NULL) + item_data = itemdb->search_name(message); if (!item_data) { // No items founds in the DB with Id or Name clif->message(fd, msg_txt(1189)); // Item not found. @@ -5852,7 +5852,7 @@ ACMD(autolootitem) { if (sd->state.autolootid[i] == 0) continue; - if (!(item_data = itemdb_exists(sd->state.autolootid[i]))) { + if (!(item_data = itemdb->exists(sd->state.autolootid[i]))) { ShowDebug("Non-existant item %d on autolootitem list (account_id: %d, char_id: %d)", sd->state.autolootid[i], sd->status.account_id, sd->status.char_id); continue; } @@ -6695,7 +6695,7 @@ ACMD(mobinfo) j = 0; for (i = 0; i < MAX_MOB_DROP; i++) { int droprate; - if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) + if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb->exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; @@ -6720,7 +6720,7 @@ ACMD(mobinfo) strcpy(atcmd_output, msg_txt(1248)); // MVP Items: j = 0; for (i = 0; i < MAX_MVP_DROP; i++) { - if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) + if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb->exists(mob->mvpitem[i].nameid)) == NULL) continue; if (mob->mvpitem[i].p > 0) { j++; @@ -7142,8 +7142,8 @@ ACMD(iteminfo) clif->message(fd, msg_txt(1276)); // Please enter an item name/ID (usage: @ii/@iteminfo ). return false; } - if ((item_array[0] = itemdb_exists(atoi(message))) == NULL) - count = itemdb_searchname_array(item_array, MAX_SEARCH, message); + if ((item_array[0] = itemdb->exists(atoi(message))) == NULL) + count = itemdb->search_name_array(item_array, MAX_SEARCH, message); if (!count) { clif->message(fd, msg_txt(19)); // Invalid item ID or name. @@ -7191,8 +7191,8 @@ ACMD(whodrops) clif->message(fd, msg_txt(1284)); // Please enter item name/ID (usage: @whodrops ). return false; } - if ((item_array[0] = itemdb_exists(atoi(message))) == NULL) - count = itemdb_searchname_array(item_array, MAX_SEARCH, message); + if ((item_array[0] = itemdb->exists(atoi(message))) == NULL) + count = itemdb->search_name_array(item_array, MAX_SEARCH, message); if (!count) { clif->message(fd, msg_txt(19)); // Invalid item ID or name. @@ -8111,7 +8111,7 @@ ACMD(itemlist) const struct item* it = &items[i]; struct item_data* itd; - if( it->nameid == 0 || (itd = itemdb_exists(it->nameid)) == NULL ) + if( it->nameid == 0 || (itd = itemdb->exists(it->nameid)) == NULL ) continue; counter += it->amount; @@ -8194,7 +8194,7 @@ ACMD(itemlist) { struct item_data* card; - if( it->card[j] == 0 || (card = itemdb_exists(it->card[j])) == NULL ) + if( it->card[j] == 0 || (card = itemdb->exists(it->card[j])) == NULL ) continue; counter2++; @@ -8307,7 +8307,7 @@ ACMD(delitem) return false; } - if( ( id = itemdb_searchname(item_name) ) != NULL || ( id = itemdb_exists(atoi(item_name)) ) != NULL ) + if( ( id = itemdb->search_name(item_name) ) != NULL || ( id = itemdb->exists(atoi(item_name)) ) != NULL ) { nameid = id->nameid; } diff --git a/src/map/battle.c b/src/map/battle.c index 800d573a2..9e65146e2 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6285,7 +6285,6 @@ static const struct _battle_data { { "mobs_level_up_exp_rate", &battle_config.mobs_level_up_exp_rate, 1, 1, INT_MAX, }, { "pk_min_level", &battle_config.pk_min_level, 55, 1, INT_MAX, }, { "skill_steal_max_tries", &battle_config.skill_steal_max_tries, 0, 0, UCHAR_MAX, }, - { "finding_ore_rate", &battle_config.finding_ore_rate, 100, 0, INT_MAX, }, { "exp_calc_type", &battle_config.exp_calc_type, 0, 0, 1, }, { "exp_bonus_attacker", &battle_config.exp_bonus_attacker, 25, 0, INT_MAX, }, { "exp_bonus_max_attacker", &battle_config.exp_bonus_max_attacker, 12, 2, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 7d41a02c5..37968f53a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -325,7 +325,6 @@ struct Battle_Config { int mobs_level_up_exp_rate; // [Valaris] int pk_min_level; // [celest] int skill_steal_max_tries; //max steal skill tries on a mob. if 0, then w/o limit [Lupus] - int finding_ore_rate; // orn int exp_calc_type; int exp_bonus_attacker; int exp_bonus_max_attacker; diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 764b51015..dc07c2409 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -137,7 +137,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha amount = RBUFW(itemlist,i*8+2); price = RBUFL(itemlist,i*8+4); - if( ( id = itemdb_exists(nameid) ) == NULL || amount == 0 ) + if( ( id = itemdb->exists(nameid) ) == NULL || amount == 0 ) {// invalid input break; } diff --git a/src/map/clif.c b/src/map/clif.c index 00e395709..3e01230b2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1759,7 +1759,7 @@ void clif_buylist(struct map_session_data *sd, struct npc_data *nd) c = 0; for( i = 0; i < nd->u.shop.count; i++ ) { - struct item_data* id = itemdb_exists(nd->u.shop.shop_item[i].nameid); + struct item_data* id = itemdb->exists(nd->u.shop.shop_item[i].nameid); int val = nd->u.shop.shop_item[i].value; if( id == NULL ) continue; @@ -2497,7 +2497,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items { if( items[i].nameid <= 0 ) continue; - id = itemdb_search(items[i].nameid); + id = itemdb->search(items[i].nameid); if( !itemdb_isstackable2(id) ) { //Equippable WBUFW(bufe,ne*cmd+4)=i+1; @@ -2577,7 +2577,7 @@ void clif_cartlist(struct map_session_data *sd) { if( sd->status.cart[i].nameid <= 0 ) continue; - id = itemdb_search(sd->status.cart[i].nameid); + id = itemdb->search(sd->status.cart[i].nameid); if( !itemdb_isstackable2(id) ) { //Equippable WBUFW(bufe,ne*cmd+4)=i+2; @@ -6416,7 +6416,7 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven for( i = 0; i < count; i++ ) { int index = vending[i].index; - struct item_data* data = itemdb_search(vsd->status.cart[index].nameid); + struct item_data* data = itemdb->search(vsd->status.cart[index].nameid); WFIFOL(fd,offset+ 0+i*22) = vending[i].value; WFIFOW(fd,offset+ 4+i*22) = vending[i].amount; WFIFOW(fd,offset+ 6+i*22) = vending[i].index + 2; @@ -6475,7 +6475,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven WFIFOL(fd,4) = id; for( i = 0; i < count; i++ ) { int index = vending[i].index; - struct item_data* data = itemdb_search(sd->status.cart[index].nameid); + struct item_data* data = itemdb->search(sd->status.cart[index].nameid); WFIFOL(fd, 8+i*22) = vending[i].value; WFIFOW(fd,12+i*22) = vending[i].index + 2; WFIFOW(fd,14+i*22) = vending[i].amount; @@ -9574,7 +9574,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if( iMap->night_flag && map[sd->bl.m].flag.nightenabled ) { //Display night. if( !sd->state.night ) { sd->state.night = 1; - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_SKE); + clif->status_change(&sd->bl, SI_SKE, 1, 0, 0, 0, 0); } } else if( sd->state.night ) { //Clear night display. sd->state.night = 0; @@ -9651,6 +9651,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) // Trigger skill effects if you appear standing on them if(!battle_config.pc_invincible_time) skill->unit_move(&sd->bl,iTimer->gettick(),1); + } @@ -13334,7 +13335,7 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) // FIXME: Stackables have a quantity of 20. // FIXME: Equips are supposed to be unidentified. - if( itemdb_searchname(monster_item_name) ) { + if( itemdb->search_name(monster_item_name) ) { snprintf(command, sizeof(command)-1, "%citem %s", atcommand->at_symbol, monster_item_name); atcommand->parse(fd, sd, command, 1); return; @@ -14509,7 +14510,7 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id) WFIFOL(fd,72) = 0; WFIFOL(fd,76) = msg->zeny; - if( item->nameid && (data = itemdb_exists(item->nameid)) != NULL ) { + if( item->nameid && (data = itemdb->exists(item->nameid)) != NULL ) { WFIFOL(fd,80) = item->amount; WFIFOW(fd,84) = (data->view_id)?data->view_id:item->nameid; WFIFOW(fd,86) = data->type; @@ -14582,7 +14583,7 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) struct item_data *data; unsigned int weight; - if ((data = itemdb_exists(sd->mail.inbox.msg[i].item.nameid)) == NULL) + if ((data = itemdb->exists(sd->mail.inbox.msg[i].item.nameid)) == NULL) return; switch( pc->checkadditem(sd, data->nameid, sd->mail.inbox.msg[i].item.amount) ) { @@ -14800,7 +14801,7 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages, WFIFOL(fd,k) = auction.auction_id; safestrncpy((char*)WFIFOP(fd,4+k), auction.seller_name, NAME_LENGTH); - if( (item = itemdb_exists(auction.item.nameid)) != NULL && item->view_id > 0 ) + if( (item = itemdb->exists(auction.item.nameid)) != NULL && item->view_id > 0 ) WFIFOW(fd,28+k) = item->view_id; else WFIFOW(fd,28+k) = auction.item.nameid; @@ -14873,7 +14874,7 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) return; } - if( (item = itemdb_exists(sd->status.inventory[idx].nameid)) != NULL && !(item->type == IT_ARMOR || item->type == IT_PETARMOR || item->type == IT_WEAPON || item->type == IT_CARD || item->type == IT_ETC) ) + if( (item = itemdb->exists(sd->status.inventory[idx].nameid)) != NULL && !(item->type == IT_ARMOR || item->type == IT_PETARMOR || item->type == IT_WEAPON || item->type == IT_CARD || item->type == IT_ETC) ) { // Consumable or pets are not allowed clif->auction_setitem(sd->fd, idx, true); return; @@ -14980,7 +14981,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) return; } - if( (item = itemdb_exists(sd->status.inventory[sd->auction.index].nameid)) == NULL ) + if( (item = itemdb->exists(sd->status.inventory[sd->auction.index].nameid)) == NULL ) { // Just in case clif->auction_message(fd, 2); // The auction has been canceled return; @@ -15116,7 +15117,7 @@ void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) #endif for( i = 0; i < nd->u.shop.count; i++ ) { - struct item_data* id = itemdb_search(nd->u.shop.shop_item[i].nameid); + struct item_data* id = itemdb->search(nd->u.shop.shop_item[i].nameid); WFIFOL(fd,offset+0+i*11) = nd->u.shop.shop_item[i].value; WFIFOL(fd,offset+4+i*11) = nd->u.shop.shop_item[i].value; // Discount Price WFIFOB(fd,offset+8+i*11) = itemtype(id->type); @@ -16036,7 +16037,7 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat { #if PACKETVER >= 20071002 unsigned char buf[22]; - struct item_data* id = itemdb_search(item_data->nameid); + struct item_data* id = itemdb->search(item_data->nameid); WBUFW(buf,0) = 0x2b8; WBUFL(buf,2) = sd->status.account_id; @@ -17058,12 +17059,12 @@ void clif_cashshop_db(void) { } if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) { - if( !( data = itemdb_exists(atoi(name+2))) ) { + if( !( data = itemdb->exists(atoi(name+2))) ) { ShowWarning("cashshop_db: unknown item id '%s' in category '%s'\n", name+2, entry_name); continue; } } else { - if( !( data = itemdb_searchname(name) ) ) { + if( !( data = itemdb->search_name(name) ) ) { ShowWarning("cashshop_db: unknown item name '%s' in category '%s'\n", name, entry_name); continue; } @@ -17123,7 +17124,6 @@ void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) { void __attribute__ ((unused)) clif_parse_dull(int fd,struct map_session_data *sd) { return; } - void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) { WFIFOHEAD(fd, 10); WFIFOW(fd, 0) = 0x845; @@ -17177,7 +17177,7 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { result = CSBR_SHORTTAGE_CASH; } else if( (sd->cashPoints+kafra_pay) < (clif->cs.data[tab][j]->price * qty) ) { result = CSBR_SHORTTAGE_CASH; - } else if ( !( data = itemdb_exists(clif->cs.data[tab][j]->id) ) ) { + } else if ( !( data = itemdb->exists(clif->cs.data[tab][j]->id) ) ) { result = CSBR_UNKONWN_ITEM; } else { struct item item_tmp; @@ -17445,6 +17445,20 @@ void clif_scriptclear(struct map_session_data *sd, int npcid) { clif->send(&p,sizeof(p), &sd->bl, SELF); } + +void clif_package_item_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) { + struct packet_package_item_announce p; + + p.PacketType = package_item_announceType; + p.PacketLength = 10+NAME_LENGTH; + p.type = 0x0; + p.ItemID = containerid; + p.len = NAME_LENGTH; + safestrncpy(p.Name, sd->status.name, sizeof(p.Name)); + p.BoxItemID = nameid; + clif->send(&p,p.PacketLength, &sd->bl, ALL_CLIENT); +} +/* */ unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) { if( sd ) { sd->cryptKey = (( sd->cryptKey * clif->cryptKey[1] ) + clif->cryptKey[2]) & 0xFFFFFFFF; @@ -18207,6 +18221,7 @@ void clif_defaults(void) { clif->user_count = clif_user_count; clif->noask_sub = clif_noask_sub; clif->cashshop_load = clif_cashshop_db; + clif->package_announce = clif_package_item_announce; clif->bc_ready = clif_bc_ready; clif->undisguise_timer = clif_undisguise_timer; /*------------------------ diff --git a/src/map/clif.h b/src/map/clif.h index 6e1fa81d3..bea701223 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -501,6 +501,7 @@ struct clif_interface { void (*item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip); void (*getareachar_item) (struct map_session_data* sd,struct flooritem_data* fitem); void (*cashshop_load) (void); + void (*package_announce) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid); /* unit-related */ void (*clearunit_single) (int id, clr_type type, int fd); void (*clearunit_area) (struct block_list* bl, clr_type type); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 859b19aac..0ff991bad 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -8,6 +8,7 @@ #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/conf.h" #include "itemdb.h" #include "map.h" #include "battle.h" // struct battle_config @@ -52,14 +53,12 @@ static int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) /*========================================== * Return item data from item name. (lookup) *------------------------------------------*/ -struct item_data* itemdb_searchname(const char *str) -{ +struct item_data* itemdb_searchname(const char *str) { struct item_data* item; struct item_data* item2=NULL; int i; - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) - { + for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) { item = itemdb_array[i]; if( item == NULL ) continue; @@ -77,6 +76,10 @@ struct item_data* itemdb_searchname(const char *str) itemdb_other->foreach(itemdb_other,itemdb_searchname_sub,str,&item,&item2); return item?item:item2; } +/* name to item data */ +struct item_data* itemdb_name2id(const char *str) { + return strdb_get(itemdb->names,str); +} /** * @see DBMatcher @@ -98,8 +101,7 @@ static int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) /*========================================== * Founds up to N matches. Returns number of matches [Skotlex] *------------------------------------------*/ -int itemdb_searchname_array(struct item_data** data, int size, const char *str) -{ +int itemdb_searchname_array(struct item_data** data, int size, const char *str) { struct item_data* item; int i; int count=0; @@ -132,38 +134,130 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str) } return count; } - - -/*========================================== - * Return a random item id from group. (takes into account % chance giving/tot group) - *------------------------------------------*/ -int itemdb_searchrandomid(int group) -{ - if(group<1 || group>=MAX_ITEMGROUP) { - ShowError("itemdb_searchrandomid: Invalid group id %d\n", group); +/* [Ind/Hercules] */ +int itemdb_chain_item(unsigned short chain_id, int *rate) { + struct item_chain_entry *entry; + int i = 0; + + if( chain_id >= itemdb->chain_count ) { + ShowError("itemdb_chain_item: unknown chain id %d\n", chain_id); return UNKNOWN_ITEM_ID; } - if (itemgroup_db[group].qty) - return itemgroup_db[group].nameid[rnd()%itemgroup_db[group].qty]; - ShowError("itemdb_searchrandomid: No item entries for group id %d\n", group); - return UNKNOWN_ITEM_ID; + entry = &itemdb->chains[chain_id].items[ rnd()%itemdb->chains[chain_id].qty ]; + + for( i = 0; i < itemdb->chains[chain_id].qty; i++ ) { + if( rnd()%10000 >= entry->rate ) { + entry = entry->next; + continue; + } else { + if( rate ) + rate[0] = entry->rate; + return entry->id; + } + } + + return 0; } +/* [Ind/Hercules] */ +void itemdb_package_item(struct map_session_data *sd, struct item_package *package) { + int i = 0, get_count, j, flag; + + for( i = 0; i < package->must_qty; i++ ) { + struct item it; + memset(&it, 0, sizeof(it)); + it.nameid = package->must_items[i].id; + it.identify = 1; + + if( package->must_items[i].hours ) { + it.expire_time = (unsigned int)(time(NULL) + ((package->must_items[i].hours*60)*60)); + } + + if( package->must_items[i].named ) { + it.card[0] = CARD0_FORGE; + it.card[1] = 0; + it.card[2] = GetWord(sd->status.char_id, 0); + it.card[3] = GetWord(sd->status.char_id, 1); + } + + if( package->must_items[i].announce ) + clif->package_announce(sd,package->must_items[i].id,package->id); + + get_count = itemdb_isstackable(package->must_items[i].id) ? package->must_items[i].qty : 1; + + it.amount = get_count == 1 ? 1 : get_count; + + for( j = 0; j < package->must_items[i].qty; j += get_count ) { + if ( ( flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT) ) ) + clif->additem(sd, 0, 0, flag); + } + } + + if( package->random_qty ) { + struct item_package_rand_entry *entry; + + entry = &package->random_list[rnd()%package->random_qty]; + + for( i = 0; i < package->random_qty; i++ ) { + if( rnd()%10000 >= entry->rate ) { + entry = entry->next; + continue; + } else { + struct item it; + memset(&it, 0, sizeof(it)); + + it.nameid = entry->id; + it.identify = 1; + + if( entry->hours ) { + it.expire_time = (unsigned int)(time(NULL) + ((entry->hours*60)*60)); + } + + if( entry->named ) { + it.card[0] = CARD0_FORGE; + it.card[1] = 0; + it.card[2] = GetWord(sd->status.char_id, 0); + it.card[3] = GetWord(sd->status.char_id, 1); + } + + if( entry->announce ) + clif->package_announce(sd,entry->id,package->id); + + get_count = itemdb_isstackable(entry->id) ? entry->qty : 1; + + it.amount = get_count == 1 ? 1 : get_count; + + for( j = 0; j < entry->qty; j += get_count ) { + if ( ( flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT) ) ) + clif->additem(sd, 0, 0, flag); + } + break; + } + } + } + + return; +} /*========================================== - * Calculates total item-group related bonuses for the given item + * Return a random item id from group. (takes into account % chance giving/tot group) *------------------------------------------*/ -int itemdb_group_bonus(struct map_session_data* sd, int itemid) -{ - int bonus = 0, i, j; - for (i=0; i < MAX_ITEMGROUP; i++) { - if (!sd->itemgrouphealrate[i]) - continue; - ARR_FIND( 0, itemgroup_db[i].qty, j, itemgroup_db[i].nameid[j] == itemid ); - if( j < itemgroup_db[i].qty ) - bonus += sd->itemgrouphealrate[i]; - } - return bonus; +int itemdb_searchrandomid(struct item_group *group) { + + if (group->qty) + return group->nameid[rnd()%group->qty]; + + ShowError("itemdb_searchrandomid: No item entries for group id %d\n", group->id); + return UNKNOWN_ITEM_ID; +} +bool itemdb_in_group(struct item_group *group, int nameid) { + int i; + + for( i = 0; i < group->qty; i++ ) + if( group->nameid[i] == nameid ) + return true; + + return false; } /// Searches for the item_data. @@ -499,7 +593,7 @@ static bool itemdb_read_itemavail(char* str[], int columns, int current) nameid = atoi(str[0]); - if( ( id = itemdb_exists(nameid) ) == NULL ) + if( ( id = itemdb->exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_itemavail: Invalid item id %d.\n", nameid); return false; @@ -520,82 +614,291 @@ static bool itemdb_read_itemavail(char* str[], int columns, int current) return true; } -/*========================================== - * read item group data - *------------------------------------------*/ -static unsigned int itemdb_read_itemgroup_sub(const char* filename) { - FILE *fp; - char line[1024]; - int ln=0; - unsigned int count = 0; - int groupid,j,k,nameid; - char *str[3],*p; - char w1[1024], w2[1024]; - - if( (fp=fopen(filename,"r"))==NULL ){ - ShowError("can't read %s\n", filename); - return 0; +void itemdb_read_groups(void) { + config_t item_group_conf; + config_setting_t *itg = NULL, *it = NULL; +#ifdef RENEWAL + const char *config_filename = "db/re/item_group.conf"; // FIXME hardcoded name +#else + const char *config_filename = "db/pre-re/item_group.conf"; // FIXME hardcoded name +#endif + const char *itname; + int i = 0, count = 0, c; + unsigned int *gsize = NULL; + + if (conf_read_file(&item_group_conf, config_filename)) { + ShowError("can't read %s\n", config_filename); + return; } - - while(fgets(line, sizeof(line), fp)) - { - ln++; - if(line[0]=='/' && line[1]=='/') + + gsize = aMalloc( config_setting_length(item_group_conf.root) * sizeof(unsigned int) ); + + for(i = 0; i < config_setting_length(item_group_conf.root); i++) + gsize[i] = 0; + + i = 0; + while( (itg = config_setting_get_elem(item_group_conf.root,i++)) ) { + const char *name = config_setting_name(itg); + + if( !itemdb->name2id(name) ) { + ShowWarning("itemdb_read_groups: unknown group item '%s', skipping..\n",name); + config_setting_remove(item_group_conf.root, name); + --i; continue; - if(strstr(line,"import")) { - if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2 && - strcmpi(w1, "import") == 0) { - count += itemdb_read_itemgroup_sub(w2); - continue; - } } - memset(str,0,sizeof(str)); - for(j=0,p=line;j<3 && p;j++){ - str[j]=p; - p=strchr(p,','); - if(p) *p++=0; + + c = 0; + while( (it = config_setting_get_elem(itg,c++)) ) { + if( config_setting_is_list(it) ) + gsize[ i - 1 ] += config_setting_get_int_elem(it,1); + else + gsize[ i - 1 ] += 1; } - if(str[0]==NULL) - continue; - if (j<3) { - if (j>1) //Or else it barks on blank lines... - ShowWarning("itemdb_read_itemgroup: Insufficient fields for entry at %s:%d\n", filename, ln); - continue; + + } + + i = 0; + CREATE(itemdb->groups, struct item_group, config_setting_length(item_group_conf.root)); + itemdb->group_count = (unsigned short)config_setting_length(item_group_conf.root); + + while( (itg = config_setting_get_elem(item_group_conf.root,i++)) ) { + struct item_data *data = itemdb->name2id(config_setting_name(itg)); + int ecount = 0; + + data->group = &itemdb->groups[count]; + + itemdb->groups[count].id = data->nameid; + itemdb->groups[count].qty = config_setting_length(itg); + + CREATE(itemdb->groups[count].nameid, unsigned short, gsize[ count ] + 1); + + c = 0; + while( (it = config_setting_get_elem(itg,c++)) ) { + int repeat = 1; + if( config_setting_is_list(it) ) { + itname = config_setting_get_string_elem(it,0); + repeat = config_setting_get_int_elem(it,1); + } else + itname = config_setting_get_string_elem(itg,c - 1); + + if( !( data = itemdb->name2id(itname) ) ) + ShowWarning("itemdb_read_groups: unknown item '%s' in group '%s'!\n",itname,config_setting_name(itg)); + + itemdb->groups[count].nameid[ecount] = data ? data->nameid : 0; + if( repeat > 1 ) { + //memset would be better? I failed to get the following to work though hu + //memset(&itemdb->groups[count].nameid[ecount+1],itemdb->groups[count].nameid[ecount],sizeof(itemdb->groups[count].nameid[0])*repeat); + int z; + for( z = ecount+1; z < ecount+repeat; z++ ) + itemdb->groups[count].nameid[z] = itemdb->groups[count].nameid[ecount]; + } + ecount += repeat; } - groupid = atoi(str[0]); - if (groupid < 0 || groupid >= MAX_ITEMGROUP) { - ShowWarning("itemdb_read_itemgroup: Invalid group %d in %s:%d\n", groupid, filename, ln); + + count++; + } + + config_destroy(&item_group_conf); + aFree(gsize); + + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); +} + +void itemdb_read_packages(void) { + config_t item_packages_conf; + config_setting_t *itg = NULL, *it = NULL, *t = NULL; +#ifdef RENEWAL + const char *config_filename = "db/re/item_packages.conf"; // FIXME hardcoded name +#else + const char *config_filename = "db/pre-re/item_packages.conf"; // FIXME hardcoded name +#endif + const char *itname; + int i = 0, count = 0, c = 0; + unsigned int *must = NULL, *random = NULL; + + if (conf_read_file(&item_packages_conf, config_filename)) { + ShowError("can't read %s\n", config_filename); + return; + } + + must = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int) ); + random = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int) ); + + for(i = 0; i < config_setting_length(item_packages_conf.root); i++) { + must[i] = 0; + random[i] = 0; + } + + i = 0; + while( (itg = config_setting_get_elem(item_packages_conf.root,i++)) ) { + const char *name = config_setting_name(itg); + + if( !itemdb->name2id(name) ) { + ShowWarning("itemdb_read_packages: unknown package item '%s', skipping..\n",name); + config_setting_remove(item_packages_conf.root, name); + --i; continue; } - nameid = atoi(str[1]); - if (!itemdb_exists(nameid)) { - ShowWarning("itemdb_read_itemgroup: Non-existant item %d in %s:%d\n", nameid, filename, ln); - continue; + + c = 0; + while( (it = config_setting_get_elem(itg,c++)) ) { + if( ( t = config_setting_get_member(it, "Random")) && !config_setting_get_bool(t) ) + must[ i - 1 ] += 1; + else + random[ i - 1 ] += 1; } - k = atoi(str[2]); - if (itemgroup_db[groupid].qty+k >= MAX_RANDITEM) { - ShowWarning("itemdb_read_itemgroup: Group %d is full (%d entries) in %s:%d\n", groupid, MAX_RANDITEM, filename, ln); - continue; + + } + + CREATE(itemdb->packages, struct item_package, config_setting_length(item_packages_conf.root)); + itemdb->package_count = (unsigned short)config_setting_length(item_packages_conf.root); + + i = 0; + while( (itg = config_setting_get_elem(item_packages_conf.root,i++)) ) { + struct item_data *data = itemdb->name2id(config_setting_name(itg)); + struct item_package_rand_entry *prev = NULL; + int r = 0, m = 0; + + data->package = &itemdb->packages[count]; + + itemdb->packages[count].id = data->nameid; + itemdb->packages[count].random_list = NULL; + itemdb->packages[count].must_items = NULL; + itemdb->packages[count].random_qty = random[ i - 1 ]; + itemdb->packages[count].must_qty = must[ i - 1 ]; + + if( itemdb->packages[count].random_qty ) + CREATE(itemdb->packages[count].random_list, struct item_package_rand_entry, itemdb->packages[count].random_qty); + if( itemdb->packages[count].must_qty ) + CREATE(itemdb->packages[count].must_items, struct item_package_must_entry, itemdb->packages[count].must_qty); + + c = 0; + while( (it = config_setting_get_elem(itg,c++)) ) { + int icount = 1, expire = 0, rate = 10000; + bool announce = false, named = false; + + itname = config_setting_name(it); + + if( !( data = itemdb->name2id(itname) ) ) + ShowWarning("itemdb_read_packages: unknown item '%s' in package '%s'!\n",itname,config_setting_name(itg)); + + if( ( t = config_setting_get_member(it, "Count")) ) + icount = config_setting_get_int(t); + + if( ( t = config_setting_get_member(it, "Expire")) ) + expire = config_setting_get_int(t); + + if( ( t = config_setting_get_member(it, "Rate")) ) { + if( (rate = (unsigned short)config_setting_get_int(t)) > 10000 ) { + ShowWarning("itemdb_read_packages: invalid rate (%d) for item '%s' in package '%s'!\n",itname,config_setting_name(itg)); + rate = 10000; + } + } + + if( ( t = config_setting_get_member(it, "Announce")) && config_setting_get_bool(t) ) + announce = true; + + if( ( t = config_setting_get_member(it, "Named")) && config_setting_get_bool(t) ) + named = true; + + if( ( t = config_setting_get_member(it, "Random")) && !config_setting_get_bool(t) ) { + itemdb->packages[count].must_items[m].id = data ? data->nameid : 0; + itemdb->packages[count].must_items[m].qty = icount; + itemdb->packages[count].must_items[m].hours = expire; + itemdb->packages[count].must_items[m].announce = announce == true ? 1 : 0; + itemdb->packages[count].must_items[m].named = named == true ? 1 : 0; + m++; + } else { + if( prev ) + prev->next = &itemdb->packages[count].random_list[r]; + itemdb->packages[count].random_list[r].id = data ? data->nameid : 0; + itemdb->packages[count].random_list[r].qty = icount; + itemdb->packages[count].random_list[r].hours = expire; + itemdb->packages[count].random_list[r].announce = announce == true ? 1 : 0; + itemdb->packages[count].random_list[r].named = named == true ? 1 : 0; + prev = &itemdb->packages[count].random_list[r]; + r++; + } + } - for(j=0;jnext = &itemdb->packages[count].random_list[0]; + count++; } - fclose(fp); - return count; + + + config_destroy(&item_packages_conf); + aFree(must); + aFree(random); + + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); } -static void itemdb_read_itemgroup(void) -{ - char path[256]; - unsigned int count; - snprintf(path, 255, "%s/"DBPATH"item_group_db.txt", iMap->db_path); - memset(&itemgroup_db, 0, sizeof(itemgroup_db)); - count = itemdb_read_itemgroup_sub(path); - ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, "item_group_db.txt"); - return; +void itemdb_read_chains(void) { + config_t item_chain_conf; + config_setting_t *itc = NULL, *entry = NULL; +#ifdef RENEWAL + const char *config_filename = "db/re/item_chain.conf"; // FIXME hardcoded name +#else + const char *config_filename = "db/pre-re/item_chain.conf"; // FIXME hardcoded name +#endif + int i = 0, count = 0; + + if (conf_read_file(&item_chain_conf, config_filename)) { + ShowError("can't read %s\n", config_filename); + return; + } + + CREATE(itemdb->chains, struct item_chain, config_setting_length(item_chain_conf.root)); + itemdb->chain_count = (unsigned short)config_setting_length(item_chain_conf.root); + + while( (itc = config_setting_get_elem(item_chain_conf.root,i++)) ) { + struct item_data *data = NULL; + struct item_chain_entry *prev = NULL; + const char *name = config_setting_name(itc); + int c = 0; + + script->set_constant2(name,i-1,0); + itemdb->chains[count].qty = (unsigned short)config_setting_length(itc); + + CREATE(itemdb->chains[count].items, struct item_chain_entry, config_setting_length(itc)); + + while( (entry = config_setting_get_elem(itc,c++)) ) { + const char *itname = config_setting_name(entry); + if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 7 ) { + if( !( data = itemdb->exists(atoi(itname+2)) ) ) + ShowWarning("itemdb_read_chains: unknown item ID '%d' in chain '%s'!\n",atoi(itname+2),name); + } else if( !( data = itemdb->name2id(itname) ) ) + ShowWarning("itemdb_read_chains: unknown item '%s' in chain '%s'!\n",itname,name); + + if( prev ) + prev->next = &itemdb->chains[count].items[c - 1]; + + itemdb->chains[count].items[c - 1].id = data ? data->nameid : 0; + itemdb->chains[count].items[c - 1].rate = data ? config_setting_get_int(entry) : 0; + + prev = &itemdb->chains[count].items[c - 1]; + } + + if( prev ) + prev->next = &itemdb->chains[count].items[0]; + + count++; + } + + config_destroy(&item_chain_conf); + + if( !script->get_constant("ITMCHAIN_ORE",&i) ) + ShowWarning("itemdb_read_chains: failed to find 'ITMCHAIN_ORE' chain to link to cache!\n"); + else + itemdb->chain_cache[ECC_ORE] = i; + + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); } + /*========================================== * Reads item trade restrictions [Skotlex] *------------------------------------------*/ @@ -606,7 +909,7 @@ static bool itemdb_read_itemtrade(char* str[], int columns, int current) nameid = atoi(str[0]); - if( ( id = itemdb_exists(nameid) ) == NULL ) + if( ( id = itemdb->exists(nameid) ) == NULL ) { //ShowWarning("itemdb_read_itemtrade: Invalid item id %d.\n", nameid); //return false; @@ -643,7 +946,7 @@ static bool itemdb_read_itemdelay(char* str[], int columns, int current) nameid = atoi(str[0]); - if( ( id = itemdb_exists(nameid) ) == NULL ) + if( ( id = itemdb->exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_itemdelay: Invalid item id %d.\n", nameid); return false; @@ -673,7 +976,7 @@ static bool itemdb_read_stack(char* fields[], int columns, int current) nameid = (unsigned short)strtoul(fields[0], NULL, 10); - if( ( id = itemdb_exists(nameid) ) == NULL ) + if( ( id = itemdb->exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_stack: Unknown item id '%hu'.\n", nameid); return false; @@ -711,7 +1014,7 @@ static bool itemdb_read_buyingstore(char* fields[], int columns, int current) nameid = atoi(fields[0]); - if( ( id = itemdb_exists(nameid) ) == NULL ) + if( ( id = itemdb->exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_buyingstore: Invalid item id %d.\n", nameid); return false; @@ -738,7 +1041,7 @@ static bool itemdb_read_nouse(char* fields[], int columns, int current) nameid = atoi(fields[0]); - if( ( id = itemdb_exists(nameid) ) == NULL ) { + if( ( id = itemdb->exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_nouse: Invalid item id %d.\n", nameid); return false; } @@ -847,7 +1150,7 @@ void itemdb_read_combos() { /* validate */ for(v = 0; v < retcount; v++) { - if( !itemdb_exists(items[v]) ) { + if( !itemdb->exists(items[v]) ) { ShowError("itemdb_read_combos: line %d of \"%s\" contains unknown item ID %d, skipping.\n", lines, path,items[v]); break; } @@ -856,7 +1159,7 @@ void itemdb_read_combos() { if( v < retcount ) continue; - id = itemdb_exists(items[0]); + id = itemdb->exists(items[0]); idx = id->combos_count; @@ -885,7 +1188,7 @@ void itemdb_read_combos() { struct item_data * it; int index; - it = itemdb_exists(items[v]); + it = itemdb->exists(items[v]); index = it->combos_count; @@ -1095,6 +1398,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) if (*str[21+offset]) id->unequip_script = parse_script(str[21+offset], source, line, scriptopt); + strdb_put(itemdb->names, id->name, id); return id->nameid; } @@ -1328,7 +1632,9 @@ static void itemdb_read(void) { itemdb_readdb(); itemdb_read_combos(); - itemdb_read_itemgroup(); + itemdb->read_groups(); + itemdb->read_chains(); + itemdb->read_packages(); sv->readdb(iMap->db_path, "item_avail.txt", ',', 2, 2, -1, &itemdb_read_itemavail); sv->readdb(iMap->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, &itemdb_read_itemtrade); sv->readdb(iMap->db_path, "item_delay.txt", ',', 2, 2, -1, &itemdb_read_itemdelay); @@ -1336,6 +1642,9 @@ static void itemdb_read(void) { sv->readdb(iMap->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, &itemdb_read_buyingstore); sv->readdb(iMap->db_path, "item_nouse.txt", ',', 3, 3, -1, &itemdb_read_nouse); + + itemdb->name_constants(); + itemdb_uid_load(); } @@ -1388,8 +1697,7 @@ static int itemdb_final_sub(DBKey key, DBData *data, va_list ap) return 0; } -void itemdb_reload(void) -{ +void itemdb_reload(void) { struct s_mapiterator* iter; struct map_session_data* sd; @@ -1400,9 +1708,46 @@ void itemdb_reload(void) if( itemdb_array[i] ) destroy_item_data(itemdb_array[i], 1); + for( i = 0; i < itemdb->group_count; i++ ) { + if( itemdb->groups[i].nameid ) + aFree(itemdb->groups[i].nameid); + } + + if( itemdb->groups ) + aFree(itemdb->groups); + + itemdb->groups = NULL; + itemdb->group_count = 0; + + for( i = 0; i < itemdb->chain_count; i++ ) { + if( itemdb->chains[i].items ) + aFree(itemdb->chains[i].items); + } + + if( itemdb->chains ) + aFree(itemdb->chains); + + itemdb->chains = NULL; + itemdb->chain_count = 0; + + for( i = 0; i < itemdb->package_count; i++ ) { + if( itemdb->packages[i].random_list ) + aFree(itemdb->packages[i].random_list); + if( itemdb->packages[i].must_items ) + aFree(itemdb->packages[i].must_items); + } + + if( itemdb->packages ) + aFree(itemdb->packages); + + itemdb->packages = NULL; + itemdb->package_count = 0; + itemdb_other->clear(itemdb_other, itemdb_final_sub); - + memset(itemdb_array, 0, sizeof(itemdb_array)); + + db_clear(itemdb->names); // read new data itemdb_read(); @@ -1454,34 +1799,94 @@ void itemdb_reload(void) } mapit->free(iter); } +void itemdb_name_constants(void) { + DBIterator *iter = db_iterator(itemdb->names); + struct item_data *data; + + for( data = dbi_first(iter); dbi_exists(iter); data = dbi_next(iter) ) + script->set_constant2(data->name,data->nameid,0); -void do_final_itemdb(void) -{ + dbi_destroy(iter); +} +void do_final_itemdb(void) { int i; for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) if( itemdb_array[i] ) destroy_item_data(itemdb_array[i], 1); + for( i = 0; i < itemdb->group_count; i++ ) { + if( itemdb->groups[i].nameid ) + aFree(itemdb->groups[i].nameid); + } + + if( itemdb->groups ) + aFree(itemdb->groups); + + for( i = 0; i < itemdb->chain_count; i++ ) { + if( itemdb->chains[i].items ) + aFree(itemdb->chains[i].items); + } + + if( itemdb->chains ) + aFree(itemdb->chains); + + for( i = 0; i < itemdb->package_count; i++ ) { + if( itemdb->packages[i].random_list ) + aFree(itemdb->packages[i].random_list); + if( itemdb->packages[i].must_items ) + aFree(itemdb->packages[i].must_items); + } + + if( itemdb->packages ) + aFree(itemdb->packages); + itemdb_other->destroy(itemdb_other, itemdb_final_sub); destroy_item_data(&dummy_item, 0); + db_destroy(itemdb->names); } -int do_init_itemdb(void) { +void do_init_itemdb(void) { memset(itemdb_array, 0, sizeof(itemdb_array)); itemdb_other = idb_alloc(DB_OPT_BASE); + itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH); create_dummy_data(); //Dummy data item. itemdb_read(); clif->cashshop_load(); - - return 0; } /* incomplete */ void itemdb_defaults(void) { itemdb = &itemdb_s; - itemdb->reload = itemdb_reload;//incomplet=e + itemdb->init = do_init_itemdb; + itemdb->final = do_final_itemdb; + itemdb->reload = itemdb_reload;//incomplete + itemdb->name_constants = itemdb_name_constants; + /* */ + itemdb->groups = NULL; + itemdb->group_count = 0; + /* */ + itemdb->chains = NULL; + itemdb->chain_count = 0; + /* */ + itemdb->packages = NULL; + itemdb->package_count = 0; + /* */ + itemdb->names = NULL; + /* */ + itemdb->read_groups = itemdb_read_groups; + itemdb->read_chains = itemdb_read_chains; + itemdb->read_packages = itemdb_read_packages; /* */ + itemdb->search_name = itemdb_searchname; + itemdb->search_name_array = itemdb_searchname_array; + itemdb->load = itemdb_load; + itemdb->search = itemdb_search; itemdb->parse_dbrow = itemdb_parse_dbrow; itemdb->exists = itemdb_exists;//incomplete + itemdb->name2id = itemdb_name2id; + itemdb->in_group = itemdb_in_group; + itemdb->group_item = itemdb_searchrandomid; + itemdb->chain_item = itemdb_chain_item; + itemdb->package_item = itemdb_package_item; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 44b455d80..5e870a5f2 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -9,18 +9,29 @@ #include "../common/mmo.h" // ITEM_NAME_LENGTH #include "map.h" -// 32k array entries in array (the rest goes to the db) -#define MAX_ITEMDB 0x8000 +/** + * Declarations + **/ +struct item_group; +struct item_package; -#define MAX_RANDITEM 11000 +/** + * Defines + **/ +#define MAX_ITEMDB 0x8000 // 32k array entries in array (the rest goes to the db) +#define MAX_ITEMDELAYS 10 // The maximum number of item delays +#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display. +#define MAX_ITEMS_PER_COMBO 6 /* maximum amount of items a combo may require */ -// The maximum number of item delays -#define MAX_ITEMDELAYS 10 +#define CARD0_FORGE 0x00FF +#define CARD0_CREATE 0x00FE +#define CARD0_PET ((short)0xFF00) -#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display. +//Marks if the card0 given is "special" (non-item id used to mark pets/created items. [Skotlex] +#define itemdb_isspecial(i) (i == CARD0_FORGE || i == CARD0_CREATE || i == CARD0_PET) -/* maximum amount of items a combo may require */ -#define MAX_ITEMS_PER_COMBO 6 +//Use apple for unknown items. +#define UNKNOWN_ITEM_ID 512 enum item_itemid { ITEMID_HOLY_WATER = 523, @@ -76,21 +87,12 @@ enum { NOUSE_SITTING = 0x01, } item_nouse_list; -//The only item group required by the code to be known. See const.txt for the full list. -#define IG_FINDINGORE 6 -#define IG_POTION 37 -//The max. item group count (increase this when needed). -#define MAX_ITEMGROUP 63 - -#define CARD0_FORGE 0x00FF -#define CARD0_CREATE 0x00FE -#define CARD0_PET ((short)0xFF00) - -//Marks if the card0 given is "special" (non-item id used to mark pets/created items. [Skotlex] -#define itemdb_isspecial(i) (i == CARD0_FORGE || i == CARD0_CREATE || i == CARD0_PET) - -//Use apple for unknown items. -#define UNKNOWN_ITEM_ID 512 +// +enum e_chain_cache { + ECC_ORE, + /* */ + ECC_MAX, +}; struct item_data { uint16 nameid; @@ -152,11 +154,9 @@ struct item_data { /* bugreport:309 */ struct item_combo **combos; unsigned char combos_count; -}; - -struct item_group { - int nameid[MAX_RANDITEM]; - int qty; //Counts amount of items in the group. + /* TODO add a pointer to some sort of (struct extra) and gather all the not-common vals into it to save memory */ + struct item_group *group; + struct item_package *package; }; struct item_combo { @@ -167,29 +167,65 @@ struct item_combo { bool isRef;/* whether this struct is a reference or the master */ }; -struct item_group itemgroup_db[MAX_ITEMGROUP]; - -struct item_data* itemdb_searchname(const char *name); -int itemdb_searchname_array(struct item_data** data, int size, const char *str); -struct item_data* itemdb_load(int nameid); -struct item_data* itemdb_search(int nameid); -struct item_data* itemdb_exists(int nameid); -#define itemdb_name(n) itemdb_search(n)->name -#define itemdb_jname(n) itemdb_search(n)->jname -#define itemdb_type(n) itemdb_search(n)->type -#define itemdb_atk(n) itemdb_search(n)->atk -#define itemdb_def(n) itemdb_search(n)->def -#define itemdb_look(n) itemdb_search(n)->look -#define itemdb_weight(n) itemdb_search(n)->weight -#define itemdb_equip(n) itemdb_search(n)->equip -#define itemdb_usescript(n) itemdb_search(n)->script -#define itemdb_equipscript(n) itemdb_search(n)->script -#define itemdb_wlv(n) itemdb_search(n)->wlv -#define itemdb_range(n) itemdb_search(n)->range -#define itemdb_slot(n) itemdb_search(n)->slot -#define itemdb_available(n) (itemdb_search(n)->flag.available) -#define itemdb_viewid(n) (itemdb_search(n)->view_id) -#define itemdb_autoequip(n) (itemdb_search(n)->flag.autoequip) +struct item_group { + unsigned short id; + unsigned short *nameid; + unsigned short qty; +}; + +struct item_chain_entry { + unsigned short id; + unsigned short rate; + struct item_chain_entry *next; +}; + +struct item_chain { + struct item_chain_entry *items; + unsigned short qty; +}; + +struct item_package_rand_entry { + unsigned short id; + unsigned short qty; + unsigned short rate; + unsigned short hours; + unsigned int announce : 1; + unsigned int named : 1; + struct item_package_rand_entry *next; +}; + +struct item_package_must_entry { + unsigned short id; + unsigned short qty; + unsigned short hours; + unsigned int announce : 1; + unsigned int named : 1; +}; + +struct item_package { + unsigned short id; + struct item_package_rand_entry *random_list; + struct item_package_must_entry *must_items; + unsigned short random_qty; + unsigned short must_qty; +}; + +#define itemdb_name(n) itemdb->search(n)->name +#define itemdb_jname(n) itemdb->search(n)->jname +#define itemdb_type(n) itemdb->search(n)->type +#define itemdb_atk(n) itemdb->search(n)->atk +#define itemdb_def(n) itemdb->search(n)->def +#define itemdb_look(n) itemdb->search(n)->look +#define itemdb_weight(n) itemdb->search(n)->weight +#define itemdb_equip(n) itemdb->search(n)->equip +#define itemdb_usescript(n) itemdb->search(n)->script +#define itemdb_equipscript(n) itemdb->search(n)->script +#define itemdb_wlv(n) itemdb->search(n)->wlv +#define itemdb_range(n) itemdb->search(n)->range +#define itemdb_slot(n) itemdb->search(n)->slot +#define itemdb_available(n) (itemdb->search(n)->flag.available) +#define itemdb_viewid(n) (itemdb->search(n)->view_id) +#define itemdb_autoequip(n) (itemdb->search(n)->flag.autoequip) #define itemdb_is_rune(n) (n >= ITEMID_NAUTHIZ && n <= ITEMID_HAGALAZ) #define itemdb_is_element(n) (n >= 990 && n <= 993) #define itemdb_is_spellbook(n) (n >= 6188 && n <= 6205) @@ -200,12 +236,9 @@ struct item_data* itemdb_exists(int nameid); #define itemdb_is_GNthrowable(n) (n >= 13268 && n <= 13290) const char* itemdb_typename(int type); -int itemdb_group_bonus(struct map_session_data* sd, int itemid); -int itemdb_searchrandomid(int flags); - -#define itemdb_value_buy(n) itemdb_search(n)->value_buy -#define itemdb_value_sell(n) itemdb_search(n)->value_sell -#define itemdb_canrefine(n) (!itemdb_search(n)->flag.no_refine) +#define itemdb_value_buy(n) itemdb->search(n)->value_buy +#define itemdb_value_sell(n) itemdb->search(n)->value_sell +#define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) //Item trade restrictions [Skotlex] int itemdb_isdropable_sub(struct item_data *, int, int); int itemdb_cantrade_sub(struct item_data*, int, int); @@ -235,17 +268,40 @@ int itemdb_isstackable(int); int itemdb_isstackable2(struct item_data *); uint64 itemdb_unique_id(int8 flag, int64 value); // Unique Item ID -void itemdb_reload(void); - -void do_final_itemdb(void); -int do_init_itemdb(void); - /* incomplete */ struct itemdb_interface { + void (*init) (void); + void (*final) (void); void (*reload) (void); + void (*name_constants) (void); + /* */ + struct item_group *groups; + unsigned short group_count; + /* */ + struct item_chain *chains; + unsigned short chain_count; + unsigned short chain_cache[ECC_MAX]; + /* */ + struct item_package *packages; + unsigned short package_count; + /* */ + DBMap *names; + /* */ + void (*read_groups) (void); + void (*read_chains) (void); + void (*read_packages) (void); /* */ + struct item_data* (*name2id) (const char *str); + struct item_data* (*search_name) (const char *name); + int (*search_name_array) (struct item_data** data, int size, const char *str); + struct item_data* (*load)(int nameid); + struct item_data* (*search)(int nameid); int (*parse_dbrow) (char** str, const char* source, int line, int scriptopt); struct item_data* (*exists) (int nameid); + bool (*in_group) (struct item_group *group, int nameid); + int (*group_item) (struct item_group *group); + int (*chain_item) (unsigned short chain_id, int *rate); + void (*package_item) (struct map_session_data *sd, struct item_package *package); } itemdb_s; struct itemdb_interface *itemdb; diff --git a/src/map/log.c b/src/map/log.c index dfb4c4a61..ae516b84e 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -187,14 +187,14 @@ void log_pick(int id, int16 m, e_log_pick_type type, int amount, struct item* it /// logs item transactions (players) void log_pick_pc(struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm, struct item_data *data) { nullpo_retv(sd); - log_pick(sd->status.char_id, sd->bl.m, type, amount, itm, data ? data : itemdb_exists(itm->nameid)); + log_pick(sd->status.char_id, sd->bl.m, type, amount, itm, data ? data : itemdb->exists(itm->nameid)); } /// logs item transactions (monsters) void log_pick_mob(struct mob_data* md, e_log_pick_type type, int amount, struct item* itm, struct item_data *data) { nullpo_retv(md); - log_pick(md->class_, md->bl.m, type, amount, itm, data ? data : itemdb_exists(itm->nameid)); + log_pick(md->class_, md->bl.m, type, amount, itm, data ? data : itemdb->exists(itm->nameid)); } 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')", diff --git a/src/map/map.c b/src/map/map.c index fbdb7a9f9..956ae5969 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3842,7 +3842,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { int drop_id = 0, drop_type = 0; if (!strcmpi(drop_arg1, "random")) drop_id = -1; - else if (itemdb_exists((drop_id = atoi(drop_arg1))) == NULL) + else if (itemdb->exists((drop_id = atoi(drop_arg1))) == NULL) drop_id = 0; if (!strcmpi(drop_arg2, "inventory")) drop_type = 1; @@ -4441,11 +4441,11 @@ unsigned short map_zone_str2itemid(const char *name) { if( !name ) return 0; if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) { - if( !( data = itemdb_exists(atoi(name+2))) ) { + if( !( data = itemdb->exists(atoi(name+2))) ) { return 0; } } else { - if( !( data = itemdb_searchname(name) ) ) { + if( !( data = itemdb->search_name(name) ) ) { return 0; } } @@ -5030,7 +5030,7 @@ void do_final(void) clif->final(); do_final_npc(); script->final(); - do_final_itemdb(); + itemdb->final(); storage->final(); guild->final(); party->do_final_party(); @@ -5466,7 +5466,7 @@ int do_init(int argc, char *argv[]) clif->init(); ircbot->init(); script->init(); - do_init_itemdb(); + itemdb->init(); skill->init(); read_map_zone_db();/* read after item and skill initalization */ do_init_mob(); diff --git a/src/map/map.h b/src/map/map.h index 3e7c45bc3..1b15b477d 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -386,7 +386,7 @@ enum _sp { SP_SUBSIZE, SP_HP_DRAIN_VALUE_RACE, SP_ADD_ITEM_HEAL_RATE, SP_SP_DRAIN_VALUE_RACE, SP_EXP_ADDRACE, // 2026-2030 SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 2031-2033 SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037 - SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040 + SP_INTRAVISION, SP_ADD_MONSTER_DROP_CHAINITEM, SP_SP_LOSS_RATE, // 2038-2040 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 diff --git a/src/map/mob.c b/src/map/mob.c index 6bb40478f..3f282bf7e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2330,7 +2330,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if (md->db->dropitem[i].nameid <= 0) continue; - if ( !(it = itemdb_exists(md->db->dropitem[i].nameid)) ) + if ( !(it = itemdb->exists(md->db->dropitem[i].nameid)) ) continue; drop_rate = md->db->dropitem[i].p; if (drop_rate <= 0) { @@ -2394,9 +2394,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } // Ore Discovery [Celest] - if (sd == mvp_sd && pc->checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/10 >= rnd()%10000) { - ditem = mob_setdropitem(itemdb_searchrandomid(IG_FINDINGORE), 1, NULL); - mob_item_drop(md, dlist, ditem, 0, battle_config.finding_ore_rate/10, homkillonly); + if (sd == mvp_sd && pc->checkskill(sd,BS_FINDINGORE) > 0) { + if( (temp = itemdb->chain_item(itemdb->chain_cache[ECC_ORE],&i)) ) { + ditem = mob_setdropitem(temp, 1, NULL); + mob_item_drop(md, dlist, ditem, 0, i, homkillonly); + } } if(sd) { @@ -2424,8 +2426,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if (rnd()%10000 >= drop_rate) continue; - itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id : itemdb_searchrandomid(sd->add_drop[i].group); - mob_item_drop(md, dlist, mob_setdropitem(itemid,1,NULL), 0, drop_rate, homkillonly); + itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id : itemdb->chain_item(sd->add_drop[i].group,&drop_rate); + if( itemid ) + mob_item_drop(md, dlist, mob_setdropitem(itemid,1,NULL), 0, drop_rate, homkillonly); } } @@ -2504,7 +2507,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) struct item_data *data; if(mdrop_id[i] <= 0) continue; - if(! (data = itemdb_exists(mdrop_id[i])) ) + if(! (data = itemdb->exists(mdrop_id[i])) ) continue; temp = mdrop_p[i]; @@ -3785,7 +3788,7 @@ static bool mob_parse_dbrow(char** str) //calculate and store Max available drop chance of the MVP item if (db->mvpitem[i].p) { struct item_data *id; - id = itemdb_search(db->mvpitem[i].nameid); + id = itemdb->search(db->mvpitem[i].nameid); if (id->maxchance == -1 || (id->maxchance < db->mvpitem[i].p/10 + 1) ) { //item has bigger drop chance or sold in shops id->maxchance = db->mvpitem[i].p/10 + 1; //reduce MVP drop info to not spoil common drop rate @@ -3803,7 +3806,7 @@ static bool mob_parse_dbrow(char** str) db->dropitem[i].p = 0; //No drop. continue; } - id = itemdb_search(db->dropitem[i].nameid); + id = itemdb->search(db->dropitem[i].nameid); type = id->type; rate = atoi(str[k+1]); if( (class_ >= 1324 && class_ <= 1363) || (class_ >= 1938 && class_ <= 1946) ) @@ -4560,7 +4563,7 @@ static bool mob_readdb_itemratio(char* str[], int columns, int current) int nameid, ratio, i; nameid = atoi(str[0]); - if( itemdb_exists(nameid) == NULL ) + if( itemdb->exists(nameid) == NULL ) { ShowWarning("itemdb_read_itemratio: Invalid item id %d.\n", nameid); return false; diff --git a/src/map/npc.c b/src/map/npc.c index 46e6d0fd2..d90f87f5d 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -610,18 +610,14 @@ int npc_timerevent_start(struct npc_data* nd, int rid) ShowError("npc_timerevent_start: Attached player not found!\n"); return 1; } - // Check if timer is already started. - if( sd ) - { + if( sd ) { if( sd->npc_timer_id != INVALID_TIMER ) return 0; - } - else if( nd->u.scr.timerid != INVALID_TIMER || nd->u.scr.timertick ) + } else if( nd->u.scr.timerid != INVALID_TIMER || nd->u.scr.timertick ) return 0; - if (j < nd->u.scr.timeramount) - { + if (j < nd->u.scr.timeramount) { int next; struct timer_event_data *ted; // Arrange for the next event @@ -640,10 +636,10 @@ int npc_timerevent_start(struct npc_data* nd, int rid) nd->u.scr.timertick = tick; // Set when timer is started nd->u.scr.timerid = iTimer->add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr_t)ted); } - } - else if (!sd) - { + + } else if (!sd) { nd->u.scr.timertick = tick; + } return 0; @@ -664,7 +660,6 @@ int npc_timerevent_stop(struct npc_data* nd) ShowError("npc_timerevent_stop: Attached player not found!\n"); return 1; } - tid = sd?&sd->npc_timer_id:&nd->u.scr.timerid; if( *tid == INVALID_TIMER && (sd || !nd->u.scr.timertick) ) // Nothing to stop return 0; @@ -785,7 +780,7 @@ int npc_settimerevent_tick(struct npc_data* nd, int newtimer) nd->u.scr.rid = 0; // Check if timer is started - flag = (nd->u.scr.timerid != INVALID_TIMER); + flag = (nd->u.scr.timerid != INVALID_TIMER || nd->u.scr.timertick); if( flag ) npc_timerevent_stop(nd); nd->u.scr.timer = newtimer; @@ -1322,7 +1317,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns nameid = item_list[i*2+1]; amount = item_list[i*2+0]; - if( !itemdb_exists(nameid) || amount <= 0 ) + if( !itemdb->exists(nameid) || amount <= 0 ) return 5; ARR_FIND(0,nd->u.shop.count,j,nd->u.shop.shop_item[j].nameid == nameid); @@ -1427,7 +1422,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po if( sd->state.trading ) return 4; - if( (item = itemdb_exists(nameid)) == NULL ) + if( (item = itemdb->exists(nameid)) == NULL ) return 5; // Invalid Item ARR_FIND(0, nd->u.shop.count, i, nd->u.shop.shop_item[i].nameid == nameid); @@ -1526,7 +1521,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) nameid = item_list[i*2+1] = nd->u.shop.shop_item[j].nameid; //item_avail replacement value = nd->u.shop.shop_item[j].value; - if( !itemdb_exists(nameid) ) + if( !itemdb->exists(nameid) ) return 3; // item no longer in itemdb if( !itemdb_isstackable(nameid) && amount > 1 ) { @@ -2211,7 +2206,7 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const break; } - if( (id = itemdb_exists(nameid)) == NULL ) + if( (id = itemdb->exists(nameid)) == NULL ) { ShowWarning("npc_parse_shop: Invalid sell item in file '%s', line '%d' (id '%d').\n", filepath, strline(buffer,start-buffer), nameid); p = strchr(p+1,','); @@ -3230,7 +3225,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char int drop_id = 0, drop_type = 0; if (!strcmpi(drop_arg1, "random")) drop_id = -1; - else if (itemdb_exists((drop_id = atoi(drop_arg1))) == NULL) + else if (itemdb->exists((drop_id = atoi(drop_arg1))) == NULL) drop_id = 0; if (!strcmpi(drop_arg2, "inventory")) drop_type = 1; @@ -3850,6 +3845,9 @@ int npc_reload(void) { npc->motd = npc_name2id("HerculesMOTD"); /* [Ind/Hercules] */ + /* re-insert */ + itemdb->name_constants(); + //Re-read the NPC Script Events cache. npc_read_event_script(); diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 083c00e31..1a52040a8 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -73,6 +73,7 @@ enum packet_headers { authokType = 0x2eb, #endif script_clearType = 0x8d6, + package_item_announceType = 0x7fd, #if PACKETVER < 4 unit_walkingType = 0x7b, #elif PACKETVER < 7 @@ -459,6 +460,15 @@ struct packet_script_clear { unsigned int NpcID; } __attribute__((packed)); +struct packet_package_item_announce { + short PacketType; + short PacketLength; + unsigned char type; + unsigned short ItemID; + char len; + char Name[NAME_LENGTH]; + unsigned short BoxItemID; +} __attribute__((packed)); #pragma pack(pop) diff --git a/src/map/pc.c b/src/map/pc.c index d8e2a0537..ec1036749 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -619,7 +619,7 @@ int pc_setinventorydata(struct map_session_data *sd) for(i=0;istatus.inventory[i].nameid; - sd->inventory_data[i] = id?itemdb_search(id):NULL; + sd->inventory_data[i] = id?itemdb->search(id):NULL; } return 0; } @@ -720,7 +720,7 @@ int pc_setequipindex(struct map_session_data *sd) // if( item->card[MAX_SLOTS - 1] && s < MAX_SLOTS - 1 ) // s = MAX_SLOTS - 1; // -// ARR_FIND( 0, s, i, item->card[i] && (data = itemdb_exists(item->card[i])) != NULL && data->flag.no_equip&flag ); +// ARR_FIND( 0, s, i, item->card[i] && (data = itemdb->exists(item->card[i])) != NULL && data->flag.no_equip&flag ); // return( i < s ) ? 0 : 1; //} @@ -1809,9 +1809,9 @@ static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, e return 1; } -static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) -{ +static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) { int i; + ShowDebug("Adding %s (%d) with rate %d\n",id?itemdb_name(id):"NONE",id,rate); //Apply config rate adjustment settings. if (rate >= 0) { //Absolute drop. if (battle_config.item_rate_adddrop != 100) @@ -1851,6 +1851,8 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id ShowWarning("pc_bonus: Reached max (%d) number of added drops per character!\n", max); return 0; } + if( id ) + ShowDebug("Adding %s (%d) with rate %d\n",itemdb_name(id),id,rate); drop[i].id = id; drop[i].group = group; drop[i].race |= race; @@ -2638,6 +2640,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val) break; #endif + case SP_ADD_MONSTER_DROP_CHAINITEM: + if (sd->state.lr_flag != 2) + pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, (1<= ELE_MAX) { - ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", type2); + case SP_ADDELE: + if(type2 >= ELE_MAX) { + ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", type2); + break; + } + if(!sd->state.lr_flag) + sd->right_weapon.addele[type2]+=val; + else if(sd->state.lr_flag == 1) + sd->left_weapon.addele[type2]+=val; + else if(sd->state.lr_flag == 2) + sd->arrow_addele[type2]+=val; break; - } - if(!sd->state.lr_flag) - sd->right_weapon.addele[type2]+=val; - else if(sd->state.lr_flag == 1) - sd->left_weapon.addele[type2]+=val; - else if(sd->state.lr_flag == 2) - sd->arrow_addele[type2]+=val; - break; - case SP_ADDRACE: - if(!sd->state.lr_flag) - sd->right_weapon.addrace[type2]+=val; - else if(sd->state.lr_flag == 1) - sd->left_weapon.addrace[type2]+=val; - else if(sd->state.lr_flag == 2) - sd->arrow_addrace[type2]+=val; - break; - case SP_ADDSIZE: - if(!sd->state.lr_flag) - sd->right_weapon.addsize[type2]+=val; - else if(sd->state.lr_flag == 1) - sd->left_weapon.addsize[type2]+=val; - else if(sd->state.lr_flag == 2) - sd->arrow_addsize[type2]+=val; - break; - case SP_SUBELE: - if(type2 >= ELE_MAX) { - ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", type2); + case SP_ADDRACE: + if(!sd->state.lr_flag) + sd->right_weapon.addrace[type2]+=val; + else if(sd->state.lr_flag == 1) + sd->left_weapon.addrace[type2]+=val; + else if(sd->state.lr_flag == 2) + sd->arrow_addrace[type2]+=val; break; - } - if(sd->state.lr_flag != 2) - sd->subele[type2]+=val; - break; - case SP_SUBRACE: - if(sd->state.lr_flag != 2) - sd->subrace[type2]+=val; - break; - case SP_ADDEFF: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus2 (Add Effect): %d is not supported.\n", type2); + case SP_ADDSIZE: + if(!sd->state.lr_flag) + sd->right_weapon.addsize[type2]+=val; + else if(sd->state.lr_flag == 1) + sd->left_weapon.addsize[type2]+=val; + else if(sd->state.lr_flag == 2) + sd->arrow_addsize[type2]+=val; break; - } - pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, - sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, 0); - break; - case SP_ADDEFF2: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus2 (Add Effect2): %d is not supported.\n", type2); + case SP_SUBELE: + if(type2 >= ELE_MAX) { + ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", type2); + break; + } + if(sd->state.lr_flag != 2) + sd->subele[type2]+=val; break; - } - pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, - sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, ATF_SELF); - break; - case SP_RESEFF: - if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) { - ShowWarning("pc_bonus2 (Resist Effect): %d is not supported.\n", type2); + case SP_SUBRACE: + if(sd->state.lr_flag != 2) + sd->subrace[type2]+=val; break; - } - if(sd->state.lr_flag == 2) + case SP_ADDEFF: + if (type2 > SC_MAX) { + ShowWarning("pc_bonus2 (Add Effect): %d is not supported.\n", type2); + break; + } + pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, + sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, 0); break; - i = sd->reseff[type2-SC_COMMON_MIN]+val; - sd->reseff[type2-SC_COMMON_MIN]= cap_value(i, 0, 10000); - break; - case SP_MAGIC_ADDELE: - if(type2 >= ELE_MAX) { - ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", type2); + case SP_ADDEFF2: + if (type2 > SC_MAX) { + ShowWarning("pc_bonus2 (Add Effect2): %d is not supported.\n", type2); + break; + } + pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, + sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, ATF_SELF); break; - } - if(sd->state.lr_flag != 2) - sd->magic_addele[type2]+=val; - break; - case SP_MAGIC_ADDRACE: - if(sd->state.lr_flag != 2) - sd->magic_addrace[type2]+=val; - break; - case SP_MAGIC_ADDSIZE: - if(sd->state.lr_flag != 2) - sd->magic_addsize[type2]+=val; - break; - case SP_MAGIC_ATK_ELE: - if(sd->state.lr_flag != 2) - sd->magic_atk_ele[type2]+=val; - break; - case SP_ADD_DAMAGE_CLASS: - switch (sd->state.lr_flag) { - case 0: //Right hand - ARR_FIND(0, ARRAYLENGTH(sd->right_weapon.add_dmg), i, sd->right_weapon.add_dmg[i].rate == 0 || sd->right_weapon.add_dmg[i].class_ == type2); - if (i == ARRAYLENGTH(sd->right_weapon.add_dmg)) - { - ShowWarning("pc_bonus2: Reached max (%d) number of add Class dmg bonuses per character!\n", ARRAYLENGTH(sd->right_weapon.add_dmg)); + case SP_RESEFF: + if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) { + ShowWarning("pc_bonus2 (Resist Effect): %d is not supported.\n", type2); + break; + } + if(sd->state.lr_flag == 2) + break; + i = sd->reseff[type2-SC_COMMON_MIN]+val; + sd->reseff[type2-SC_COMMON_MIN]= cap_value(i, 0, 10000); + break; + case SP_MAGIC_ADDELE: + if(type2 >= ELE_MAX) { + ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", type2); + break; + } + if(sd->state.lr_flag != 2) + sd->magic_addele[type2]+=val; + break; + case SP_MAGIC_ADDRACE: + if(sd->state.lr_flag != 2) + sd->magic_addrace[type2]+=val; + break; + case SP_MAGIC_ADDSIZE: + if(sd->state.lr_flag != 2) + sd->magic_addsize[type2]+=val; + break; + case SP_MAGIC_ATK_ELE: + if(sd->state.lr_flag != 2) + sd->magic_atk_ele[type2]+=val; + break; + case SP_ADD_DAMAGE_CLASS: + switch (sd->state.lr_flag) { + case 0: //Right hand + ARR_FIND(0, ARRAYLENGTH(sd->right_weapon.add_dmg), i, sd->right_weapon.add_dmg[i].rate == 0 || sd->right_weapon.add_dmg[i].class_ == type2); + if (i == ARRAYLENGTH(sd->right_weapon.add_dmg)) + { + ShowWarning("pc_bonus2: Reached max (%d) number of add Class dmg bonuses per character!\n", ARRAYLENGTH(sd->right_weapon.add_dmg)); + break; + } + sd->right_weapon.add_dmg[i].class_ = type2; + sd->right_weapon.add_dmg[i].rate += val; + if (!sd->right_weapon.add_dmg[i].rate) //Shift the rest of elements up. + memmove(&sd->right_weapon.add_dmg[i], &sd->right_weapon.add_dmg[i+1], sizeof(sd->right_weapon.add_dmg) - (i+1)*sizeof(sd->right_weapon.add_dmg[0])); + break; + case 1: //Left hand + ARR_FIND(0, ARRAYLENGTH(sd->left_weapon.add_dmg), i, sd->left_weapon.add_dmg[i].rate == 0 || sd->left_weapon.add_dmg[i].class_ == type2); + if (i == ARRAYLENGTH(sd->left_weapon.add_dmg)) + { + ShowWarning("pc_bonus2: Reached max (%d) number of add Class dmg bonuses per character!\n", ARRAYLENGTH(sd->left_weapon.add_dmg)); + break; + } + sd->left_weapon.add_dmg[i].class_ = type2; + sd->left_weapon.add_dmg[i].rate += val; + if (!sd->left_weapon.add_dmg[i].rate) //Shift the rest of elements up. + memmove(&sd->left_weapon.add_dmg[i], &sd->left_weapon.add_dmg[i+1], sizeof(sd->left_weapon.add_dmg) - (i+1)*sizeof(sd->left_weapon.add_dmg[0])); break; } - sd->right_weapon.add_dmg[i].class_ = type2; - sd->right_weapon.add_dmg[i].rate += val; - if (!sd->right_weapon.add_dmg[i].rate) //Shift the rest of elements up. - memmove(&sd->right_weapon.add_dmg[i], &sd->right_weapon.add_dmg[i+1], sizeof(sd->right_weapon.add_dmg) - (i+1)*sizeof(sd->right_weapon.add_dmg[0])); break; - case 1: //Left hand - ARR_FIND(0, ARRAYLENGTH(sd->left_weapon.add_dmg), i, sd->left_weapon.add_dmg[i].rate == 0 || sd->left_weapon.add_dmg[i].class_ == type2); - if (i == ARRAYLENGTH(sd->left_weapon.add_dmg)) + case SP_ADD_MAGIC_DAMAGE_CLASS: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->add_mdmg), i, sd->add_mdmg[i].rate == 0 || sd->add_mdmg[i].class_ == type2); + if (i == ARRAYLENGTH(sd->add_mdmg)) { - ShowWarning("pc_bonus2: Reached max (%d) number of add Class dmg bonuses per character!\n", ARRAYLENGTH(sd->left_weapon.add_dmg)); + ShowWarning("pc_bonus2: Reached max (%d) number of add Class magic dmg bonuses per character!\n", ARRAYLENGTH(sd->add_mdmg)); break; } - sd->left_weapon.add_dmg[i].class_ = type2; - sd->left_weapon.add_dmg[i].rate += val; - if (!sd->left_weapon.add_dmg[i].rate) //Shift the rest of elements up. - memmove(&sd->left_weapon.add_dmg[i], &sd->left_weapon.add_dmg[i+1], sizeof(sd->left_weapon.add_dmg) - (i+1)*sizeof(sd->left_weapon.add_dmg[0])); + sd->add_mdmg[i].class_ = type2; + sd->add_mdmg[i].rate += val; + if (!sd->add_mdmg[i].rate) //Shift the rest of elements up. + memmove(&sd->add_mdmg[i], &sd->add_mdmg[i+1], sizeof(sd->add_mdmg) - (i+1)*sizeof(sd->add_mdmg[0])); break; - } - break; - case SP_ADD_MAGIC_DAMAGE_CLASS: - if(sd->state.lr_flag == 2) + case SP_ADD_DEF_CLASS: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->add_def), i, sd->add_def[i].rate == 0 || sd->add_def[i].class_ == type2); + if (i == ARRAYLENGTH(sd->add_def)) + { + ShowWarning("pc_bonus2: Reached max (%d) number of add Class def bonuses per character!\n", ARRAYLENGTH(sd->add_def)); + break; + } + sd->add_def[i].class_ = type2; + sd->add_def[i].rate += val; + if (!sd->add_def[i].rate) //Shift the rest of elements up. + memmove(&sd->add_def[i], &sd->add_def[i+1], sizeof(sd->add_def) - (i+1)*sizeof(sd->add_def[0])); break; - ARR_FIND(0, ARRAYLENGTH(sd->add_mdmg), i, sd->add_mdmg[i].rate == 0 || sd->add_mdmg[i].class_ == type2); - if (i == ARRAYLENGTH(sd->add_mdmg)) - { - ShowWarning("pc_bonus2: Reached max (%d) number of add Class magic dmg bonuses per character!\n", ARRAYLENGTH(sd->add_mdmg)); + case SP_ADD_MDEF_CLASS: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->add_mdef), i, sd->add_mdef[i].rate == 0 || sd->add_mdef[i].class_ == type2); + if (i == ARRAYLENGTH(sd->add_mdef)) + { + ShowWarning("pc_bonus2: Reached max (%d) number of add Class mdef bonuses per character!\n", ARRAYLENGTH(sd->add_mdef)); + break; + } + sd->add_mdef[i].class_ = type2; + sd->add_mdef[i].rate += val; + if (!sd->add_mdef[i].rate) //Shift the rest of elements up. + memmove(&sd->add_mdef[i], &sd->add_mdef[i+1], sizeof(sd->add_mdef) - (i+1)*sizeof(sd->add_mdef[0])); break; - } - sd->add_mdmg[i].class_ = type2; - sd->add_mdmg[i].rate += val; - if (!sd->add_mdmg[i].rate) //Shift the rest of elements up. - memmove(&sd->add_mdmg[i], &sd->add_mdmg[i+1], sizeof(sd->add_mdmg) - (i+1)*sizeof(sd->add_mdmg[0])); - break; - case SP_ADD_DEF_CLASS: - if(sd->state.lr_flag == 2) + case SP_HP_DRAIN_RATE: + if(!sd->state.lr_flag) { + sd->right_weapon.hp_drain[RC_NONBOSS].rate += type2; + sd->right_weapon.hp_drain[RC_NONBOSS].per += val; + sd->right_weapon.hp_drain[RC_BOSS].rate += type2; + sd->right_weapon.hp_drain[RC_BOSS].per += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.hp_drain[RC_NONBOSS].rate += type2; + sd->left_weapon.hp_drain[RC_NONBOSS].per += val; + sd->left_weapon.hp_drain[RC_BOSS].rate += type2; + sd->left_weapon.hp_drain[RC_BOSS].per += val; + } break; - ARR_FIND(0, ARRAYLENGTH(sd->add_def), i, sd->add_def[i].rate == 0 || sd->add_def[i].class_ == type2); - if (i == ARRAYLENGTH(sd->add_def)) - { - ShowWarning("pc_bonus2: Reached max (%d) number of add Class def bonuses per character!\n", ARRAYLENGTH(sd->add_def)); + case SP_HP_DRAIN_VALUE: + if(!sd->state.lr_flag) { + sd->right_weapon.hp_drain[RC_NONBOSS].value += type2; + sd->right_weapon.hp_drain[RC_NONBOSS].type = val; + sd->right_weapon.hp_drain[RC_BOSS].value += type2; + sd->right_weapon.hp_drain[RC_BOSS].type = val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.hp_drain[RC_NONBOSS].value += type2; + sd->left_weapon.hp_drain[RC_NONBOSS].type = val; + sd->left_weapon.hp_drain[RC_BOSS].value += type2; + sd->left_weapon.hp_drain[RC_BOSS].type = val; + } break; - } - sd->add_def[i].class_ = type2; - sd->add_def[i].rate += val; - if (!sd->add_def[i].rate) //Shift the rest of elements up. - memmove(&sd->add_def[i], &sd->add_def[i+1], sizeof(sd->add_def) - (i+1)*sizeof(sd->add_def[0])); - break; - case SP_ADD_MDEF_CLASS: - if(sd->state.lr_flag == 2) + case SP_SP_DRAIN_RATE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[RC_NONBOSS].rate += type2; + sd->right_weapon.sp_drain[RC_NONBOSS].per += val; + sd->right_weapon.sp_drain[RC_BOSS].rate += type2; + sd->right_weapon.sp_drain[RC_BOSS].per += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[RC_NONBOSS].rate += type2; + sd->left_weapon.sp_drain[RC_NONBOSS].per += val; + sd->left_weapon.sp_drain[RC_BOSS].rate += type2; + sd->left_weapon.sp_drain[RC_BOSS].per += val; + } break; - ARR_FIND(0, ARRAYLENGTH(sd->add_mdef), i, sd->add_mdef[i].rate == 0 || sd->add_mdef[i].class_ == type2); - if (i == ARRAYLENGTH(sd->add_mdef)) - { - ShowWarning("pc_bonus2: Reached max (%d) number of add Class mdef bonuses per character!\n", ARRAYLENGTH(sd->add_mdef)); + case SP_SP_DRAIN_VALUE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[RC_NONBOSS].value += type2; + sd->right_weapon.sp_drain[RC_NONBOSS].type = val; + sd->right_weapon.sp_drain[RC_BOSS].value += type2; + sd->right_weapon.sp_drain[RC_BOSS].type = val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[RC_NONBOSS].value += type2; + sd->left_weapon.sp_drain[RC_NONBOSS].type = val; + sd->left_weapon.sp_drain[RC_BOSS].value += type2; + sd->left_weapon.sp_drain[RC_BOSS].type = val; + } break; - } - sd->add_mdef[i].class_ = type2; - sd->add_mdef[i].rate += val; - if (!sd->add_mdef[i].rate) //Shift the rest of elements up. - memmove(&sd->add_mdef[i], &sd->add_mdef[i+1], sizeof(sd->add_mdef) - (i+1)*sizeof(sd->add_mdef[0])); - break; - case SP_HP_DRAIN_RATE: - if(!sd->state.lr_flag) { - sd->right_weapon.hp_drain[RC_NONBOSS].rate += type2; - sd->right_weapon.hp_drain[RC_NONBOSS].per += val; - sd->right_weapon.hp_drain[RC_BOSS].rate += type2; - sd->right_weapon.hp_drain[RC_BOSS].per += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.hp_drain[RC_NONBOSS].rate += type2; - sd->left_weapon.hp_drain[RC_NONBOSS].per += val; - sd->left_weapon.hp_drain[RC_BOSS].rate += type2; - sd->left_weapon.hp_drain[RC_BOSS].per += val; - } - break; - case SP_HP_DRAIN_VALUE: - if(!sd->state.lr_flag) { - sd->right_weapon.hp_drain[RC_NONBOSS].value += type2; - sd->right_weapon.hp_drain[RC_NONBOSS].type = val; - sd->right_weapon.hp_drain[RC_BOSS].value += type2; - sd->right_weapon.hp_drain[RC_BOSS].type = val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.hp_drain[RC_NONBOSS].value += type2; - sd->left_weapon.hp_drain[RC_NONBOSS].type = val; - sd->left_weapon.hp_drain[RC_BOSS].value += type2; - sd->left_weapon.hp_drain[RC_BOSS].type = val; - } - break; - case SP_SP_DRAIN_RATE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[RC_NONBOSS].rate += type2; - sd->right_weapon.sp_drain[RC_NONBOSS].per += val; - sd->right_weapon.sp_drain[RC_BOSS].rate += type2; - sd->right_weapon.sp_drain[RC_BOSS].per += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[RC_NONBOSS].rate += type2; - sd->left_weapon.sp_drain[RC_NONBOSS].per += val; - sd->left_weapon.sp_drain[RC_BOSS].rate += type2; - sd->left_weapon.sp_drain[RC_BOSS].per += val; - } - break; - case SP_SP_DRAIN_VALUE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[RC_NONBOSS].value += type2; - sd->right_weapon.sp_drain[RC_NONBOSS].type = val; - sd->right_weapon.sp_drain[RC_BOSS].value += type2; - sd->right_weapon.sp_drain[RC_BOSS].type = val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[RC_NONBOSS].value += type2; - sd->left_weapon.sp_drain[RC_NONBOSS].type = val; - sd->left_weapon.sp_drain[RC_BOSS].value += type2; - sd->left_weapon.sp_drain[RC_BOSS].type = val; - } - break; - case SP_SP_VANISH_RATE: - if(sd->state.lr_flag != 2) { - sd->bonus.sp_vanish_rate += type2; - sd->bonus.sp_vanish_per += val; - } - break; - case SP_GET_ZENY_NUM: - if(sd->state.lr_flag != 2 && sd->bonus.get_zeny_rate < val) { - sd->bonus.get_zeny_rate = val; - sd->bonus.get_zeny_num = type2; - } - break; - case SP_ADD_GET_ZENY_NUM: - if(sd->state.lr_flag != 2) { - sd->bonus.get_zeny_rate += val; - sd->bonus.get_zeny_num += type2; - } - break; - case SP_WEAPON_COMA_ELE: - if(type2 >= ELE_MAX) { - ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", type2); + case SP_SP_VANISH_RATE: + if(sd->state.lr_flag != 2) { + sd->bonus.sp_vanish_rate += type2; + sd->bonus.sp_vanish_per += val; + } break; - } - if(sd->state.lr_flag == 2) + case SP_GET_ZENY_NUM: + if(sd->state.lr_flag != 2 && sd->bonus.get_zeny_rate < val) { + sd->bonus.get_zeny_rate = val; + sd->bonus.get_zeny_num = type2; + } break; - sd->weapon_coma_ele[type2] += val; - sd->special_state.bonus_coma = 1; - break; - case SP_WEAPON_COMA_RACE: - if(sd->state.lr_flag == 2) + case SP_ADD_GET_ZENY_NUM: + if(sd->state.lr_flag != 2) { + sd->bonus.get_zeny_rate += val; + sd->bonus.get_zeny_num += type2; + } break; - sd->weapon_coma_race[type2] += val; - sd->special_state.bonus_coma = 1; - break; - case SP_WEAPON_ATK: - if(sd->state.lr_flag != 2) - sd->weapon_atk[type2]+=val; - break; - case SP_WEAPON_ATK_RATE: - if(sd->state.lr_flag != 2) - sd->weapon_atk_rate[type2]+=val; - break; - case SP_CRITICAL_ADDRACE: - if(sd->state.lr_flag != 2) - sd->critaddrace[type2] += val*10; - break; - case SP_ADDEFF_WHENHIT: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus2 (Add Effect when hit): %d is not supported.\n", type2); + case SP_WEAPON_COMA_ELE: + if(type2 >= ELE_MAX) { + ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", type2); + break; + } + if(sd->state.lr_flag == 2) + break; + sd->weapon_coma_ele[type2] += val; + sd->special_state.bonus_coma = 1; break; - } - if(sd->state.lr_flag != 2) - pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, val, 0, 0); - break; - case SP_SKILL_ATK: - if(sd->state.lr_flag == 2) + case SP_WEAPON_COMA_RACE: + if(sd->state.lr_flag == 2) + break; + sd->weapon_coma_race[type2] += val; + sd->special_state.bonus_coma = 1; break; - ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, sd->skillatk[i].id == 0 || sd->skillatk[i].id == type2); - if (i == ARRAYLENGTH(sd->skillatk)) - { //Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bSkillAtk reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillatk), type2, val); + case SP_WEAPON_ATK: + if(sd->state.lr_flag != 2) + sd->weapon_atk[type2]+=val; break; - } - if (sd->skillatk[i].id == type2) - sd->skillatk[i].val += val; - else { - sd->skillatk[i].id = type2; - sd->skillatk[i].val = val; - } - break; - case SP_SKILL_HEAL: - if(sd->state.lr_flag == 2) + case SP_WEAPON_ATK_RATE: + if(sd->state.lr_flag != 2) + sd->weapon_atk_rate[type2]+=val; break; - ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == 0 || sd->skillheal[i].id == type2); - if (i == ARRAYLENGTH(sd->skillheal)) - { // Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bSkillHeal reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal), type2, val); + case SP_CRITICAL_ADDRACE: + if(sd->state.lr_flag != 2) + sd->critaddrace[type2] += val*10; break; - } - if (sd->skillheal[i].id == type2) - sd->skillheal[i].val += val; - else { - sd->skillheal[i].id = type2; - sd->skillheal[i].val = val; - } - break; - case SP_SKILL_HEAL2: - if(sd->state.lr_flag == 2) + case SP_ADDEFF_WHENHIT: + if (type2 > SC_MAX) { + ShowWarning("pc_bonus2 (Add Effect when hit): %d is not supported.\n", type2); + break; + } + if(sd->state.lr_flag != 2) + pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, val, 0, 0); break; - ARR_FIND(0, ARRAYLENGTH(sd->skillheal2), i, sd->skillheal2[i].id == 0 || sd->skillheal2[i].id == type2); - if (i == ARRAYLENGTH(sd->skillheal2)) - { // Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bSkillHeal2 reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal2), type2, val); + case SP_SKILL_ATK: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, sd->skillatk[i].id == 0 || sd->skillatk[i].id == type2); + if (i == ARRAYLENGTH(sd->skillatk)) + { //Better mention this so the array length can be updated. [Skotlex] + ShowDebug("run_script: bonus2 bSkillAtk reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillatk), type2, val); + break; + } + if (sd->skillatk[i].id == type2) + sd->skillatk[i].val += val; + else { + sd->skillatk[i].id = type2; + sd->skillatk[i].val = val; + } break; - } - if (sd->skillheal2[i].id == type2) - sd->skillheal2[i].val += val; - else { - sd->skillheal2[i].id = type2; - sd->skillheal2[i].val = val; - } - break; - case SP_ADD_SKILL_BLOW: - if(sd->state.lr_flag == 2) + case SP_SKILL_HEAL: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == 0 || sd->skillheal[i].id == type2); + if (i == ARRAYLENGTH(sd->skillheal)) + { // Better mention this so the array length can be updated. [Skotlex] + ShowDebug("run_script: bonus2 bSkillHeal reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal), type2, val); + break; + } + if (sd->skillheal[i].id == type2) + sd->skillheal[i].val += val; + else { + sd->skillheal[i].id = type2; + sd->skillheal[i].val = val; + } break; - ARR_FIND(0, ARRAYLENGTH(sd->skillblown), i, sd->skillblown[i].id == 0 || sd->skillblown[i].id == type2); - if (i == ARRAYLENGTH(sd->skillblown)) - { //Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bSkillBlown reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillblown), type2, val); + case SP_SKILL_HEAL2: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillheal2), i, sd->skillheal2[i].id == 0 || sd->skillheal2[i].id == type2); + if (i == ARRAYLENGTH(sd->skillheal2)) + { // Better mention this so the array length can be updated. [Skotlex] + ShowDebug("run_script: bonus2 bSkillHeal2 reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal2), type2, val); + break; + } + if (sd->skillheal2[i].id == type2) + sd->skillheal2[i].val += val; + else { + sd->skillheal2[i].id = type2; + sd->skillheal2[i].val = val; + } break; - } - if(sd->skillblown[i].id == type2) - sd->skillblown[i].val += val; - else { - sd->skillblown[i].id = type2; - sd->skillblown[i].val = val; - } - break; -#ifndef RENEWAL_CAST - case SP_VARCASTRATE: -#endif - case SP_CASTRATE: - if(sd->state.lr_flag == 2) + case SP_ADD_SKILL_BLOW: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillblown), i, sd->skillblown[i].id == 0 || sd->skillblown[i].id == type2); + if (i == ARRAYLENGTH(sd->skillblown)) + { //Better mention this so the array length can be updated. [Skotlex] + ShowDebug("run_script: bonus2 bSkillBlown reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillblown), type2, val); + break; + } + if(sd->skillblown[i].id == type2) + sd->skillblown[i].val += val; + else { + sd->skillblown[i].id = type2; + sd->skillblown[i].val = val; + } break; - 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 %s reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", + #ifndef RENEWAL_CAST + case SP_VARCASTRATE: + #endif + case SP_CASTRATE: + if(sd->state.lr_flag == 2) + break; + 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 %s reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", -#ifndef RENEWAL_CAST - "bCastRate", -#else - "bVariableCastrate", -#endif + #ifndef RENEWAL_CAST + "bCastRate", + #else + "bVariableCastrate", + #endif - ARRAYLENGTH(sd->skillcast), type2, val); + ARRAYLENGTH(sd->skillcast), type2, val); + break; + } + if(sd->skillcast[i].id == type2) + sd->skillcast[i].val += val; + else { + sd->skillcast[i].id = type2; + sd->skillcast[i].val = val; + } break; - } - if(sd->skillcast[i].id == type2) - sd->skillcast[i].val += val; - else { - sd->skillcast[i].id = type2; - sd->skillcast[i].val = val; - } - break; - case SP_FIXCASTRATE: - if(sd->state.lr_flag == 2) - 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); + ARR_FIND(0, ARRAYLENGTH(sd->skillfixcastrate), i, sd->skillfixcastrate[i].id == 0 || sd->skillfixcastrate[i].id == type2); - if (i == ARRAYLENGTH(sd->skillfixcastrate)) + 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; - } + 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; + if(sd->skillfixcastrate[i].id == type2) + sd->skillfixcastrate[i].val += val; - else { - sd->skillfixcastrate[i].id = type2; - sd->skillfixcastrate[i].val = val; - } + else { + sd->skillfixcastrate[i].id = type2; + sd->skillfixcastrate[i].val = val; + } - break; + break; - case SP_HP_LOSS_RATE: - if(sd->state.lr_flag != 2) { - sd->hp_loss.value = type2; - sd->hp_loss.rate = val; - } - break; - case SP_HP_REGEN_RATE: - if(sd->state.lr_flag != 2) { - sd->hp_regen.value = type2; - sd->hp_regen.rate = val; - } - break; - case SP_ADDRACE2: - if (!(type2 > RC2_NONE && type2 < RC2_MAX)) + case SP_HP_LOSS_RATE: + if(sd->state.lr_flag != 2) { + sd->hp_loss.value = type2; + sd->hp_loss.rate = val; + } break; - if(sd->state.lr_flag != 2) - sd->right_weapon.addrace2[type2] += val; - else - sd->left_weapon.addrace2[type2] += val; - break; - case SP_SUBSIZE: - if(sd->state.lr_flag != 2) - sd->subsize[type2]+=val; - break; - case SP_SUBRACE2: - if (!(type2 > RC2_NONE && type2 < RC2_MAX)) + case SP_HP_REGEN_RATE: + if(sd->state.lr_flag != 2) { + sd->hp_regen.value = type2; + sd->hp_regen.rate = val; + } break; - if(sd->state.lr_flag != 2) - sd->subrace2[type2]+=val; - break; - case SP_ADD_ITEM_HEAL_RATE: - if(sd->state.lr_flag == 2) + case SP_ADDRACE2: + if (!(type2 > RC2_NONE && type2 < RC2_MAX)) + break; + if(sd->state.lr_flag != 2) + sd->right_weapon.addrace2[type2] += val; + else + sd->left_weapon.addrace2[type2] += val; break; - if (type2 < MAX_ITEMGROUP) { //Group bonus - sd->itemgrouphealrate[type2] += val; + case SP_SUBSIZE: + if(sd->state.lr_flag != 2) + sd->subsize[type2]+=val; break; - } - //Standard item bonus. - for(i=0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid && sd->itemhealrate[i].nameid != type2; i++); - if(i == ARRAYLENGTH(sd->itemhealrate)) { - ShowWarning("pc_bonus2: Reached max (%d) number of item heal bonuses per character!\n", ARRAYLENGTH(sd->itemhealrate)); + case SP_SUBRACE2: + if (!(type2 > RC2_NONE && type2 < RC2_MAX)) + break; + if(sd->state.lr_flag != 2) + sd->subrace2[type2]+=val; break; - } - sd->itemhealrate[i].nameid = type2; - sd->itemhealrate[i].rate += val; - break; - case SP_EXP_ADDRACE: - if(sd->state.lr_flag != 2) - sd->expaddrace[type2]+=val; - break; - case SP_SP_GAIN_RACE: - if(sd->state.lr_flag != 2) - sd->sp_gain_race[type2]+=val; - break; - case SP_ADD_MONSTER_DROP_ITEM: - if (sd->state.lr_flag != 2) - pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, (1<state.lr_flag != 2) - pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, type2, (1<state.lr_flag != 2) { - sd->sp_loss.value = type2; - sd->sp_loss.rate = val; - } - break; - case SP_SP_REGEN_RATE: - if(sd->state.lr_flag != 2) { - sd->sp_regen.value = type2; - sd->sp_regen.rate = val; - } - break; - case SP_HP_DRAIN_VALUE_RACE: - if(!sd->state.lr_flag) { - sd->right_weapon.hp_drain[type2].value += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.hp_drain[type2].value += val; - } - break; - case SP_SP_DRAIN_VALUE_RACE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[type2].value += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[type2].value += val; - } - break; - case SP_IGNORE_MDEF_RATE: - if(sd->state.lr_flag != 2) - sd->ignore_mdef[type2] += val; - break; - case SP_IGNORE_DEF_RATE: - if(sd->state.lr_flag != 2) - sd->ignore_def[type2] += val; - break; - case SP_SP_GAIN_RACE_ATTACK: - if(sd->state.lr_flag != 2) - sd->sp_gain_race_attack[type2] = cap_value(sd->sp_gain_race_attack[type2] + val, 0, INT16_MAX); - break; - case SP_HP_GAIN_RACE_ATTACK: - if(sd->state.lr_flag != 2) - sd->hp_gain_race_attack[type2] = cap_value(sd->hp_gain_race_attack[type2] + val, 0, INT16_MAX); - break; - case SP_SKILL_USE_SP_RATE: //bonus2 bSkillUseSPrate,n,x; - if(sd->state.lr_flag == 2) + case SP_ADD_ITEM_HEAL_RATE: + if(sd->state.lr_flag == 2) + break; + //Standard item bonus. + for(i=0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid && sd->itemhealrate[i].nameid != type2; i++); + if(i == ARRAYLENGTH(sd->itemhealrate)) { + ShowWarning("pc_bonus2: Reached max (%d) number of item heal bonuses per character!\n", ARRAYLENGTH(sd->itemhealrate)); + break; + } + sd->itemhealrate[i].nameid = type2; + sd->itemhealrate[i].rate += val; break; - ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == 0 || sd->skillusesprate[i].id == type2); - if (i == ARRAYLENGTH(sd->skillusesprate)) { - ShowDebug("run_script: bonus2 bSkillUseSPrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesprate), type2, val); + case SP_EXP_ADDRACE: + if(sd->state.lr_flag != 2) + sd->expaddrace[type2]+=val; break; - } - if (sd->skillusesprate[i].id == type2) - sd->skillusesprate[i].val += val; - else { - sd->skillusesprate[i].id = type2; - sd->skillusesprate[i].val = val; - } - break; - case SP_SKILL_COOLDOWN: - if(sd->state.lr_flag == 2) + case SP_SP_GAIN_RACE: + if(sd->state.lr_flag != 2) + sd->sp_gain_race[type2]+=val; break; - ARR_FIND(0, ARRAYLENGTH(sd->skillcooldown), i, sd->skillcooldown[i].id == 0 || sd->skillcooldown[i].id == type2); - if (i == ARRAYLENGTH(sd->skillcooldown)) - { - ShowDebug("run_script: bonus2 bSkillCoolDown reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillcooldown), type2, val); + case SP_ADD_MONSTER_DROP_ITEM: + if (sd->state.lr_flag != 2) + pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, (1<skillcooldown[i].id == type2) - sd->skillcooldown[i].val += val; - else { - sd->skillcooldown[i].id = type2; - sd->skillcooldown[i].val = val; - } - break; - case SP_SKILL_FIXEDCAST: - if(sd->state.lr_flag == 2) + case SP_SP_LOSS_RATE: + if(sd->state.lr_flag != 2) { + sd->sp_loss.value = type2; + sd->sp_loss.rate = val; + } break; - ARR_FIND(0, ARRAYLENGTH(sd->skillfixcast), i, sd->skillfixcast[i].id == 0 || sd->skillfixcast[i].id == type2); - if (i == ARRAYLENGTH(sd->skillfixcast)) - { - ShowDebug("run_script: bonus2 bSkillFixedCast reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillfixcast), type2, val); + case SP_SP_REGEN_RATE: + if(sd->state.lr_flag != 2) { + sd->sp_regen.value = type2; + sd->sp_regen.rate = val; + } break; - } - if (sd->skillfixcast[i].id == type2) - sd->skillfixcast[i].val += val; - else { - sd->skillfixcast[i].id = type2; - sd->skillfixcast[i].val = val; - } - break; - case SP_SKILL_VARIABLECAST: - if(sd->state.lr_flag == 2) + case SP_HP_DRAIN_VALUE_RACE: + if(!sd->state.lr_flag) { + sd->right_weapon.hp_drain[type2].value += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.hp_drain[type2].value += val; + } break; - ARR_FIND(0, ARRAYLENGTH(sd->skillvarcast), i, sd->skillvarcast[i].id == 0 || sd->skillvarcast[i].id == type2); - if (i == ARRAYLENGTH(sd->skillvarcast)) - { - ShowDebug("run_script: bonus2 bSkillVariableCast reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillvarcast), type2, val); + case SP_SP_DRAIN_VALUE_RACE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[type2].value += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[type2].value += val; + } break; - } - if (sd->skillvarcast[i].id == type2) - sd->skillvarcast[i].val += val; - else { - sd->skillvarcast[i].id = type2; - sd->skillvarcast[i].val = val; - } - break; -#ifdef RENEWAL_CAST - case SP_VARCASTRATE: - if(sd->state.lr_flag == 2) + case SP_IGNORE_MDEF_RATE: + if(sd->state.lr_flag != 2) + sd->ignore_mdef[type2] += val; break; - ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2); - if (i == ARRAYLENGTH(sd->skillcast)) - { - ShowDebug("run_script: bonus2 bVariableCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n",ARRAYLENGTH(sd->skillcast), type2, val); + case SP_IGNORE_DEF_RATE: + if(sd->state.lr_flag != 2) + sd->ignore_def[type2] += val; break; - } - if(sd->skillcast[i].id == type2) - sd->skillcast[i].val -= val; - else { - sd->skillcast[i].id = type2; - sd->skillcast[i].val -= val; - } - break; -#endif - case SP_SKILL_USE_SP: //bonus2 bSkillUseSP,n,x; - if(sd->state.lr_flag == 2) + case SP_SP_GAIN_RACE_ATTACK: + if(sd->state.lr_flag != 2) + sd->sp_gain_race_attack[type2] = cap_value(sd->sp_gain_race_attack[type2] + val, 0, INT16_MAX); break; - ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == 0 || sd->skillusesp[i].id == type2); - if (i == ARRAYLENGTH(sd->skillusesp)) { - ShowDebug("run_script: bonus2 bSkillUseSP reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesp), type2, val); + case SP_HP_GAIN_RACE_ATTACK: + if(sd->state.lr_flag != 2) + sd->hp_gain_race_attack[type2] = cap_value(sd->hp_gain_race_attack[type2] + val, 0, INT16_MAX); + break; + case SP_SKILL_USE_SP_RATE: //bonus2 bSkillUseSPrate,n,x; + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == 0 || sd->skillusesprate[i].id == type2); + if (i == ARRAYLENGTH(sd->skillusesprate)) { + ShowDebug("run_script: bonus2 bSkillUseSPrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesprate), type2, val); + break; + } + if (sd->skillusesprate[i].id == type2) + sd->skillusesprate[i].val += val; + else { + sd->skillusesprate[i].id = type2; + sd->skillusesprate[i].val = val; + } + break; + case SP_SKILL_COOLDOWN: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillcooldown), i, sd->skillcooldown[i].id == 0 || sd->skillcooldown[i].id == type2); + if (i == ARRAYLENGTH(sd->skillcooldown)) + { + ShowDebug("run_script: bonus2 bSkillCoolDown reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillcooldown), type2, val); + break; + } + if (sd->skillcooldown[i].id == type2) + sd->skillcooldown[i].val += val; + else { + sd->skillcooldown[i].id = type2; + sd->skillcooldown[i].val = val; + } + break; + case SP_SKILL_FIXEDCAST: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillfixcast), i, sd->skillfixcast[i].id == 0 || sd->skillfixcast[i].id == type2); + if (i == ARRAYLENGTH(sd->skillfixcast)) + { + ShowDebug("run_script: bonus2 bSkillFixedCast reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillfixcast), type2, val); + break; + } + if (sd->skillfixcast[i].id == type2) + sd->skillfixcast[i].val += val; + else { + sd->skillfixcast[i].id = type2; + sd->skillfixcast[i].val = val; + } + break; + case SP_SKILL_VARIABLECAST: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillvarcast), i, sd->skillvarcast[i].id == 0 || sd->skillvarcast[i].id == type2); + if (i == ARRAYLENGTH(sd->skillvarcast)) + { + ShowDebug("run_script: bonus2 bSkillVariableCast reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillvarcast), type2, val); + break; + } + if (sd->skillvarcast[i].id == type2) + sd->skillvarcast[i].val += val; + else { + sd->skillvarcast[i].id = type2; + sd->skillvarcast[i].val = val; + } + break; + #ifdef RENEWAL_CAST + case SP_VARCASTRATE: + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2); + if (i == ARRAYLENGTH(sd->skillcast)) + { + ShowDebug("run_script: bonus2 bVariableCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n",ARRAYLENGTH(sd->skillcast), type2, val); + break; + } + if(sd->skillcast[i].id == type2) + sd->skillcast[i].val -= val; + else { + sd->skillcast[i].id = type2; + sd->skillcast[i].val -= val; + } + break; + #endif + case SP_SKILL_USE_SP: //bonus2 bSkillUseSP,n,x; + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == 0 || sd->skillusesp[i].id == type2); + if (i == ARRAYLENGTH(sd->skillusesp)) { + ShowDebug("run_script: bonus2 bSkillUseSP reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesp), type2, val); + break; + } + if (sd->skillusesp[i].id == type2) + sd->skillusesp[i].val += val; + else { + sd->skillusesp[i].id = type2; + sd->skillusesp[i].val = val; + } + break; + case SP_ADD_MONSTER_DROP_CHAINITEM: + if (sd->state.lr_flag != 2) + pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, 1<skillusesp[i].id == type2) - sd->skillusesp[i].val += val; - else { - sd->skillusesp[i].id = type2; - sd->skillusesp[i].val = val; - } - break; - default: - ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val); - break; } return 0; } @@ -3251,124 +3253,119 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) nullpo_ret(sd); switch(type){ - case SP_ADD_MONSTER_DROP_ITEM: - if(sd->state.lr_flag != 2) - pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, 1<state.lr_flag != 2) - pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, -type3, val); - break; - case SP_AUTOSPELL: - if(sd->state.lr_flag != 2) - { - int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self. - target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF)); - pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), - target?-type2:type2, type3, val, 0, current_equip_card_id); - } - break; - case SP_AUTOSPELL_WHENHIT: - if(sd->state.lr_flag != 2) - { - int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self. - target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF)); - pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), - target?-type2:type2, type3, val, BF_NORMAL|BF_SKILL, current_equip_card_id); - } - break; - case SP_SP_DRAIN_RATE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[RC_NONBOSS].rate += type2; - sd->right_weapon.sp_drain[RC_NONBOSS].per += type3; - sd->right_weapon.sp_drain[RC_NONBOSS].type = val; - sd->right_weapon.sp_drain[RC_BOSS].rate += type2; - sd->right_weapon.sp_drain[RC_BOSS].per += type3; - sd->right_weapon.sp_drain[RC_BOSS].type = val; - - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[RC_NONBOSS].rate += type2; - sd->left_weapon.sp_drain[RC_NONBOSS].per += type3; - sd->left_weapon.sp_drain[RC_NONBOSS].type = val; - sd->left_weapon.sp_drain[RC_BOSS].rate += type2; - sd->left_weapon.sp_drain[RC_BOSS].per += type3; - sd->left_weapon.sp_drain[RC_BOSS].type = val; - } - break; - case SP_HP_DRAIN_RATE_RACE: - if(!sd->state.lr_flag) { - sd->right_weapon.hp_drain[type2].rate += type3; - sd->right_weapon.hp_drain[type2].per += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.hp_drain[type2].rate += type3; - sd->left_weapon.hp_drain[type2].per += val; - } - break; - case SP_SP_DRAIN_RATE_RACE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[type2].rate += type3; - sd->right_weapon.sp_drain[type2].per += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[type2].rate += type3; - sd->left_weapon.sp_drain[type2].per += val; - } - break; - case SP_ADD_MONSTER_DROP_ITEMGROUP: - if (sd->state.lr_flag != 2) - pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, type2, 1<state.lr_flag != 2) + pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, 1<state.lr_flag != 2) + pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, -type3, val); + break; + case SP_AUTOSPELL: + if(sd->state.lr_flag != 2) + { + int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self. + target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF)); + pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), + target?-type2:type2, type3, val, 0, current_equip_card_id); + } + break; + case SP_AUTOSPELL_WHENHIT: + if(sd->state.lr_flag != 2) + { + int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self. + target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF)); + pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), + target?-type2:type2, type3, val, BF_NORMAL|BF_SKILL, current_equip_card_id); + } + break; + case SP_SP_DRAIN_RATE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[RC_NONBOSS].rate += type2; + sd->right_weapon.sp_drain[RC_NONBOSS].per += type3; + sd->right_weapon.sp_drain[RC_NONBOSS].type = val; + sd->right_weapon.sp_drain[RC_BOSS].rate += type2; + sd->right_weapon.sp_drain[RC_BOSS].per += type3; + sd->right_weapon.sp_drain[RC_BOSS].type = val; - case SP_ADDEFF: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus3 (Add Effect): %d is not supported.\n", type2); + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[RC_NONBOSS].rate += type2; + sd->left_weapon.sp_drain[RC_NONBOSS].per += type3; + sd->left_weapon.sp_drain[RC_NONBOSS].type = val; + sd->left_weapon.sp_drain[RC_BOSS].rate += type2; + sd->left_weapon.sp_drain[RC_BOSS].per += type3; + sd->left_weapon.sp_drain[RC_BOSS].type = val; + } + break; + case SP_HP_DRAIN_RATE_RACE: + if(!sd->state.lr_flag) { + sd->right_weapon.hp_drain[type2].rate += type3; + sd->right_weapon.hp_drain[type2].per += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.hp_drain[type2].rate += type3; + sd->left_weapon.hp_drain[type2].per += val; + } + break; + case SP_SP_DRAIN_RATE_RACE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[type2].rate += type3; + sd->right_weapon.sp_drain[type2].per += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[type2].rate += type3; + sd->left_weapon.sp_drain[type2].per += val; + } + break; + case SP_ADDEFF: + if (type2 > SC_MAX) { + ShowWarning("pc_bonus3 (Add Effect): %d is not supported.\n", type2); + break; + } + pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, + sd->state.lr_flag!=2?type3:0, sd->state.lr_flag==2?type3:0, val); break; - } - pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2, - sd->state.lr_flag!=2?type3:0, sd->state.lr_flag==2?type3:0, val); - break; - case SP_ADDEFF_WHENHIT: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus3 (Add Effect when hit): %d is not supported.\n", type2); + case SP_ADDEFF_WHENHIT: + if (type2 > SC_MAX) { + ShowWarning("pc_bonus3 (Add Effect when hit): %d is not supported.\n", type2); + break; + } + if(sd->state.lr_flag != 2) + pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, type3, 0, val); break; - } - if(sd->state.lr_flag != 2) - pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, type3, 0, val); - break; - case SP_ADDEFF_ONSKILL: - if( type3 > SC_MAX ) { - ShowWarning("pc_bonus3 (Add Effect on skill): %d is not supported.\n", type3); + case SP_ADDEFF_ONSKILL: + if( type3 > SC_MAX ) { + ShowWarning("pc_bonus3 (Add Effect on skill): %d is not supported.\n", type3); + break; + } + if( sd->state.lr_flag != 2 ) + pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, val, type2, ATF_TARGET); break; - } - if( sd->state.lr_flag != 2 ) - pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, val, type2, ATF_TARGET); - break; - case SP_ADDELE: - if (type2 > ELE_MAX) { - ShowWarning("pc_bonus3 (SP_ADDELE): element %d is out of range.\n", type2); + case SP_ADDELE: + if (type2 > ELE_MAX) { + ShowWarning("pc_bonus3 (SP_ADDELE): element %d is out of range.\n", type2); + break; + } + if (sd->state.lr_flag != 2) + pc_bonus_addele(sd, (unsigned char)type2, type3, val); break; - } - if (sd->state.lr_flag != 2) - pc_bonus_addele(sd, (unsigned char)type2, type3, val); - break; - case SP_SUBELE: - if (type2 > ELE_MAX) { - ShowWarning("pc_bonus3 (SP_SUBELE): element %d is out of range.\n", type2); + case SP_SUBELE: + if (type2 > ELE_MAX) { + ShowWarning("pc_bonus3 (SP_SUBELE): element %d is out of range.\n", type2); + break; + } + if (sd->state.lr_flag != 2) + pc_bonus_subele(sd, (unsigned char)type2, type3, val); break; - } - if (sd->state.lr_flag != 2) - pc_bonus_subele(sd, (unsigned char)type2, type3, val); - break; - default: - ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val); - break; + default: + ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val); + break; } return 0; @@ -3421,24 +3418,24 @@ int pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type4 nullpo_ret(sd); switch(type){ - case SP_AUTOSPELL: - if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, current_equip_card_id); - break; + case SP_AUTOSPELL: + if(sd->state.lr_flag != 2) + pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, current_equip_card_id); + break; - case SP_AUTOSPELL_WHENHIT: - if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, current_equip_card_id); - break; + case SP_AUTOSPELL_WHENHIT: + if(sd->state.lr_flag != 2) + pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, current_equip_card_id); + break; - case SP_AUTOSPELL_ONSKILL: - if(sd->state.lr_flag != 2) - pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, (val&1?-type3:type3), (val&2?-type4:type4), type5, current_equip_card_id); - break; + case SP_AUTOSPELL_ONSKILL: + if(sd->state.lr_flag != 2) + pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, (val&1?-type3:type3), (val&2?-type4:type4), type5, current_equip_card_id); + break; - default: - ShowWarning("pc_bonus5: unknown type %d %d %d %d %d %d!\n",type,type2,type3,type4,type5,val); - break; + default: + ShowWarning("pc_bonus5: unknown type %d %d %d %d %d %d!\n",type,type2,type3,type4,type5,val); + break; } return 0; @@ -3628,7 +3625,7 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount) if(amount > MAX_AMOUNT) return ADDITEM_OVERAMOUNT; - data = itemdb_search(nameid); + data = itemdb->search(nameid); if(!itemdb_isstackable2(data)) return ADDITEM_NEW; @@ -3863,7 +3860,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l if( amount > MAX_AMOUNT ) return 5; - data = itemdb_search(item_data->nameid); + data = itemdb->search(item_data->nameid); if( data->stack.inventory && amount > data->stack.amount ) {// item stack limitation @@ -4250,11 +4247,10 @@ int pc_isUseitem(struct map_session_data *sd,int n) * 0 = fail * 1 = success *------------------------------------------*/ -int pc_useitem(struct map_session_data *sd,int n) -{ +int pc_useitem(struct map_session_data *sd,int n) { unsigned int tick = iTimer->gettick(); int amount, nameid, i; - struct script_code *script; + struct script_code *item_script; nullpo_ret(sd); @@ -4357,7 +4353,7 @@ int pc_useitem(struct map_session_data *sd,int n) sd->catch_target_class = -1; amount = sd->status.inventory[n].amount; - script = sd->inventory_data[n]->script; + item_script = sd->inventory_data[n]->script; //Check if the item is to be consumed immediately [Skotlex] if( sd->inventory_data[n]->flag.delay_consume ) clif->useitemack(sd,n,amount,true); @@ -4380,9 +4376,14 @@ int pc_useitem(struct map_session_data *sd,int n) sd->canuseitem_tick = tick + battle_config.item_use_interval; if( itemdb_iscashfood(nameid) ) sd->canusecashfood_tick = tick + battle_config.cashfood_use_interval; - - run_script(script,0,sd->bl.id,fake_nd->bl.id); + + script->current_item_id = nameid; + + run_script(item_script,0,sd->bl.id,fake_nd->bl.id); + + script->current_item_id = 0; potion_flag = 0; + return 1; } @@ -4402,7 +4403,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun if(item_data->nameid <= 0 || amount <= 0) return 1; - data = itemdb_search(item_data->nameid); + data = itemdb->search(item_data->nameid); if( data->stack.cart && amount > data->stack.amount ) {// item stack limitation @@ -4465,7 +4466,7 @@ int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log_ struct item_data * data; nullpo_retr(1, sd); - if( sd->status.cart[n].nameid == 0 || sd->status.cart[n].amount < amount || !(data = itemdb_exists(sd->status.cart[n].nameid)) ) + if( sd->status.cart[n].nameid == 0 || sd->status.cart[n].amount < amount || !(data = itemdb->exists(sd->status.cart[n].nameid)) ) return 1; logs->pick_pc(sd, log_type, -amount, &sd->status.cart[n],data); @@ -4570,7 +4571,7 @@ int pc_show_steal(struct block_list *bl,va_list ap) sd=va_arg(ap,struct map_session_data *); itemid=va_arg(ap,int); - if((item=itemdb_exists(itemid))==NULL) + if((item=itemdb->exists(itemid))==NULL) sprintf(output,"%s stole an Unknown Item (id: %i).",sd->status.name, itemid); else sprintf(output,"%s stole %s.",sd->status.name,item->jname); @@ -4623,7 +4624,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil // Try dropping one item, in the order from first to last possible slot. // Droprate is affected by the skill success rate. for( i = 0; i < MAX_STEAL_DROP; i++ ) - if( md->db->dropitem[i].nameid > 0 && (data = itemdb_exists(md->db->dropitem[i].nameid)) && rnd() % 10000 < md->db->dropitem[i].p * rate/100. ) + if( md->db->dropitem[i].nameid > 0 && (data = itemdb->exists(md->db->dropitem[i].nameid)) && rnd() % 10000 < md->db->dropitem[i].p * rate/100. ) break; if( i == MAX_STEAL_DROP ) return 0; @@ -7304,12 +7305,10 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) bonus += bonus*(potion_flag-1)*50/100; //All item bonuses. bonus += sd->bonus.itemhealrate2; - //Item Group bonuses - bonus += bonus*itemdb_group_bonus(sd, itemid)/100; //Individual item bonuses. - for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) - { - if (sd->itemhealrate[i].nameid == itemid) { + for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) { + struct item_data *it = itemdb->exists(sd->itemhealrate[i].nameid); + if (sd->itemhealrate[i].nameid == itemid || (it && it->group && itemdb->in_group(it->group,itemid))) { bonus += bonus*sd->itemhealrate[i].rate/100; break; } @@ -8477,7 +8476,7 @@ int pc_load_combo(struct map_session_data *sd) { for( j = 0; j < id->slot; j++ ) { if (!sd->status.inventory[idx].card[j]) continue; - if ( ( data = itemdb_exists(sd->status.inventory[idx].card[j]) ) != NULL ) { + if ( ( data = itemdb->exists(sd->status.inventory[idx].card[j]) ) != NULL ) { if( data->combos_count ) ret += pc_checkcombo(sd,data); } @@ -8661,7 +8660,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) struct item_data *data; if (!sd->status.inventory[n].card[i]) continue; - if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->combos_count ) pc_checkcombo(sd,data); } @@ -8684,7 +8683,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) struct item_data *data; if (!sd->status.inventory[n].card[i]) continue; - if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->equip_script ) run_script(data->equip_script,0,sd->bl.id,fake_nd->bl.id); } @@ -8822,7 +8821,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { struct item_data *data; if (!sd->status.inventory[n].card[i]) continue; - if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->combos_count ) { if( pc_removecombo(sd,data) ) status_cacl = true; @@ -8852,7 +8851,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { if (!sd->status.inventory[n].card[i]) continue; - if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->unequip_script ) run_script(data->unequip_script,0,sd->bl.id,fake_nd->bl.id); } diff --git a/src/map/pc.h b/src/map/pc.h index 43d5d40c7..298808d0d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -10,7 +10,7 @@ #include "battle.h" // battle_config #include "battleground.h" #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" // MAX_ITEMGROUP +#include "itemdb.h" #include "map.h" // RC_MAX #include "script.h" // struct script_reg, struct script_regstr #include "searchstore.h" // struct s_search_store_info @@ -256,7 +256,6 @@ struct map_session_data { int expaddrace[RC_MAX]; int ignore_mdef[RC_MAX]; int ignore_def[RC_MAX]; - int itemgrouphealrate[MAX_ITEMGROUP]; short sp_gain_race[RC_MAX]; short sp_gain_race_attack[RC_MAX]; short hp_gain_race_attack[RC_MAX]; diff --git a/src/map/pet.c b/src/map/pet.c index 00402f9d4..8ed88c46c 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -592,7 +592,7 @@ int pet_menu(struct map_session_data *sd,int menunum) if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate) return 1; - egg_id = itemdb_exists(sd->pd->petDB->EggID); + egg_id = itemdb->exists(sd->pd->petDB->EggID); if (egg_id) { if ((egg_id->flag.trade_restriction&0x01) && !pc->inventoryblank(sd)) { clif->message(sd->fd, msg_txt(451)); // You can't return your pet because your inventory is full. diff --git a/src/map/script.c b/src/map/script.c index f65c0c21c..481cb5870 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1397,7 +1397,7 @@ const char* parse_syntax(const char* p) v = p2-p; // length of word at p2 memcpy(label,p,v); label[v]='\0'; - if( !script_get_constant(label, &v) ) + if( !script->get_constant(label, &v) ) disp_error_message("parse_syntax: 'case' label is not an integer",p); p = skip_word(p); } else { //Numeric value @@ -1951,25 +1951,32 @@ bool script_get_constant(const char* name, int* value) } /// Creates new constant or parameter with given value. -void script_set_constant(const char* name, int value, bool isparameter) -{ +void script_set_constant(const char* name, int value, bool isparameter) { int n = add_str(name); - if( script->str_data[n].type == C_NOP ) - {// new + if( script->str_data[n].type == C_NOP ) {// new script->str_data[n].type = isparameter ? C_PARAM : C_INT; script->str_data[n].val = value; - } - else if( script->str_data[n].type == C_PARAM || script->str_data[n].type == C_INT ) - {// existing parameter or constant + } else if( script->str_data[n].type == C_PARAM || script->str_data[n].type == C_INT ) {// existing parameter or constant ShowError("script_set_constant: Attempted to overwrite existing %s '%s' (old value=%d, new value=%d).\n", ( script->str_data[n].type == C_PARAM ) ? "parameter" : "constant", name, script->str_data[n].val, value); - } - else - {// existing name + } else {// existing name ShowError("script_set_constant: Invalid name for %s '%s' (already defined as %s).\n", isparameter ? "parameter" : "constant", name, script_op2name(script->str_data[n].type)); } } +/* will override if necessary */ +void script_set_constant2(const char *name, int value, bool isparameter) { + int n = add_str(name); + + if( script->str_data[n].type != C_NOP ) { + script->str_data[n].next = 0; + script->str_data[n].func = NULL; + script->str_data[n].backpatch = -1; + script->str_data[n].label = -1; + } + script->str_data[n].type = isparameter ? C_PARAM : C_INT; + script->str_data[n].val = value; +} /*========================================== * Reading constant databases * const.txt @@ -5564,11 +5571,11 @@ BUILDIN(countitem) if( data_isstring(data) ) {// item name - id = itemdb_searchname(script->conv_str(st, data)); + id = itemdb->search_name(script->conv_str(st, data)); } else {// item id - id = itemdb_exists(script->conv_num(st, data)); + id = itemdb->exists(script->conv_num(st, data)); } if( id == NULL ) @@ -5611,11 +5618,11 @@ BUILDIN(countitem2) if( data_isstring(data) ) {// item name - id = itemdb_searchname(script->conv_str(st, data)); + id = itemdb->search_name(script->conv_str(st, data)); } else {// item id - id = itemdb_exists(script->conv_num(st, data)); + id = itemdb->exists(script->conv_num(st, data)); } if( id == NULL ) @@ -5678,9 +5685,9 @@ BUILDIN(checkweight) data = script_getdata(st,i); script->get_val(st, data); // convert into value in case of a variable if( data_isstring(data) ){// item name - id = itemdb_searchname(script->conv_str(st, data)); + id = itemdb->search_name(script->conv_str(st, data)); } else {// item id - id = itemdb_exists(script->conv_num(st, data)); + id = itemdb->exists(script->conv_num(st, data)); } if( id == NULL ) { ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,i)); // returns string, regardless of what it was @@ -5794,7 +5801,7 @@ BUILDIN(checkweight2) script_removetop(st, -1, 0); if(fail) continue; //cpntonie to depop rest - if(itemdb_exists(nameid) == NULL ){ + if(itemdb->exists(nameid) == NULL ){ ShowError("buildin_checkweight2: Invalid item '%d'.\n", nameid); fail=1; continue; @@ -5852,7 +5859,7 @@ BUILDIN(getitem) if( data_isstring(data) ) {// "" const char *name=script->conv_str(st,data); - if( (item_data = itemdb_searchname(name)) == NULL ){ + if( (item_data = itemdb->search_name(name)) == NULL ){ ShowError("buildin_getitem: Nonexistant item %s requested.\n", name); return false; //No item created. } @@ -5864,7 +5871,7 @@ BUILDIN(getitem) nameid = -nameid; flag = 1; } - if( nameid <= 0 || !(item_data = itemdb_exists(nameid)) ){ + if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ){ ShowError("buildin_getitem: Nonexistant item %d requested.\n", nameid); return false; //No item created. } @@ -5939,7 +5946,7 @@ BUILDIN(getitem2) script->get_val(st,data); if( data_isstring(data) ){ const char *name=script->conv_str(st,data); - struct item_data *item_data = itemdb_searchname(name); + struct item_data *item_data = itemdb->search_name(name); if( item_data ) nameid=item_data->nameid; else @@ -5963,7 +5970,7 @@ BUILDIN(getitem2) if(nameid > 0) { memset(&item_tmp,0,sizeof(item_tmp)); - item_data=itemdb_exists(nameid); + item_data=itemdb->exists(nameid); if (item_data == NULL) return -1; if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){ @@ -6035,7 +6042,7 @@ BUILDIN(rentitem) if( data_isstring(data) ) { const char *name = script->conv_str(st,data); - struct item_data *itd = itemdb_searchname(name); + struct item_data *itd = itemdb->search_name(name); if( itd == NULL ) { ShowError("buildin_rentitem: Nonexistant item %s requested.\n", name); @@ -6046,7 +6053,7 @@ BUILDIN(rentitem) else if( data_isint(data) ) { nameid = script->conv_num(st,data); - if( nameid <= 0 || !itemdb_exists(nameid) ) + if( nameid <= 0 || !itemdb->exists(nameid) ) { ShowError("buildin_rentitem: Nonexistant item %d requested.\n", nameid); return false; @@ -6097,7 +6104,7 @@ BUILDIN(getnameditem) script->get_val(st,data); if( data_isstring(data) ){ const char *name=script->conv_str(st,data); - struct item_data *item_data = itemdb_searchname(name); + struct item_data *item_data = itemdb->search_name(name); if( item_data == NULL) { //Failed script_pushint(st,0); @@ -6107,7 +6114,7 @@ BUILDIN(getnameditem) }else nameid = script->conv_num(st,data); - if(!itemdb_exists(nameid)/* || itemdb_isstackable(nameid)*/) + if(!itemdb->exists(nameid)/* || itemdb_isstackable(nameid)*/) { //Even though named stackable items "could" be risky, they are required for certain quests. script_pushint(st,0); return true; @@ -6146,12 +6153,30 @@ BUILDIN(getnameditem) * gets a random item ID from an item group [Skotlex] * groupranditem group_num *------------------------------------------*/ -BUILDIN(grouprandomitem) -{ - int group; +BUILDIN(grouprandomitem) { + struct item_data *data; + int nameid; + + if( script_hasdata(st, 2) ) + nameid = script_getnum(st, 2); + else if ( script->current_item_id ) + nameid = script->current_item_id; + else { + ShowWarning("buildin_grouprandomitem: no item id provided and no item attached\n"); + script_pushint(st, 0); + return true; + } - group = script_getnum(st,2); - script_pushint(st,itemdb_searchrandomid(group)); + if( !(data = itemdb->exists(nameid)) ) { + ShowWarning("buildin_grouprandomitem: unknown item id %d\n",nameid); + script_pushint(st, 0); + } else if ( !data->group ) { + ShowWarning("buildin_grouprandomitem: item '%s' (%d) isn't a group!\n",data->name,nameid); + script_pushint(st, 0); + } else { + script_pushint(st, itemdb->group_item(data->group)); + } + return true; } @@ -6171,13 +6196,13 @@ BUILDIN(makeitem) script->get_val(st,data); if( data_isstring(data) ){ const char *name=script->conv_str(st,data); - if( (item_data = itemdb_searchname(name)) ) + if( (item_data = itemdb->search_name(name)) ) nameid=item_data->nameid; else nameid=UNKNOWN_ITEM_ID; } else { nameid=script->conv_num(st,data); - if( nameid <= 0 || !(item_data = itemdb_exists(nameid)) ){ + if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ){ ShowError("makeitem: Nonexistant item %d requested.\n", nameid); return false; //No item created. } @@ -6384,7 +6409,7 @@ BUILDIN(delitem) if( data_isstring(data) ) { const char* item_name = script->conv_str(st,data); - struct item_data* id = itemdb_searchname(item_name); + struct item_data* id = itemdb->search_name(item_name); if( id == NULL ) { ShowError("script:delitem: unknown item \"%s\".\n", item_name); @@ -6396,7 +6421,7 @@ BUILDIN(delitem) else { it.nameid = script->conv_num(st,data);// - if( !itemdb_exists( it.nameid ) ) + if( !itemdb->exists( it.nameid ) ) { ShowError("script:delitem: unknown item \"%d\".\n", it.nameid); st->state = END; @@ -6453,7 +6478,7 @@ BUILDIN(delitem2) if( data_isstring(data) ) { const char* item_name = script->conv_str(st,data); - struct item_data* id = itemdb_searchname(item_name); + struct item_data* id = itemdb->search_name(item_name); if( id == NULL ) { ShowError("script:delitem2: unknown item \"%s\".\n", item_name); @@ -6465,7 +6490,7 @@ BUILDIN(delitem2) else { it.nameid = script->conv_num(st,data);// - if( !itemdb_exists( it.nameid ) ) + if( !itemdb->exists( it.nameid ) ) { ShowError("script:delitem: unknown item \"%d\".\n", it.nameid); st->state = END; @@ -8422,7 +8447,12 @@ BUILDIN(monster) if (sd && strcmp(mapn, "this") == 0) m = sd->bl.m; else { - m = iMap->mapname2mapid(mapn); + + if ( ( m = iMap->mapname2mapid(mapn) ) == -1 ) { + ShowWarning("buildin_monster: Attempted to spawn monster class %d on non-existing map '%s'\n",class_, mapn); + return false; + } + if (map[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) { ShowError("buildin_monster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn); @@ -8456,7 +8486,7 @@ BUILDIN(getmobdrops) { if( mob->dropitem[i].nameid < 1 ) continue; - if( itemdb_exists(mob->dropitem[i].nameid) == NULL ) + if( itemdb->exists(mob->dropitem[i].nameid) == NULL ) continue; mapreg_setreg(reference_uid(add_str("$@MobDrop_item"), j), mob->dropitem[i].nameid); @@ -9129,14 +9159,14 @@ BUILDIN(itemeffect) { if( data_isstring( data ) ){ const char *name = script->conv_str( st, data ); - if( ( item_data = itemdb_searchname( name ) ) == NULL ){ + if( ( item_data = itemdb->search_name( name ) ) == NULL ){ ShowError( "buildin_itemeffect: Nonexistant item %s requested.\n", name ); return false; } } else if( data_isint( data ) ){ int nameid = script->conv_num( st, data ); - if( ( item_data = itemdb_exists( nameid ) ) == NULL ){ + if( ( item_data = itemdb->exists( nameid ) ) == NULL ){ ShowError("buildin_itemeffect: Nonexistant item %d requested.\n", nameid ); return false; } @@ -9363,7 +9393,7 @@ BUILDIN(getareadropitem) script->get_val(st,data); if( data_isstring(data) ){ const char *name=script->conv_str(st,data); - struct item_data *item_data = itemdb_searchname(name); + struct item_data *item_data = itemdb->search_name(name); item=UNKNOWN_ITEM_ID; if( item_data ) item=item_data->nameid; @@ -11446,13 +11476,13 @@ BUILDIN(getitemname) if( data_isstring(data) ){ const char *name=script->conv_str(st,data); - struct item_data *item_data = itemdb_searchname(name); + struct item_data *item_data = itemdb->search_name(name); if( item_data ) item_id=item_data->nameid; }else item_id=script->conv_num(st,data); - i_data = itemdb_exists(item_id); + i_data = itemdb->exists(item_id); if (i_data == NULL) { script_pushconststr(st,"null"); @@ -11474,7 +11504,7 @@ BUILDIN(getitemslots) item_id=script_getnum(st,2); - i_data = itemdb_exists(item_id); + i_data = itemdb->exists(item_id); if (i_data) script_pushint(st,i_data->slot); @@ -11515,7 +11545,7 @@ BUILDIN(getiteminfo) item_id = script_getnum(st,2); n = script_getnum(st,3); - i_data = itemdb_exists(item_id); + i_data = itemdb->exists(item_id); if (i_data && n>=0 && n<=14) { item_arr = (int*)&i_data->value_buy; @@ -11557,7 +11587,7 @@ BUILDIN(setiteminfo) item_id = script_getnum(st,2); n = script_getnum(st,3); value = script_getnum(st,4); - i_data = itemdb_exists(item_id); + i_data = itemdb->exists(item_id); if (i_data && n>=0 && n<=14) { item_arr = (int*)&i_data->value_buy; @@ -13106,7 +13136,7 @@ BUILDIN(equip) sd = script_rid2sd(st); nameid=script_getnum(st,2); - if((item_data = itemdb_exists(nameid)) == NULL) + if((item_data = itemdb->exists(nameid)) == NULL) { ShowError("wrong item ID : equipitem(%i)\n",nameid); return false; @@ -13125,7 +13155,7 @@ BUILDIN(autoequip) nameid=script_getnum(st,2); flag=script_getnum(st,3); - if( ( item_data = itemdb_exists(nameid) ) == NULL ) + if( ( item_data = itemdb->exists(nameid) ) == NULL ) { ShowError("buildin_autoequip: Invalid item '%d'.\n", nameid); return false; @@ -14464,7 +14494,7 @@ BUILDIN(setitemscript) new_bonus_script = script_getstr(st,3); if( script_hasdata(st,4) ) n=script_getnum(st,4); - i_data = itemdb_exists(item_id); + i_data = itemdb->exists(item_id); if (!i_data || new_bonus_script==NULL || ( new_bonus_script[0] && new_bonus_script[0]!='{' )) { script_pushint(st,0); @@ -14630,10 +14660,10 @@ BUILDIN(searchitem) int32 i; TBL_PC* sd = NULL; - if ((items[0] = itemdb_exists(atoi(itemname)))) + if ((items[0] = itemdb->exists(atoi(itemname)))) count = 1; else { - count = itemdb_searchname_array(items, ARRAYLENGTH(items), itemname); + count = itemdb->search_name_array(items, ARRAYLENGTH(items), itemname); if (count > MAX_SEARCH) count = MAX_SEARCH; } @@ -16831,50 +16861,53 @@ BUILDIN(checkre) return true; } -/* getrandgroupitem , */ +/* getrandgroupitem , */ BUILDIN(getrandgroupitem) { - TBL_PC* sd; - int i, get_count = 0, flag, nameid, group = script_getnum(st, 2), qty = script_getnum(st,3); - struct item item_tmp; - - if( !( sd = script_rid2sd(st) ) ) - return true; - - if( qty <= 0 ) { - ShowError("getrandgroupitem: qty is <= 0!\n"); - return false; - } - - if(group < 1 || group >= MAX_ITEMGROUP) { - ShowError("getrandgroupitem: Invalid group id %d\n", group); - return false; - } - if (!itemgroup_db[group].qty) { - ShowError("getrandgroupitem: group id %d is empty!\n", group); - return false; - } - - nameid = itemdb_searchrandomid(group); - memset(&item_tmp,0,sizeof(item_tmp)); - - item_tmp.nameid = nameid; - item_tmp.identify = itemdb_isidentified(nameid); - - //Check if it's stackable. - if (!itemdb_isstackable(nameid)) - get_count = 1; - else - get_count = qty; + struct item_data *data = NULL; + struct map_session_data *sd = NULL; + int nameid = script_getnum(st, 2); + int count = script_getnum(st, 3); - for (i = 0; i < qty; i += get_count) { - // if not pet egg - if (!pet_create_egg(sd, nameid)) { - if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { - clif->additem(sd, 0, 0, flag); - if( pc->candrop(sd,&item_tmp) ) - iMap->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + if( !(data = itemdb->exists(nameid)) ) { + ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid); + script_pushint(st, 1); + } else if ( count <= 0 ) { + ShowError("buildin_getrandgroupitem: qty is <= 0!\n"); + script_pushint(st, 1); + } else if ( !data->group ) { + ShowWarning("buildin_getrandgroupitem: item '%s' (%d) isn't a group!\n",data->name,nameid); + script_pushint(st, 1); + } else if( !( sd = script->rid2sd(st) ) ) { + ShowWarning("buildin_getrandgroupitem: no player attached!! (item %s (%d))\n",data->name,nameid); + script_pushint(st, 1); + } else { + int i, get_count, flag; + struct item it; + + memset(&it,0,sizeof(it)); + + nameid = itemdb->group_item(data->group); + + it.nameid = nameid; + it.identify = itemdb_isidentified(nameid); + + if (!itemdb_isstackable(nameid)) + get_count = 1; + else + get_count = count; + + for (i = 0; i < count; i += get_count) { + // if not pet egg + if (!pet_create_egg(sd, nameid)) { + if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); + if( pc->candrop(sd,&it) ) + iMap->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + } } } + + script_pushint(st, 0); } return true; @@ -17268,6 +17301,41 @@ BUILDIN(qiclear) { return true; } +/** + * packageitem({}) + * when no item id is provided it tries to assume it comes from the current item id being processed (if any) + **/ +BUILDIN(packageitem) { + struct item_data *data = NULL; + struct map_session_data *sd = NULL; + int nameid; + + if( script_hasdata(st, 2) ) + nameid = script_getnum(st, 2); + else if ( script->current_item_id ) + nameid = script->current_item_id; + else { + ShowWarning("buildin_packageitem: no item id provided and no item attached\n"); + script_pushint(st, 1); + return true; + } + + if( !(data = itemdb->exists(nameid)) ) { + ShowWarning("buildin_packageitem: unknown item id %d\n",nameid); + script_pushint(st, 1); + } else if ( !data->package ) { + ShowWarning("buildin_packageitem: item '%s' (%d) isn't a package!\n",data->name,nameid); + script_pushint(st, 1); + } else if( !( sd = script->rid2sd(st) ) ) { + ShowWarning("buildin_packageitem: no player attached!! (item %s (%d))\n",data->name,nameid); + script_pushint(st, 1); + } else { + itemdb->package_item(sd,data->package); + script_pushint(st, 0); + } + + return true; +} // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT @@ -17782,6 +17850,9 @@ void script_parse_builtin(void) { BUILDIN_DEF(qicheck,"i"), BUILDIN_DEF(qiget,"i"), BUILDIN_DEF(qiclear,"i"), + + BUILDIN_DEF(packageitem,"?"), + }; int i,n, len = ARRAYLENGTH(BUILDIN), start = script->buildin_count; char* p; @@ -17859,6 +17930,8 @@ void script_defaults(void) { script->word_buf = NULL; script->word_size = 0; + script->current_item_id = 0; + script->init = do_init_script; script->final = do_final_script; @@ -17874,6 +17947,9 @@ void script_defaults(void) { script->push_str = push_str; script->push_copy = push_copy; script->pop_stack = pop_stack; + script->set_constant = script_set_constant; + script->set_constant2 = script_set_constant2; + script->get_constant = script_get_constant; script->queue = script_hqueue_get; script->queue_add = script_hqueue_add; diff --git a/src/map/script.h b/src/map/script.h index 3cfcd9de4..a047779a8 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -202,9 +202,6 @@ struct DBMap* script_get_label_db(void); struct DBMap* script_get_userfunc_db(void); void script_run_autobonus(const char *autobonus,int id, int pos); -bool script_get_constant(const char* name, int* value); -void script_set_constant(const char* name, int value, bool isparameter); - void script_cleararray_pc(struct map_session_data* sd, const char* varname, void* value); void script_setarray_pc(struct map_session_data* sd, const char* varname, uint8 idx, void* value, int* refcache); @@ -357,10 +354,12 @@ struct script_interface { char *str_buf; int str_size; // size of the buffer int str_pos; // next position to be assigned - // + /* */ char *word_buf; int word_size; /* */ + unsigned short current_item_id; + /* */ void (*init) (void); void (*final) (void); /* */ @@ -376,6 +375,9 @@ struct script_interface { struct script_data* (*push_str) (struct script_stack* stack, enum c_op type, char* str); struct script_data* (*push_copy) (struct script_stack* stack, int pos); void (*pop_stack) (struct script_state* st, int start, int end); + void (*set_constant) (const char* name, int value, bool isparameter); + void (*set_constant2) (const char *name, int value, bool isparameter); + bool (*get_constant) (const char* name, int* value); /* */ struct hQueue *(*queue) (int idx); bool (*queue_add) (int idx, int var); diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 3cda77e4a..d346a0de6 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -135,14 +135,14 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned // validate lists for( i = 0; i < item_count; i++ ) { - if( !itemdb_exists(itemlist[i]) ) { + if( !itemdb->exists(itemlist[i]) ) { ShowWarning("searchstore_query: Client resolved item %hu is not known.\n", itemlist[i]); clif->search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); return; } } for( i = 0; i < card_count; i++ ) { - if( !itemdb_exists(cardlist[i]) ) { + if( !itemdb->exists(cardlist[i]) ) { ShowWarning("searchstore_query: Client resolved card %hu is not known.\n", cardlist[i]); clif->search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); return; diff --git a/src/map/skill.c b/src/map/skill.c index aec1ebbfc..509de6f4a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6474,7 +6474,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui return 1; } if( sd ) { - int x,bonus=100; + int x,bonus=100, potion = min(500+skill_lv,505); x = skill_lv%11 - 1; i = pc->search_inventory(sd,skill_db[skill_id].itemid[x]); if( i < 0 || skill_db[skill_id].itemid[x] <= 0 ) { @@ -6523,11 +6523,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } } - if (sd->itemgrouphealrate[IG_POTION]>0) { - hp += hp * sd->itemgrouphealrate[IG_POTION] / 100; - sp += sp * sd->itemgrouphealrate[IG_POTION] / 100; + for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) { + if (sd->itemhealrate[i].nameid == potion) { + hp += hp * sd->itemhealrate[i].rate / 100; + sp += sp * sd->itemhealrate[i].rate / 100; + break; + } } - + if( (i = pc->skillheal_bonus(sd, skill_id)) ) { hp += hp * i / 100; sp += sp * i / 100; @@ -9936,7 +9939,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int i = skill_lv%11 - 1; struct item_data *item; i = skill_db[skill_id].itemid[i]; - item = itemdb_search(i); + item = itemdb->search(i); potion_flag = 1; potion_hp = 0; potion_sp = 0; @@ -15925,7 +15928,7 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid, if( skill_id == RK_RUNEMASTERY ) { int temp_qty, skill_lv = pc->checkskill(sd,skill_id); - data = itemdb_search(nameid); + data = itemdb->search(nameid); if( skill_lv == 10 ) temp_qty = 1 + rnd()%3; else if( skill_lv > 5 ) temp_qty = 1 + rnd()%2; diff --git a/src/map/status.c b/src/map/status.c index 55b79fff7..48ad1e239 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2371,7 +2371,6 @@ int status_calc_pc_(struct map_session_data* sd, bool first) + sizeof(sd->expaddrace) + sizeof(sd->ignore_mdef) + sizeof(sd->ignore_def) - + sizeof(sd->itemgrouphealrate) + sizeof(sd->sp_gain_race) + sizeof(sd->sp_gain_race_attack) + sizeof(sd->hp_gain_race_attack) @@ -2600,16 +2599,9 @@ int status_calc_pc_(struct map_session_data* sd, bool first) current_equip_card_id= c= sd->status.inventory[index].card[j]; if(!c) continue; - data = itemdb_exists(c); + data = itemdb->exists(c); if(!data) continue; - if(first && data->equip_script) {//Execute equip-script on login - run_script(data->equip_script,0,sd->bl.id,0); - if (!calculating) - return 1; - } - if(!data->script) - continue; for(k = 0; k < map[sd->bl.m].zone->disabled_items_count; k++) { if( map[sd->bl.m].zone->disabled_items[k] == data->nameid ) { @@ -2620,6 +2612,15 @@ int status_calc_pc_(struct map_session_data* sd, bool first) if( k < map[sd->bl.m].zone->disabled_items_count ) continue; + if(first && data->equip_script) {//Execute equip-script on login + run_script(data->equip_script,0,sd->bl.id,0); + if (!calculating) + return 1; + } + + if(!data->script) + continue; + if(i == EQI_HAND_L && sd->status.inventory[index].equip == EQP_HAND_L) { //Left hand status. sd->state.lr_flag = 1; run_script(data->script,0,sd->bl.id,0); @@ -2632,15 +2633,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first) } } - if( sc->count && sc->data[SC_ITEMSCRIPT] ) - { - struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1); + if( sc->count && sc->data[SC_ITEMSCRIPT] ) { + struct item_data *data = itemdb->exists(sc->data[SC_ITEMSCRIPT]->val1); if( data && data->script ) run_script(data->script,0,sd->bl.id,0); } - if( sd->pd ) - { // Pet Bonus + if( sd->pd ) { // Pet Bonus struct pet_data *pd = sd->pd; if( pd && pd->petDB && pd->petDB->equip_script && pd->pet.intimate >= battle_config.pet_equip_min_friendly ) run_script(pd->petDB->equip_script,0,sd->bl.id,0); @@ -3871,8 +3870,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) if(flag&SCB_DSPD) { int dmotion; - if( bl->type&BL_PC ) - { + if( bl->type&BL_PC ) { if (b_status->agi == status->agi) status->dmotion = status_calc_dmotion(bl, sc, b_status->dmotion); else { @@ -3883,16 +3881,11 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) //It's safe to ignore b_status->dmotion since no bonus affects it. status->dmotion = status_calc_dmotion(bl, sc, status->dmotion); } - } - else - if( bl->type&BL_HOM ) - { + } else if( bl->type&BL_HOM ) { dmotion = 800-status->agi*4; status->dmotion = cap_value(dmotion, 400, 800); status->dmotion = status_calc_dmotion(bl, sc, b_status->dmotion); - } - else // mercenary and mobs - { + } else { // mercenary and mobs status->dmotion = status_calc_dmotion(bl, sc, b_status->dmotion); } } @@ -3918,13 +3911,13 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first) if( flag&SCB_BASE ) {// calculate the object's base status too switch( bl->type ) { - case BL_PC: status_calc_pc_(BL_CAST(BL_PC,bl), first); break; - case BL_MOB: status_calc_mob_(BL_CAST(BL_MOB,bl), first); break; - case BL_PET: status_calc_pet_(BL_CAST(BL_PET,bl), first); break; - case BL_HOM: status_calc_homunculus_(BL_CAST(BL_HOM,bl), first); break; - case BL_MER: status_calc_mercenary_(BL_CAST(BL_MER,bl), first); break; - case BL_ELEM: status_calc_elemental_(BL_CAST(BL_ELEM,bl), first); break; - case BL_NPC: status_calc_npc_(BL_CAST(BL_NPC,bl), first); break; + case BL_PC: status_calc_pc_(BL_CAST(BL_PC,bl), first); break; + case BL_MOB: status_calc_mob_(BL_CAST(BL_MOB,bl), first); break; + case BL_PET: status_calc_pet_(BL_CAST(BL_PET,bl), first); break; + case BL_HOM: status_calc_homunculus_(BL_CAST(BL_HOM,bl), first); break; + case BL_MER: status_calc_mercenary_(BL_CAST(BL_MER,bl), first); break; + case BL_ELEM: status_calc_elemental_(BL_CAST(BL_ELEM,bl), first); break; + case BL_NPC: status_calc_npc_(BL_CAST(BL_NPC,bl), first); break; } } @@ -6300,43 +6293,43 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti else tick -= (status->vit + status->luk) / 20 * 1000; break; - case SC_BURNING: - tick -= 75 * status->luk + 125 * status->agi; - tick = max(tick,5000); // Minimum Duration 5s. - break; - case SC_FROSTMISTY: - tick -= 1000 * ((status->vit + status->dex) / 20); - tick = max(tick,6000); // Minimum Duration 10s. - break; - case SC_OBLIVIONCURSE: // 100% - (100 - 0.8 x INT) - sc_def = 100 - ( 100 - status->int_* 8 / 10 ); - sc_def = max(sc_def, 5); // minimum of 5% - break; - case SC_WUGBITE: // {(Base Success chance) - (Target's AGI / 4)} - rate -= status->agi*100/4; - rate = max(rate,5000); // minimum of 50% - break; - case SC_ELECTRICSHOCKER: - if( bl->type == BL_MOB ) - tick -= 1000 * (status->agi/10); - break; - case SC_CRYSTALIZE: - tick -= (1000*(status->vit/10))+(status_get_lv(bl)/50); - break; - case SC_MANDRAGORA: - sc_def = (status->vit+status->luk)/5; - break; - case SC_KYOUGAKU: - tick -= 1000 * status_get_int(bl) / 20; - break; - case SC_NEEDLE_OF_PARALYZE: - tick -= 50 * (status->vit + status->luk); //(1000/20); - break; - default: - //Effect that cannot be reduced? Likely a buff. - if (!(rnd()%10000 < rate)) - return 0; - return tick?tick:1; + case SC_BURNING: + tick -= 75 * status->luk + 125 * status->agi; + tick = max(tick,5000); // Minimum Duration 5s. + break; + case SC_FROSTMISTY: + tick -= 1000 * ((status->vit + status->dex) / 20); + tick = max(tick,6000); // Minimum Duration 10s. + break; + case SC_OBLIVIONCURSE: // 100% - (100 - 0.8 x INT) + sc_def = 100 - ( 100 - status->int_* 8 / 10 ); + sc_def = max(sc_def, 5); // minimum of 5% + break; + case SC_WUGBITE: // {(Base Success chance) - (Target's AGI / 4)} + rate -= status->agi*100/4; + rate = max(rate,5000); // minimum of 50% + break; + case SC_ELECTRICSHOCKER: + if( bl->type == BL_MOB ) + tick -= 1000 * (status->agi/10); + break; + case SC_CRYSTALIZE: + tick -= (1000*(status->vit/10))+(status_get_lv(bl)/50); + break; + case SC_MANDRAGORA: + sc_def = (status->vit+status->luk)/5; + break; + case SC_KYOUGAKU: + tick -= 1000 * status_get_int(bl) / 20; + break; + case SC_NEEDLE_OF_PARALYZE: + tick -= 50 * (status->vit + status->luk); //(1000/20); + break; + default: + //Effect that cannot be reduced? Likely a buff. + if (!(rnd()%10000 < rate)) + return 0; + return tick?tick:1; } if (sd) { @@ -6528,27 +6521,26 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed. return 0; // Immune to status ailements switch( type ) { - case SC_QUAGMIRE://Tester said it protects against this and decrease agi. - case SC_DEC_AGI: - case SC_BURNING: - case SC_FROSTMISTY: - //case SC_WHITEIMPRISON://Need confirm. Protected against this in the past. [Rytech] - case SC_MARSHOFABYSS: - case SC_TOXIN: - case SC_PARALYSE: - case SC_VENOMBLEED: - case SC_MAGICMUSHROOM: - case SC_DEATHHURT: - case SC_PYREXIA: - case SC_OBLIVIONCURSE: - case SC_LEECHESEND: - case SC_CRYSTALIZE: ////08/31/2011 - Class Balance Changes - case SC_DEEP_SLEEP: - case SC_MANDRAGORA: + case SC_QUAGMIRE://Tester said it protects against this and decrease agi. + case SC_DEC_AGI: + case SC_BURNING: + case SC_FROSTMISTY: + //case SC_WHITEIMPRISON://Need confirm. Protected against this in the past. [Rytech] + case SC_MARSHOFABYSS: + case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_DEATHHURT: + case SC_PYREXIA: + case SC_OBLIVIONCURSE: + case SC_LEECHESEND: + case SC_CRYSTALIZE: ////08/31/2011 - Class Balance Changes + case SC_DEEP_SLEEP: + case SC_MANDRAGORA: return 0; } - } - else if( sc->data[SC_INSPIRATION] ) { + } else if( sc->data[SC_INSPIRATION] ) { if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX ) return 0; // Immune to status ailements switch( type ) { @@ -6590,286 +6582,286 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val || (type==SC_ANGRIFFS_MODUS && sc->data[SC_GOLDENE_FERSE]) ) return 0; - case SC_STONE: - if(sc->data[SC_POWER_OF_GAIA]) - return 0; - case SC_FREEZE: - //Undead are immune to Freeze/Stone - if (undead_flag && !(flag&1)) - return 0; - case SC_DEEP_SLEEP: - case SC_SLEEP: - case SC_STUN: - case SC_FROSTMISTY: - case SC_CRYSTALIZE: - if (sc->opt1) - return 0; //Cannot override other opt1 status changes. [Skotlex] - if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_CRYSTALIZE) && sc->data[SC_WARMER]) - return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie] - break; - - //There all like berserk, do not everlap each other - case SC__BLOODYLUST: - if(!sd) return 0; //should only affect player - case SC_BERSERK: - if (((type == SC_BERSERK) && (sc->data[SC_SATURDAY_NIGHT_FEVER] || sc->data[SC__BLOODYLUST])) - || ((type == SC__BLOODYLUST) && (sc->data[SC_SATURDAY_NIGHT_FEVER] || sc->data[SC_BERSERK])) - ) - return 0; + case SC_STONE: + if(sc->data[SC_POWER_OF_GAIA]) + return 0; + case SC_FREEZE: + //Undead are immune to Freeze/Stone + if (undead_flag && !(flag&1)) + return 0; + case SC_DEEP_SLEEP: + case SC_SLEEP: + case SC_STUN: + case SC_FROSTMISTY: + case SC_CRYSTALIZE: + if (sc->opt1) + return 0; //Cannot override other opt1 status changes. [Skotlex] + if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_CRYSTALIZE) && sc->data[SC_WARMER]) + return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie] break; - case SC_BURNING: - if(sc->opt1 || sc->data[SC_FROSTMISTY]) - return 0; - break; + //There all like berserk, do not everlap each other + case SC__BLOODYLUST: + if(!sd) return 0; //should only affect player + case SC_BERSERK: + if (((type == SC_BERSERK) && (sc->data[SC_SATURDAY_NIGHT_FEVER] || sc->data[SC__BLOODYLUST])) + || ((type == SC__BLOODYLUST) && (sc->data[SC_SATURDAY_NIGHT_FEVER] || sc->data[SC_BERSERK])) + ) + return 0; + break; - case SC_CRUCIS: - //Only affects demons and undead element (but not players) - if((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) - return 0; - break; - case SC_LEXAETERNA: - if( (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) || sc->data[SC_FREEZE] ) - return 0; - break; - case SC_KYRIE: - if (bl->type == BL_MOB) - return 0; - break; - case SC_OVERTHRUST: - if (sc->data[SC_OVERTHRUSTMAX]) - return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex] - case SC_OVERTHRUSTMAX: - if( sc->option&OPTION_MADOGEAR ) - return 0;//Overthrust and Overthrust Max cannot be used on Mado Gear [Ind] - break; - case SC_ADRENALINE: - if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE))) - return 0; - if (sc->data[SC_QUAGMIRE] || - sc->data[SC_DEC_AGI] || - sc->option&OPTION_MADOGEAR //Adrenaline doesn't affect Mado Gear [Ind] - ) - return 0; - break; - case SC_ADRENALINE2: - if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE2))) - return 0; - if (sc->data[SC_QUAGMIRE] || - sc->data[SC_DEC_AGI] - ) - return 0; - break; - case SC_MAGNIFICAT: - if( sc->data[SC_OFFERTORIUM] || sc->option&OPTION_MADOGEAR ) //Mado is immune to magnificat - return 0; + case SC_BURNING: + if(sc->opt1 || sc->data[SC_FROSTMISTY]) + return 0; break; - case SC_ONEHANDQUICKEN: - case SC_MER_QUICKEN: - case SC_TWOHANDQUICKEN: - if(sc->data[SC_DEC_AGI]) - return 0; - case SC_INC_AGI: - if(sd && pc_issit(sd)){ - pc->setstand(sd); - clif->standing(&sd->bl); - } + case SC_CRUCIS: + //Only affects demons and undead element (but not players) + if((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) + return 0; + break; + case SC_LEXAETERNA: + if( (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) || sc->data[SC_FREEZE] ) + return 0; + break; + case SC_KYRIE: + if (bl->type == BL_MOB) + return 0; + break; + case SC_OVERTHRUST: + if (sc->data[SC_OVERTHRUSTMAX]) + return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex] + case SC_OVERTHRUSTMAX: + if( sc->option&OPTION_MADOGEAR ) + return 0;//Overthrust and Overthrust Max cannot be used on Mado Gear [Ind] + break; + case SC_ADRENALINE: + if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE))) + return 0; + if (sc->data[SC_QUAGMIRE] || + sc->data[SC_DEC_AGI] || + sc->option&OPTION_MADOGEAR //Adrenaline doesn't affect Mado Gear [Ind] + ) + return 0; + break; + case SC_ADRENALINE2: + if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE2))) + return 0; + if (sc->data[SC_QUAGMIRE] || + sc->data[SC_DEC_AGI] + ) + return 0; + break; + case SC_MAGNIFICAT: + if( sc->data[SC_OFFERTORIUM] || sc->option&OPTION_MADOGEAR ) //Mado is immune to magnificat + return 0; + break; + case SC_ONEHANDQUICKEN: + case SC_MER_QUICKEN: + case SC_TWOHANDQUICKEN: + if(sc->data[SC_DEC_AGI]) + return 0; - case SC_CONCENTRATION: - case SC_SPEARQUICKEN: - case SC_TRUESIGHT: - case SC_WINDWALK: - case SC_CARTBOOST: - case SC_ASSNCROS: - if (sc->data[SC_QUAGMIRE]) - return 0; - if(sc->option&OPTION_MADOGEAR) - return 0;//Mado is immune to increase agi, wind walk, cart boost, etc (others above) [Ind] - break; - case SC_CLOAKING: - //Avoid cloaking with no wall and low skill level. [Skotlex] - //Due to the cloaking card, we have to check the wall versus to known - //skill level rather than the used one. [Skotlex] - //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL)) - if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) ) - return 0; - break; - case SC_MODECHANGE: - { - int mode; - struct status_data *bstatus = status_get_base_status(bl); - if (!bstatus) return 0; - if (sc->data[type]) - { //Pile up with previous values. - if(!val2) val2 = sc->data[type]->val2; - val3 |= sc->data[type]->val3; - val4 |= sc->data[type]->val4; - } - mode = val2?val2:bstatus->mode; //Base mode - if (val4) mode&=~val4; //Del mode - if (val3) mode|= val3; //Add mode - if (mode == bstatus->mode) { //No change. - if (sc->data[type]) //Abort previous status - return status_change_end(bl, type, INVALID_TIMER); - return 0; - } - } - break; - //Strip skills, need to divest something or it fails. - case SC_NOEQUIPWEAPON: - if (sd && !(flag&4)) { //apply sc anyway if loading saved sc_data - int i; - opt_flag = 0; //Reuse to check success condition. - if(sd->bonus.unstripable_equip&EQP_WEAPON) + case SC_INC_AGI: + if(sd && pc_issit(sd)){ + pc->setstand(sd); + clif->standing(&sd->bl); + } + + case SC_CONCENTRATION: + case SC_SPEARQUICKEN: + case SC_TRUESIGHT: + case SC_WINDWALK: + case SC_CARTBOOST: + case SC_ASSNCROS: + if (sc->data[SC_QUAGMIRE]) + return 0; + if(sc->option&OPTION_MADOGEAR) + return 0;//Mado is immune to increase agi, wind walk, cart boost, etc (others above) [Ind] + break; + case SC_CLOAKING: + //Avoid cloaking with no wall and low skill level. [Skotlex] + //Due to the cloaking card, we have to check the wall versus to known + //skill level rather than the used one. [Skotlex] + //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL)) + if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) ) + return 0; + break; + case SC_MODECHANGE: + { + int mode; + struct status_data *bstatus = status_get_base_status(bl); + if (!bstatus) return 0; + if (sc->data[type]) + { //Pile up with previous values. + if(!val2) val2 = sc->data[type]->val2; + val3 |= sc->data[type]->val3; + val4 |= sc->data[type]->val4; + } + mode = val2?val2:bstatus->mode; //Base mode + if (val4) mode&=~val4; //Del mode + if (val3) mode|= val3; //Add mode + if (mode == bstatus->mode) { //No change. + if (sc->data[type]) //Abort previous status + return status_change_end(bl, type, INVALID_TIMER); return 0; + } + } + break; + //Strip skills, need to divest something or it fails. + case SC_NOEQUIPWEAPON: + if (sd && !(flag&4)) { //apply sc anyway if loading saved sc_data + int i; + opt_flag = 0; //Reuse to check success condition. + if(sd->bonus.unstripable_equip&EQP_WEAPON) + return 0; - i = sd->equip_index[EQI_HAND_R]; - if (i>=0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON) { - opt_flag|=2; + i = sd->equip_index[EQI_HAND_R]; + if (i>=0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON) { + opt_flag|=2; + pc->unequipitem(sd,i,3); + } + if (!opt_flag) return 0; + } + if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC + break; + case SC_NOEQUIPSHIELD: + if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off.. + else + if (sd && !(flag&4)) { + int i; + if(sd->bonus.unstripable_equip&EQP_SHIELD) + return 0; + i = sd->equip_index[EQI_HAND_L]; + if ( i < 0 || !sd->inventory_data[i] || sd->inventory_data[i]->type != IT_ARMOR ) + return 0; pc->unequipitem(sd,i,3); } - if (!opt_flag) return 0; - } - if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC - break; - case SC_NOEQUIPSHIELD: - if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off.. - else - if (sd && !(flag&4)) { - int i; - if(sd->bonus.unstripable_equip&EQP_SHIELD) + if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC + break; + case SC_NOEQUIPARMOR: + if (sd && !(flag&4)) { + int i; + if(sd->bonus.unstripable_equip&EQP_ARMOR) + return 0; + i = sd->equip_index[EQI_ARMOR]; + if ( i < 0 || !sd->inventory_data[i] ) + return 0; + pc->unequipitem(sd,i,3); + } + if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC + break; + case SC_NOEQUIPHELM: + if (sd && !(flag&4)) { + int i; + if(sd->bonus.unstripable_equip&EQP_HELM) + return 0; + i = sd->equip_index[EQI_HEAD_TOP]; + if ( i < 0 || !sd->inventory_data[i] ) + return 0; + pc->unequipitem(sd,i,3); + } + if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC + break; + case SC_MER_FLEE: + case SC_MER_ATK: + case SC_MER_HP: + case SC_MER_SP: + case SC_MER_HIT: + if( bl->type != BL_MER ) + return 0; // Stats only for Mercenaries + break; + case SC_FOOD_STR: + if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1) return 0; - i = sd->equip_index[EQI_HAND_L]; - if ( i < 0 || !sd->inventory_data[i] || sd->inventory_data[i]->type != IT_ARMOR ) + break; + case SC_FOOD_AGI: + if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > val1) return 0; - pc->unequipitem(sd,i,3); - } - if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC - break; - case SC_NOEQUIPARMOR: - if (sd && !(flag&4)) { - int i; - if(sd->bonus.unstripable_equip&EQP_ARMOR) + break; + case SC_FOOD_VIT: + if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > val1) return 0; - i = sd->equip_index[EQI_ARMOR]; - if ( i < 0 || !sd->inventory_data[i] ) + break; + case SC_FOOD_INT: + if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > val1) return 0; - pc->unequipitem(sd,i,3); - } - if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC - break; - case SC_NOEQUIPHELM: - if (sd && !(flag&4)) { - int i; - if(sd->bonus.unstripable_equip&EQP_HELM) + break; + case SC_FOOD_DEX: + if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > val1) return 0; - i = sd->equip_index[EQI_HEAD_TOP]; - if ( i < 0 || !sd->inventory_data[i] ) + break; + case SC_FOOD_LUK: + if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1) return 0; - pc->unequipitem(sd,i,3); - } - if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC - break; - case SC_MER_FLEE: - case SC_MER_ATK: - case SC_MER_HP: - case SC_MER_SP: - case SC_MER_HIT: - if( bl->type != BL_MER ) - return 0; // Stats only for Mercenaries - break; - case SC_FOOD_STR: - if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_AGI: - if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_VIT: - if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_INT: - if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_DEX: - if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_LUK: - if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1) - return 0; - break; - case SC_FOOD_STR_CASH: - if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1) - return 0; - break; - case SC_FOOD_AGI_CASH: - if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1) - return 0; - break; - case SC_FOOD_VIT_CASH: - if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1) - return 0; - break; - case SC_FOOD_INT_CASH: - if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1) - return 0; - break; - case SC_FOOD_DEX_CASH: - if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1) - return 0; - break; - case SC_FOOD_LUK_CASH: - if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1) - return 0; - break; - case SC_CAMOUFLAGE: - if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) ) - return 0; - break; - case SC__STRIPACCESSARY: - if( sd ) { - int i = -1; - if( !(sd->bonus.unstripable_equip&EQI_ACC_L) ) { - i = sd->equip_index[EQI_ACC_L]; - if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR ) - pc->unequipitem(sd,i,3); //L-Accessory - } if( !(sd->bonus.unstripable_equip&EQI_ACC_R) ) { - i = sd->equip_index[EQI_ACC_R]; - if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR ) - pc->unequipitem(sd,i,3); //R-Accessory - } - if( i < 0 ) + break; + case SC_FOOD_STR_CASH: + if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1) return 0; - } - if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC - break; - case SC_TOXIN: - case SC_PARALYSE: - case SC_VENOMBLEED: - case SC_MAGICMUSHROOM: - case SC_DEATHHURT: - case SC_PYREXIA: - case SC_OBLIVIONCURSE: - case SC_LEECHESEND: - { // it doesn't stack or even renewed - int i = SC_TOXIN; - for(; i<= SC_LEECHESEND; i++) - if(sc->data[i]) return 0; - } - break; - case SC_SATURDAY_NIGHT_FEVER: - if (sc->data[SC_BERSERK] || sc->data[SC_INSPIRATION] || sc->data[SC__BLOODYLUST]) - return 0; break; - case SC_OFFERTORIUM: - if (sc->data[SC_MAGNIFICAT]) - return 0; + case SC_FOOD_AGI_CASH: + if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1) + return 0; break; + case SC_FOOD_VIT_CASH: + if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1) + return 0; + break; + case SC_FOOD_INT_CASH: + if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1) + return 0; + break; + case SC_FOOD_DEX_CASH: + if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1) + return 0; + break; + case SC_FOOD_LUK_CASH: + if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1) + return 0; + break; + case SC_CAMOUFLAGE: + if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) ) + return 0; + break; + case SC__STRIPACCESSARY: + if( sd ) { + int i = -1; + if( !(sd->bonus.unstripable_equip&EQI_ACC_L) ) { + i = sd->equip_index[EQI_ACC_L]; + if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR ) + pc->unequipitem(sd,i,3); //L-Accessory + } if( !(sd->bonus.unstripable_equip&EQI_ACC_R) ) { + i = sd->equip_index[EQI_ACC_R]; + if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR ) + pc->unequipitem(sd,i,3); //R-Accessory + } + if( i < 0 ) + return 0; + } + if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC + break; + case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_DEATHHURT: + case SC_PYREXIA: + case SC_OBLIVIONCURSE: + case SC_LEECHESEND: + { // it doesn't stack or even renewed + int i = SC_TOXIN; + for(; i<= SC_LEECHESEND; i++) + if(sc->data[i]) return 0; + } + break; + case SC_SATURDAY_NIGHT_FEVER: + if (sc->data[SC_BERSERK] || sc->data[SC_INSPIRATION] || sc->data[SC__BLOODYLUST]) + return 0; + break; + case SC_OFFERTORIUM: + if (sc->data[SC_MAGNIFICAT]) + return 0; + break; } //Check for BOSS resistances @@ -6915,236 +6907,236 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val //Before overlapping fail, one must check for status cured. switch (type) { - case SC_BLESSING: - //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM - //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] - if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) { - status_change_end(bl, SC_CURSE, INVALID_TIMER); - if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) - status_change_end(bl, SC_STONE, INVALID_TIMER); - } - break; - case SC_INC_AGI: - status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); - break; - case SC_QUAGMIRE: - status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER); - status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER); - status_change_end(bl, SC_WINDWALK, INVALID_TIMER); - //Also blocks the ones below... - case SC_DEC_AGI: - status_change_end(bl, SC_CARTBOOST, INVALID_TIMER); - //Also blocks the ones below... - case SC_DONTFORGETME: - status_change_end(bl, SC_INC_AGI, INVALID_TIMER); - status_change_end(bl, SC_ADRENALINE, INVALID_TIMER); - status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER); - status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); - status_change_end(bl, SC_ACCELERATION, INVALID_TIMER); - break; - case SC_ONEHANDQUICKEN: - //Removes the Aspd potion effect, as reported by Vicious. [Skotlex] - status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); - break; - case SC_OVERTHRUSTMAX: - //Cancels Normal Overthrust. [Skotlex] - status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER); - break; - case SC_KYRIE: - //Cancels Assumptio - status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); - break; - case SC_DELUGE: - if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND]) - status_change_end(bl, SC_BLIND, INVALID_TIMER); - break; - case SC_SILENCE: - if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) - status_change_end(bl, SC_GOSPEL, INVALID_TIMER); - break; - case SC_HIDING: - status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER); - status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); - break; - case SC__BLOODYLUST: - case SC_BERSERK: - if(battle_config.berserk_cancels_buffs) { - status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); + case SC_BLESSING: + //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM + //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] + if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) { + status_change_end(bl, SC_CURSE, INVALID_TIMER); + if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) + status_change_end(bl, SC_STONE, INVALID_TIMER); + } + break; + case SC_INC_AGI: + status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); + break; + case SC_QUAGMIRE: + status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER); + status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER); + status_change_end(bl, SC_WINDWALK, INVALID_TIMER); + //Also blocks the ones below... + case SC_DEC_AGI: + status_change_end(bl, SC_CARTBOOST, INVALID_TIMER); + //Also blocks the ones below... + case SC_DONTFORGETME: + status_change_end(bl, SC_INC_AGI, INVALID_TIMER); + status_change_end(bl, SC_ADRENALINE, INVALID_TIMER); + status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER); + status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER); status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); - status_change_end(bl, SC_PARRYING, INVALID_TIMER); - status_change_end(bl, SC_AURABLADE, INVALID_TIMER); + status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); - } -#ifdef RENEWAL - else { - status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - } -#endif - break; - case SC_ASSUMPTIO: - status_change_end(bl, SC_KYRIE, INVALID_TIMER); - status_change_end(bl, SC_KAITE, INVALID_TIMER); - break; - case SC_KAITE: - status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); - break; - case SC_CARTBOOST: - if(sc->data[SC_DEC_AGI]) - { //Cancel Decrease Agi, but take no further effect [Skotlex] - status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); - return 0; - } - break; - case SC_FUSION: - status_change_end(bl, SC_SOULLINK, INVALID_TIMER); - break; - case SC_GS_ADJUSTMENT: - status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER); - break; - case SC_GS_MADNESSCANCEL: - status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER); - break; - //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up - case SC_PROPERTYUNDEAD: - status_change_end(bl, SC_BLESSING, INVALID_TIMER); - status_change_end(bl, SC_INC_AGI, INVALID_TIMER); - break; - case SC_FOOD_STR: - status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER); - break; - case SC_FOOD_AGI: - status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER); - break; - case SC_FOOD_VIT: - status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER); - break; - case SC_FOOD_INT: - status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER); - break; - case SC_FOOD_DEX: - status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER); - break; - case SC_FOOD_LUK: - status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER); - break; - case SC_FOOD_STR_CASH: - status_change_end(bl, SC_FOOD_STR, INVALID_TIMER); - break; - case SC_FOOD_AGI_CASH: - status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER); - break; - case SC_FOOD_VIT_CASH: - status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER); - break; - case SC_FOOD_INT_CASH: - status_change_end(bl, SC_FOOD_INT, INVALID_TIMER); - break; - case SC_FOOD_DEX_CASH: - status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER); - break; - case SC_FOOD_LUK_CASH: - status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER); - break; - case SC_ENDURE: - if( val4 ) - status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); - break; - case SC_FIGHTINGSPIRIT: - status_change_end(bl, type, INVALID_TIMER); // Remove previous one. - break; - case SC_MARSHOFABYSS: - status_change_end(bl, SC_INCAGI, INVALID_TIMER); - status_change_end(bl, SC_WINDWALK, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); - break; - case SC_SWING: - case SC_SYMPHONY_LOVE: - case SC_MOONLIT_SERENADE: - case SC_RUSH_WINDMILL: - case SC_ECHOSONG: - case SC_HARMONIZE: //group A doesn't overlap - if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER); - if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER); - if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER); - if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER); - if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER); - if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER); - break; - case SC_SIREN: - case SC_DEEP_SLEEP: - case SC_GLOOMYDAY: - case SC_SONG_OF_MANA: - case SC_DANCE_WITH_WUG: - case SC_SATURDAY_NIGHT_FEVER: - case SC_LERADS_DEW: - case SC_MELODYOFSINK: - case SC_BEYOND_OF_WARCRY: - case SC_UNLIMITED_HUMMING_VOICE: //group B - if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER); - if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER); - if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER); - if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER); - if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER); - if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER); - if (type != SC_GLOOMYDAY) { - status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER); - status_change_end(bl, SC_GLOOMYDAY_SK, INVALID_TIMER); - } - if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER); - if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER); - if (type != SC_SATURDAY_NIGHT_FEVER) { - if (sc->data[SC_SATURDAY_NIGHT_FEVER]) { - sc->data[SC_SATURDAY_NIGHT_FEVER]->val2 = 0; //mark to not lose hp - status_change_end(bl, SC_SATURDAY_NIGHT_FEVER, INVALID_TIMER); - } - } - break; - case SC_REFLECTSHIELD: - status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER); - break; - case SC_LG_REFLECTDAMAGE: - status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER); - break; - case SC_SHIELDSPELL_DEF: - case SC_SHIELDSPELL_MDEF: - case SC_SHIELDSPELL_REF: - status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); - if( type != SC_SHIELDSPELL_DEF ) - status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER); - if( type != SC_SHIELDSPELL_MDEF ) - status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER); - if( type != SC_SHIELDSPELL_REF ) - status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER); - break; - case SC_GENTLETOUCH_ENERGYGAIN: - case SC_GENTLETOUCH_CHANGE: - case SC_GENTLETOUCH_REVITALIZE: - if( type != SC_GENTLETOUCH_REVITALIZE ) - status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER); - if( type != SC_GENTLETOUCH_ENERGYGAIN ) - status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER); - if( type != SC_GENTLETOUCH_CHANGE ) - status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER); - break; - case SC_INVINCIBLE: - status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER); - break; - case SC_INVINCIBLEOFF: - status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER); - break; - case SC_MAGICPOWER: - status_change_end(bl, type, INVALID_TIMER); - break; + status_change_end(bl, SC_ACCELERATION, INVALID_TIMER); + break; + case SC_ONEHANDQUICKEN: + //Removes the Aspd potion effect, as reported by Vicious. [Skotlex] + status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); + break; + case SC_OVERTHRUSTMAX: + //Cancels Normal Overthrust. [Skotlex] + status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER); + break; + case SC_KYRIE: + //Cancels Assumptio + status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); + break; + case SC_DELUGE: + if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND]) + status_change_end(bl, SC_BLIND, INVALID_TIMER); + break; + case SC_SILENCE: + if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) + status_change_end(bl, SC_GOSPEL, INVALID_TIMER); + break; + case SC_HIDING: + status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER); + status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); + break; + case SC__BLOODYLUST: + case SC_BERSERK: + if(battle_config.berserk_cancels_buffs) { + status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); + status_change_end(bl, SC_PARRYING, INVALID_TIMER); + status_change_end(bl, SC_AURABLADE, INVALID_TIMER); + status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); + } + #ifdef RENEWAL + else { + status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); + } + #endif + break; + case SC_ASSUMPTIO: + status_change_end(bl, SC_KYRIE, INVALID_TIMER); + status_change_end(bl, SC_KAITE, INVALID_TIMER); + break; + case SC_KAITE: + status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); + break; + case SC_CARTBOOST: + if(sc->data[SC_DEC_AGI]) + { //Cancel Decrease Agi, but take no further effect [Skotlex] + status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); + return 0; + } + break; + case SC_FUSION: + status_change_end(bl, SC_SOULLINK, INVALID_TIMER); + break; + case SC_GS_ADJUSTMENT: + status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER); + break; + case SC_GS_MADNESSCANCEL: + status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER); + break; + //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up + case SC_PROPERTYUNDEAD: + status_change_end(bl, SC_BLESSING, INVALID_TIMER); + status_change_end(bl, SC_INC_AGI, INVALID_TIMER); + break; + case SC_FOOD_STR: + status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER); + break; + case SC_FOOD_AGI: + status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER); + break; + case SC_FOOD_VIT: + status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER); + break; + case SC_FOOD_INT: + status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER); + break; + case SC_FOOD_DEX: + status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER); + break; + case SC_FOOD_LUK: + status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER); + break; + case SC_FOOD_STR_CASH: + status_change_end(bl, SC_FOOD_STR, INVALID_TIMER); + break; + case SC_FOOD_AGI_CASH: + status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER); + break; + case SC_FOOD_VIT_CASH: + status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER); + break; + case SC_FOOD_INT_CASH: + status_change_end(bl, SC_FOOD_INT, INVALID_TIMER); + break; + case SC_FOOD_DEX_CASH: + status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER); + break; + case SC_FOOD_LUK_CASH: + status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER); + break; + case SC_ENDURE: + if( val4 ) + status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); + break; + case SC_FIGHTINGSPIRIT: + status_change_end(bl, type, INVALID_TIMER); // Remove previous one. + break; + case SC_MARSHOFABYSS: + status_change_end(bl, SC_INCAGI, INVALID_TIMER); + status_change_end(bl, SC_WINDWALK, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); + break; + case SC_SWING: + case SC_SYMPHONY_LOVE: + case SC_MOONLIT_SERENADE: + case SC_RUSH_WINDMILL: + case SC_ECHOSONG: + case SC_HARMONIZE: //group A doesn't overlap + if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER); + if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER); + if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER); + if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER); + if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER); + if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER); + break; + case SC_SIREN: + case SC_DEEP_SLEEP: + case SC_GLOOMYDAY: + case SC_SONG_OF_MANA: + case SC_DANCE_WITH_WUG: + case SC_SATURDAY_NIGHT_FEVER: + case SC_LERADS_DEW: + case SC_MELODYOFSINK: + case SC_BEYOND_OF_WARCRY: + case SC_UNLIMITED_HUMMING_VOICE: //group B + if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER); + if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER); + if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER); + if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER); + if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER); + if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER); + if (type != SC_GLOOMYDAY) { + status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER); + status_change_end(bl, SC_GLOOMYDAY_SK, INVALID_TIMER); + } + if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER); + if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER); + if (type != SC_SATURDAY_NIGHT_FEVER) { + if (sc->data[SC_SATURDAY_NIGHT_FEVER]) { + sc->data[SC_SATURDAY_NIGHT_FEVER]->val2 = 0; //mark to not lose hp + status_change_end(bl, SC_SATURDAY_NIGHT_FEVER, INVALID_TIMER); + } + } + break; + case SC_REFLECTSHIELD: + status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER); + break; + case SC_LG_REFLECTDAMAGE: + status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER); + break; + case SC_SHIELDSPELL_DEF: + case SC_SHIELDSPELL_MDEF: + case SC_SHIELDSPELL_REF: + status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); + if( type != SC_SHIELDSPELL_DEF ) + status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER); + if( type != SC_SHIELDSPELL_MDEF ) + status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER); + if( type != SC_SHIELDSPELL_REF ) + status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER); + break; + case SC_GENTLETOUCH_ENERGYGAIN: + case SC_GENTLETOUCH_CHANGE: + case SC_GENTLETOUCH_REVITALIZE: + if( type != SC_GENTLETOUCH_REVITALIZE ) + status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER); + if( type != SC_GENTLETOUCH_ENERGYGAIN ) + status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER); + if( type != SC_GENTLETOUCH_CHANGE ) + status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER); + break; + case SC_INVINCIBLE: + status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER); + break; + case SC_INVINCIBLEOFF: + status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER); + break; + case SC_MAGICPOWER: + status_change_end(bl, type, INVALID_TIMER); + break; } //Check for overlapping fails @@ -9223,24 +9215,24 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if (sce->timer != INVALID_TIMER) //Could be a SC with infinite duration iTimer->delete_timer(sce->timer,status_change_timer); if (sc->opt1) - switch (type) { - //"Ugly workaround" [Skotlex] - //delays status change ending so that a skill that sets opt1 fails to - //trigger when it also removed one - case SC_STONE: - sce->val3 = 0; //Petrify time counter. - case SC_FREEZE: - case SC_STUN: - case SC_SLEEP: - if (sce->val1) { - //Removing the 'level' shouldn't affect anything in the code - //since these SC are not affected by it, and it lets us know - //if we have already delayed this attack or not. - sce->val1 = 0; - sce->timer = iTimer->add_timer(iTimer->gettick()+10, status_change_timer, bl->id, type); - return 1; + switch (type) { + //"Ugly workaround" [Skotlex] + //delays status change ending so that a skill that sets opt1 fails to + //trigger when it also removed one + case SC_STONE: + sce->val3 = 0; //Petrify time counter. + case SC_FREEZE: + case SC_STUN: + case SC_SLEEP: + if (sce->val1) { + //Removing the 'level' shouldn't affect anything in the code + //since these SC are not affected by it, and it lets us know + //if we have already delayed this attack or not. + sce->val1 = 0; + sce->timer = iTimer->add_timer(iTimer->gettick()+10, status_change_timer, bl->id, type); + return 1; + } } - } } (sc->count)--; @@ -11417,12 +11409,11 @@ static bool status_readdb_refine(char* fields[], int columns, int current) return true; } -static bool status_readdb_scconfig(char* fields[], int columns, int current) -{ +static bool status_readdb_scconfig(char* fields[], int columns, int current) { int val = 0; char* type = fields[0]; - if( !script_get_constant(type, &val) ){ + if( !script->get_constant(type, &val) ){ ShowWarning("status_readdb_sc_conf: Invalid status type %s specified.\n", type); return false; } diff --git a/src/map/storage.c b/src/map/storage.c index 49cb18cbe..e3fa073af 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -24,9 +24,6 @@ #include #include - -static DBMap* guild_storage_db; // int guild_id -> struct guild_storage* - /*========================================== * Sort items in the warehouse *------------------------------------------*/ @@ -58,14 +55,13 @@ static void storage_sortitem(struct item* items, unsigned int size) /*========================================== * Init/Terminate *------------------------------------------*/ -int do_init_storage(void) // Called from map.c::do_init() -{ - guild_storage_db=idb_alloc(DB_OPT_RELEASE_DATA); +/* ##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] -{ - guild_storage_db->destroy(guild_storage_db,NULL); +void do_final_storage(void) { // by [MC Cameri] + gstorage->db->destroy(gstorage->db,NULL); } /** @@ -83,7 +79,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) { - guild_storage_db->foreach(guild_storage_db, storage_reconnect_sub); + gstorage->db->foreach(gstorage->db, storage_reconnect_sub); } /*========================================== @@ -132,8 +128,7 @@ int compare_item(struct item *a, struct item *b) /*========================================== * Internal add-item function. *------------------------------------------*/ -static int storage_additem(struct map_session_data* sd, struct item* item_data, int amount) -{ +int storage_additem(struct map_session_data* sd, struct item* item_data, int amount) { struct storage_data* stor = &sd->status.storage; struct item_data *data; int i; @@ -141,7 +136,7 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data, if( item_data->nameid <= 0 || amount <= 0 ) return 1; - data = itemdb_search(item_data->nameid); + data = itemdb->search(item_data->nameid); if( data->stack.storage && amount > data->stack.amount ) {// item stack limitation @@ -226,7 +221,7 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount) if( amount < 1 || amount > sd->status.inventory[index].amount ) return 0; - if( storage_additem(sd,&sd->status.inventory[index],amount) == 0 ) + if( storage->additem(sd,&sd->status.inventory[index],amount) == 0 ) pc->delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE); return 1; @@ -283,7 +278,7 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun if( amount < 1 || amount > sd->status.cart[index].amount ) return 0; - if( storage_additem(sd,&sd->status.cart[index],amount) == 0 ) + if( storage->additem(sd,&sd->status.cart[index],amount) == 0 ) pc->cart_delitem(sd,index,amount,0,LOG_TYPE_STORAGE); return 1; @@ -359,19 +354,17 @@ struct guild_storage *guild2storage(int guild_id) { struct guild_storage *gs = NULL; if(guild->search(guild_id) != NULL) - gs = idb_ensure(guild_storage_db,guild_id,create_guildstorage); + gs = idb_ensure(gstorage->db,guild_id,create_guildstorage); return gs; } //For just locating a storage without creating one. [Skotlex] -struct guild_storage *guild2storage2(int guild_id) -{ - return (struct guild_storage*)idb_get(guild_storage_db,guild_id); +struct guild_storage *guild2storage2(int guild_id) { + return (struct guild_storage*)idb_get(gstorage->db,guild_id); } -int guild_storage_delete(int guild_id) -{ - idb_remove(guild_storage_db,guild_id); +int guild_storage_delete(int guild_id) { + idb_remove(gstorage->db,guild_id); return 0; } @@ -435,7 +428,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto if(item_data->nameid <= 0 || amount <= 0) return 1; - data = itemdb_search(item_data->nameid); + data = itemdb->search(item_data->nameid); if( data->stack.guildstorage && amount > data->stack.amount ) {// item stack limitation @@ -745,6 +738,7 @@ void storage_defaults(void) { storage->delitem = storage_delitem; storage->open = storage_storageopen; storage->add = storage_storageadd; + storage->additem = storage_additem; storage->get = storage_storageget; storage->addfromcart = storage_storageaddfromcart; storage->gettocart = storage_storagegettocart; diff --git a/src/map/storage.h b/src/map/storage.h index 058b980b1..fc05ef06c 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -9,6 +9,7 @@ struct storage_data; struct guild_storage; struct item; struct map_session_data; +struct DBMap; struct storage_interface { int (*init) (void); @@ -20,6 +21,7 @@ struct storage_interface { int (*open) (struct map_session_data *sd); int (*add) (struct map_session_data *sd,int index,int amount); int (*get) (struct map_session_data *sd,int index,int amount); + int (*additem) (struct map_session_data* sd, struct item* item_data, int amount); int (*addfromcart) (struct map_session_data *sd,int index,int amount); int (*gettocart) (struct map_session_data *sd,int index,int amount); void (*close) (struct map_session_data *sd); @@ -28,6 +30,8 @@ struct storage_interface { struct storage_interface *storage; struct guild_storage_interface { + struct DBMap* db; // int guild_id -> struct guild_storage* + /* */ struct guild_storage *(*id2storage) (int guild_id); struct guild_storage *(*id2storage2) (int guild_id); int (*delete) (int guild_id); diff --git a/src/map/trade.c b/src/map/trade.c index f469f4b28..a2a29651b 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -257,7 +257,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) if (amount > inventory[n].amount) return 0; //qty Exploit? - data = itemdb_search(inventory[n].nameid); + data = itemdb->search(inventory[n].nameid); i = MAX_INVENTORY; if (itemdb_isstackable2(data)) { //Stackable item. for(i = 0; i < MAX_INVENTORY; i++) @@ -288,7 +288,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) if (amount > inventory2[n].amount) return 0; // search if it's possible to add item (for full inventory) - data = itemdb_search(inventory2[n].nameid); + data = itemdb->search(inventory2[n].nameid); i = MAX_INVENTORY; if (itemdb_isstackable2(data)) { for(i = 0; i < MAX_INVENTORY; i++) diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 723a3cc94..a6e1c20e6 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -17,7 +17,7 @@ HPExport struct hplugin_info pinfo = { "DB2SQL", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? - "0.1", // Plugin version + "0.2", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; @@ -107,9 +107,12 @@ CPCMD(db2sql) { /* link */ parse_dbrow = itemdb->parse_dbrow; itemdb->parse_dbrow = db2sql; - /* empty table */ +#ifdef RENEWAL + if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", iMap->item_db_re_db ) ) +#else if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", iMap->item_db_db) ) +#endif Sql_ShowDebug(mysql_handle); else { itemdb->reload(); -- cgit v1.2.3-70-g09d2 From 71627e92fbe36c23993456486a308acd0428fd3d Mon Sep 17 00:00:00 2001 From: Susu Date: Tue, 25 Jun 2013 14:12:21 +0200 Subject: - Added chrif interface --- src/map/atcommand.c | 16 ++--- src/map/battle.c | 6 +- src/map/buyingstore.c | 4 +- src/map/chrif.c | 190 +++++++++++++++++++++++++++++++++----------------- src/map/chrif.h | 104 +++++++++++++++------------ src/map/clif.c | 16 ++--- src/map/intif.c | 16 ++--- src/map/map.c | 40 ++++++----- src/map/pc.c | 22 +++--- src/map/pet.c | 2 +- src/map/quest.c | 8 +-- src/map/script.c | 2 +- src/map/skill.c | 2 +- src/map/storage.c | 12 ++-- src/map/trade.c | 10 +-- src/map/vending.c | 4 +- 16 files changed, 266 insertions(+), 188 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a1bc52924..13519c804 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -745,7 +745,7 @@ ACMD(save) if (sd->status.pet_id > 0 && sd->pd) intif_save_petdata(sd->status.account_id, &sd->pd->pet); - chrif_save(sd,0); + chrif->save(sd,0); clif->message(fd, msg_txt(6)); // Your save point has been changed. @@ -2745,7 +2745,7 @@ ACMD(char_block) return false; } - chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. return true; @@ -2842,7 +2842,7 @@ ACMD(char_ban) return false; } - chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 2, year, month, day, hour, minute, second); // type: 2 - ban + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 2, year, month, day, hour, minute, second); // type: 2 - ban clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. return true; @@ -2863,7 +2863,7 @@ ACMD(char_unblock) } // send answer to login server via char-server - chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. return true; @@ -2884,7 +2884,7 @@ ACMD(char_unban) } // send answer to login server via char-server - chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. return true; @@ -3688,7 +3688,7 @@ ACMD(reloadbattleconf) ) { // Exp or Drop rates changed. mob_reload(); //Needed as well so rate changes take effect. - chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common); + chrif->ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common); } clif->message(fd, msg_txt(255)); return true; @@ -5010,7 +5010,7 @@ ACMD(email) return false; } - chrif_changeemail(sd->status.account_id, actual_email, new_email); + chrif->changeemail(sd->status.account_id, actual_email, new_email); clif->message(fd, msg_txt(148)); // Information sended to login-server via char-server. return true; } @@ -6513,7 +6513,7 @@ ACMD(changesex) // to avoid any problem with equipment and invalid sex, equipment is unequiped. for( i=0; iequip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3); - chrif_changesex(sd); + chrif->changesex(sd); return true; } diff --git a/src/map/battle.c b/src/map/battle.c index 9e65146e2..b818e7ef4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1489,7 +1489,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += 300 + 100 * skill_lv + status_get_int(src); RE_LVL_DMOD(100); break; - case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster’s Base Level / 100 )] % + case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster�s Base Level / 100 )] % skillratio += 100 + 100 * skill_lv; RE_LVL_DMOD(100); break; @@ -6536,14 +6536,14 @@ void Hercules_report(char* date, char *time_c) { WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val; } - chrif_send_report(buf, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) ); + chrif->send_report(buf, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) ); aFree(buf); #undef BFLAG_LENGTH } static int Hercules_report_timer(int tid, unsigned int tick, int id, intptr_t data) { - if( chrif_isconnected() ) {/* char server relays it, so it must be online. */ + if( chrif->isconnected() ) {/* char server relays it, so it must be online. */ Hercules_report(__DATE__,__TIME__); } return 0; diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index dc07c2409..7041042df 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -384,8 +384,8 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int } if( iMap->save_settings&128 ) { - chrif_save(sd, 0); - chrif_save(pl_sd, 0); + chrif->save(sd, 0); + chrif->save(pl_sd, 0); } // check whether or not there is still something to buy diff --git a/src/map/chrif.c b/src/map/chrif.c index a95193363..9e8b18d3b 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -53,39 +53,39 @@ static const int packet_len_table[0x3d] = { // U - used, F - free //2af9: Incoming, chrif_connectack -> 'answer of the 2af8 login(ok / fail)' //2afa: Outgoing, chrif_sendmap -> 'sending our maps' //2afb: Incoming, chrif_sendmapack -> 'Maps received successfully / or not ..' -//2afc: Outgoing, chrif_scdata_request -> request sc_data for pc->authok'ed char. <- new command reuses previous one. -//2afd: Incoming, chrif_authok -> 'client authentication ok' +//2afc: Outgoing, chrif->scdata_request -> request sc_data for pc->authok'ed char. <- new command reuses previous one. +//2afd: Incoming, chrif->authok -> 'client authentication ok' //2afe: Outgoing, send_usercount_tochar -> 'sends player count of this map server to charserver' -//2aff: Outgoing, send_users_tochar -> 'sends all actual connected character ids to charserver' +//2aff: Outgoing, chrif->send_users_tochar -> 'sends all actual connected character ids to charserver' //2b00: Incoming, iMap->setusers -> 'set the actual usercount? PACKET.2B COUNT.L.. ?' (not sure) -//2b01: Outgoing, chrif_save -> 'charsave of char XY account XY (complete struct)' -//2b02: Outgoing, chrif_charselectreq -> 'player returns from ingame to charserver to select another char.., this packets includes sessid etc' ? (not 100% sure) +//2b01: Outgoing, chrif->save -> 'charsave of char XY account XY (complete struct)' +//2b02: Outgoing, chrif->charselectreq -> 'player returns from ingame to charserver to select another char.., this packets includes sessid etc' ? (not 100% sure) //2b03: Incoming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure) //2b04: Incoming, chrif_recvmap -> 'getting maps from charserver of other mapserver's' -//2b05: Outgoing, chrif_changemapserver -> 'Tell the charserver the mapchange / quest for ok...' +//2b05: Outgoing, chrif->changemapserver -> 'Tell the charserver the mapchange / quest for ok...' //2b06: Incoming, chrif_changemapserverack -> 'awnser of 2b05, ok/fail, data: dunno^^' -//2b07: Outgoing, chrif_removefriend -> 'Tell charserver to remove friend_id from char_id friend list' -//2b08: Outgoing, chrif_searchcharid -> '...' +//2b07: Outgoing, chrif->removefriend -> 'Tell charserver to remove friend_id from char_id friend list' +//2b08: Outgoing, chrif->searchcharid -> '...' //2b09: Incoming, map_addchariddb -> 'Adds a name to the nick db' //2b0a: Incoming/Outgoing, socket_datasync() //2b0b: Outgoing, update charserv skillid2idx -//2b0c: Outgoing, chrif_changeemail -> 'change mail address ...' +//2b0c: Outgoing, chrif->changeemail -> 'change mail address ...' //2b0d: Incoming, chrif_changedsex -> 'Change sex of acc XY' -//2b0e: Outgoing, chrif_char_ask_name -> 'Do some operations (change sex, ban / unban etc)' +//2b0e: Outgoing, chrif->char_ask_name -> 'Do some operations (change sex, ban / unban etc)' //2b0f: Incoming, chrif_char_ask_name_answer -> 'answer of the 2b0e' -//2b10: Outgoing, chrif_updatefamelist -> 'Update the fame ranking lists and send them' -//2b11: Outgoing, chrif_divorce -> 'tell the charserver to do divorce' +//2b10: Outgoing, chrif->updatefamelist -> 'Update the fame ranking lists and send them' +//2b11: Outgoing, chrif->divorce -> 'tell the charserver to do divorce' //2b12: Incoming, chrif_divorceack -> 'divorce chars //2b13: FREE //2b14: Incoming, chrif_accountban -> 'not sure: kick the player with message XY' //2b15: FREE -//2b16: Outgoing, chrif_ragsrvinfo -> 'sends base / job / drop rates ....' -//2b17: Outgoing, chrif_char_offline -> 'tell the charserver that the char is now offline' -//2b18: Outgoing, chrif_char_reset_offline -> 'set all players OFF!' -//2b19: Outgoing, chrif_char_online -> 'tell the charserver that the char .. is online' -//2b1a: Outgoing, chrif_buildfamelist -> 'Build the fame ranking lists and send them' +//2b16: Outgoing, chrif->ragsrvinfo -> 'sends base / job / drop rates ....' +//2b17: Outgoing, chrif->char_offline -> 'tell the charserver that the char is now offline' +//2b18: Outgoing, chrif->char_reset_offline -> 'set all players OFF!' +//2b19: Outgoing, chrif->char_online -> 'tell the charserver that the char .. is online' +//2b1a: Outgoing, chrif->buildfamelist -> 'Build the fame ranking lists and send them' //2b1b: Incoming, chrif_recvfamelist -> 'Receive fame ranking lists' -//2b1c: Outgoing, chrif_save_scdata -> 'Send sc_data of player for saving.' +//2b1c: Outgoing, chrif->save_scdata -> 'Send sc_data of player for saving.' //2b1d: Incoming, chrif_load_scdata -> 'received sc_data of player for loading.' //2b1e: Incoming, chrif_update_ip -> 'Reqest forwarded from char-server for interserver IP sync.' [Lance] //2b1f: Incoming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius] @@ -95,10 +95,9 @@ static const int packet_len_table[0x3d] = { // U - used, F - free //2b23: Outgoing, chrif_keepalive. charserver ping. //2b24: Incoming, chrif_keepalive_ack. charserver ping reply. //2b25: Incoming, chrif_deadopt -> 'Removes baby from Father ID and Mother ID' -//2b26: Outgoing, chrif_authreq -> 'client authentication request' +//2b26: Outgoing, chrif->authreq -> 'client authentication request' //2b27: Incoming, chrif_authfail -> 'client authentication failed' -int chrif_connected = 0; int char_fd = -1; int srvinfo; static char char_ip_str[128]; @@ -106,14 +105,13 @@ static uint32 char_ip = 0; static uint16 char_port = 6121; static char userid[NAME_LENGTH], passwd[NAME_LENGTH]; static int chrif_state = 0; -int other_mapserver_count=0; //Holds count of how many other map servers are online (apart of this instance) [Skotlex] //Interval at which map server updates online listing. [Valaris] #define CHECK_INTERVAL 3600000 //Interval at which map server sends number of connected users. [Skotlex] #define UPDATE_INTERVAL 10000 //This define should spare writing the check in every function. [Skotlex] -#define chrif_check(a) { if(!chrif_isconnected()) return a; } +#define chrif_check(a) { if(!chrif->isconnected()) return a; } /// Resets all the data. @@ -139,7 +137,7 @@ struct auth_node* chrif_search(int account_id) { } struct auth_node* chrif_auth_check(int account_id, int char_id, enum sd_state state) { - struct auth_node *node = chrif_search(account_id); + struct auth_node *node = chrif->search(account_id); return ( node && node->char_id == char_id && node->state == state ) ? node : NULL; } @@ -147,7 +145,7 @@ struct auth_node* chrif_auth_check(int account_id, int char_id, enum sd_state st bool chrif_auth_delete(int account_id, int char_id, enum sd_state state) { struct auth_node *node; - if ( (node = chrif_auth_check(account_id, char_id, state) ) ) { + if ( (node = chrif->auth_check(account_id, char_id, state) ) ) { int fd = node->sd ? node->sd->fd : node->fd; if ( session[fd] && session[fd]->session_data == node->sd ) @@ -171,7 +169,7 @@ bool chrif_auth_delete(int account_id, int char_id, enum sd_state state) { static bool chrif_sd_to_auth(TBL_PC* sd, enum sd_state state) { struct auth_node *node; - if ( chrif_search(sd->status.account_id) ) + if ( chrif->search(sd->status.account_id) ) return false; //Already exists? node = ers_alloc(auth_db_ers, struct auth_node); @@ -208,12 +206,12 @@ static bool chrif_auth_logout(TBL_PC* sd, enum sd_state state) { } bool chrif_auth_finished(TBL_PC* sd) { - struct auth_node *node= chrif_search(sd->status.account_id); + struct auth_node *node= chrif->search(sd->status.account_id); if ( node && node->sd == sd && node->state == ST_LOGIN ) { node->sd = NULL; - return chrif_auth_delete(node->account_id, node->char_id, ST_LOGIN); + return chrif->auth_delete(node->account_id, node->char_id, ST_LOGIN); } return false; @@ -276,8 +274,8 @@ int chrif_save(struct map_session_data *sd, int flag) { if (flag && sd->state.active) { //Store player data which is quitting //FIXME: SC are lost if there's no connection at save-time because of the way its related data is cleared immediately after this function. [Skotlex] - if ( chrif_isconnected() ) - chrif_save_scdata(sd); + if ( chrif->isconnected() ) + chrif->save_scdata(sd); if ( !chrif_auth_logout(sd,flag == 1 ? ST_LOGOUT : ST_MAPCHANGE) ) ShowError("chrif_save: Failed to set up player %d:%d for proper quitting!\n", sd->status.account_id, sd->status.char_id); } @@ -367,7 +365,7 @@ int chrif_recvmap(int fd) { if (battle_config.etc_log) ShowStatus("Received maps from %d.%d.%d.%d:%d (%d maps)\n", CONVIP(ip), port, j); - other_mapserver_count++; + chrif->other_mapserver_count++; return 0; } @@ -381,7 +379,7 @@ int chrif_removemap(int fd) { for(i = 10, j = 0; i < RFIFOW(fd, 2); i += 4, j++) iMap->eraseipport(RFIFOW(fd, i), ip, port); - other_mapserver_count--; + chrif->other_mapserver_count--; if(battle_config.etc_log) ShowStatus("remove map of server %d.%d.%d.%d:%d (%d maps)\n", CONVIP(ip), port, j); @@ -391,15 +389,15 @@ int chrif_removemap(int fd) { // received after a character has been "final saved" on the char-server static void chrif_save_ack(int fd) { - chrif_auth_delete(RFIFOL(fd,2), RFIFOL(fd,6), ST_LOGOUT); - chrif_check_shutdown(); + chrif->auth_delete(RFIFOL(fd,2), RFIFOL(fd,6), ST_LOGOUT); + chrif->check_shutdown(); } // request to move a character between mapservers int chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port) { nullpo_retr(-1, sd); - if (other_mapserver_count < 1) {//No other map servers are online! + if (chrif->other_mapserver_count < 1) {//No other map servers are online! clif->authfail_fd(sd->fd, 0); return -1; } @@ -430,7 +428,7 @@ int chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port) { int chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) { struct auth_node *node; - if ( !( node = chrif_auth_check(account_id, char_id, ST_MAPCHANGE) ) ) + if ( !( node = chrif->auth_check(account_id, char_id, ST_MAPCHANGE) ) ) return -1; if ( !login_id1 ) { @@ -440,7 +438,7 @@ int chrif_changemapserverack(int account_id, int login_id1, int login_id2, int c clif->changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port)); //Player has been saved already, remove him from memory. [Skotlex] - chrif_auth_delete(account_id, char_id, ST_MAPCHANGE); + chrif->auth_delete(account_id, char_id, ST_MAPCHANGE); return 0; } @@ -458,7 +456,7 @@ int chrif_connectack(int fd) { ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd); chrif_state = 1; - chrif_connected = 1; + chrif->chrif_connected = 1; chrif_sendmap(fd); @@ -470,7 +468,7 @@ int chrif_connectack(int fd) { } socket_datasync(fd, true); - chrif_skillid2idx(fd); + chrif->skillid2idx(fd); return 0; } @@ -485,13 +483,13 @@ static int chrif_reconnect(DBKey key, DBData *data, va_list ap) { case ST_LOGIN: if ( node->sd && node->char_dat == NULL ) {//Since there is no way to request the char auth, make it fail. pc->authfail(node->sd); - chrif_char_offline(node->sd); - chrif_auth_delete(node->account_id, node->char_id, ST_LOGIN); + chrif->char_offline(node->sd); + chrif->auth_delete(node->account_id, node->char_id, ST_LOGIN); } break; case ST_LOGOUT: //Re-send final save - chrif_save(node->sd, 1); + chrif->save(node->sd, 1); break; case ST_MAPCHANGE: { //Re-send map-change request. struct map_session_data *sd = node->sd; @@ -499,7 +497,7 @@ static int chrif_reconnect(DBKey key, DBData *data, va_list ap) { uint16 port; if( iMap->mapname2ipport(sd->mapindex,&ip,&port) == 0 ) - chrif_changemapserver(sd, ip, port); + chrif->changemapserver(sd, ip, port); else //too much lag/timeout is the closest explanation for this error. clif->authfail_fd(sd->fd, 3); @@ -517,10 +515,10 @@ void chrif_on_ready(void) { chrif_state = 2; - chrif_check_shutdown(); + chrif->check_shutdown(); //If there are players online, send them to the char-server. [Skotlex] - send_users_tochar(); + chrif->send_users_tochar(); //Auth db reconnect handling auth_db->foreach(auth_db,chrif_reconnect); @@ -572,9 +570,9 @@ int chrif_scdata_request(int account_id, int char_id) { * Request auth confirmation *------------------------------------------*/ void chrif_authreq(struct map_session_data *sd) { - struct auth_node *node= chrif_search(sd->bl.id); + struct auth_node *node= chrif->search(sd->bl.id); - if( node != NULL || !chrif_isconnected() ) { + if( node != NULL || !chrif->isconnected() ) { set_eof(sd->fd); return; } @@ -622,7 +620,7 @@ void chrif_authok(int fd) { if ( ( sd = iMap->id2sd(account_id) ) != NULL ) return; - if ( ( node = chrif_search(account_id) ) == NULL ) + if ( ( node = chrif->search(account_id) ) == NULL ) return; // should not happen if ( node->state != ST_LOGIN ) @@ -632,7 +630,7 @@ void chrif_authok(int fd) { /* //When we receive double login info and the client has not connected yet, //discard the older one and keep the new one. - chrif_auth_delete(node->account_id, node->char_id, ST_LOGIN); + chrif->auth_delete(node->account_id, node->char_id, ST_LOGIN); */ return; // should not happen } @@ -651,8 +649,8 @@ void chrif_authok(int fd) { pc->authfail(sd); } - chrif_char_offline(sd); //Set him offline, the char server likely has it set as online already. - chrif_auth_delete(account_id, char_id, ST_LOGIN); + chrif->char_offline(sd); //Set him offline, the char server likely has it set as online already. + chrif->auth_delete(account_id, char_id, ST_LOGIN); } // client authentication failed @@ -667,7 +665,7 @@ void chrif_authfail(int fd) {/* HELLO WORLD. ip in RFIFOL 15 is not being used ( login_id1 = RFIFOL(fd,10); sex = RFIFOB(fd,14); - node = chrif_search(account_id); + node = chrif->search(account_id); if( node != NULL && node->account_id == account_id && @@ -677,7 +675,7 @@ void chrif_authfail(int fd) {/* HELLO WORLD. ip in RFIFOL 15 is not being used ( node->state == ST_LOGIN ) {// found a match clif->authfail_fd(node->fd, 0); - chrif_auth_delete(account_id, char_id, ST_LOGIN); + chrif->auth_delete(account_id, char_id, ST_LOGIN); } } @@ -695,13 +693,13 @@ int auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) { case ST_LOGOUT: //Re-save attempt (->sd should never be null here). node->node_created = iTimer->gettick(); //Refresh tick (avoid char-server load if connection is really bad) - chrif_save(node->sd, 1); + chrif->save(node->sd, 1); break; default: //Clear data. any connected players should have timed out by now. ShowInfo("auth_db: Node (state %s) timed out for %d:%d\n", states[node->state], node->account_id, node->char_id); - chrif_char_offline_nsd(node->account_id, node->char_id); - chrif_auth_delete(node->account_id, node->char_id, node->state); + chrif->char_offline_nsd(node->account_id, node->char_id); + chrif->auth_delete(node->account_id, node->char_id, node->state); break; } return 1; @@ -825,7 +823,7 @@ int chrif_changesex(struct map_session_data *sd) { /*========================================== * R 2b0f .l .24B .w .w - * Processing a reply to chrif_char_ask_name() (request to modify an account). + * Processing a reply to chrif->char_ask_name() (request to modify an account). * type of operation: * 1: block, 2: ban, 3: unblock, 4: unban, 5: changesex * type of answer: @@ -1037,9 +1035,9 @@ int chrif_disconnectplayer(int fd) { sd = iMap->id2sd(account_id); if( sd == NULL ) { - struct auth_node* auth = chrif_search(account_id); + struct auth_node* auth = chrif->search(account_id); - if( auth != NULL && chrif_auth_delete(account_id, auth->char_id, ST_LOGIN) ) + if( auth != NULL && chrif->auth_delete(account_id, auth->char_id, ST_LOGIN) ) return 0; return -1; @@ -1333,11 +1331,11 @@ int chrif_char_online(struct map_session_data *sd) { /// Called when the connection to Char Server is disconnected. void chrif_on_disconnect(void) { - if( chrif_connected != 1 ) + if( chrif->chrif_connected != 1 ) ShowWarning("Connection to Char Server lost.\n\n"); - chrif_connected = 0; + chrif->chrif_connected = 0; - other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect. + chrif->other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect. iMap->eraseallipport(); //Attempt to reconnect in a second. [Skotlex] @@ -1447,7 +1445,7 @@ int chrif_parse(int fd) { switch(cmd) { case 0x2af9: chrif_connectack(fd); break; case 0x2afb: chrif_sendmapack(fd); break; - case 0x2afd: chrif_authok(fd); break; + case 0x2afd: chrif->authok(fd); break; case 0x2b00: iMap->setusers(RFIFOL(fd,2)); chrif_keepalive(fd); break; case 0x2b03: clif->charselectok(RFIFOL(fd,2), RFIFOB(fd,6)); break; case 0x2b04: chrif_recvmap(fd); break; @@ -1546,15 +1544,15 @@ static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_ realloc_fifo(char_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); chrif_connect(char_fd); - chrif_connected = (chrif_state == 2); + chrif->chrif_connected = (chrif_state == 2); srvinfo = 0; } else { if (srvinfo == 0) { - chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common); + chrif->ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common); srvinfo = 1; } } - if ( chrif_isconnected() ) + if ( chrif->isconnected() ) displayed = 0; return 0; } @@ -1648,3 +1646,65 @@ int do_init_chrif(void) { return 0; } + +/*===================================== +* Default Functions : chrif.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +void chrif_defaults(void) { + chrif = &chrif_s; + + /* vars */ + + chrif->chrif_connected = 0; + chrif->other_mapserver_count = 0; + + /* funcs */ + + chrif->setuserid = chrif_setuserid; + chrif->setpasswd = chrif_setpasswd; + chrif->checkdefaultlogin = chrif_checkdefaultlogin; + chrif->setip = chrif_setip; + chrif->setport = chrif_setport; + + chrif->isconnected = chrif_isconnected; + chrif->check_shutdown = chrif_check_shutdown; + + chrif->search = chrif_search; + chrif->auth_check = chrif_auth_check; + chrif->auth_delete = chrif_auth_delete; + chrif->auth_finished = chrif_auth_finished; + + chrif->authreq = chrif_authreq; + chrif->authok = chrif_authok; + chrif->scdata_request = chrif_scdata_request; + chrif->save = chrif_save; + chrif->charselectreq = chrif_charselectreq; + chrif->changemapserver = chrif_changemapserver; + + chrif->searchcharid = chrif_searchcharid; + chrif->changeemail = chrif_changeemail; + chrif->char_ask_name = chrif_char_ask_name; + chrif->updatefamelist = chrif_updatefamelist; + chrif->buildfamelist = chrif_buildfamelist; + chrif->save_scdata = chrif_save_scdata; + chrif->ragsrvinfo = chrif_ragsrvinfo; + chrif->char_offline = chrif_char_offline; + chrif->char_offline_nsd = chrif_char_offline_nsd; + chrif->char_reset_offline = chrif_char_reset_offline; + chrif->send_users_tochar = send_users_tochar; + chrif->char_online = chrif_char_online; + chrif->changesex = chrif_changesex; + //chrif->chardisconnect = chrif_chardisconnect; + chrif->divorce = chrif_divorce; + + chrif->removefriend = chrif_removefriend; + chrif->send_report = chrif_send_report; + + chrif->do_final_chrif = do_final_chrif; + chrif->do_init_chrif = do_init_chrif; + + chrif->flush_fifo = chrif_flush_fifo; + chrif->skillid2idx = chrif_skillid2idx; +} diff --git a/src/map/chrif.h b/src/map/chrif.h index 9c7142905..faabedeed 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -1,13 +1,10 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams - #ifndef _CHRIF_H_ #define _CHRIF_H_ - #include "../common/cbasetypes.h" #include - enum sd_state { ST_LOGIN, ST_LOGOUT, ST_MAPCHANGE }; struct auth_node { int account_id, char_id; @@ -19,53 +16,72 @@ struct auth_node { enum sd_state state; //To track whether player was login in/out or changing maps. }; -void chrif_setuserid(char* id); -void chrif_setpasswd(char* pwd); -void chrif_checkdefaultlogin(void); -int chrif_setip(const char* ip); -void chrif_setport(uint16 port); - -int chrif_isconnected(void); -void chrif_check_shutdown(void); -extern int chrif_connected; -extern int other_mapserver_count; -struct auth_node* chrif_search(int account_id); -struct auth_node* chrif_auth_check(int account_id, int char_id, enum sd_state state); -bool chrif_auth_delete(int account_id, int char_id, enum sd_state state); -bool chrif_auth_finished(struct map_session_data* sd); -void chrif_authreq(struct map_session_data* sd); -void chrif_authok(int fd); -int chrif_scdata_request(int account_id, int char_id); -int chrif_save(struct map_session_data* sd, int flag); -int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip); -int chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port); +/*===================================== +* Interface : chrif.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +struct chrif_interface { -int chrif_searchcharid(int char_id); -int chrif_changeemail(int id, const char *actual_email, const char *new_email); -int chrif_char_ask_name(int acc, const char* character_name, unsigned short operation_type, int year, int month, int day, int hour, int minute, int second); -int chrif_updatefamelist(struct map_session_data *sd); -int chrif_buildfamelist(void); -int chrif_save_scdata(struct map_session_data *sd); -int chrif_ragsrvinfo(int base_rate,int job_rate, int drop_rate); -int chrif_char_offline(struct map_session_data *sd); -int chrif_char_offline_nsd(int account_id, int char_id); -int chrif_char_reset_offline(void); -int send_users_tochar(void); -int chrif_char_online(struct map_session_data *sd); -int chrif_changesex(struct map_session_data *sd); -int chrif_chardisconnect(struct map_session_data *sd); -int chrif_divorce(int partner_id1, int partner_id2); + /* vars */ + + int chrif_connected; + int other_mapserver_count; //Holds count of how many other map servers are online (apart of this instance) [Skotlex] -int chrif_removefriend(int char_id, int friend_id); -void chrif_send_report(char* buf, int len); + /* funcs */ + + void (*setuserid) (char* id); + void (*setpasswd) (char* pwd); + void (*checkdefaultlogin) (void); + int (*setip) (const char* ip); + void (*setport) (uint16 port); + + int (*isconnected) (void); + void (*check_shutdown) (void); + + struct auth_node* (*search) (int account_id); + struct auth_node* (*auth_check) (int account_id, int char_id, enum sd_state state); + bool (*auth_delete) (int account_id, int char_id, enum sd_state state); + bool (*auth_finished) (struct map_session_data* sd); + + void (*authreq) (struct map_session_data* sd); + void (*authok) (int fd); + int (*scdata_request) (int account_id, int char_id); + int (*save) (struct map_session_data* sd, int flag); + int (*charselectreq) (struct map_session_data* sd, uint32 s_ip); + int (*changemapserver) (struct map_session_data* sd, uint32 ip, uint16 port); + + int (*searchcharid) (int char_id); + int (*changeemail) (int id, const char *actual_email, const char *new_email); + int (*char_ask_name) (int acc, const char* character_name, unsigned short operation_type, int year, int month, int day, int hour, int minute, int second); + int (*updatefamelist) (struct map_session_data *sd); + int (*buildfamelist) (void); + int (*save_scdata) (struct map_session_data *sd); + int (*ragsrvinfo) (int base_rate,int job_rate, int drop_rate); + int (*char_offline) (struct map_session_data *sd); + int (*char_offline_nsd) (int account_id, int char_id); + int (*char_reset_offline) (void); + int (*send_users_tochar) (void); + int (*char_online) (struct map_session_data *sd); + int (*changesex) (struct map_session_data *sd); + int (*chardisconnect) (struct map_session_data *sd); + int (*divorce) (int partner_id1, int partner_id2); + + int (*removefriend) (int char_id, int friend_id); + void (*send_report) (char* buf, int len); + + int (*do_final_chrif) (void); + int (*do_init_chrif) (void); + + int (*flush_fifo) (void); + void (*skillid2idx) (int fd); +} chrif_s; -int do_final_chrif(void); -int do_init_chrif(void); +struct chrif_interface *chrif; -int chrif_flush_fifo(void); -void chrif_skillid2idx(int fd); +void chrif_defaults(void); #endif /* _CHRIF_H_ */ diff --git a/src/map/clif.c b/src/map/clif.c index 3e01230b2..f98df7ec3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9295,7 +9295,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) { } if (bl || - ((node=chrif_search(account_id)) && //An already existing node is valid only if it is for this login. + ((node=chrif->search(account_id)) && //An already existing node is valid only if it is for this login. !(node->account_id == account_id && node->char_id == char_id && node->state == ST_LOGIN))) { clif->authfail_fd(fd, 8); //Still recognizes last connection @@ -9321,7 +9321,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) { WFIFOSET(fd,packet_len(0x283)); #endif - chrif_authreq(sd); + chrif->authreq(sd); } void clif_hercules_chsys_mjoin(struct map_session_data *sd) { if( !map[sd->bl.m].channel ) { @@ -10334,7 +10334,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) { if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && (!battle_config.prevent_logout || DIFF_TICK(iTimer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. - chrif_charselectreq(sd, session[fd]->client_addr); + chrif->charselectreq(sd, session[fd]->client_addr); } else { clif->disconnect_ack(sd, 1); } @@ -13869,7 +13869,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) } } else { //friend not online -- ask char server to delete from his friendlist - if(chrif_removefriend(char_id,sd->status.char_id)) { // char-server offline, abort + if(chrif->removefriend(char_id,sd->status.char_id)) { // char-server offline, abort clif->message(fd, msg_txt(673)); //"This action can't be performed at the moment. Please try again later." return; } @@ -14560,7 +14560,7 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) int i; bool fail = false; - if( !chrif_isconnected() ) + if( !chrif->isconnected() ) return; if( mail_id <= 0 ) return; @@ -14621,7 +14621,7 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd) int mail_id = RFIFOL(fd,2); int i; - if( !chrif_isconnected() ) + if( !chrif->isconnected() ) return; if( mail_id <= 0 ) return; @@ -14670,7 +14670,7 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) int amount = RFIFOL(fd,4); unsigned char flag; - if( !chrif_isconnected() ) + if( !chrif->isconnected() ) return; if (idx < 0 || amount < 0) return; @@ -14704,7 +14704,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) struct mail_message msg; int body_len; - if( !chrif_isconnected() ) + if( !chrif->isconnected() ) return; if( sd->state.trading ) return; diff --git a/src/map/intif.c b/src/map/intif.c index e364f5c25..294d79656 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -147,7 +147,7 @@ int intif_broadcast(const char* mes, int len, int type) if (CheckForCharServer()) return 0; - if (other_mapserver_count < 1) + if (chrif->other_mapserver_count < 1) return 0; //No need to send. WFIFOHEAD(inter_fd, 16 + lp + len); @@ -175,7 +175,7 @@ int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fo if (CheckForCharServer()) return 0; - if (other_mapserver_count < 1) + if (chrif->other_mapserver_count < 1) return 0; //No need to send. WFIFOHEAD(inter_fd, 16 + len); @@ -219,7 +219,7 @@ int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int me if (CheckForCharServer()) return 0; - if (other_mapserver_count < 1) + if (chrif->other_mapserver_count < 1) { //Character not found. clif->wis_end(sd->fd, 1); return 0; @@ -502,7 +502,7 @@ int intif_party_message(int party_id,int account_id,const char *mes,int len) if (CheckForCharServer()) return 0; - if (other_mapserver_count < 1) + if (chrif->other_mapserver_count < 1) return 0; //No need to send. WFIFOHEAD(inter_fd,len + 12); @@ -637,7 +637,7 @@ int intif_guild_message(int guild_id,int account_id,const char *mes,int len) if (CheckForCharServer()) return 0; - if (other_mapserver_count < 1) + if (chrif->other_mapserver_count < 1) return 0; //No need to send. WFIFOHEAD(inter_fd, len + 12); @@ -950,7 +950,7 @@ int intif_parse_Registers(int fd) struct global_reg *reg; int *qty; int account_id = RFIFOL(fd,4), char_id = RFIFOL(fd,8); - struct auth_node *node = chrif_auth_check(account_id, char_id, ST_LOGIN); + struct auth_node *node = chrif->auth_check(account_id, char_id, ST_LOGIN); if (node) sd = node->sd; else { //Normally registries should arrive for in log-in chars. @@ -1723,7 +1723,7 @@ static void intif_parse_Mail_send(int fd) { clif->mail_send(sd->fd, false); if( iMap->save_settings&16 ) - chrif_save(sd, 0); + chrif->save(sd, 0); } } } @@ -1814,7 +1814,7 @@ static void intif_parse_Auction_register(int fd) { clif->auction_message(sd->fd, 1); // Confirmation Packet ?? if( iMap->save_settings&32 ) - chrif_save(sd,0); + chrif->save(sd,0); } else { diff --git a/src/map/map.c b/src/map/map.c index 74e2c74e0..ee56f140f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1566,7 +1566,7 @@ void map_reqnickdb(struct map_session_data * sd, int charid) CREATE(req, struct charid_request, 1); req->next = p->requests; p->requests = req; - chrif_searchcharid(charid); + chrif->searchcharid(charid); } /*========================================== @@ -1629,11 +1629,11 @@ int map_quit(struct map_session_data *sd) { int i; if(!sd->state.active) { //Removing a player that is not active. - struct auth_node *node = chrif_search(sd->status.account_id); + struct auth_node *node = chrif->search(sd->status.account_id); if (node && node->char_id == sd->status.char_id && node->state != ST_LOGOUT) //Except when logging out, clear the auth-connect data immediately. - chrif_auth_delete(node->account_id, node->char_id, node->state); + chrif->auth_delete(node->account_id, node->char_id, node->state); //Non-active players should not have loaded any data yet (or it was cleared already) so no additional cleanups are needed. return 0; } @@ -1728,7 +1728,7 @@ int map_quit(struct map_session_data *sd) { party->booking_delete(sd); // Party Booking [Spiria] pc->makesavestatus(sd); pc->clean_skilltree(sd); - chrif_save(sd,1); + chrif->save(sd,1); unit_free_pc(sd); return 0; } @@ -1790,7 +1790,7 @@ const char* map_charid2nick(int charid) if( *p->nick ) return p->nick;// name in nick_db - chrif_searchcharid(charid);// request the name + chrif->searchcharid(charid);// request the name return NULL; } @@ -3354,13 +3354,13 @@ int map_config_read(char *cfgName) { if( msg_silent ) // only bother if its actually enabled ShowInfo("Console Silent Setting: %d\n", atoi(w2)); } else if (strcmpi(w1, "userid")==0) - chrif_setuserid(w2); + chrif->setuserid(w2); else if (strcmpi(w1, "passwd") == 0) - chrif_setpasswd(w2); + chrif->setpasswd(w2); else if (strcmpi(w1, "char_ip") == 0) - char_ip_set = chrif_setip(w2); + char_ip_set = chrif->setip(w2); else if (strcmpi(w1, "char_port") == 0) - chrif_setport(atoi(w2)); + chrif->setport(atoi(w2)); else if (strcmpi(w1, "map_ip") == 0) map_ip_set = clif->setip(w2); else if (strcmpi(w1, "bind_ip") == 0) @@ -5018,12 +5018,12 @@ void do_final(void) ShowStatus("Cleaned up %d maps."CL_CLL"\n", iMap->map_num); id_db->foreach(id_db,cleanup_db_sub); - chrif_char_reset_offline(); - chrif_flush_fifo(); + chrif->char_reset_offline(); + chrif->flush_fifo(); atcommand->final(); battle->final(); - do_final_chrif(); + chrif->do_final_chrif(); ircbot->final();/* before clif. */ clif->final(); do_final_npc(); @@ -5075,7 +5075,7 @@ void do_final(void) static int map_abort_sub(struct map_session_data* sd, va_list ap) { - chrif_save(sd,1); + chrif->save(sd,1); return 1; } @@ -5093,7 +5093,7 @@ void do_abort(void) return; } run = 1; - if (!chrif_isconnected()) + if (!chrif->isconnected()) { if (pc_db->size(pc_db)) ShowFatalError("Server has crashed without a connection to the char-server, %u characters can't be saved!\n", pc_db->size(pc_db)); @@ -5101,7 +5101,7 @@ void do_abort(void) } ShowError("Server received crash signal! Attempting to save all online characters!\n"); iMap->map_foreachpc(map_abort_sub); - chrif_flush_fifo(); + chrif->flush_fifo(); } /*====================================================== @@ -5161,7 +5161,7 @@ void do_shutdown(void) mapit->free(iter); flush_fifos(); } - chrif_check_shutdown(); + chrif->check_shutdown(); } } @@ -5233,6 +5233,7 @@ void map_hp_symbols(void) { HPM->share(bg,"battlegrounds"); HPM->share(buyingstore,"buyingstore"); HPM->share(clif,"clif"); + HPM->share(chrif,"chrif"); HPM->share(guild,"guild"); HPM->share(gstorage,"gstorage"); HPM->share(homun,"homun"); @@ -5266,6 +5267,7 @@ void load_defaults(void) { battleground_defaults(); buyingstore_defaults(); clif_defaults(); + chrif_defaults(); guild_defaults(); gstorage_defaults(); homunculus_defaults(); @@ -5398,7 +5400,7 @@ int do_init(int argc, char *argv[]) // loads npcs iMap->reloadnpc(false); - chrif_checkdefaultlogin(); + chrif->checkdefaultlogin(); if (!map_ip_set || !char_ip_set) { char ip_str[16]; @@ -5416,7 +5418,7 @@ int do_init(int argc, char *argv[]) if (!map_ip_set) clif->setip(ip_str); if (!char_ip_set) - chrif_setip(ip_str); + chrif->setip(ip_str); } battle->config_read(iMap->BATTLE_CONF_FILENAME); @@ -5461,7 +5463,7 @@ int do_init(int argc, char *argv[]) atcommand->init(); battle->init(); instance->init(); - do_init_chrif(); + chrif->do_init_chrif(); clif->init(); ircbot->init(); script->init(); diff --git a/src/map/pc.c b/src/map/pc.c index 0d1a99175..b1ba2b5c8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -360,7 +360,7 @@ void pc_addfame(struct map_session_data *sd,int count) clif->fame_taekwon(sd,count); break; } - chrif_updatefamelist(sd); + chrif->updatefamelist(sd); } // Check whether a player ID is in the fame rankers' list of its job, returns his/her position if so, 0 else @@ -1238,13 +1238,13 @@ int pc_reg_received(struct map_session_data *sd) iMap->addiddb(&sd->bl); iMap->delnickdb(sd->status.char_id, sd->status.name); - if (!chrif_auth_finished(sd)) + if (!chrif->auth_finished(sd)) ShowError("pc_reg_received: Failed to properly remove player %d:%d from logging db!\n", sd->status.account_id, sd->status.char_id); pc->load_combo(sd); status_calc_pc(sd,1); - chrif_scdata_request(sd->status.account_id, sd->status.char_id); + chrif->scdata_request(sd->status.account_id, sd->status.char_id); intif_Mail_requestinbox(sd->status.char_id, 0); // MAIL SYSTEM - Request Mail Inbox intif_request_questlog(sd); @@ -4838,8 +4838,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y sd->bl.x=x; sd->bl.y=y; pc->clean_skilltree(sd); - chrif_save(sd,2); - chrif_changemapserver(sd, ip, (short)port); + chrif->save(sd,2); + chrif->changemapserver(sd, ip, (short)port); //Free session data from this map server [Kevin] unit_free_pc(sd); @@ -7579,16 +7579,16 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) //if you were previously famous, not anymore. if (fame_flag) { - chrif_save(sd,0); - chrif_buildfamelist(); + chrif->save(sd,0); + chrif->buildfamelist(); } else if (sd->status.fame > 0) { //It may be that now they are famous? switch (sd->class_&MAPID_UPPERMASK) { case MAPID_BLACKSMITH: case MAPID_ALCHEMIST: case MAPID_TAEKWON: - chrif_save(sd,0); - chrif_buildfamelist(); + chrif->save(sd,0); + chrif->buildfamelist(); break; } } @@ -9032,7 +9032,7 @@ int pc_divorce(struct map_session_data *sd) if( (p_sd = iMap->charid2sd(sd->status.partner_id)) == NULL ) { // Lets char server do the divorce - if( chrif_divorce(sd->status.char_id, sd->status.partner_id) ) + if( chrif->divorce(sd->status.char_id, sd->status.partner_id) ) return -1; // No char server connected return 0; @@ -9210,7 +9210,7 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data) last_save_id = sd->bl.id; save_flag = 2; - chrif_save(sd,0); + chrif->save(sd,0); break; } mapit->free(iter); diff --git a/src/map/pet.c b/src/map/pet.c index 8ed88c46c..e6ef0a488 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -408,7 +408,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *pet) intif_save_petdata(sd->status.account_id,pet); if (iMap->save_settings&8) - chrif_save(sd,0); //is it REALLY Needed to save the char for hatching a pet? [Skotlex] + chrif->save(sd,0); //is it REALLY Needed to save the char for hatching a pet? [Skotlex] if(sd->bl.prev != NULL) { iMap->addblock(&sd->pd->bl); diff --git a/src/map/quest.c b/src/map/quest.c index b56088886..3776d603f 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -100,7 +100,7 @@ int quest_add(TBL_PC * sd, int quest_id) clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]); if( iMap->save_settings&64 ) - chrif_save(sd,0); + chrif->save(sd,0); return 0; } @@ -148,7 +148,7 @@ int quest_change(TBL_PC * sd, int qid1, int qid2) clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]); if( iMap->save_settings&64 ) - chrif_save(sd,0); + chrif->save(sd,0); return 0; } @@ -179,7 +179,7 @@ int quest_delete(TBL_PC * sd, int quest_id) clif->quest_delete(sd, quest_id); if( iMap->save_settings&64 ) - chrif_save(sd,0); + chrif->save(sd,0); return 0; } @@ -250,7 +250,7 @@ int quest_update_status(TBL_PC * sd, int quest_id, quest_state status) { clif->quest_delete(sd, quest_id); if( iMap->save_settings&64 ) - chrif_save(sd,0); + chrif->save(sd,0); return 0; } diff --git a/src/map/script.c b/src/map/script.c index bbae42c6f..06830704b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9965,7 +9965,7 @@ BUILDIN(changesex) // to avoid any problem with equipment and invalid sex, equipment is unequiped. for( i=0; iequip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3); - chrif_changesex(sd); + chrif->changesex(sd); return true; } diff --git a/src/map/skill.c b/src/map/skill.c index 509de6f4a..413233b4f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -17845,7 +17845,7 @@ void skill_reload (void) { } } } - chrif_skillid2idx(0); + chrif->skillid2idx(0); /* lets update all players skill tree : so that if any skill modes were changed they're properly updated */ iter = mapit_getallusers(); for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) diff --git a/src/map/storage.c b/src/map/storage.c index e3fa073af..5b3c75d58 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -321,7 +321,7 @@ void storage_storageclose(struct map_session_data* sd) clif->storageclose(sd); if( iMap->save_settings&4 ) - chrif_save(sd,0); //Invokes the storage saving as well. + chrif->save(sd,0); //Invokes the storage saving as well. sd->state.storage_flag = 0; } @@ -334,7 +334,7 @@ void storage_storage_quit(struct map_session_data* sd, int flag) nullpo_retv(sd); if (iMap->save_settings&4) - chrif_save(sd, flag); //Invokes the storage saving as well. + chrif->save(sd, flag); //Invokes the storage saving as well. sd->state.storage_flag = 0; } @@ -688,7 +688,7 @@ int storage_guild_storageclose(struct map_session_data* sd) if (stor->storage_status) { if (iMap->save_settings&4) - chrif_save(sd, 0); //This one also saves the storage. [Skotlex] + chrif->save(sd, 0); //This one also saves the storage. [Skotlex] else gstorage->save(sd->status.account_id, sd->status.guild_id,0); stor->storage_status=0; @@ -711,13 +711,13 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) stor->storage_status = 0; clif->storageclose(sd); if (iMap->save_settings&4) - chrif_save(sd,0); + chrif->save(sd,0); return 0; } if(stor->storage_status) { if (iMap->save_settings&4) - chrif_save(sd,0); + chrif->save(sd,0); else gstorage->save(sd->status.account_id,sd->status.guild_id,1); } @@ -762,4 +762,4 @@ void gstorage_defaults(void) { gstorage->pc_quit = storage_guild_storage_quit; gstorage->save = storage_guild_storagesave; gstorage->saved = storage_guild_storagesaved; -} \ No newline at end of file +} diff --git a/src/map/trade.c b/src/map/trade.c index a2a29651b..c44f04884 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -206,13 +206,13 @@ int impossible_trade_check(struct map_session_data *sd) intif_wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); // if we block people if (battle_config.ban_hack_trade < 0) { - chrif_char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block + chrif->char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block set_eof(sd->fd); // forced to disconnect because of the hack // message about the ban strcpy(message_to_gm, msg_txt(540)); // This player has been definitively blocked. // if we ban people } else if (battle_config.ban_hack_trade > 0) { - chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second) + chrif->char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second) set_eof(sd->fd); // forced to disconnect because of the hack // message about the ban sprintf(message_to_gm, msg_txt(507), battle_config.ban_hack_trade); // This player has been banned for %d minute(s). @@ -603,8 +603,8 @@ void trade_tradecommit(struct map_session_data *sd) // save both player to avoid crash: they always have no advantage/disadvantage between the 2 players if (iMap->save_settings&1) { - chrif_save(sd,0); - chrif_save(tsd,0); + chrif->save(sd,0); + chrif->save(tsd,0); } } @@ -621,4 +621,4 @@ void trade_defaults(void) trade->ok = trade_tradeok; trade->cancel = trade_tradecancel; trade->commit = trade_tradecommit; -} \ No newline at end of file +} diff --git a/src/map/vending.c b/src/map/vending.c index b9575c8dd..898008a3a 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -198,8 +198,8 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, //Always save BOTH: buyer and customer if( iMap->save_settings&2 ) { - chrif_save(sd,0); - chrif_save(vsd,0); + chrif->save(sd,0); + chrif->save(vsd,0); } //check for @AUTOTRADE users [durf] -- cgit v1.2.3-70-g09d2 From 8de3c1118a6a7a235cc7a3e77f24b0c4c5c397ae Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 1 Jul 2013 17:03:58 -0300 Subject: Fixed Bug #7216 Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help! http://hercules.ws/board/index.php?app=tracker&showissue=7216 Signed-off-by: shennetsind --- src/map/atcommand.c | 2 ++ src/map/atcommand.h | 2 +- src/map/battle.c | 1 + src/map/battle.h | 2 +- src/map/battleground.c | 1 + src/map/battleground.h | 2 +- src/map/buyingstore.c | 2 +- src/map/buyingstore.h | 2 +- src/map/chrif.c | 2 ++ src/map/chrif.h | 2 +- src/map/clif.c | 2 ++ src/map/clif.h | 2 +- src/map/guild.c | 1 + src/map/guild.h | 2 +- src/map/homunculus.c | 2 ++ src/map/homunculus.h | 2 +- src/map/instance.c | 2 ++ src/map/instance.h | 2 +- src/map/irc-bot.c | 2 ++ src/map/irc-bot.h | 2 +- src/map/itemdb.c | 2 ++ src/map/itemdb.h | 2 +- src/map/log.c | 1 + src/map/log.h | 2 +- src/map/mail.c | 2 ++ src/map/mail.h | 2 +- src/map/map.c | 2 ++ src/map/map.h | 2 +- src/map/party.c | 2 ++ src/map/party.h | 2 +- src/map/pc.c | 2 ++ src/map/pc.h | 2 +- src/map/script.c | 2 ++ src/map/script.h | 2 +- src/map/searchstore.c | 1 + src/map/searchstore.h | 2 +- src/map/skill.c | 3 +++ src/map/skill.h | 2 +- src/map/storage.c | 3 +++ src/map/storage.h | 4 ++-- src/map/trade.c | 2 ++ src/map/trade.h | 2 +- src/map/vending.c | 2 ++ src/map/vending.h | 2 +- 44 files changed, 63 insertions(+), 24 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b778aab6c..f35bf8a12 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -51,6 +51,8 @@ #include #include +struct atcommand_interface atcommand_s; + static char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others) static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index f09b1f2b8..12439ab32 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -86,7 +86,7 @@ struct atcommand_interface { void (*final_msg) (void); /* atcommand binding */ struct atcmd_binding_data* (*get_bind_byname) (const char* name); -} atcommand_s; +}; struct atcommand_interface *atcommand; diff --git a/src/map/battle.c b/src/map/battle.c index 37d3ec13e..0ace7e941 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -39,6 +39,7 @@ int attr_fix_table[4][ELE_MAX][ELE_MAX]; struct Battle_Config battle_config; +struct battle_interface battle_s; static struct eri *delay_damage_ers; //For battle delay damage structures. int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last skill in use by this bl. diff --git a/src/map/battle.h b/src/map/battle.h index 37968f53a..9a8c18fd7 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -556,7 +556,7 @@ struct battle_interface { struct block_list* (*get_enemy_area) (struct block_list *src, int x, int y, int range, int type, int ignore_id); /* damages area, originally for royal guard's reflect damage */ int (*damage_area) ( struct block_list *bl, va_list ap); -} battle_s; +}; struct battle_interface *battle; diff --git a/src/map/battleground.c b/src/map/battleground.c index 3f0b9ee41..4bf0843d5 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -28,6 +28,7 @@ static DBMap* bg_team_db; // int bg_id -> struct battleground_data* static unsigned int bg_team_counter = 0; // Next bg_id +struct battleground_interface bg_s; struct battleground_data* bg_team_search(int bg_id) { // Search a BG Team using bg_id if( !bg_id ) return NULL; diff --git a/src/map/battleground.h b/src/map/battleground.h index f76d84d0c..88d75f953 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -101,7 +101,7 @@ struct battleground_interface { void (*queue_check) (struct bg_arena *arena); /* */ void (*config_read) (void); -} bg_s; +}; struct battleground_interface *bg; diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 7041042df..73c50b0bf 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -37,7 +37,7 @@ enum e_buyingstore_failure static unsigned int buyingstore_nextid = 0; static const short buyingstore_blankslots[MAX_SLOTS] = { 0 }; // used when checking whether or not an item's card slots are blank - +struct buyingstore_interface buyingstore_s; /// Returns unique buying store id static unsigned int buyingstore_getuid(void) diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index a416317be..ae5fcb9e5 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -29,7 +29,7 @@ struct buyingstore_interface { void (*trade) (struct map_session_data* sd, int account_id, unsigned int buyer_id, const uint8* itemlist, unsigned int count); bool (*search) (struct map_session_data* sd, unsigned short nameid); bool (*searchall) (struct map_session_data* sd, const struct s_search_store_search* s); -} buyingstore_s; +}; struct buyingstore_interface *buyingstore; diff --git a/src/map/chrif.c b/src/map/chrif.c index 80c82354c..c2067dbd1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -48,6 +48,8 @@ static const int packet_len_table[0x3d] = { // U - used, F - free -1,10, 8, 2, 2,14,19,19, // 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, U->2b24, U->2b25, U->2b26, U->2b27 }; +struct chrif_interface chrif_s; + //Used Packets: //2af8: Outgoing, chrif_connect -> 'connect to charserver / auth @ charserver' //2af9: Incoming, chrif_connectack -> 'answer of the 2af8 login(ok / fail)' diff --git a/src/map/chrif.h b/src/map/chrif.h index 1af652cea..a6a5fc6bf 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -79,7 +79,7 @@ struct chrif_interface { int (*flush_fifo) (void); void (*skillid2idx) (int fd); -} chrif_s; +}; struct chrif_interface *chrif; diff --git a/src/map/clif.c b/src/map/clif.c index 0ad6fbd44..f925fcf55 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -53,6 +53,8 @@ #include #include +struct clif_interface clif_s; + //#define DUMP_UNKNOWN_PACKET //#define DUMP_INVALID_PACKET diff --git a/src/map/clif.h b/src/map/clif.h index c23db873e..a0946a48a 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1149,7 +1149,7 @@ struct clif_interface { void (*pPartyBookingRefuseVolunteer) (int fd, struct map_session_data *sd); void (*pPartyBookingCancelVolunteer) (int fd, struct map_session_data *sd); #endif -} clif_s; +}; struct clif_interface *clif; diff --git a/src/map/guild.c b/src/map/guild.c index e093fdf92..aa1d8c7a9 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -30,6 +30,7 @@ #include #include +struct guild_interface guild_s; static DBMap* guild_db; // int guild_id -> struct guild* static DBMap* castle_db; // int castle_id -> struct guild_castle* diff --git a/src/map/guild.h b/src/map/guild.h index 9841f5451..1f61df09e 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -104,7 +104,7 @@ struct guild_interface { void (*flags_clear) (void); /* guild aura */ void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); -} guild_s; +}; struct guild_interface *guild; diff --git a/src/map/homunculus.c b/src/map/homunculus.c index efb5c0eb3..0d1b6ebcb 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -40,6 +40,8 @@ #include #include +struct homunculus_interface homunculus_s; + //Returns the viewdata for homunculus struct view_data* homunculus_get_viewdata(int class_) { if (homdb_checkid(class_)) diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 86d437e73..4b35c0992 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -133,7 +133,7 @@ struct homunculus_interface { void (*exp_db_read) (void); void (*addspiritball) (struct homun_data *hd, int max); void (*delspiritball) (struct homun_data *hd, int count, int type); -} homunculus_s; +}; struct homunculus_interface *homun; diff --git a/src/map/instance.c b/src/map/instance.c index 6b80f5d75..9207c1d53 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -25,6 +25,8 @@ #include #include +struct instance_interface instance_s; + /// Checks whether given instance id is valid or not. bool instance_is_valid(int instance_id) { if( instance_id < 0 || instance_id >= instance->instances ) {// out of range diff --git a/src/map/instance.h b/src/map/instance.h index e86586e44..164aaf662 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -62,7 +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); -} instance_s; +}; struct instance_interface *instance; diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 7f03ed8d4..0be8074c8 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -19,6 +19,8 @@ #include #include +struct irc_bot_interface irc_bot_s; + char send_string[200]; int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 911a15b0e..1fd4b58ab 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -52,7 +52,7 @@ struct irc_bot_interface { void (*pong) (int fd, char *cmd, char *source, char *target, char *msg); void (*join) (int fd, char *cmd, char *source, char *target, char *msg); void (*privmsg) (int fd, char *cmd, char *source, char *target, char *msg); -} irc_bot_s; +}; struct irc_bot_interface *ircbot; diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5fae29500..4e0477b75 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -24,6 +24,8 @@ static DBMap* itemdb_other;// int nameid -> struct item_data* struct item_data dummy_item; //This is the default dummy item used for non-existant items. [Skotlex] +struct itemdb_interface itemdb_s; + /** * Search for item name * name = item alias, so we should find items aliases first. if not found then look for "jname" (full name) diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 5e870a5f2..dcd0ae644 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -302,7 +302,7 @@ struct itemdb_interface { int (*group_item) (struct item_group *group); int (*chain_item) (unsigned short chain_id, int *rate); void (*package_item) (struct map_session_data *sd, struct item_package *package); -} itemdb_s; +}; struct itemdb_interface *itemdb; diff --git a/src/map/log.c b/src/map/log.c index ae516b84e..79e3b87e6 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -18,6 +18,7 @@ #include #include +struct log_interface log_s; /// filters for item logging typedef enum e_log_filter { diff --git a/src/map/log.h b/src/map/log.h index 462a12ff5..376483fe7 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -78,7 +78,7 @@ struct log_interface { int (*config_read) (const char* cfgName); void (*config_done) (void); -} log_s; +}; struct log_interface *logs; diff --git a/src/map/mail.c b/src/map/mail.c index 9a8d4e521..021a51cde 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -15,6 +15,8 @@ #include #include +struct mail_interface mail_s; + void mail_clear(struct map_session_data *sd) { sd->mail.nameid = 0; diff --git a/src/map/mail.h b/src/map/mail.h index 99742c7bd..b2b9048cb 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -17,7 +17,7 @@ struct mail_interface { int (*openmail) (struct map_session_data *sd); void (*deliveryfail) (struct map_session_data *sd, struct mail_message *msg); bool (*invalid_operation) (struct map_session_data *sd); -} mail_s; +}; struct mail_interface *mail; diff --git a/src/map/map.c b/src/map/map.c index 389c031bd..10d413676 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -132,6 +132,8 @@ int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing m struct eri *map_iterator_ers; char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made +struct map_interface iMap_s; + /*========================================== * server player count (of all mapservers) *------------------------------------------*/ diff --git a/src/map/map.h b/src/map/map.h index 3b53b71cc..6002e56da 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -906,7 +906,7 @@ struct map_interface { void (*clean) (int i); void (*do_shutdown) (void); -} iMap_s; +}; struct map_interface *iMap; diff --git a/src/map/party.c b/src/map/party.c index 154f84207..30740b058 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -33,6 +33,8 @@ 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); /*========================================== diff --git a/src/map/party.h b/src/map/party.h index f215baa56..3ce47141c 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -123,7 +123,7 @@ struct party_interface { 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); -} party_s; +}; struct party_interface *party; diff --git a/src/map/pc.c b/src/map/pc.c index 3e823bb97..3ddae9222 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -89,6 +89,8 @@ struct item_cd { short nameid[MAX_ITEMDELAYS];//skill id }; +struct pc_interface pc_s; + //Converts a class to its array index for CLASS_COUNT defined arrays. //Note that it does not do a validity check for speed purposes, where parsing //player input make sure to use a pcdb_checkid first! diff --git a/src/map/pc.h b/src/map/pc.h index 8be2b7344..0bc1f7325 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -951,7 +951,7 @@ struct pc_interface { #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) int (*level_penalty_mod) (struct map_session_data *sd, struct mob_data * md, int type); #endif -} pc_s; +}; struct pc_interface *pc; diff --git a/src/map/script.c b/src/map/script.c index 858c66874..ee1143f05 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -176,6 +176,8 @@ int potion_hp=0, potion_per_hp=0, potion_sp=0, potion_per_sp=0; int potion_target=0; +struct script_interface script_s; + c_op get_com(unsigned char *script,int *pos); int get_num(unsigned char *script,int *pos); diff --git a/src/map/script.h b/src/map/script.h index 902125681..25a891897 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -393,7 +393,7 @@ struct script_interface { bool (*queue_remove) (int idx, int var); int (*queue_create) (void); void (*queue_clear) (int idx); -} script_s; +}; struct script_interface *script; diff --git a/src/map/searchstore.c b/src/map/searchstore.c index d346a0de6..c7f4f9fed 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -39,6 +39,7 @@ enum e_searchstore_effecttype { typedef bool (*searchstore_search_t)(struct map_session_data* sd, unsigned short nameid); typedef bool (*searchstore_searchall_t)(struct map_session_data* sd, const struct s_search_store_search* s); +struct searchstore_interface searchstore_s; /// retrieves search function by type static inline searchstore_search_t searchstore_getsearchfunc(unsigned char type) { diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 61e65c7d2..42d47c7c0 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -52,7 +52,7 @@ struct searchstore_interface { bool (*queryremote) (struct map_session_data* sd, int account_id); void (*clearremote) (struct map_session_data* sd); bool (*result) (struct map_session_data* sd, unsigned int store_id, int account_id, const char* store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short* card, unsigned char refine); -} searchstore_s; +}; struct searchstore_interface *searchstore; diff --git a/src/map/skill.c b/src/map/skill.c index 4bd27f578..dc89f3170 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -104,6 +104,9 @@ struct s_skill_unit_layout skill_unit_layout[MAX_SKILL_UNIT_LAYOUT]; int firewall_unit_pos; int icewall_unit_pos; int earthstrain_unit_pos; + +struct skill_interface skill_s; + //Since only mob-casted splash skills can hit ice-walls static inline int splash_target(struct block_list* bl) { #ifndef RENEWAL diff --git a/src/map/skill.h b/src/map/skill.h index 338537975..fceef5556 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1936,7 +1936,7 @@ struct skill_interface { int (*changematerial) (struct map_session_data *sd, int n, unsigned short *item_list); int (*get_elemental_type) (uint16 skill_id, uint16 skill_lv); void (*cooldown_save) (struct map_session_data * sd); -} skill_s; +}; struct skill_interface *skill; diff --git a/src/map/storage.c b/src/map/storage.c index 5b3c75d58..7a4649a98 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -24,6 +24,9 @@ #include #include +struct storage_interface storage_s; +struct guild_storage_interface gstorage_s; + /*========================================== * Sort items in the warehouse *------------------------------------------*/ diff --git a/src/map/storage.h b/src/map/storage.h index fc05ef06c..83243a622 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -26,7 +26,7 @@ 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); -} storage_s; +}; struct storage_interface *storage; struct guild_storage_interface { @@ -46,7 +46,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. -} gstorage_s; +}; struct guild_storage_interface *gstorage; diff --git a/src/map/trade.c b/src/map/trade.c index c44f04884..13b5f5431 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -24,6 +24,8 @@ //Max distance from traders to enable a trade to take place. #define TRADE_DISTANCE 2 +struct trade_interface trade_s; + /*========================================== * Initiates a trade request. *------------------------------------------*/ diff --git a/src/map/trade.h b/src/map/trade.h index 8bf918ad2..e8ac4a8c4 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -17,7 +17,7 @@ struct trade_interface { void (*ok) (struct map_session_data *sd); void (*cancel) (struct map_session_data *sd); void (*commit) (struct map_session_data *sd); -} trade_s; +}; struct trade_interface *trade; diff --git a/src/map/vending.c b/src/map/vending.c index 898008a3a..2784d46a2 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -21,6 +21,8 @@ #include #include +struct vending_interface vending_s; + /// Returns an unique vending shop id. static inline unsigned int getid(void) { return vending->next_id++; diff --git a/src/map/vending.h b/src/map/vending.h index 0148deb71..1b4381ccd 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -29,7 +29,7 @@ struct vending_interface { void (*purchase) (struct map_session_data* sd, int aid, unsigned int uid, const uint8* data, int count); bool (*search) (struct map_session_data* sd, unsigned short nameid); bool (*searchall) (struct map_session_data* sd, const struct s_search_store_search* s); -} vending_s; +}; struct vending_interface * vending; -- cgit v1.2.3-70-g09d2 From e3761a81ba4c941ba04a2b6b1f161a6e1402ebe9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 11 Jul 2013 14:30:58 -0300 Subject: Fix to Bug #7434 Fixing a ancient bug where placing a item from inventory to cart when cart is full would render such item un-clickable, same for when doing so from storage to cart. Special Thanks to Yommy for all the data, jTynne for bringing this up. http://hercules.ws/board/tracker/issue-7434-weightinability-to-click-item-issue/ Signed-off-by: shennetsind --- src/map/clif.c | 23 +++++++++++++++++++---- src/map/clif.h | 1 + src/map/packets_struct.h | 7 +++++++ src/map/pc.c | 15 ++++++++------- src/map/storage.c | 10 +++++++--- 5 files changed, 42 insertions(+), 14 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/clif.c b/src/map/clif.c index f17766f50..0000633bc 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11133,13 +11133,16 @@ void clif_parse_StopAttack(int fd,struct map_session_data *sd) /// Request to move an item from inventory to cart (CZ_MOVE_ITEM_FROM_BODY_TO_CART). /// 0126 .W .L -void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) -{ +void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) { + int flag = 0; if (pc_istrading(sd)) return; if (!pc_iscarton(sd)) return; - pc->putitemtocart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4)); + if ( (flag = pc->putitemtocart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4))) ) { + clif->dropitem(sd, RFIFOW(fd,2)-2,0); + clif->cart_additem_ack(sd,flag == 1?0x0:0x1); + } } @@ -17580,7 +17583,18 @@ void clif_skill_cooldown_list(int fd, struct skill_cd* cd) { WFIFOSET(fd,4+(offset*count)); } - +/* [Ind/Hercules] - Data Thanks to Yommy + * - ADDITEM_TO_CART_FAIL_WEIGHT = 0x0 + * - ADDITEM_TO_CART_FAIL_COUNT = 0x1 + */ +void clif_cart_additem_ack(struct map_session_data *sd, int flag) { + struct packet_cart_additem_ack p; + + p.PacketType = cart_additem_ackType; + p.result = (char)flag; + + clif->send(&p,sizeof(p), &sd->bl, SELF); +} /* */ unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) { if( sd ) { @@ -17917,6 +17931,7 @@ void clif_defaults(void) { clif->addcards2 = clif_addcards2; clif->item_sub = clif_item_sub; clif->getareachar_item = clif_getareachar_item; + clif->cart_additem_ack = clif_cart_additem_ack; /* unit-related */ clif->clearunit_single = clif_clearunit_single; clif->clearunit_area = clif_clearunit_area; diff --git a/src/map/clif.h b/src/map/clif.h index a0946a48a..e1744b4e8 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -501,6 +501,7 @@ struct clif_interface { void (*addcards2) (unsigned short *cards, struct item* item); void (*item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip); void (*getareachar_item) (struct map_session_data* sd,struct flooritem_data* fitem); + void (*cart_additem_ack) (struct map_session_data *sd, int flag); void (*cashshop_load) (void); void (*package_announce) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid); /* unit-related */ diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index f6e6a8a3f..d56e9ce01 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -18,6 +18,7 @@ struct EQUIPSLOTINFO { * **/ enum packet_headers { + cart_additem_ackType = 0x12c, sc_notickType = 0x196, #if PACKETVER < 20061218 additemType = 0xa0, @@ -459,6 +460,7 @@ struct packet_script_clear { short PacketType; unsigned int NpcID; } __attribute__((packed)); + /* made possible thanks to Yommy!! */ struct packet_package_item_announce { short PacketType; @@ -471,6 +473,11 @@ struct packet_package_item_announce { unsigned short BoxItemID; } __attribute__((packed)); +struct packet_cart_additem_ack { + short PacketType; + char result; +} __attribute__((packed)); + #pragma pack(pop) #endif /* _PACKETS_STRUCT_H_ */ diff --git a/src/map/pc.c b/src/map/pc.c index 87e80c264..0bd593930 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4432,7 +4432,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) ) { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); - return 1; + return 1;/* TODO: there is no official response to this? */ } if( (w = data->weight*amount) + sd->cart_weight > sd->cart_weight_max ) @@ -4450,7 +4450,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun if( i < MAX_CART ) {// item already in cart, stack it if( amount > MAX_AMOUNT - sd->status.cart[i].amount || ( data->stack.cart && amount > data->stack.amount - sd->status.cart[i].amount ) ) - return 1; // no room + return 2; // no room sd->status.cart[i].amount+=amount; clif->cart_additem(sd,i,amount,0); @@ -4459,7 +4459,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun {// item not stackable or not present, add it ARR_FIND( 0, MAX_CART, i, sd->status.cart[i].nameid == 0 ); if( i == MAX_CART ) - return 1; // no room + return 2; // no room memcpy(&sd->status.cart[i],item_data,sizeof(sd->status.cart[0])); sd->status.cart[i].amount=amount; @@ -4513,6 +4513,7 @@ int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log_ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) { struct item *item_data; + int flag; nullpo_ret(sd); @@ -4524,10 +4525,10 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending ) return 1; - if( pc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE) == 0 ) + if( (flag = pc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0 ) return pc->delitem(sd,idx,amount,0,5,LOG_TYPE_NONE); - return 1; + return flag; } /*========================================== @@ -4569,11 +4570,11 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount) if(item_data->nameid==0 || amount < 1 || item_data->amountstate.vending ) return 1; + if((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0) return pc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE); - clif->additem(sd,0,0,flag); - return 1; + return flag; } /*========================================== diff --git a/src/map/storage.c b/src/map/storage.c index 7a4649a98..e0b751863 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -294,8 +294,8 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun * 0 : fail * 1 : success *------------------------------------------*/ -int storage_storagegettocart(struct map_session_data* sd, int index, int amount) -{ +int storage_storagegettocart(struct map_session_data* sd, int index, int amount) { + int flag = 0; nullpo_ret(sd); if( index < 0 || index >= MAX_STORAGE ) @@ -307,8 +307,12 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount) if( amount < 1 || amount > sd->status.storage.items[index].amount ) return 0; - if( pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE) == 0 ) + if( (flag = pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 ) storage->delitem(sd,index,amount); + else { + clif->dropitem(sd, index,0); + clif->cart_additem_ack(sd,flag == 1?0x0:0x1); + } return 1; } -- cgit v1.2.3-70-g09d2 From 857e4fb58b26ea088c0ad92ec5b1ac9423ec1e65 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 17 Jul 2013 05:29:19 +0200 Subject: Added missing initialization of some functions in the homunculus interface - Fixes issue #7536 (thanks to jTynne for the report) http://hercules.ws/board/tracker/issue-7536-map-crash-july-15th/ - Minor corrections to the other interfaces as well (reordered initialization to follow the definitions, removed duplicate entry in the skill interface initialization, commented out some unused entries) Signed-off-by: Haru --- src/map/atcommand.c | 2 +- src/map/battle.c | 16 ++++++++-------- src/map/chrif.h | 2 +- src/map/clif.c | 46 +++++++++++++++++++++++----------------------- src/map/clif.h | 5 +++-- src/map/homunculus.c | 2 ++ src/map/itemdb.c | 2 +- src/map/log.c | 5 +++-- src/map/map.c | 34 +++++++++++++++++----------------- src/map/map.h | 2 +- src/map/pc.h | 2 +- src/map/script.c | 5 ++--- src/map/skill.c | 7 +++---- src/map/storage.c | 2 +- 14 files changed, 67 insertions(+), 65 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 950961b29..29bd43d16 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -10260,9 +10260,9 @@ void atcommand_defaults(void) { atcommand->final = do_final_atcommand; atcommand->parse = is_atcommand; + atcommand->create = atcommand_hp_add; atcommand->can_use = atcommand_can_use; atcommand->can_use2 = atcommand_can_use2; - atcommand->create = atcommand_hp_add; atcommand->load_groups = atcommand_db_load_groups; atcommand->exists = atcommand_exists; atcommand->msg_read = msg_config_read; diff --git a/src/map/battle.c b/src/map/battle.c index 2016efa3b..bded771e7 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6784,18 +6784,11 @@ void battle_defaults(void) { battle->calc_damage = battle_calc_damage; battle->calc_gvg_damage = battle_calc_gvg_damage; battle->calc_bg_damage = battle_calc_bg_damage; - battle->calc_base_damage = battle_calc_base_damage; - battle->calc_misc_attack = battle_calc_misc_attack; - battle->calc_magic_attack = battle_calc_magic_attack; battle->weapon_attack = battle_weapon_attack; + battle->calc_weapon_attack = battle_calc_weapon_attack; battle->delay_damage = battle_delay_damage; battle->drain = battle_drain; battle->calc_return_damage = battle_calc_return_damage; - battle->calc_weapon_attack = battle_calc_weapon_attack; -#ifdef RENEWAL - battle->calc_weapon_damage = battle_calc_weapon_damage; -#endif - battle->calc_defense = battle_calc_defense; battle->attr_ratio = battle_attr_ratio; battle->attr_fix = battle_attr_fix; battle->calc_cardfix = battle_calc_cardfix; @@ -6803,6 +6796,10 @@ void battle_defaults(void) { battle->calc_masteryfix = battle_calc_masteryfix; battle->calc_skillratio = battle_calc_skillratio; battle->calc_sizefix = battle_calc_sizefix; +#ifdef RENEWAL + battle->calc_weapon_damage = battle_calc_weapon_damage; +#endif + battle->calc_defense = battle_calc_defense; battle->get_master = battle_get_master; battle->get_targeted = battle_gettargeted; battle->get_enemy = battle_getenemy; @@ -6818,6 +6815,9 @@ void battle_defaults(void) { battle->delay_damage_sub = battle_delay_damage_sub; battle->blewcount_bonus = battle_blewcount_bonus; battle->range_type = battle_range_type; + battle->calc_base_damage = battle_calc_base_damage; + battle->calc_misc_attack = battle_calc_misc_attack; + battle->calc_magic_attack = battle_calc_magic_attack; battle->adjust_skill_damage = battle_adjust_skill_damage; battle->add_mastery = battle_addmastery; battle->calc_drain = battle_calc_drain; diff --git a/src/map/chrif.h b/src/map/chrif.h index a6a5fc6bf..b6883d855 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -68,7 +68,7 @@ struct chrif_interface { int (*send_users_tochar) (void); int (*char_online) (struct map_session_data *sd); int (*changesex) (struct map_session_data *sd); - int (*chardisconnect) (struct map_session_data *sd); + //int (*chardisconnect) (struct map_session_data *sd); // FIXME: Commented out in clif.c, function does not exist int (*divorce) (int partner_id1, int partner_id2); int (*removefriend) (int char_id, int friend_id); diff --git a/src/map/clif.c b/src/map/clif.c index 2f7360da9..c19c9f7f6 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17934,6 +17934,8 @@ void clif_defaults(void) { clif->item_sub = clif_item_sub; clif->getareachar_item = clif_getareachar_item; clif->cart_additem_ack = clif_cart_additem_ack; + clif->cashshop_load = clif_cashshop_db; + clif->package_announce = clif_package_item_announce; /* unit-related */ clif->clearunit_single = clif_clearunit_single; clif->clearunit_area = clif_clearunit_area; @@ -18334,19 +18336,6 @@ void clif_defaults(void) { /* elemental-related */ clif->elemental_info = clif_elemental_info; clif->elemental_updatestatus = clif_elemental_updatestatus; - /* Hercules Channel System */ - clif->chsys_create = clif_hercules_chsys_create; - clif->chsys_msg = clif_hercules_chsys_msg; - clif->chsys_msg2 = clif_hercules_chsys_msg2; - clif->chsys_send = clif_hercules_chsys_send; - clif->chsys_join = clif_hercules_chsys_join; - clif->chsys_left = clif_hercules_chsys_left; - clif->chsys_delete = clif_hercules_chsys_delete; - clif->chsys_mjoin = clif_hercules_chsys_mjoin; - clif->chsys_quit = clif_hercules_chsys_quit; - clif->chsys_quitg = clif_hercules_chsys_quitg; - clif->chsys_gjoin = clif_hercules_chsys_gjoin; - clif->chsys_gleave = clif_hercules_chsys_gleave; /* bgqueue */ clif->bgqueue_ack = clif_bgqueue_ack; clif->bgqueue_notice_delete = clif_bgqueue_notice_delete; @@ -18361,10 +18350,21 @@ void clif_defaults(void) { clif->notify_time = clif_notify_time; clif->user_count = clif_user_count; clif->noask_sub = clif_noask_sub; - clif->cashshop_load = clif_cashshop_db; - clif->package_announce = clif_package_item_announce; clif->bc_ready = clif_bc_ready; clif->undisguise_timer = clif_undisguise_timer; + /* Hercules Channel System */ + clif->chsys_create = clif_hercules_chsys_create; + clif->chsys_msg = clif_hercules_chsys_msg; + clif->chsys_msg2 = clif_hercules_chsys_msg2; + clif->chsys_send = clif_hercules_chsys_send; + clif->chsys_join = clif_hercules_chsys_join; + clif->chsys_left = clif_hercules_chsys_left; + clif->chsys_delete = clif_hercules_chsys_delete; + clif->chsys_mjoin = clif_hercules_chsys_mjoin; + clif->chsys_quit = clif_hercules_chsys_quit; + clif->chsys_quitg = clif_hercules_chsys_quitg; + clif->chsys_gjoin = clif_hercules_chsys_gjoin; + clif->chsys_gleave = clif_hercules_chsys_gleave; /*------------------------ *- Parse Incoming Packet *------------------------*/ @@ -18402,6 +18402,7 @@ void clif_defaults(void) { clif->pKickFromChat = clif_parse_KickFromChat; clif->pChatLeave = clif_parse_ChatLeave; clif->pTradeRequest = clif_parse_TradeRequest; + clif->chann_config_read = read_channels_config; clif->pTradeAck = clif_parse_TradeAck; clif->pTradeAddItem = clif_parse_TradeAddItem; clif->pTradeOk = clif_parse_TradeOk; @@ -18456,7 +18457,6 @@ void clif_defaults(void) { clif->pLeaveParty = clif_parse_LeaveParty; clif->pRemovePartyMember = clif_parse_RemovePartyMember; clif->pPartyChangeOption = clif_parse_PartyChangeOption; - clif->chann_config_read = read_channels_config; clif->pPartyMessage = clif_parse_PartyMessage; clif->pPartyChangeLeader = clif_parse_PartyChangeLeader; clif->pPartyBookingRegisterReq = clif_parse_PartyBookingRegisterReq; @@ -18561,17 +18561,19 @@ void clif_defaults(void) { clif->pDebug = clif_parse_debug; clif->pSkillSelectMenu = clif_parse_SkillSelectMenu; clif->pMoveItem = clif_parse_MoveItem; + /* dull */ + clif->pDull = clif_parse_dull; + /* BGQueue */ + clif->pBGQueueRegister = clif_parse_bgqueue_register; + clif->pBGQueueCheckState = clif_parse_bgqueue_checkstate; + clif->pBGQueueRevokeReq = clif_parse_bgqueue_revoke_req; + clif->pBGQueueBattleBeginAck = clif_parse_bgqueue_battlebegin_ack; /* RagExe Cash Shop [Ind/Hercules] */ clif->pCashShopOpen = clif_parse_CashShopOpen; clif->pCashShopClose = clif_parse_CashShopClose; clif->pCashShopReqTab = clif_parse_CashShopReqTab; clif->pCashShopSchedule = clif_parse_CashShopSchedule; clif->pCashShopBuy = clif_parse_CashShopBuy; - /* BGQueue */ - clif->pBGQueueRegister = clif_parse_bgqueue_register; - clif->pBGQueueCheckState = clif_parse_bgqueue_checkstate; - clif->pBGQueueRevokeReq = clif_parse_bgqueue_revoke_req; - clif->pBGQueueBattleBeginAck = clif_parse_bgqueue_battlebegin_ack; /* */ clif->pPartyTick = clif_parse_PartyTick; clif->pGuildInvite2 = clif_parse_GuildInvite2; @@ -18583,6 +18585,4 @@ void clif_defaults(void) { clif->pPartyBookingRefuseVolunteer = clif_parse_PartyBookingRefuseVolunteer; clif->pPartyBookingCancelVolunteer = clif_parse_PartyBookingCancelVolunteer; #endif - /* dull */ - clif->pDull = clif_parse_dull; } diff --git a/src/map/clif.h b/src/map/clif.h index e1744b4e8..2cf193965 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -918,6 +918,9 @@ struct clif_interface { void (*notify_time) (struct map_session_data* sd, unsigned long time); void (*user_count) (struct map_session_data* sd, int count); void (*noask_sub) (struct map_session_data *src, struct map_session_data *target, int type); + void (*bc_ready) (void); + int (*undisguise_timer) (int tid, unsigned int tick, int id, intptr_t data); + /* Hercules Channel System */ void (*chsys_create) (struct hChSysCh *channel, char *name, char *pass, unsigned char color); void (*chsys_msg) (struct hChSysCh *channel, struct map_session_data *sd, char *msg); void (*chsys_msg2) (struct hChSysCh *channel, char *msg); @@ -930,8 +933,6 @@ struct clif_interface { void (*chsys_quitg) (struct map_session_data *sd); void (*chsys_gjoin) (struct guild *g1,struct guild *g2); void (*chsys_gleave) (struct guild *g1,struct guild *g2); - void (*bc_ready) (void); - int (*undisguise_timer) (int tid, unsigned int tick, int id, intptr_t data); /*------------------------ *- Parse Incoming Packet *------------------------*/ diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 9bf752ef7..5a9d7ac28 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1295,4 +1295,6 @@ void homunculus_defaults(void) { homun->read_skill_db_sub = homunculus_read_skill_db_sub; homun->skill_db_read = homunculus_skill_db_read; homun->exp_db_read = homunculus_exp_db_read; + homun->addspiritball = homunculus_addspiritball; + homun->delspiritball = homunculus_delspiritball; } diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 036075e57..3c77c4b14 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2187,13 +2187,13 @@ void itemdb_defaults(void) { itemdb->write_cached_packages = itemdb_write_cached_packages; itemdb->read_cached_packages = itemdb_read_cached_packages; /* */ + itemdb->name2id = itemdb_name2id; itemdb->search_name = itemdb_searchname; itemdb->search_name_array = itemdb_searchname_array; itemdb->load = itemdb_load; itemdb->search = itemdb_search; itemdb->parse_dbrow = itemdb_parse_dbrow; itemdb->exists = itemdb_exists;//incomplete - itemdb->name2id = itemdb_name2id; itemdb->in_group = itemdb_in_group; itemdb->group_item = itemdb_searchrandomid; itemdb->chain_item = itemdb_chain_item; diff --git a/src/map/log.c b/src/map/log.c index 79e3b87e6..daf96b930 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -513,8 +513,6 @@ void log_defaults(void) { logs->atcommand = log_atcommand; logs->branch = log_branch; logs->mvpdrop = log_mvpdrop; - logs->config_read = log_config_read; - logs->config_done = log_config_complete; /* will be modified in a few seconds once loading is complete. */ logs->pick_sub = log_pick_sub_txt; @@ -525,4 +523,7 @@ void log_defaults(void) { logs->branch_sub = log_branch_sub_txt; logs->mvpdrop_sub = log_mvpdrop_sub_txt; + logs->config_read = log_config_read; + logs->config_done = log_config_complete; + } diff --git a/src/map/map.c b/src/map/map.c index 05ba2edc2..db3bcf001 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5583,6 +5583,23 @@ void map_defaults(void) { iMap->charid2nick = map_charid2nick; iMap->charid2sd = map_charid2sd; + iMap->map_foreachpc = map_map_foreachpc; + iMap->map_foreachmob = map_map_foreachmob; + iMap->map_foreachnpc = map_map_foreachnpc; + iMap->map_foreachregen = map_map_foreachregen; + iMap->map_foreachiddb = map_map_foreachiddb; + + iMap->foreachinrange = map_foreachinrange; + iMap->foreachinshootrange = map_foreachinshootrange; + iMap->foreachinarea = map_foreachinarea; + iMap->forcountinrange = map_forcountinrange; + iMap->forcountinarea = map_forcountinarea; + iMap->foreachinmovearea = map_foreachinmovearea; + iMap->foreachincell = map_foreachincell; + iMap->foreachinpath = map_foreachinpath; + iMap->foreachinmap = map_foreachinmap; + iMap->foreachininstance = map_foreachininstance; + iMap->id2sd = map_id2sd; iMap->id2md = map_id2md; iMap->id2nd = map_id2nd; @@ -5628,23 +5645,6 @@ void map_defaults(void) { iMap->do_shutdown = do_shutdown; - iMap->map_foreachpc = map_map_foreachpc; - iMap->map_foreachmob = map_map_foreachmob; - iMap->map_foreachnpc = map_map_foreachnpc; - iMap->map_foreachregen = map_map_foreachregen; - iMap->map_foreachiddb = map_map_foreachiddb; - - iMap->foreachinrange = map_foreachinrange; - iMap->foreachinshootrange = map_foreachinshootrange; - iMap->foreachinarea=map_foreachinarea; - iMap->forcountinrange=map_forcountinrange; - iMap->forcountinarea=map_forcountinarea; - iMap->foreachinmovearea = map_foreachinmovearea; - iMap->foreachincell=map_foreachincell; - iMap->foreachinpath=map_foreachinpath; - iMap->foreachinmap=map_foreachinmap; - iMap->foreachininstance=map_foreachininstance; - /* temporary until the map.c "Hercules Renewal Phase One" design is complete. [Ind] */ mapit = &mapit_s; diff --git a/src/map/map.h b/src/map/map.h index ec5921509..7826e00b3 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -902,7 +902,7 @@ struct map_interface { int (*addmobtolist) (unsigned short m, struct spawn_data *spawn); // [Wizputer] void (*spawnmobs) (int16 m); // [Wizputer] void (*removemobs) (int16 m); // [Wizputer] - void (*do_reconnect_map) (void); //Invoked on map-char reconnection [Skotlex] Note used but still keeping it, just in case + //void (*do_reconnect_map) (void); //Invoked on map-char reconnection [Skotlex] Note used but still keeping it, just in case void (*addmap2db) (struct map_data *m); void (*removemapdb) (struct map_data *m); void (*clean) (int i); diff --git a/src/map/pc.h b/src/map/pc.h index 58dd85083..c21258dd7 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -752,7 +752,7 @@ struct pc_interface { int (*class2idx) (int class_); int (*get_group_level) (struct map_session_data *sd); - int (*getrefinebonus) (int lv,int type); + //int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called bool (*can_give_items) (struct map_session_data *sd); bool (*can_use_command) (struct map_session_data *sd, const char *command); diff --git a/src/map/script.c b/src/map/script.c index c48610d3c..4a457bd28 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -18139,8 +18139,8 @@ void script_defaults(void) { script->hqs = script->hqis = 0; memset(&script->hqe, 0, sizeof(script->hqe)); - script->buildin_count = 0; script->buildin = NULL; + script->buildin_count = 0; script->str_data = NULL; script->str_data_size = 0; @@ -18176,6 +18176,7 @@ void script_defaults(void) { script->set_constant = script_set_constant; script->set_constant2 = script_set_constant2; script->get_constant = script_get_constant; + script->label_add = script_label_add; script->queue = script_hqueue_get; script->queue_add = script_hqueue_add; @@ -18183,6 +18184,4 @@ void script_defaults(void) { script->queue_remove = script_hqueue_remove; script->queue_create = script_hqueue_create; script->queue_clear = script_hqueue_clear; - - script->label_add = script_label_add; } diff --git a/src/map/skill.c b/src/map/skill.c index 1b350f74c..0b39ff620 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -18140,6 +18140,7 @@ void skill_defaults(void) { skill->get_mhp = skill_get_mhp; skill->get_sp = skill_get_sp; skill->get_state = skill_get_state; + skill->get_spiritball = skill_get_spiritball; skill->get_zeny = skill_get_zeny; skill->get_num = skill_get_num; skill->get_cast = skill_get_cast; @@ -18162,7 +18163,6 @@ void skill_defaults(void) { skill->get_unit_target = skill_get_unit_target; skill->get_unit_interval = skill_get_unit_interval; skill->get_unit_bl_target = skill_get_unit_bl_target; - skill->get_spiritball = skill_get_spiritball; skill->get_unit_layout_type = skill_get_unit_layout_type; skill->get_unit_range = skill_get_unit_range; skill->get_cooldown = skill_get_cooldown; @@ -18202,14 +18202,13 @@ void skill_defaults(void) { skill->delay_fix = skill_delay_fix; skill->check_condition_castbegin = skill_check_condition_castbegin; skill->check_condition_castend = skill_check_condition_castend; - skill->check_condition_char_sub = skill_check_condition_char_sub; + skill->consume_requirement = skill_consume_requirement; skill->get_requirement = skill_get_requirement; skill->check_pc_partner = skill_check_pc_partner; - skill->consume_requirement = skill_consume_requirement; skill->unit_move = skill_unit_move; - skill->unit_move_unit_group = skill_unit_move_unit_group; skill->unit_onleft = skill_unit_onleft; skill->unit_onout = skill_unit_onout; + skill->unit_move_unit_group = skill_unit_move_unit_group; skill->guildaura_sub = skill_guildaura_sub; skill->sit = skill_sit; skill->brandishspear = skill_brandishspear; diff --git a/src/map/storage.c b/src/map/storage.c index e0b751863..5ebbb0dde 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -745,8 +745,8 @@ void storage_defaults(void) { storage->delitem = storage_delitem; storage->open = storage_storageopen; storage->add = storage_storageadd; - storage->additem = storage_additem; storage->get = storage_storageget; + storage->additem = storage_additem; storage->addfromcart = storage_storageaddfromcart; storage->gettocart = storage_storagegettocart; storage->close = storage_storageclose; -- cgit v1.2.3-70-g09d2 From 853489bcb5f2acfce14731b117ddc2b246042883 Mon Sep 17 00:00:00 2001 From: Susu Date: Mon, 29 Jul 2013 15:49:14 +0200 Subject: Added intif interface --- src/map/atcommand.c | 20 +- src/map/chrif.c | 14 +- src/map/clif.c | 30 +- src/map/elemental.c | 4 +- src/map/guild.c | 56 +- src/map/homunculus.c | 10 +- src/map/intif.c | 4610 +++++++++++++++++++++++++------------------------- src/map/intif.h | 240 +-- src/map/map.c | 4 +- src/map/mercenary.c | 4 +- src/map/mob.c | 6 +- src/map/npc.c | 4 +- src/map/party.c | 30 +- src/map/pc.c | 34 +- src/map/pet.c | 12 +- src/map/quest.c | 1 - src/map/script.c | 16 +- src/map/storage.c | 4 +- src/map/trade.c | 6 +- src/map/unit.c | 10 +- 20 files changed, 2612 insertions(+), 2503 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index c14b8a26e..018098928 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -745,7 +745,7 @@ ACMD(save) pc->setsavepoint(sd, sd->mapindex, sd->bl.x, sd->bl.y); if (sd->status.pet_id > 0 && sd->pd) - intif_save_petdata(sd->status.account_id, &sd->pd->pet); + intif->save_petdata(sd->status.account_id, &sd->pd->pet); chrif->save(sd,0); @@ -1048,7 +1048,7 @@ ACMD(kami) if (strstr(command, "l") != NULL) clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP); else - intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0); + intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0); } else { if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) { clif->message(fd, msg_txt(981)); // Please enter color and message (usage: @kamic ). @@ -1059,7 +1059,7 @@ ACMD(kami) clif->message(fd, msg_txt(982)); // Invalid color. return false; } - intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); + intif->broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); } return true; } @@ -2526,7 +2526,7 @@ ACMD(guildlevelup) added_level = 1 - guild_info->guild_lv; if (added_level != 0) { - intif_guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level)); + intif->guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level)); clif->message(fd, msg_txt(179)); // Guild level changed. } else { clif->message(fd, msg_txt(45)); // Guild level change failed. @@ -2563,7 +2563,7 @@ ACMD(makeegg) pet_id = search_petDB_index(id, PET_EGG); if (pet_id >= 0) { sd->catch_target_class = pet_db[pet_id].class_; - intif_create_pet( + intif->create_pet( sd->status.account_id, sd->status.char_id, (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv, (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate, @@ -2682,7 +2682,7 @@ ACMD(petrename) } pd->pet.rename_flag = 0; - intif_save_petdata(sd->status.account_id, &pd->pet); + intif->save_petdata(sd->status.account_id, &pd->pet); clif->send_petstatus(sd); clif->message(fd, msg_txt(187)); // You can now rename your pet. @@ -4960,7 +4960,7 @@ ACMD(broadcast) } sprintf(atcmd_output, "%s: %s", sd->status.name, message); - intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, 0); + intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, 0); return true; } @@ -7974,7 +7974,7 @@ ACMD(request) } sprintf(atcmd_output, msg_txt(278), message); // (@request): %s - intif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); + intif->wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); clif->disp_onlyself(sd, atcmd_output, strlen(atcmd_output)); clif->message(sd->fd,msg_txt(279)); // @request sent. return true; @@ -8335,7 +8335,7 @@ ACMD(delitem) if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET ) {// delete pet - intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2])); + intif->delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2])); } pc->delitem(sd, idx, delamount, 0, 0, LOG_TYPE_COMMAND); @@ -8508,7 +8508,7 @@ ACMD(accinfo) { //remove const type safestrncpy(query, message, NAME_LENGTH); - intif_request_accinfo( sd->fd, sd->bl.id, pc->get_group_level(sd), query ); + intif->request_accinfo( sd->fd, sd->bl.id, pc->get_group_level(sd), query ); return true; } diff --git a/src/map/chrif.c b/src/map/chrif.c index 02e9e977c..d1ee8b5b1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -293,11 +293,11 @@ int chrif_save(struct map_session_data *sd, int flag) { //Saving of registry values. if (sd->state.reg_dirty&4) - intif_saveregistry(sd, 3); //Save char regs + intif->saveregistry(sd, 3); //Save char regs if (sd->state.reg_dirty&2) - intif_saveregistry(sd, 2); //Save account regs + intif->saveregistry(sd, 2); //Save account regs if (sd->state.reg_dirty&1) - intif_saveregistry(sd, 1); //Save account2 regs + intif->saveregistry(sd, 1); //Save account2 regs WFIFOHEAD(char_fd, sizeof(sd->status) + 13); WFIFOW(char_fd,0) = 0x2b01; @@ -309,7 +309,7 @@ int chrif_save(struct map_session_data *sd, int flag) { WFIFOSET(char_fd, WFIFOW(char_fd,2)); if( sd->status.pet_id > 0 && sd->pd ) - intif_save_petdata(sd->status.account_id,&sd->pd->pet); + intif->save_petdata(sd->status.account_id,&sd->pd->pet); if( sd->hd && homun_alive(sd->hd) ) homun->save(sd->hd); if( sd->md && mercenary_get_lifetime(sd->md) > 0 ) @@ -317,7 +317,7 @@ int chrif_save(struct map_session_data *sd, int flag) { if( sd->ed && elemental->get_lifetime(sd->ed) > 0 ) elemental->save(sd->ed); if( sd->save_quest ) - intif_quest_save(sd); + intif->quest_save(sd); return 0; } @@ -1423,12 +1423,12 @@ int chrif_parse(int fd) { while ( RFIFOREST(fd) >= 2 ) { cmd = RFIFOW(fd,0); if (cmd < 0x2af8 || cmd >= 0x2af8 + ARRAYLENGTH(packet_len_table) || packet_len_table[cmd-0x2af8] == 0) { - int r = intif_parse(fd); // Passed on to the intif + int r = intif->parse(fd); // Passed on to the intif if (r == 1) continue; // Treated in intif if (r == 2) return 0; // Didn't have enough data (len==-1) - ShowWarning("chrif_parse: session #%d, intif_parse failed (unrecognized command 0x%.4x).\n", fd, cmd); + ShowWarning("chrif_parse: session #%d, intif->parse failed (unrecognized command 0x%.4x).\n", fd, cmd); set_eof(fd); return 0; } diff --git a/src/map/clif.c b/src/map/clif.c index 8377eed5c..f5ce8ede3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9889,7 +9889,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id); ShowWarning(gm_msg); // information is sent to all online GMs - intif_wis_message_to_gm(iMap->wisp_server_name, battle_config.hack_info_GM_level, gm_msg); + intif->wis_message_to_gm(iMap->wisp_server_name, battle_config.hack_info_GM_level, gm_msg); return; } */ @@ -10489,7 +10489,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) // if there are 'Test' player on an other map-server and 'test' player on this map-server, // and if we ask for 'Test', we must not contact 'test' player // so, we send information to inter-server, which is the only one which decide (and copy correct name). - intif_wis_message(sd, target, message, messagelen); + intif->wis_message(sd, target, message, messagelen); return; } @@ -14556,7 +14556,7 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd) struct mail_data* md = &sd->mail.inbox; if( md->amount < MAIL_MAX_INBOX && (md->full || sd->mail.changed) ) - intif_Mail_requestinbox(sd->status.char_id, 1); + intif->Mail_requestinbox(sd->status.char_id, 1); else clif->mail_refreshinbox(sd); @@ -14620,7 +14620,7 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id) if (msg->status == MAIL_UNREAD) { msg->status = MAIL_READ; - intif_Mail_read(mail_id); + intif->Mail_read(mail_id); clif->pMail_refreshinbox(fd, sd); } } @@ -14700,7 +14700,7 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) memset(&sd->mail.inbox.msg[i].item, 0, sizeof(struct item)); clif->mail_read(sd, mail_id); - intif_Mail_getattach(sd->status.char_id, mail_id); + intif->Mail_getattach(sd->status.char_id, mail_id); } @@ -14727,7 +14727,7 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd) return; } - intif_Mail_delete(sd->status.char_id, mail_id); + intif->Mail_delete(sd->status.char_id, mail_id); } } @@ -14746,7 +14746,7 @@ void clif_parse_Mail_return(int fd, struct map_session_data *sd) ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); if( i < MAIL_MAX_INBOX && sd->mail.inbox.msg[i].send_id != 0 ) - intif_Mail_return(sd->status.char_id, mail_id); + intif->Mail_return(sd->status.char_id, mail_id); else clif->mail_return(sd->fd, mail_id, 1); } @@ -14839,7 +14839,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) memset(msg.body, 0x00, MAIL_BODY_LENGTH); msg.timestamp = time(NULL); - if( !intif_Mail_send(sd->status.account_id, &msg) ) + if( !intif->Mail_send(sd->status.account_id, &msg) ) mail->deliveryfail(sd, &msg); sd->cansendmail_tick = iTimer->gettick() + 1000; // 1 Second flood Protection @@ -15083,7 +15083,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) auction.item.amount = 1; auction.timestamp = 0; - if( !intif_Auction_register(&auction) ) + if( !intif->Auction_register(&auction) ) clif->auction_message(fd, 4); // No Char Server? lets say something to the client else { @@ -15103,7 +15103,7 @@ void clif_parse_Auction_cancel(int fd, struct map_session_data *sd) { unsigned int auction_id = RFIFOL(fd,2); - intif_Auction_cancel(sd->status.char_id, auction_id); + intif->Auction_cancel(sd->status.char_id, auction_id); } @@ -15113,7 +15113,7 @@ void clif_parse_Auction_close(int fd, struct map_session_data *sd) { unsigned int auction_id = RFIFOL(fd,2); - intif_Auction_close(sd->status.char_id, auction_id); + intif->Auction_close(sd->status.char_id, auction_id); } @@ -15133,11 +15133,11 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd) clif->auction_message(fd, 0); // You have failed to bid into the auction else if( bid > sd->status.zeny ) clif->auction_message(fd, 8); // You do not have enough zeny - else if ( CheckForCharServer() ) // char server is down (bugreport:1138) + else if ( intif->CheckForCharServer() ) // char server is down (bugreport:1138) clif->auction_message(fd, 0); // You have failed to bid into the auction else { pc->payzeny(sd, bid, LOG_TYPE_AUCTION, NULL); - intif_Auction_bid(sd->status.char_id, sd->status.name, auction_id, bid); + intif->Auction_bid(sd->status.char_id, sd->status.name, auction_id, bid); } } @@ -15160,7 +15160,7 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd) clif->pAuction_cancelreg(fd, sd); safestrncpy(search_text, (char*)RFIFOP(fd,8), sizeof(search_text)); - intif_Auction_requestlist(sd->status.char_id, type, price, search_text, page); + intif->Auction_requestlist(sd->status.char_id, type, price, search_text, page); } @@ -15174,7 +15174,7 @@ void clif_parse_Auction_buysell(int fd, struct map_session_data* sd) short type = RFIFOW(fd,2) + 6; clif->pAuction_cancelreg(fd, sd); - intif_Auction_requestlist(sd->status.char_id, type, 0, "", 1); + intif->Auction_requestlist(sd->status.char_id, type, 0, "", 1); } diff --git a/src/map/elemental.c b/src/map/elemental.c index 3c212ccaa..03aa93e49 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -135,7 +135,7 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet ele.life_time = lifetime; // Request Char Server to create this elemental - intif_elemental_create(&ele); + intif->elemental_create(&ele); return 1; } @@ -163,7 +163,7 @@ int elemental_save(struct elemental_data *ed) { ed->elemental.flee = ed->battle_status.flee; ed->elemental.hit = ed->battle_status.hit; ed->elemental.life_time = elemental->get_lifetime(ed); - intif_elemental_save(&ed->elemental); + intif->elemental_save(&ed->elemental); return 1; } diff --git a/src/map/guild.c b/src/map/guild.c index e5ea6809d..601d88387 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -84,7 +84,7 @@ static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) if (sd->status.guild_id != guild_id) { //If player belongs to a different guild, kick him out. - intif_guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **"); + intif->guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **"); return NULL; } @@ -179,7 +179,7 @@ static bool guild_read_castledb(char* str[], int columns, int current) idb_put(castle_db,gc->castle_id,gc); - //intif_guild_castle_info(gc->castle_id); + //intif->guild_castle_info(gc->castle_id); return true; } @@ -313,7 +313,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) { else g->member[i].exp+= c->exp; - intif_guild_change_memberinfo(g->guild_id,c->account_id,c->char_id, + intif->guild_change_memberinfo(g->guild_id,c->account_id,c->char_id, GMI_EXP,&g->member[i].exp,sizeof(g->member[i].exp)); c->exp=0; @@ -395,7 +395,7 @@ int guild_create(struct map_session_data *sd, const char *name) guild_makemember(&m,sd); m.position=0; - intif_guild_create(name,&m); + intif->guild_create(name,&m); return 1; } @@ -420,7 +420,7 @@ int guild_created(int account_id,int guild_id) { //Information request int guild_request_info(int guild_id) { - return intif_guild_request_info(guild_id); + return intif->guild_request_info(guild_id); } //Information request with event @@ -733,7 +733,7 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) } guild_makemember(&m,sd); - intif_guild_addmember(guild_id, &m); + intif->guild_addmember(guild_id, &m); //TODO: send a minimap update to this player } @@ -799,7 +799,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag) // cancel if player not present or invalide guild_id invitation if (flag == 0) { ShowError("guild: member added error %d is not online\n",account_id); - intif_guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); + intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); } return 0; } @@ -851,7 +851,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c ((iMap->agit_flag || iMap->agit2_flag) && map[sd->bl.m].flag.gvg_castle)) return 0; - intif_guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes); + intif->guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes); return 0; } @@ -886,7 +886,7 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i // find the member and perform expulsion i = guild->getindex(g, account_id, char_id); if( i != -1 && strcmp(g->member[i].name,g->master) != 0 ) //Can't expel the GL! - intif_guild_leave(g->guild_id,account_id,char_id,1,mes); + intif->guild_leave(g->guild_id,account_id,char_id,1,mes); return 0; } @@ -954,7 +954,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) if(!(g = sd->guild)) return 0; - intif_guild_memberinfoshort(g->guild_id, + intif->guild_memberinfoshort(g->guild_id, sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_); if(!online){ @@ -1047,7 +1047,7 @@ int guild_send_message(struct map_session_data *sd,const char *mes,int len) if(sd->status.guild_id==0) return 0; - intif_guild_message(sd->status.guild_id,sd->status.account_id,mes,len); + intif->guild_message(sd->status.guild_id,sd->status.account_id,mes,len); guild->recv_message(sd->status.guild_id,sd->status.account_id,mes,len); // Chat logging type 'G' / Guild Chat @@ -1073,7 +1073,7 @@ int guild_recv_message(int guild_id,int account_id,const char *mes,int len) *---------------------------------------------------*/ int guild_change_memberposition(int guild_id,int account_id,int char_id,short idx) { - return intif_guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx)); + return intif->guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx)); } /*==================================================== @@ -1106,7 +1106,7 @@ int guild_change_position(int guild_id,int idx, p.mode=mode&0x11; p.exp_mode=exp_mode; safestrncpy(p.name,name,NAME_LENGTH); - return intif_guild_position(guild_id,idx,&p); + return intif->guild_position(guild_id,idx,&p); } /*==================================================== @@ -1137,7 +1137,7 @@ int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes if(guild_id!=sd->status.guild_id) return 0; - return intif_guild_notice(guild_id,mes1,mes2); + return intif->guild_notice(guild_id,mes1,mes2); } /*==================================================== @@ -1175,7 +1175,7 @@ int guild_change_emblem(struct map_session_data *sd,int len,const char *data) return 0; } - return intif_guild_emblem(sd->status.guild_id,len,data); + return intif->guild_emblem(sd->status.guild_id,len,data); } /*==================================================== @@ -1328,7 +1328,7 @@ int guild_skillup(TBL_PC* sd, uint16 skill_id) if( g->skill_point > 0 && g->skill[idx].id != 0 && g->skill[idx].lv < max ) - intif_guild_skillup(g->guild_id, skill_id, sd->status.account_id, max); + intif->guild_skillup(g->guild_id, skill_id, sd->status.account_id, max); return 0; } @@ -1529,18 +1529,18 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) for(i=0;ialliance[i].guild_id==tsd->status.guild_id && g->alliance[i].opposition==1) - intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id, + intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, sd->status.account_id,tsd->status.account_id,9 ); } for(i=0;ialliance[i].guild_id==sd->status.guild_id && tg->alliance[i].opposition==1) - intif_guild_alliance( tsd->status.guild_id,sd->status.guild_id, + intif->guild_alliance( tsd->status.guild_id,sd->status.guild_id, tsd->status.account_id,sd->status.account_id,9 ); } // inform other servers - intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id, + intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, sd->status.account_id,tsd->status.account_id,0 ); return 0; } else { // deny @@ -1564,7 +1564,7 @@ int guild_delalliance(struct map_session_data *sd,int guild_id,int flag) return 0; } // end addition [Valaris] - intif_guild_alliance( sd->status.guild_id,guild_id,sd->status.account_id,0,flag|8 ); + intif->guild_alliance( sd->status.guild_id,guild_id,sd->status.account_id,0,flag|8 ); return 0; } @@ -1600,13 +1600,13 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd) if(iMap->agit_flag || iMap->agit2_flag) // Prevent the changing of alliances to oppositions during WoE. return 0; //Change alliance to opposition. - intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id, + intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, sd->status.account_id,tsd->status.account_id,8 ); } } // inform other serv - intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id, + intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, sd->status.account_id,tsd->status.account_id,1 ); return 0; } @@ -1713,7 +1713,7 @@ int guild_broken_sub(DBKey key, DBData *data, va_list ap) for(j=0;jmax_member;j++) if( (sd=g->member[j].sd)!=NULL ) clif->guild_delalliance(sd,guild_id,g->alliance[i].opposition); - intif_guild_alliance(g->guild_id, guild_id,0,0,g->alliance[i].opposition|8); + intif->guild_alliance(g->guild_id, guild_id,0,0,g->alliance[i].opposition|8); g->alliance[i].guild_id=0; } } @@ -1799,7 +1799,7 @@ int guild_gm_change(int guild_id, struct map_session_data *sd) return 0; //Notify servers that master has changed. - intif_guild_change_gm(guild_id, sd->status.name, strlen(sd->status.name)+1); + intif->guild_change_gm(guild_id, sd->status.name, strlen(sd->status.name)+1); return 1; } @@ -1905,7 +1905,7 @@ int guild_break(struct map_session_data *sd,char *name) { } } - intif_guild_break(g->guild_id); + intif->guild_break(g->guild_id); return 1; } @@ -1929,7 +1929,7 @@ void guild_castle_map_init(void) *(cursor++) = gc->castle_id; } dbi_destroy(iter); - if (intif_guild_castle_dataload(num, castle_ids)) + if (intif->guild_castle_dataload(num, castle_ids)) ShowStatus("Requested '"CL_WHITE"%d"CL_RESET"' guild castles from char-server...\n", num); aFree(castle_ids); } @@ -1996,7 +1996,7 @@ int guild_castledatasave(int castle_id, int index, int value) return 0; } - if (!intif_guild_castle_datasave(castle_id, index, value)) { + if (!intif->guild_castle_datasave(castle_id, index, value)) { guild->castle_reconnect(castle_id, index, value); } return 0; @@ -2006,7 +2006,7 @@ void guild_castle_reconnect_sub(void *key, void *data, va_list ap) { int castle_id = GetWord((int)__64BPTRSIZE(key), 0); int index = GetWord((int)__64BPTRSIZE(key), 1); - intif_guild_castle_datasave(castle_id, index, *(int *)data); + intif->guild_castle_datasave(castle_id, index, *(int *)data); aFree(data); } diff --git a/src/map/homunculus.c b/src/map/homunculus.c index a1dd38b68..3a6ed074c 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -544,7 +544,7 @@ void homunculus_save(struct homun_data *hd) { //calculation on login) hd->homunculus.hp = hd->battle_status.hp; hd->homunculus.sp = hd->battle_status.sp; - intif_homunculus_requestsave(sd->status.account_id, &hd->homunculus); + intif->homunculus_requestsave(sd->status.account_id, &hd->homunculus); } unsigned char homunculus_menu(struct map_session_data *sd,unsigned char menu_num) { @@ -731,7 +731,7 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) { if(i < 0) { ShowError("homunculus_create: unknown class [%d] for homunculus '%s', requesting deletion.\n", hom->class_, hom->name); sd->status.hom_id = 0; - intif_homunculus_requestdelete(hom->hom_id); + intif->homunculus_requestdelete(hom->hom_id); return false; } sd->hd = hd = (struct homun_data*)aCalloc(1,sizeof(struct homun_data)); @@ -777,7 +777,7 @@ bool homunculus_call(struct map_session_data *sd) { // If homunc not yet loaded, load it if (!sd->hd) - return intif_homunculus_requestload(sd->status.account_id, sd->status.hom_id); + return intif->homunculus_requestload(sd->status.account_id, sd->status.hom_id); hd = sd->hd; @@ -892,7 +892,7 @@ bool homunculus_creation_request(struct map_session_data *sd, int class_) { hom.luk = base->luk *10; // Request homunculus creation - intif_homunculus_create(sd->status.account_id, &hom); + intif->homunculus_create(sd->status.account_id, &hom); return true; } @@ -904,7 +904,7 @@ bool homunculus_ressurect(struct map_session_data* sd, unsigned char per, short return false; // no homunculus if (!sd->hd) //Load homun data; - return intif_homunculus_requestload(sd->status.account_id, sd->status.hom_id); + return intif->homunculus_requestload(sd->status.account_id, sd->status.hom_id); hd = sd->hd; diff --git a/src/map/intif.c b/src/map/intif.c index f2c5e7e78..813c1cf7c 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,2259 +1,2351 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "map.h" -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "pc.h" -#include "intif.h" -#include "log.h" -#include "storage.h" -#include "party.h" -#include "guild.h" -#include "pet.h" -#include "atcommand.h" -#include "mercenary.h" -#include "homunculus.h" -#include "elemental.h" -#include "mail.h" -#include "quest.h" - -#include -#include -#include -#include -#include -#include - - -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] -}; - -extern int char_fd; // inter server Fd used for char_fd -#define inter_fd char_fd // alias - -//----------------------------------------------------------------- -// Send to inter server - -int CheckForCharServer(void) -{ - return ((char_fd <= 0) || session[char_fd] == NULL || session[char_fd]->wdata == NULL); -} - -// pet -int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id, - short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 24 + NAME_LENGTH); - WFIFOW(inter_fd,0) = 0x3080; - WFIFOL(inter_fd,2) = account_id; - WFIFOL(inter_fd,6) = char_id; - WFIFOW(inter_fd,10) = pet_class; - WFIFOW(inter_fd,12) = pet_lv; - WFIFOW(inter_fd,14) = pet_egg_id; - WFIFOW(inter_fd,16) = pet_equip; - WFIFOW(inter_fd,18) = intimate; - WFIFOW(inter_fd,20) = hungry; - WFIFOB(inter_fd,22) = rename_flag; - WFIFOB(inter_fd,23) = incuvate; - memcpy(WFIFOP(inter_fd,24),pet_name,NAME_LENGTH); - WFIFOSET(inter_fd,24+NAME_LENGTH); - - return 0; -} - -int intif_request_petdata(int account_id,int char_id,int pet_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 14); - WFIFOW(inter_fd,0) = 0x3081; - WFIFOL(inter_fd,2) = account_id; - WFIFOL(inter_fd,6) = char_id; - WFIFOL(inter_fd,10) = pet_id; - WFIFOSET(inter_fd,14); - - return 0; -} - -int intif_save_petdata(int account_id,struct s_pet *p) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, sizeof(struct s_pet) + 8); - WFIFOW(inter_fd,0) = 0x3082; - WFIFOW(inter_fd,2) = sizeof(struct s_pet) + 8; - WFIFOL(inter_fd,4) = account_id; - memcpy(WFIFOP(inter_fd,8),p,sizeof(struct s_pet)); - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - - return 0; -} - -int intif_delete_petdata(int pet_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3083; - WFIFOL(inter_fd,2) = pet_id; - WFIFOSET(inter_fd,6); - - return 1; -} - -int intif_rename(struct map_session_data *sd, int type, char *name) -{ - if (CheckForCharServer()) - return 1; - - WFIFOHEAD(inter_fd,NAME_LENGTH+12); - WFIFOW(inter_fd,0) = 0x3006; - WFIFOL(inter_fd,2) = sd->status.account_id; - WFIFOL(inter_fd,6) = sd->status.char_id; - WFIFOB(inter_fd,10) = type; //Type: 0 - PC, 1 - PET, 2 - HOM - memcpy(WFIFOP(inter_fd,11),name, NAME_LENGTH); - WFIFOSET(inter_fd,NAME_LENGTH+12); - return 0; -} - -// GM Send a message -int intif_broadcast(const char* mes, int len, int type) -{ - int lp = type ? 4 : 0; - - // Send to the local players - clif->broadcast(NULL, mes, len, type, ALL_CLIENT); - - if (CheckForCharServer()) - return 0; - - if (chrif->other_mapserver_count < 1) - return 0; //No need to send. - - WFIFOHEAD(inter_fd, 16 + lp + len); - WFIFOW(inter_fd,0) = 0x3000; - WFIFOW(inter_fd,2) = 16 + lp + len; - WFIFOL(inter_fd,4) = 0xFF000000; // 0xFF000000 color signals standard broadcast - WFIFOW(inter_fd,8) = 0; // fontType not used with standard broadcast - WFIFOW(inter_fd,10) = 0; // fontSize not used with standard broadcast - WFIFOW(inter_fd,12) = 0; // fontAlign not used with standard broadcast - WFIFOW(inter_fd,14) = 0; // fontY not used with standard broadcast - if (type == 0x10) // bc_blue - WFIFOL(inter_fd,16) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow. - else if (type == 0x20) // bc_woe - WFIFOL(inter_fd,16) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'. - memcpy(WFIFOP(inter_fd,16 + lp), mes, len); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - return 0; -} - -int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) -{ - // Send to the local players - clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT); - - if (CheckForCharServer()) - return 0; - - if (chrif->other_mapserver_count < 1) - return 0; //No need to send. - - WFIFOHEAD(inter_fd, 16 + len); - WFIFOW(inter_fd,0) = 0x3000; - WFIFOW(inter_fd,2) = 16 + len; - WFIFOL(inter_fd,4) = fontColor; - WFIFOW(inter_fd,8) = fontType; - WFIFOW(inter_fd,10) = fontSize; - WFIFOW(inter_fd,12) = fontAlign; - WFIFOW(inter_fd,14) = fontY; - memcpy(WFIFOP(inter_fd,16), mes, len); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - return 0; -} - -/// send a message using the main chat system -/// the source of message -/// the message that was sent -int intif_main_message(struct map_session_data* sd, const char* message) -{ - char output[256]; - - nullpo_ret(sd); - - // format the message for main broadcasting - snprintf( output, sizeof(output), msg_txt(386), sd->status.name, message ); - - // send the message using the inter-server broadcast service - intif_broadcast2( output, strlen(output) + 1, 0xFE000000, 0, 0, 0, 0 ); - - // log the chat message - logs->chat( LOG_CHAT_MAINCHAT, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message ); - - return 0; -} - -// The transmission of Wisp/Page to inter-server (player not found on this server) -int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) -{ - nullpo_ret(sd); - if (CheckForCharServer()) - return 0; - - if (chrif->other_mapserver_count < 1) - { //Character not found. - clif->wis_end(sd->fd, 1); - return 0; - } - - WFIFOHEAD(inter_fd,mes_len + 52); - WFIFOW(inter_fd,0) = 0x3001; - WFIFOW(inter_fd,2) = mes_len + 52; - memcpy(WFIFOP(inter_fd,4), sd->status.name, NAME_LENGTH); - memcpy(WFIFOP(inter_fd,4+NAME_LENGTH), nick, NAME_LENGTH); - memcpy(WFIFOP(inter_fd,4+2*NAME_LENGTH), mes, mes_len); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - - if (battle_config.etc_log) - ShowInfo("intif_wis_message from %s to %s (message: '%s')\n", sd->status.name, nick, mes); - - return 0; -} - -// The reply of Wisp/page -int intif_wis_replay(int id, int flag) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,7); - WFIFOW(inter_fd,0) = 0x3002; - WFIFOL(inter_fd,2) = id; - WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target - WFIFOSET(inter_fd,7); - - if (battle_config.etc_log) - ShowInfo("intif_wis_replay: id: %d, flag:%d\n", id, flag); - - return 0; -} - -// The transmission of GM only Wisp/Page from server to inter-server -int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes) -{ - int mes_len; - if (CheckForCharServer()) - return 0; - mes_len = strlen(mes) + 1; // + null - WFIFOHEAD(inter_fd, mes_len + 32); - WFIFOW(inter_fd,0) = 0x3003; - WFIFOW(inter_fd,2) = mes_len + 32; - memcpy(WFIFOP(inter_fd,4), wisp_name, NAME_LENGTH); - WFIFOL(inter_fd,4+NAME_LENGTH) = permission; - memcpy(WFIFOP(inter_fd,8+NAME_LENGTH), mes, mes_len); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - - if (battle_config.etc_log) - ShowNotice("intif_wis_message_to_gm: from: '%s', required permission: %d, message: '%s'.\n", wisp_name, permission, mes); - - return 0; -} - -int intif_regtostr(char* str, struct global_reg *reg, int qty) -{ - int len =0, i; - - for (i = 0; i < qty; i++) { - len+= sprintf(str+len, "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. - len+= sprintf(str+len, "%s", reg[i].value)+1; - } - return len; -} - -//Request for saving registry values. -int intif_saveregistry(struct map_session_data *sd, int type) -{ - struct global_reg *reg; - int count; - int i, p; - - if (CheckForCharServer()) - return -1; - - switch (type) { - case 3: //Character reg - reg = sd->save_reg.global; - count = sd->save_reg.global_num; - sd->state.reg_dirty &= ~0x4; - break; - case 2: //Account reg - reg = sd->save_reg.account; - count = sd->save_reg.account_num; - sd->state.reg_dirty &= ~0x2; - break; - case 1: //Account2 reg - reg = sd->save_reg.account2; - count = sd->save_reg.account2_num; - sd->state.reg_dirty &= ~0x1; - break; - default: //Broken code? - ShowError("intif_saveregistry: Invalid type %d\n", type); - return -1; - } - WFIFOHEAD(inter_fd, 288 * MAX_REG_NUM+13); - WFIFOW(inter_fd,0)=0x3004; - WFIFOL(inter_fd,4)=sd->status.account_id; - WFIFOL(inter_fd,8)=sd->status.char_id; - WFIFOB(inter_fd,12)=type; - for( p = 13, i = 0; i < count; i++ ) { - if (reg[i].str[0] != '\0' && reg[i].value[0] != '\0') { - p+= sprintf((char*)WFIFOP(inter_fd,p), "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. - p+= sprintf((char*)WFIFOP(inter_fd,p), "%s", reg[i].value)+1; - } - } - WFIFOW(inter_fd,2)=p; - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - return 0; -} - -//Request the registries for this player. -int intif_request_registry(struct map_session_data *sd, int flag) -{ - nullpo_ret(sd); - - sd->save_reg.account2_num = -1; - sd->save_reg.account_num = -1; - sd->save_reg.global_num = -1; - - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3005; - WFIFOL(inter_fd,2) = sd->status.account_id; - WFIFOL(inter_fd,6) = sd->status.char_id; - WFIFOB(inter_fd,10) = (flag&1?1:0); //Request Acc Reg 2 - WFIFOB(inter_fd,11) = (flag&2?1:0); //Request Acc Reg - WFIFOB(inter_fd,12) = (flag&4?1:0); //Request Char Reg - WFIFOSET(inter_fd,13); - - return 0; -} - -int intif_request_guild_storage(int account_id,int guild_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x3018; - WFIFOL(inter_fd,2) = account_id; - WFIFOL(inter_fd,6) = guild_id; - WFIFOSET(inter_fd,10); - return 0; -} -int intif_send_guild_storage(int account_id,struct guild_storage *gstor) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,sizeof(struct guild_storage)+12); - WFIFOW(inter_fd,0) = 0x3019; - WFIFOW(inter_fd,2) = (unsigned short)sizeof(struct guild_storage)+12; - WFIFOL(inter_fd,4) = account_id; - WFIFOL(inter_fd,8) = gstor->guild_id; - memcpy( WFIFOP(inter_fd,12),gstor, sizeof(struct guild_storage) ); - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - return 0; -} - -// Party creation request -int intif_create_party(struct party_member *member,char *name,int item,int item2) -{ - if (CheckForCharServer()) - return 0; - nullpo_ret(member); - - WFIFOHEAD(inter_fd,64); - WFIFOW(inter_fd,0) = 0x3020; - WFIFOW(inter_fd,2) = 30+sizeof(struct party_member); - memcpy(WFIFOP(inter_fd,4),name, NAME_LENGTH); - WFIFOB(inter_fd,28)= item; - WFIFOB(inter_fd,29)= item2; - memcpy(WFIFOP(inter_fd,30), member, sizeof(struct party_member)); - WFIFOSET(inter_fd,WFIFOW(inter_fd, 2)); - return 0; -} - -// Party information request -int intif_request_partyinfo(int party_id, int char_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x3021; - WFIFOL(inter_fd,2) = party_id; - WFIFOL(inter_fd,6) = char_id; - WFIFOSET(inter_fd,10); - return 0; -} - -// Request to add a member to party -int intif_party_addmember(int party_id,struct party_member *member) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,42); - WFIFOW(inter_fd,0)=0x3022; - WFIFOW(inter_fd,2)=8+sizeof(struct party_member); - WFIFOL(inter_fd,4)=party_id; - memcpy(WFIFOP(inter_fd,8),member,sizeof(struct party_member)); - WFIFOSET(inter_fd,WFIFOW(inter_fd, 2)); - return 1; -} - -// Request to change party configuration (exp,item share) -int intif_party_changeoption(int party_id,int account_id,int exp,int item) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,14); - WFIFOW(inter_fd,0)=0x3023; - WFIFOL(inter_fd,2)=party_id; - WFIFOL(inter_fd,6)=account_id; - WFIFOW(inter_fd,10)=exp; - WFIFOW(inter_fd,12)=item; - WFIFOSET(inter_fd,14); - return 0; -} - -// Request to leave party -int intif_party_leave(int party_id,int account_id, int char_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,14); - WFIFOW(inter_fd,0)=0x3024; - WFIFOL(inter_fd,2)=party_id; - WFIFOL(inter_fd,6)=account_id; - WFIFOL(inter_fd,10)=char_id; - WFIFOSET(inter_fd,14); - return 0; -} - -// Request keeping party for new map ?? -int intif_party_changemap(struct map_session_data *sd,int online) -{ - int16 m, mapindex; - - if (CheckForCharServer()) - return 0; - if(!sd) - return 0; - - if( (m=iMap->mapindex2mapid(sd->mapindex)) >= 0 && map[m].instance_id >= 0 ) - mapindex = map[map[m].instance_src_map].index; - else - mapindex = sd->mapindex; - - WFIFOHEAD(inter_fd,19); - WFIFOW(inter_fd,0)=0x3025; - WFIFOL(inter_fd,2)=sd->status.party_id; - WFIFOL(inter_fd,6)=sd->status.account_id; - WFIFOL(inter_fd,10)=sd->status.char_id; - WFIFOW(inter_fd,14)=mapindex; - WFIFOB(inter_fd,16)=online; - WFIFOW(inter_fd,17)=sd->status.base_level; - WFIFOSET(inter_fd,19); - return 1; -} - -// Request breaking party -int intif_break_party(int party_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0)=0x3026; - WFIFOL(inter_fd,2)=party_id; - WFIFOSET(inter_fd,6); - return 0; -} - -// Sending party chat -int intif_party_message(int party_id,int account_id,const char *mes,int len) -{ - if (CheckForCharServer()) - return 0; - - if (chrif->other_mapserver_count < 1) - return 0; //No need to send. - - WFIFOHEAD(inter_fd,len + 12); - WFIFOW(inter_fd,0)=0x3027; - WFIFOW(inter_fd,2)=len+12; - WFIFOL(inter_fd,4)=party_id; - WFIFOL(inter_fd,8)=account_id; - memcpy(WFIFOP(inter_fd,12),mes,len); - WFIFOSET(inter_fd,len+12); - return 0; -} - -// Request a new leader for party -int intif_party_leaderchange(int party_id,int account_id,int char_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,14); - WFIFOW(inter_fd,0)=0x3029; - WFIFOL(inter_fd,2)=party_id; - WFIFOL(inter_fd,6)=account_id; - WFIFOL(inter_fd,10)=char_id; - WFIFOSET(inter_fd,14); - return 0; -} - -// Request a Guild creation -int intif_guild_create(const char *name,const struct guild_member *master) -{ - if (CheckForCharServer()) - return 0; - nullpo_ret(master); - - WFIFOHEAD(inter_fd,sizeof(struct guild_member)+(8+NAME_LENGTH)); - WFIFOW(inter_fd,0)=0x3030; - WFIFOW(inter_fd,2)=sizeof(struct guild_member)+(8+NAME_LENGTH); - WFIFOL(inter_fd,4)=master->account_id; - memcpy(WFIFOP(inter_fd,8),name,NAME_LENGTH); - memcpy(WFIFOP(inter_fd,8+NAME_LENGTH),master,sizeof(struct guild_member)); - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - return 0; -} - -// Request Guild information -int intif_guild_request_info(int guild_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3031; - WFIFOL(inter_fd,2) = guild_id; - WFIFOSET(inter_fd,6); - return 0; -} - -// Request to add member to the guild -int intif_guild_addmember(int guild_id,struct guild_member *m) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,sizeof(struct guild_member)+8); - WFIFOW(inter_fd,0) = 0x3032; - WFIFOW(inter_fd,2) = sizeof(struct guild_member)+8; - WFIFOL(inter_fd,4) = guild_id; - memcpy(WFIFOP(inter_fd,8),m,sizeof(struct guild_member)); - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - return 0; -} - -// Request a new leader for guild -int intif_guild_change_gm(int guild_id, const char* name, int len) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, len + 8); - WFIFOW(inter_fd, 0)=0x3033; - WFIFOW(inter_fd, 2)=len+8; - WFIFOL(inter_fd, 4)=guild_id; - memcpy(WFIFOP(inter_fd,8),name,len); - WFIFOSET(inter_fd,len+8); - return 0; -} - -// Request to leave guild -int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 55); - WFIFOW(inter_fd, 0) = 0x3034; - WFIFOL(inter_fd, 2) = guild_id; - WFIFOL(inter_fd, 6) = account_id; - WFIFOL(inter_fd,10) = char_id; - WFIFOB(inter_fd,14) = flag; - safestrncpy((char*)WFIFOP(inter_fd,15),mes,40); - WFIFOSET(inter_fd,55); - return 0; -} - -//Update request / Lv online status of the guild members -int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 19); - WFIFOW(inter_fd, 0) = 0x3035; - WFIFOL(inter_fd, 2) = guild_id; - WFIFOL(inter_fd, 6) = account_id; - WFIFOL(inter_fd,10) = char_id; - WFIFOB(inter_fd,14) = online; - WFIFOW(inter_fd,15) = lv; - WFIFOW(inter_fd,17) = class_; - WFIFOSET(inter_fd,19); - return 0; -} - -//Guild disbanded notification -int intif_guild_break(int guild_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 6); - WFIFOW(inter_fd, 0) = 0x3036; - WFIFOL(inter_fd, 2) = guild_id; - WFIFOSET(inter_fd,6); - return 0; -} - -// Send a guild message -int intif_guild_message(int guild_id,int account_id,const char *mes,int len) -{ - if (CheckForCharServer()) - return 0; - - if (chrif->other_mapserver_count < 1) - return 0; //No need to send. - - WFIFOHEAD(inter_fd, len + 12); - WFIFOW(inter_fd,0)=0x3037; - WFIFOW(inter_fd,2)=len+12; - WFIFOL(inter_fd,4)=guild_id; - WFIFOL(inter_fd,8)=account_id; - memcpy(WFIFOP(inter_fd,12),mes,len); - WFIFOSET(inter_fd,len+12); - - return 0; -} - -// Request a change of Guild basic information -int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, len + 10); - WFIFOW(inter_fd,0)=0x3039; - WFIFOW(inter_fd,2)=len+10; - WFIFOL(inter_fd,4)=guild_id; - WFIFOW(inter_fd,8)=type; - memcpy(WFIFOP(inter_fd,10),data,len); - WFIFOSET(inter_fd,len+10); - return 0; -} - -// Request a change of Guild member information -int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id, - int type,const void *data,int len) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, len + 18); - WFIFOW(inter_fd, 0)=0x303a; - WFIFOW(inter_fd, 2)=len+18; - WFIFOL(inter_fd, 4)=guild_id; - WFIFOL(inter_fd, 8)=account_id; - WFIFOL(inter_fd,12)=char_id; - WFIFOW(inter_fd,16)=type; - memcpy(WFIFOP(inter_fd,18),data,len); - WFIFOSET(inter_fd,len+18); - return 0; -} - -// Request a change of Guild title -int intif_guild_position(int guild_id,int idx,struct guild_position *p) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, sizeof(struct guild_position)+12); - WFIFOW(inter_fd,0)=0x303b; - WFIFOW(inter_fd,2)=sizeof(struct guild_position)+12; - WFIFOL(inter_fd,4)=guild_id; - WFIFOL(inter_fd,8)=idx; - memcpy(WFIFOP(inter_fd,12),p,sizeof(struct guild_position)); - WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); - return 0; -} - -// Request an update of Guildskill skill_id -int intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) -{ - if( CheckForCharServer() ) - return 0; - WFIFOHEAD(inter_fd, 18); - WFIFOW(inter_fd, 0) = 0x303c; - WFIFOL(inter_fd, 2) = guild_id; - WFIFOL(inter_fd, 6) = skill_id; - WFIFOL(inter_fd, 10) = account_id; - WFIFOL(inter_fd, 14) = max; - WFIFOSET(inter_fd, 18); - return 0; -} - -// Request a new guild relationship -int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,19); - WFIFOW(inter_fd, 0)=0x303d; - WFIFOL(inter_fd, 2)=guild_id1; - WFIFOL(inter_fd, 6)=guild_id2; - WFIFOL(inter_fd,10)=account_id1; - WFIFOL(inter_fd,14)=account_id2; - WFIFOB(inter_fd,18)=flag; - WFIFOSET(inter_fd,19); - return 0; -} - -// Request to change guild notice -int intif_guild_notice(int guild_id,const char *mes1,const char *mes2) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,186); - WFIFOW(inter_fd,0)=0x303e; - WFIFOL(inter_fd,2)=guild_id; - memcpy(WFIFOP(inter_fd,6),mes1,MAX_GUILDMES1); - memcpy(WFIFOP(inter_fd,66),mes2,MAX_GUILDMES2); - WFIFOSET(inter_fd,186); - return 0; -} - -// Request to change guild emblem -int intif_guild_emblem(int guild_id,int len,const char *data) -{ - if (CheckForCharServer()) - return 0; - if(guild_id<=0 || len<0 || len>2000) - return 0; - WFIFOHEAD(inter_fd,len + 12); - WFIFOW(inter_fd,0)=0x303f; - WFIFOW(inter_fd,2)=len+12; - WFIFOL(inter_fd,4)=guild_id; - WFIFOL(inter_fd,8)=0; - memcpy(WFIFOP(inter_fd,12),data,len); - WFIFOSET(inter_fd,len+12); - return 0; -} - -/** - * Requests guild castles data from char-server. - * @param num Number of castles, size of castle_ids array. - * @param castle_ids Pointer to array of castle IDs. - */ -int intif_guild_castle_dataload(int num, int *castle_ids) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 4 + num * sizeof(int)); - WFIFOW(inter_fd, 0) = 0x3040; - WFIFOW(inter_fd, 2) = 4 + num * sizeof(int); - memcpy(WFIFOP(inter_fd, 4), castle_ids, num * sizeof(int)); - WFIFOSET(inter_fd, WFIFOW(inter_fd, 2)); - return 1; -} - - -// Request change castle guild owner and save data -int intif_guild_castle_datasave(int castle_id,int index, int value) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd,9); - WFIFOW(inter_fd,0)=0x3041; - WFIFOW(inter_fd,2)=castle_id; - WFIFOB(inter_fd,4)=index; - WFIFOL(inter_fd,5)=value; - WFIFOSET(inter_fd,9); - return 1; -} - -//----------------------------------------------------------------- -// Homunculus Packets send to Inter server [albator] -//----------------------------------------------------------------- - -int intif_homunculus_create(int account_id, struct s_homunculus *sh) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, sizeof(struct s_homunculus)+8); - WFIFOW(inter_fd,0) = 0x3090; - WFIFOW(inter_fd,2) = sizeof(struct s_homunculus)+8; - WFIFOL(inter_fd,4) = account_id; - memcpy(WFIFOP(inter_fd,8),sh,sizeof(struct s_homunculus)); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - return 0; -} - -bool intif_homunculus_requestload(int account_id, int homun_id) { - if (CheckForCharServer()) - return false; - WFIFOHEAD(inter_fd, 10); - WFIFOW(inter_fd,0) = 0x3091; - WFIFOL(inter_fd,2) = account_id; - WFIFOL(inter_fd,6) = homun_id; - WFIFOSET(inter_fd, 10); - return true; -} - -int intif_homunculus_requestsave(int account_id, struct s_homunculus* sh) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, sizeof(struct s_homunculus)+8); - WFIFOW(inter_fd,0) = 0x3092; - WFIFOW(inter_fd,2) = sizeof(struct s_homunculus)+8; - WFIFOL(inter_fd,4) = account_id; - memcpy(WFIFOP(inter_fd,8),sh,sizeof(struct s_homunculus)); - WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); - return 0; - -} - -int intif_homunculus_requestdelete(int homun_id) -{ - if (CheckForCharServer()) - return 0; - WFIFOHEAD(inter_fd, 6); - WFIFOW(inter_fd, 0) = 0x3093; - WFIFOL(inter_fd,2) = homun_id; - WFIFOSET(inter_fd,6); - return 0; - -} - - -//----------------------------------------------------------------- -// Packets receive from inter server - -// Wisp/Page reception // rewritten by [Yor] -int intif_parse_WisMessage(int fd) -{ - struct map_session_data* sd; - char *wisp_source; - char name[NAME_LENGTH]; - int id, i; - - id=RFIFOL(fd,4); - - safestrncpy(name, (char*)RFIFOP(fd,32), NAME_LENGTH); - sd = iMap->nick2sd(name); - if(sd == NULL || strcmp(sd->status.name, name) != 0) - { //Not found - intif_wis_replay(id,1); - return 0; - } - if(sd->state.ignoreAll) { - intif_wis_replay(id, 2); - return 0; - } - wisp_source = (char *) RFIFOP(fd,8); // speed up [Yor] - for(i=0; i < MAX_IGNORE_LIST && - sd->ignore[i].name[0] != '\0' && - strcmp(sd->ignore[i].name, wisp_source) != 0 - ; i++); - - if (i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0') - { //Ignored - intif_wis_replay(id, 2); - return 0; - } - //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) -{ - struct map_session_data* sd; - - if (battle_config.etc_log) - ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target - sd = (struct map_session_data *)iMap->nick2sd((char *) RFIFOP(fd,2)); - if (sd != NULL) - clif->wis_end(sd->fd, RFIFOB(fd,26)); - - return 0; -} - -static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) -{ - int permission = va_arg(va, int); - char *wisp_name; - char *message; - int len; - - if (!pc_has_permission(sd, permission)) - return 0; - wisp_name = va_arg(va, char*); - message = va_arg(va, char*); - len = va_arg(va, int); - clif->wis_message(sd->fd, wisp_name, message, len); - return 1; -} - -// Received wisp message from map-server via char-server for ALL gm -// 0x3003/0x3803 .w .24B .l .?B -int mapif_parse_WisToGM(int fd) -{ - int permission, mes_len; - char Wisp_name[NAME_LENGTH]; - char mbuf[255]; - char *message; - - mes_len = RFIFOW(fd,2) - 32; - message = (char *) (mes_len >= 255 ? (char *) aMalloc(mes_len) : mbuf); - - permission = RFIFOL(fd,28); - safestrncpy(Wisp_name, (char*)RFIFOP(fd,4), NAME_LENGTH); - safestrncpy(message, (char*)RFIFOP(fd,32), mes_len); - // information is sent to all online GM - iMap->map_foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len); - - if (message != mbuf) - aFree(message); - return 0; -} - -// Request player registre -int intif_parse_Registers(int fd) -{ - int j,p,len,max, flag; - struct map_session_data *sd; - struct global_reg *reg; - int *qty; - int account_id = RFIFOL(fd,4), char_id = RFIFOL(fd,8); - struct auth_node *node = chrif->auth_check(account_id, char_id, ST_LOGIN); - if (node) - sd = node->sd; - else { //Normally registries should arrive for in log-in chars. - sd = iMap->id2sd(account_id); - if (sd && RFIFOB(fd,12) == 3 && sd->status.char_id != char_id) - sd = NULL; //Character registry from another character. - } - if (!sd) return 1; - - flag = (sd->save_reg.global_num == -1 || sd->save_reg.account_num == -1 || sd->save_reg.account2_num == -1); - - switch (RFIFOB(fd,12)) { - case 3: //Character Registry - reg = sd->save_reg.global; - qty = &sd->save_reg.global_num; - max = GLOBAL_REG_NUM; - break; - case 2: //Account Registry - reg = sd->save_reg.account; - qty = &sd->save_reg.account_num; - max = ACCOUNT_REG_NUM; - break; - case 1: //Account2 Registry - reg = sd->save_reg.account2; - qty = &sd->save_reg.account2_num; - max = ACCOUNT_REG2_NUM; - break; - default: - ShowError("intif_parse_Registers: Unrecognized type %d\n",RFIFOB(fd,12)); - return 0; - } - for(j=0,p=13;jsave_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) -{ - struct guild_storage *gstor; - struct map_session_data *sd; - int guild_id; - - guild_id = RFIFOL(fd,8); - if(guild_id <= 0) - return 1; - sd=iMap->id2sd( RFIFOL(fd,4) ); - if(sd==NULL){ - ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); - return 1; - } - gstor=gstorage->id2storage(guild_id); - if(!gstor) { - ShowWarning("intif_parse_LoadGuildStorage: error guild_id %d not exist\n",guild_id); - return 1; - } - 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; - } - 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; - } - 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; - } - - memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage)); - gstorage->open(sd); - return 0; -} - -// ACK guild_storage saved -int intif_parse_SaveGuildStorage(int fd) -{ - gstorage->saved(/*RFIFOL(fd,2), */RFIFOL(fd,6)); - return 0; -} - -// ACK party creation -int 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) -{ - 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; - } - - 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) -{ - 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) -{ - 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) -{ - 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) -{ - party->broken(RFIFOL(fd,2)); - return 0; -} - -// ACK party on new map -int 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) -{ - 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) -{ - guild->created(RFIFOL(fd,2),RFIFOL(fd,6)); - return 0; -} - -// ACK guild infos -int 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; - } - 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) -{ - 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) -{ - 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) -{ - 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) -{ - guild->broken(RFIFOL(fd,2),RFIFOB(fd,6)); - return 0; -} - -// basic guild info change notice -// 0x3839 .w .l .w .?b -int intif_parse_GuildBasicInfoChanged(int fd) -{ - //int len = RFIFOW(fd,2) - 10; - int guild_id = RFIFOL(fd,4); - int type = RFIFOW(fd,8); - //void* data = RFIFOP(fd,10); - - struct guild* g = guild->search(guild_id); - if( g == NULL ) - return 0; - - 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; - } - - return 0; -} - -// guild member info change notice -// 0x383a .w .l .l .l .w .?b -int intif_parse_GuildMemberInfoChanged(int fd) -{ - //int len = RFIFOW(fd,2) - 18; - int guild_id = RFIFOL(fd,4); - int account_id = RFIFOL(fd,8); - int char_id = RFIFOL(fd,12); - int type = RFIFOW(fd,16); - //void* data = RFIFOP(fd,18); - - struct guild* g; - int idx; - - g = guild->search(guild_id); - if( g == NULL ) - return 0; - - idx = guild->getindex(g,account_id,char_id); - if( idx == -1 ) - return 0; - - 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; - } - return 0; -} - -// ACK change of guild title -int 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) -{ - guild->skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10)); - return 0; -} - -// ACK change of guild relationship -int 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) -{ - 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) -{ - 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) -{ - 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)); -} - -// ACK change of guildmaster -int intif_parse_GuildMasterChanged(int fd) -{ - return guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10)); -} - -// Request pet creation -int 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) -{ - 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{ - memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet)); - pet_recv_petdata(RFIFOL(fd,4),&p,RFIFOB(fd,8)); - } - - return 0; -} - -// ACK pet save data -int intif_parse_SavePetOk(int fd) -{ - if(RFIFOB(fd,6) == 1) - ShowError("pet data save failure\n"); - - return 0; -} - -// ACK deleting pet -int 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) -{ - struct map_session_data *sd = NULL; - if((sd=iMap->id2sd(RFIFOL(fd,2)))==NULL || - sd->status.char_id != RFIFOL(fd,6)) - return 0; - - switch (RFIFOB(fd,10)) { - case 0: //Players [NOT SUPPORTED YET] - break; - case 1: //Pets - pet_change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11)); - break; - case 2: //Hom - homun->change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11)); - break; - } - return 0; -} - -//---------------------------------------------------------------- -// Homunculus recv packets [albator] - -int intif_parse_CreateHomunculus(int fd) -{ - int len; - 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; - } - 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; - - 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; - } - homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8)); - return 0; -} - -int 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) -{ - if(RFIFOB(fd,2) != 1) - ShowError("Homunculus data delete failure\n"); - - return 0; -} - -/************************************** - -QUESTLOG SYSTEM FUNCTIONS - -***************************************/ - -int intif_request_questlog(TBL_PC *sd) -{ - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3060; - WFIFOL(inter_fd,2) = sd->status.char_id; - WFIFOSET(inter_fd,6); - return 0; -} - -int intif_parse_questlog(int fd) -{ - int char_id = RFIFOL(fd, 4); - int i; - TBL_PC * sd = iMap->charid2sd(char_id); - - //User not online anymore - if(!sd) - return -1; - - sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest); - - memset(&sd->quest_log, 0, sizeof(sd->quest_log)); - - for( i = 0; i < sd->num_quests; i++ ) - { - memcpy(&sd->quest_log[i], RFIFOP(fd, i*sizeof(struct quest)+8), sizeof(struct quest)); - - sd->quest_index[i] = quest_search_db(sd->quest_log[i].quest_id); - - if( sd->quest_index[i] < 0 ) - { - ShowError("intif_parse_questlog: quest %d not found in DB.\n",sd->quest_log[i].quest_id); - sd->avail_quests--; - sd->num_quests--; - i--; - continue; - } - - if( sd->quest_log[i].state == Q_COMPLETE ) - sd->avail_quests--; - } - - quest_pc_login(sd); - - return 0; -} - -int intif_parse_questsave(int fd) -{ - int cid = RFIFOL(fd, 2); - TBL_PC *sd = iMap->id2sd(cid); - - if( !RFIFOB(fd, 6) ) - 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) -{ - int len; - - if(CheckForCharServer()) - return 0; - - len = sizeof(struct quest)*sd->num_quests + 8; - - WFIFOHEAD(inter_fd, len); - WFIFOW(inter_fd,0) = 0x3061; - WFIFOW(inter_fd,2) = len; - WFIFOL(inter_fd,4) = sd->status.char_id; - if( sd->num_quests ) - memcpy(WFIFOP(inter_fd,8), &sd->quest_log, sizeof(struct quest)*sd->num_quests); - WFIFOSET(inter_fd, len); - - return 0; -} - -/*========================================== - * MAIL SYSTEM - * By Zephyrus - *==========================================*/ - -/*------------------------------------------ - * Inbox Request - * flag: 0 Update Inbox | 1 OpenMail - *------------------------------------------*/ -int intif_Mail_requestinbox(int char_id, unsigned char flag) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,7); - WFIFOW(inter_fd,0) = 0x3048; - WFIFOL(inter_fd,2) = char_id; - WFIFOB(inter_fd,6) = flag; - WFIFOSET(inter_fd,7); - - return 0; -} - -int intif_parse_Mail_inboxreceived(int fd) -{ - struct map_session_data *sd; - unsigned char flag = RFIFOB(fd,8); - - sd = iMap->charid2sd(RFIFOL(fd,4)); - - if (sd == NULL) - { - ShowError("intif_parse_Mail_inboxreceived: char not found %d\n",RFIFOL(fd,4)); - return 1; - } - - 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; - } - - //FIXME: this operation is not safe [ultramage] - memcpy(&sd->mail.inbox, RFIFOP(fd,9), sizeof(struct mail_data)); - sd->mail.changed = false; // cache is now in sync - - if (flag) - clif->mail_refreshinbox(sd); - 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 - *------------------------------------------*/ -int intif_Mail_read(int mail_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3049; - WFIFOL(inter_fd,2) = mail_id; - WFIFOSET(inter_fd,6); - - return 0; -} -/*------------------------------------------ - * Get Attachment - *------------------------------------------*/ -int intif_Mail_getattach(int char_id, int mail_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x304a; - WFIFOL(inter_fd,2) = char_id; - WFIFOL(inter_fd,6) = mail_id; - WFIFOSET(inter_fd, 10); - - return 0; -} - -int intif_parse_Mail_getattach(int fd) -{ - struct map_session_data *sd; - struct item item; - int zeny = RFIFOL(fd,8); - - sd = iMap->charid2sd( RFIFOL(fd,4) ); - - if (sd == NULL) - { - ShowError("intif_parse_Mail_getattach: char not found %d\n",RFIFOL(fd,4)); - return 1; - } - - 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; - } - - memcpy(&item, RFIFOP(fd,12), sizeof(struct item)); - - mail->getattachment(sd, zeny, &item); - return 0; -} -/*------------------------------------------ - * Delete Message - *------------------------------------------*/ -int intif_Mail_delete(int char_id, int mail_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x304b; - WFIFOL(inter_fd,2) = char_id; - WFIFOL(inter_fd,6) = mail_id; - WFIFOSET(inter_fd,10); - - return 0; -} - -int intif_parse_Mail_delete(int fd) -{ - int char_id = RFIFOL(fd,2); - int mail_id = RFIFOL(fd,6); - bool failed = RFIFOB(fd,10); - - struct map_session_data *sd = iMap->charid2sd(char_id); - if (sd == NULL) - { - ShowError("intif_parse_Mail_delete: char not found %d\n", char_id); - return 1; - } - - if (!failed) - { - int i; - ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); - if( i < MAIL_MAX_INBOX ) - { - memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); - sd->mail.inbox.amount--; - } - - if( sd->mail.inbox.full ) - intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails - } - - clif->mail_delete(sd->fd, mail_id, failed); - return 0; -} -/*------------------------------------------ - * Return Message - *------------------------------------------*/ -int intif_Mail_return(int char_id, int mail_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x304c; - WFIFOL(inter_fd,2) = char_id; - WFIFOL(inter_fd,6) = mail_id; - WFIFOSET(inter_fd,10); - - return 0; -} - -int intif_parse_Mail_return(int fd) -{ - struct map_session_data *sd = iMap->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( !fail ) - { - int i; - ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); - if( i < MAIL_MAX_INBOX ) - { - memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); - sd->mail.inbox.amount--; - } - - if( sd->mail.inbox.full ) - intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails - } - - clif->mail_return(sd->fd, mail_id, fail); - return 0; -} -/*------------------------------------------ - * Send Mail - *------------------------------------------*/ -int intif_Mail_send(int account_id, struct mail_message *msg) -{ - int len = sizeof(struct mail_message) + 8; - - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,len); - WFIFOW(inter_fd,0) = 0x304d; - WFIFOW(inter_fd,2) = len; - WFIFOL(inter_fd,4) = account_id; - memcpy(WFIFOP(inter_fd,8), msg, sizeof(struct mail_message)); - WFIFOSET(inter_fd,len); - - return 1; -} - -static void intif_parse_Mail_send(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)); - return; - } - - memcpy(&msg, RFIFOP(fd,4), sizeof(struct mail_message)); - fail = (msg.id == 0); - - // notify sender - sd = iMap->charid2sd(msg.send_id); - if( sd != NULL ) - { - if( fail ) - mail->deliveryfail(sd, &msg); - else - { - clif->mail_send(sd->fd, false); - if( iMap->save_settings&16 ) - chrif->save(sd, 0); - } - } -} - -static void intif_parse_Mail_new(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); - int mail_id = RFIFOL(fd,6); - const char* sender_name = (char*)RFIFOP(fd,10); - const char* title = (char*)RFIFOP(fd,34); - - if( sd == NULL ) - return; - - sd->mail.changed = true; - clif->mail_new(sd->fd, mail_id, sender_name, title); -} - -/*========================================== - * AUCTION SYSTEM - * By Zephyrus - *==========================================*/ -int intif_Auction_requestlist(int char_id, short type, int price, const char* searchtext, short page) -{ - int len = NAME_LENGTH + 16; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,len); - WFIFOW(inter_fd,0) = 0x3050; - WFIFOW(inter_fd,2) = len; - WFIFOL(inter_fd,4) = char_id; - WFIFOW(inter_fd,8) = type; - WFIFOL(inter_fd,10) = price; - WFIFOW(inter_fd,14) = page; - memcpy(WFIFOP(inter_fd,16), searchtext, NAME_LENGTH); - WFIFOSET(inter_fd,len); - - return 0; -} - -static void intif_parse_Auction_results(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,4)); - short count = RFIFOW(fd,8); - short pages = RFIFOW(fd,10); - uint8* data = RFIFOP(fd,12); - - if( sd == NULL ) - return; - - clif->auction_results(sd, count, pages, data); -} - -int intif_Auction_register(struct auction_data *auction) -{ - int len = sizeof(struct auction_data) + 4; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,len); - WFIFOW(inter_fd,0) = 0x3051; - WFIFOW(inter_fd,2) = len; - memcpy(WFIFOP(inter_fd,4), auction, sizeof(struct auction_data)); - WFIFOSET(inter_fd,len); - - return 1; -} - -static void intif_parse_Auction_register(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)); - return; - } - - memcpy(&auction, RFIFOP(fd,4), sizeof(struct auction_data)); - if( (sd = iMap->charid2sd(auction.seller_id)) == NULL ) - return; - - if( auction.auction_id > 0 ) - { - clif->auction_message(sd->fd, 1); // Confirmation Packet ?? - if( iMap->save_settings&32 ) - chrif->save(sd,0); - } - else - { - int zeny = auction.hours*battle_config.auction_feeperhour; - - clif->auction_message(sd->fd, 4); - pc->additem(sd, &auction.item, auction.item.amount, LOG_TYPE_AUCTION); - - pc->getzeny(sd, zeny, LOG_TYPE_AUCTION, NULL); - } -} - -int intif_Auction_cancel(int char_id, unsigned int auction_id) -{ - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x3052; - WFIFOL(inter_fd,2) = char_id; - WFIFOL(inter_fd,6) = auction_id; - WFIFOSET(inter_fd,10); - - return 0; -} - -static void intif_parse_Auction_cancel(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); - int result = RFIFOB(fd,6); - - if( sd == NULL ) - 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; - } -} - -int intif_Auction_close(int char_id, unsigned int auction_id) -{ - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x3053; - WFIFOL(inter_fd,2) = char_id; - WFIFOL(inter_fd,6) = auction_id; - WFIFOSET(inter_fd,10); - - return 0; -} - -static void intif_parse_Auction_close(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); - unsigned char result = RFIFOB(fd,6); - - if( sd == NULL ) - return; - - clif->auction_close(sd->fd, result); - if( result == 0 ) - { - // FIXME: Leeching off a parse function - clif->pAuction_cancelreg(fd, sd); - intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1); - } -} - -int intif_Auction_bid(int char_id, const char* name, unsigned int auction_id, int bid) -{ - int len = 16 + NAME_LENGTH; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,len); - WFIFOW(inter_fd,0) = 0x3055; - WFIFOW(inter_fd,2) = len; - WFIFOL(inter_fd,4) = char_id; - WFIFOL(inter_fd,8) = auction_id; - WFIFOL(inter_fd,12) = bid; - memcpy(WFIFOP(inter_fd,16), name, NAME_LENGTH); - WFIFOSET(inter_fd,len); - - return 0; -} - -static void intif_parse_Auction_bid(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); - int bid = RFIFOL(fd,6); - unsigned char result = RFIFOB(fd,10); - - if( sd == NULL ) - return; - - clif->auction_message(sd->fd, result); - if( bid > 0 ) { - pc->getzeny(sd, bid, LOG_TYPE_AUCTION,NULL); - } - if( result == 1 ) { // To update the list, display your buy list - clif->pAuction_cancelreg(fd, sd); - intif_Auction_requestlist(sd->status.char_id, 7, 0, "", 1); - } -} - -// Used to send 'You have won the auction' and 'You failed to won the auction' messages -static void intif_parse_Auction_message(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); - unsigned char result = RFIFOB(fd,6); - - if( sd == NULL ) - return; - - clif->auction_message(sd->fd, result); -} - -/*========================================== - * Mercenary's System - *------------------------------------------*/ -int intif_mercenary_create(struct s_mercenary *merc) -{ - int size = sizeof(struct s_mercenary) + 4; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,size); - WFIFOW(inter_fd,0) = 0x3070; - WFIFOW(inter_fd,2) = size; - memcpy(WFIFOP(inter_fd,4), merc, sizeof(struct s_mercenary)); - WFIFOSET(inter_fd,size); - return 0; -} - -int intif_parse_mercenary_received(int fd) -{ - int len = RFIFOW(fd,2) - 5; - 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; - } - - merc_data_received((struct s_mercenary*)RFIFOP(fd,5), RFIFOB(fd,4)); - return 0; -} - -int intif_mercenary_request(int merc_id, int char_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x3071; - WFIFOL(inter_fd,2) = merc_id; - WFIFOL(inter_fd,6) = char_id; - WFIFOSET(inter_fd,10); - return 0; -} - -int intif_mercenary_delete(int merc_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x3072; - WFIFOL(inter_fd,2) = merc_id; - WFIFOSET(inter_fd,6); - return 0; -} - -int intif_parse_mercenary_deleted(int fd) -{ - if( RFIFOB(fd,2) != 1 ) - ShowError("Mercenary data delete failure\n"); - - return 0; -} - -int intif_mercenary_save(struct s_mercenary *merc) -{ - int size = sizeof(struct s_mercenary) + 4; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,size); - WFIFOW(inter_fd,0) = 0x3073; - WFIFOW(inter_fd,2) = size; - memcpy(WFIFOP(inter_fd,4), merc, sizeof(struct s_mercenary)); - WFIFOSET(inter_fd,size); - return 0; -} - -int intif_parse_mercenary_saved(int fd) -{ - if( RFIFOB(fd,2) != 1 ) - ShowError("Mercenary data save failure\n"); - - return 0; -} - -/*========================================== - * Elemental's System - *------------------------------------------*/ -int intif_elemental_create(struct s_elemental *ele) -{ - int size = sizeof(struct s_elemental) + 4; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,size); - WFIFOW(inter_fd,0) = 0x307c; - WFIFOW(inter_fd,2) = size; - memcpy(WFIFOP(inter_fd,4), ele, sizeof(struct s_elemental)); - WFIFOSET(inter_fd,size); - return 0; -} - -int intif_parse_elemental_received(int fd) -{ - int len = RFIFOW(fd,2) - 5; - 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; - } - - elemental->data_received((struct s_elemental*)RFIFOP(fd,5), RFIFOB(fd,4)); - return 0; -} - -int intif_elemental_request(int ele_id, int char_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,10); - WFIFOW(inter_fd,0) = 0x307d; - WFIFOL(inter_fd,2) = ele_id; - WFIFOL(inter_fd,6) = char_id; - WFIFOSET(inter_fd,10); - return 0; -} - -int intif_elemental_delete(int ele_id) -{ - if (CheckForCharServer()) - return 0; - - WFIFOHEAD(inter_fd,6); - WFIFOW(inter_fd,0) = 0x307e; - WFIFOL(inter_fd,2) = ele_id; - WFIFOSET(inter_fd,6); - return 0; -} - -int intif_parse_elemental_deleted(int fd) -{ - if( RFIFOB(fd,2) != 1 ) - ShowError("Elemental data delete failure\n"); - - return 0; -} - -int intif_elemental_save(struct s_elemental *ele) -{ - int size = sizeof(struct s_elemental) + 4; - - if( CheckForCharServer() ) - return 0; - - WFIFOHEAD(inter_fd,size); - WFIFOW(inter_fd,0) = 0x307f; - WFIFOW(inter_fd,2) = size; - memcpy(WFIFOP(inter_fd,4), ele, sizeof(struct s_elemental)); - WFIFOSET(inter_fd,size); - return 0; -} - -int intif_parse_elemental_saved(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 ) { - - - WFIFOHEAD(inter_fd,2 + 4 + 4 + 4 + NAME_LENGTH); - - WFIFOW(inter_fd,0) = 0x3007; - WFIFOL(inter_fd,2) = u_fd; - WFIFOL(inter_fd,6) = aid; - WFIFOL(inter_fd,10) = group_lv; - safestrncpy((char *)WFIFOP(inter_fd,14), query, NAME_LENGTH); - - WFIFOSET(inter_fd,2 + 4 + 4 + 4 + NAME_LENGTH); - - return; -} - -void intif_parse_MessageToFD(int fd) { - int u_fd = RFIFOL(fd,4); - - if( session[u_fd] && session[u_fd]->session_data ) { - int aid = RFIFOL(fd,8); - struct map_session_data * sd = session[u_fd]->session_data; - /* matching e.g. previous fd owner didn't dc during request or is still the same */ - if( sd->bl.id == aid ) { - char msg[512]; - safestrncpy(msg, (char*)RFIFOP(fd,12), RFIFOW(fd,2) - 12); - clif->message(u_fd,msg); - } - - } - - return; -} - -//----------------------------------------------------------------- -// Communication from the inter server -// Return a 0 (false) if there were any errors. -// 1, 2 if there are not enough to return the length of the packet if the packet processing -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){ - return 0; - } - // Check the length of the packet - packet_len = packet_len_table[cmd-0x3800]; - if(packet_len==-1){ - if(RFIFOREST(fd)<4) - return 2; - packet_len = RFIFOW(fd,2); - } - if((int)RFIFOREST(fd)broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, 0, 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; - default: - ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0)); - return 0; - } - // Skip packet - RFIFOSKIP(fd,packet_len); - return 1; -} +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "map.h" +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "pc.h" +#include "intif.h" +#include "log.h" +#include "storage.h" +#include "party.h" +#include "guild.h" +#include "pet.h" +#include "atcommand.h" +#include "mercenary.h" +#include "homunculus.h" +#include "elemental.h" +#include "mail.h" +#include "quest.h" + +#include +#include +#include +#include +#include +#include + + +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] +}; + +extern int char_fd; // inter server Fd used for char_fd +#define inter_fd char_fd // alias + +//----------------------------------------------------------------- +// Send to inter server + +int CheckForCharServer(void) +{ + return ((char_fd <= 0) || session[char_fd] == NULL || session[char_fd]->wdata == NULL); +} + +// pet +int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id, + short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 24 + NAME_LENGTH); + WFIFOW(inter_fd,0) = 0x3080; + WFIFOL(inter_fd,2) = account_id; + WFIFOL(inter_fd,6) = char_id; + WFIFOW(inter_fd,10) = pet_class; + WFIFOW(inter_fd,12) = pet_lv; + WFIFOW(inter_fd,14) = pet_egg_id; + WFIFOW(inter_fd,16) = pet_equip; + WFIFOW(inter_fd,18) = intimate; + WFIFOW(inter_fd,20) = hungry; + WFIFOB(inter_fd,22) = rename_flag; + WFIFOB(inter_fd,23) = incuvate; + memcpy(WFIFOP(inter_fd,24),pet_name,NAME_LENGTH); + WFIFOSET(inter_fd,24+NAME_LENGTH); + + return 0; +} + +int intif_request_petdata(int account_id,int char_id,int pet_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 14); + WFIFOW(inter_fd,0) = 0x3081; + WFIFOL(inter_fd,2) = account_id; + WFIFOL(inter_fd,6) = char_id; + WFIFOL(inter_fd,10) = pet_id; + WFIFOSET(inter_fd,14); + + return 0; +} + +int intif_save_petdata(int account_id,struct s_pet *p) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, sizeof(struct s_pet) + 8); + WFIFOW(inter_fd,0) = 0x3082; + WFIFOW(inter_fd,2) = sizeof(struct s_pet) + 8; + WFIFOL(inter_fd,4) = account_id; + memcpy(WFIFOP(inter_fd,8),p,sizeof(struct s_pet)); + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + + return 0; +} + +int intif_delete_petdata(int pet_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3083; + WFIFOL(inter_fd,2) = pet_id; + WFIFOSET(inter_fd,6); + + return 1; +} + +int intif_rename(struct map_session_data *sd, int type, char *name) +{ + if (intif->CheckForCharServer()) + return 1; + + WFIFOHEAD(inter_fd,NAME_LENGTH+12); + WFIFOW(inter_fd,0) = 0x3006; + WFIFOL(inter_fd,2) = sd->status.account_id; + WFIFOL(inter_fd,6) = sd->status.char_id; + WFIFOB(inter_fd,10) = type; //Type: 0 - PC, 1 - PET, 2 - HOM + memcpy(WFIFOP(inter_fd,11),name, NAME_LENGTH); + WFIFOSET(inter_fd,NAME_LENGTH+12); + return 0; +} + +// GM Send a message +int intif_broadcast(const char* mes, int len, int type) +{ + int lp = type ? 4 : 0; + + // Send to the local players + clif->broadcast(NULL, mes, len, type, ALL_CLIENT); + + if (intif->CheckForCharServer()) + return 0; + + if (chrif->other_mapserver_count < 1) + return 0; //No need to send. + + WFIFOHEAD(inter_fd, 16 + lp + len); + WFIFOW(inter_fd,0) = 0x3000; + WFIFOW(inter_fd,2) = 16 + lp + len; + WFIFOL(inter_fd,4) = 0xFF000000; // 0xFF000000 color signals standard broadcast + WFIFOW(inter_fd,8) = 0; // fontType not used with standard broadcast + WFIFOW(inter_fd,10) = 0; // fontSize not used with standard broadcast + WFIFOW(inter_fd,12) = 0; // fontAlign not used with standard broadcast + WFIFOW(inter_fd,14) = 0; // fontY not used with standard broadcast + if (type == 0x10) // bc_blue + WFIFOL(inter_fd,16) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow. + else if (type == 0x20) // bc_woe + WFIFOL(inter_fd,16) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'. + memcpy(WFIFOP(inter_fd,16 + lp), mes, len); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + return 0; +} + +int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) +{ + // Send to the local players + clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT); + + if (intif->CheckForCharServer()) + return 0; + + if (chrif->other_mapserver_count < 1) + return 0; //No need to send. + + WFIFOHEAD(inter_fd, 16 + len); + WFIFOW(inter_fd,0) = 0x3000; + WFIFOW(inter_fd,2) = 16 + len; + WFIFOL(inter_fd,4) = fontColor; + WFIFOW(inter_fd,8) = fontType; + WFIFOW(inter_fd,10) = fontSize; + WFIFOW(inter_fd,12) = fontAlign; + WFIFOW(inter_fd,14) = fontY; + memcpy(WFIFOP(inter_fd,16), mes, len); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + return 0; +} + +/// send a message using the main chat system +/// the source of message +/// the message that was sent +int intif_main_message(struct map_session_data* sd, const char* message) +{ + char output[256]; + + nullpo_ret(sd); + + // format the message for main broadcasting + snprintf( output, sizeof(output), msg_txt(386), sd->status.name, message ); + + // send the message using the inter-server broadcast service + intif_broadcast2( output, strlen(output) + 1, 0xFE000000, 0, 0, 0, 0 ); + + // log the chat message + logs->chat( LOG_CHAT_MAINCHAT, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message ); + + return 0; +} + +// The transmission of Wisp/Page to inter-server (player not found on this server) +int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) +{ + nullpo_ret(sd); + if (intif->CheckForCharServer()) + return 0; + + if (chrif->other_mapserver_count < 1) + { //Character not found. + clif->wis_end(sd->fd, 1); + return 0; + } + + WFIFOHEAD(inter_fd,mes_len + 52); + WFIFOW(inter_fd,0) = 0x3001; + WFIFOW(inter_fd,2) = mes_len + 52; + memcpy(WFIFOP(inter_fd,4), sd->status.name, NAME_LENGTH); + memcpy(WFIFOP(inter_fd,4+NAME_LENGTH), nick, NAME_LENGTH); + memcpy(WFIFOP(inter_fd,4+2*NAME_LENGTH), mes, mes_len); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + + if (battle_config.etc_log) + ShowInfo("intif_wis_message from %s to %s (message: '%s')\n", sd->status.name, nick, mes); + + return 0; +} + +// The reply of Wisp/page +int intif_wis_replay(int id, int flag) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,7); + WFIFOW(inter_fd,0) = 0x3002; + WFIFOL(inter_fd,2) = id; + WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WFIFOSET(inter_fd,7); + + if (battle_config.etc_log) + ShowInfo("intif_wis_replay: id: %d, flag:%d\n", id, flag); + + return 0; +} + +// The transmission of GM only Wisp/Page from server to inter-server +int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes) +{ + int mes_len; + if (intif->CheckForCharServer()) + return 0; + mes_len = strlen(mes) + 1; // + null + WFIFOHEAD(inter_fd, mes_len + 32); + WFIFOW(inter_fd,0) = 0x3003; + WFIFOW(inter_fd,2) = mes_len + 32; + memcpy(WFIFOP(inter_fd,4), wisp_name, NAME_LENGTH); + WFIFOL(inter_fd,4+NAME_LENGTH) = permission; + memcpy(WFIFOP(inter_fd,8+NAME_LENGTH), mes, mes_len); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + + if (battle_config.etc_log) + ShowNotice("intif_wis_message_to_gm: from: '%s', required permission: %d, message: '%s'.\n", wisp_name, permission, mes); + + return 0; +} + +int intif_regtostr(char* str, struct global_reg *reg, int qty) +{ + int len =0, i; + + for (i = 0; i < qty; i++) { + len+= sprintf(str+len, "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. + len+= sprintf(str+len, "%s", reg[i].value)+1; + } + return len; +} + +//Request for saving registry values. +int intif_saveregistry(struct map_session_data *sd, int type) +{ + struct global_reg *reg; + int count; + int i, p; + + if (intif->CheckForCharServer()) + return -1; + + switch (type) { + case 3: //Character reg + reg = sd->save_reg.global; + count = sd->save_reg.global_num; + sd->state.reg_dirty &= ~0x4; + break; + case 2: //Account reg + reg = sd->save_reg.account; + count = sd->save_reg.account_num; + sd->state.reg_dirty &= ~0x2; + break; + case 1: //Account2 reg + reg = sd->save_reg.account2; + count = sd->save_reg.account2_num; + sd->state.reg_dirty &= ~0x1; + break; + default: //Broken code? + ShowError("intif_saveregistry: Invalid type %d\n", type); + return -1; + } + WFIFOHEAD(inter_fd, 288 * MAX_REG_NUM+13); + WFIFOW(inter_fd,0)=0x3004; + WFIFOL(inter_fd,4)=sd->status.account_id; + WFIFOL(inter_fd,8)=sd->status.char_id; + WFIFOB(inter_fd,12)=type; + for( p = 13, i = 0; i < count; i++ ) { + if (reg[i].str[0] != '\0' && reg[i].value[0] != '\0') { + p+= sprintf((char*)WFIFOP(inter_fd,p), "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. + p+= sprintf((char*)WFIFOP(inter_fd,p), "%s", reg[i].value)+1; + } + } + WFIFOW(inter_fd,2)=p; + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + return 0; +} + +//Request the registries for this player. +int intif_request_registry(struct map_session_data *sd, int flag) +{ + nullpo_ret(sd); + + sd->save_reg.account2_num = -1; + sd->save_reg.account_num = -1; + sd->save_reg.global_num = -1; + + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3005; + WFIFOL(inter_fd,2) = sd->status.account_id; + WFIFOL(inter_fd,6) = sd->status.char_id; + WFIFOB(inter_fd,10) = (flag&1?1:0); //Request Acc Reg 2 + WFIFOB(inter_fd,11) = (flag&2?1:0); //Request Acc Reg + WFIFOB(inter_fd,12) = (flag&4?1:0); //Request Char Reg + WFIFOSET(inter_fd,13); + + return 0; +} + +int intif_request_guild_storage(int account_id,int guild_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x3018; + WFIFOL(inter_fd,2) = account_id; + WFIFOL(inter_fd,6) = guild_id; + WFIFOSET(inter_fd,10); + return 0; +} +int intif_send_guild_storage(int account_id,struct guild_storage *gstor) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,sizeof(struct guild_storage)+12); + WFIFOW(inter_fd,0) = 0x3019; + WFIFOW(inter_fd,2) = (unsigned short)sizeof(struct guild_storage)+12; + WFIFOL(inter_fd,4) = account_id; + WFIFOL(inter_fd,8) = gstor->guild_id; + memcpy( WFIFOP(inter_fd,12),gstor, sizeof(struct guild_storage) ); + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + return 0; +} + +// Party creation request +int intif_create_party(struct party_member *member,char *name,int item,int item2) +{ + if (intif->CheckForCharServer()) + return 0; + nullpo_ret(member); + + WFIFOHEAD(inter_fd,64); + WFIFOW(inter_fd,0) = 0x3020; + WFIFOW(inter_fd,2) = 30+sizeof(struct party_member); + memcpy(WFIFOP(inter_fd,4),name, NAME_LENGTH); + WFIFOB(inter_fd,28)= item; + WFIFOB(inter_fd,29)= item2; + memcpy(WFIFOP(inter_fd,30), member, sizeof(struct party_member)); + WFIFOSET(inter_fd,WFIFOW(inter_fd, 2)); + return 0; +} + +// Party information request +int intif_request_partyinfo(int party_id, int char_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x3021; + WFIFOL(inter_fd,2) = party_id; + WFIFOL(inter_fd,6) = char_id; + WFIFOSET(inter_fd,10); + return 0; +} + +// Request to add a member to party +int intif_party_addmember(int party_id,struct party_member *member) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,42); + WFIFOW(inter_fd,0)=0x3022; + WFIFOW(inter_fd,2)=8+sizeof(struct party_member); + WFIFOL(inter_fd,4)=party_id; + memcpy(WFIFOP(inter_fd,8),member,sizeof(struct party_member)); + WFIFOSET(inter_fd,WFIFOW(inter_fd, 2)); + return 1; +} + +// Request to change party configuration (exp,item share) +int intif_party_changeoption(int party_id,int account_id,int exp,int item) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,14); + WFIFOW(inter_fd,0)=0x3023; + WFIFOL(inter_fd,2)=party_id; + WFIFOL(inter_fd,6)=account_id; + WFIFOW(inter_fd,10)=exp; + WFIFOW(inter_fd,12)=item; + WFIFOSET(inter_fd,14); + return 0; +} + +// Request to leave party +int intif_party_leave(int party_id,int account_id, int char_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,14); + WFIFOW(inter_fd,0)=0x3024; + WFIFOL(inter_fd,2)=party_id; + WFIFOL(inter_fd,6)=account_id; + WFIFOL(inter_fd,10)=char_id; + WFIFOSET(inter_fd,14); + return 0; +} + +// Request keeping party for new map ?? +int intif_party_changemap(struct map_session_data *sd,int online) +{ + int16 m, mapindex; + + if (intif->CheckForCharServer()) + return 0; + if(!sd) + return 0; + + if( (m=iMap->mapindex2mapid(sd->mapindex)) >= 0 && map[m].instance_id >= 0 ) + mapindex = map[map[m].instance_src_map].index; + else + mapindex = sd->mapindex; + + WFIFOHEAD(inter_fd,19); + WFIFOW(inter_fd,0)=0x3025; + WFIFOL(inter_fd,2)=sd->status.party_id; + WFIFOL(inter_fd,6)=sd->status.account_id; + WFIFOL(inter_fd,10)=sd->status.char_id; + WFIFOW(inter_fd,14)=mapindex; + WFIFOB(inter_fd,16)=online; + WFIFOW(inter_fd,17)=sd->status.base_level; + WFIFOSET(inter_fd,19); + return 1; +} + +// Request breaking party +int intif_break_party(int party_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0)=0x3026; + WFIFOL(inter_fd,2)=party_id; + WFIFOSET(inter_fd,6); + return 0; +} + +// Sending party chat +int intif_party_message(int party_id,int account_id,const char *mes,int len) +{ + if (intif->CheckForCharServer()) + return 0; + + if (chrif->other_mapserver_count < 1) + return 0; //No need to send. + + WFIFOHEAD(inter_fd,len + 12); + WFIFOW(inter_fd,0)=0x3027; + WFIFOW(inter_fd,2)=len+12; + WFIFOL(inter_fd,4)=party_id; + WFIFOL(inter_fd,8)=account_id; + memcpy(WFIFOP(inter_fd,12),mes,len); + WFIFOSET(inter_fd,len+12); + return 0; +} + +// Request a new leader for party +int intif_party_leaderchange(int party_id,int account_id,int char_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,14); + WFIFOW(inter_fd,0)=0x3029; + WFIFOL(inter_fd,2)=party_id; + WFIFOL(inter_fd,6)=account_id; + WFIFOL(inter_fd,10)=char_id; + WFIFOSET(inter_fd,14); + return 0; +} + +// Request a Guild creation +int intif_guild_create(const char *name,const struct guild_member *master) +{ + if (intif->CheckForCharServer()) + return 0; + nullpo_ret(master); + + WFIFOHEAD(inter_fd,sizeof(struct guild_member)+(8+NAME_LENGTH)); + WFIFOW(inter_fd,0)=0x3030; + WFIFOW(inter_fd,2)=sizeof(struct guild_member)+(8+NAME_LENGTH); + WFIFOL(inter_fd,4)=master->account_id; + memcpy(WFIFOP(inter_fd,8),name,NAME_LENGTH); + memcpy(WFIFOP(inter_fd,8+NAME_LENGTH),master,sizeof(struct guild_member)); + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + return 0; +} + +// Request Guild information +int intif_guild_request_info(int guild_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3031; + WFIFOL(inter_fd,2) = guild_id; + WFIFOSET(inter_fd,6); + return 0; +} + +// Request to add member to the guild +int intif_guild_addmember(int guild_id,struct guild_member *m) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,sizeof(struct guild_member)+8); + WFIFOW(inter_fd,0) = 0x3032; + WFIFOW(inter_fd,2) = sizeof(struct guild_member)+8; + WFIFOL(inter_fd,4) = guild_id; + memcpy(WFIFOP(inter_fd,8),m,sizeof(struct guild_member)); + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + return 0; +} + +// Request a new leader for guild +int intif_guild_change_gm(int guild_id, const char* name, int len) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, len + 8); + WFIFOW(inter_fd, 0)=0x3033; + WFIFOW(inter_fd, 2)=len+8; + WFIFOL(inter_fd, 4)=guild_id; + memcpy(WFIFOP(inter_fd,8),name,len); + WFIFOSET(inter_fd,len+8); + return 0; +} + +// Request to leave guild +int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 55); + WFIFOW(inter_fd, 0) = 0x3034; + WFIFOL(inter_fd, 2) = guild_id; + WFIFOL(inter_fd, 6) = account_id; + WFIFOL(inter_fd,10) = char_id; + WFIFOB(inter_fd,14) = flag; + safestrncpy((char*)WFIFOP(inter_fd,15),mes,40); + WFIFOSET(inter_fd,55); + return 0; +} + +//Update request / Lv online status of the guild members +int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 19); + WFIFOW(inter_fd, 0) = 0x3035; + WFIFOL(inter_fd, 2) = guild_id; + WFIFOL(inter_fd, 6) = account_id; + WFIFOL(inter_fd,10) = char_id; + WFIFOB(inter_fd,14) = online; + WFIFOW(inter_fd,15) = lv; + WFIFOW(inter_fd,17) = class_; + WFIFOSET(inter_fd,19); + return 0; +} + +//Guild disbanded notification +int intif_guild_break(int guild_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 6); + WFIFOW(inter_fd, 0) = 0x3036; + WFIFOL(inter_fd, 2) = guild_id; + WFIFOSET(inter_fd,6); + return 0; +} + +// Send a guild message +int intif_guild_message(int guild_id,int account_id,const char *mes,int len) +{ + if (intif->CheckForCharServer()) + return 0; + + if (chrif->other_mapserver_count < 1) + return 0; //No need to send. + + WFIFOHEAD(inter_fd, len + 12); + WFIFOW(inter_fd,0)=0x3037; + WFIFOW(inter_fd,2)=len+12; + WFIFOL(inter_fd,4)=guild_id; + WFIFOL(inter_fd,8)=account_id; + memcpy(WFIFOP(inter_fd,12),mes,len); + WFIFOSET(inter_fd,len+12); + + return 0; +} + +// Request a change of Guild basic information +int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, len + 10); + WFIFOW(inter_fd,0)=0x3039; + WFIFOW(inter_fd,2)=len+10; + WFIFOL(inter_fd,4)=guild_id; + WFIFOW(inter_fd,8)=type; + memcpy(WFIFOP(inter_fd,10),data,len); + WFIFOSET(inter_fd,len+10); + return 0; +} + +// Request a change of Guild member information +int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id, + int type,const void *data,int len) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, len + 18); + WFIFOW(inter_fd, 0)=0x303a; + WFIFOW(inter_fd, 2)=len+18; + WFIFOL(inter_fd, 4)=guild_id; + WFIFOL(inter_fd, 8)=account_id; + WFIFOL(inter_fd,12)=char_id; + WFIFOW(inter_fd,16)=type; + memcpy(WFIFOP(inter_fd,18),data,len); + WFIFOSET(inter_fd,len+18); + return 0; +} + +// Request a change of Guild title +int intif_guild_position(int guild_id,int idx,struct guild_position *p) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, sizeof(struct guild_position)+12); + WFIFOW(inter_fd,0)=0x303b; + WFIFOW(inter_fd,2)=sizeof(struct guild_position)+12; + WFIFOL(inter_fd,4)=guild_id; + WFIFOL(inter_fd,8)=idx; + memcpy(WFIFOP(inter_fd,12),p,sizeof(struct guild_position)); + WFIFOSET(inter_fd,WFIFOW(inter_fd,2)); + return 0; +} + +// Request an update of Guildskill skill_id +int intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) +{ + if( intif->CheckForCharServer() ) + return 0; + WFIFOHEAD(inter_fd, 18); + WFIFOW(inter_fd, 0) = 0x303c; + WFIFOL(inter_fd, 2) = guild_id; + WFIFOL(inter_fd, 6) = skill_id; + WFIFOL(inter_fd, 10) = account_id; + WFIFOL(inter_fd, 14) = max; + WFIFOSET(inter_fd, 18); + return 0; +} + +// Request a new guild relationship +int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,19); + WFIFOW(inter_fd, 0)=0x303d; + WFIFOL(inter_fd, 2)=guild_id1; + WFIFOL(inter_fd, 6)=guild_id2; + WFIFOL(inter_fd,10)=account_id1; + WFIFOL(inter_fd,14)=account_id2; + WFIFOB(inter_fd,18)=flag; + WFIFOSET(inter_fd,19); + return 0; +} + +// Request to change guild notice +int intif_guild_notice(int guild_id,const char *mes1,const char *mes2) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,186); + WFIFOW(inter_fd,0)=0x303e; + WFIFOL(inter_fd,2)=guild_id; + memcpy(WFIFOP(inter_fd,6),mes1,MAX_GUILDMES1); + memcpy(WFIFOP(inter_fd,66),mes2,MAX_GUILDMES2); + WFIFOSET(inter_fd,186); + return 0; +} + +// Request to change guild emblem +int intif_guild_emblem(int guild_id,int len,const char *data) +{ + if (intif->CheckForCharServer()) + return 0; + if(guild_id<=0 || len<0 || len>2000) + return 0; + WFIFOHEAD(inter_fd,len + 12); + WFIFOW(inter_fd,0)=0x303f; + WFIFOW(inter_fd,2)=len+12; + WFIFOL(inter_fd,4)=guild_id; + WFIFOL(inter_fd,8)=0; + memcpy(WFIFOP(inter_fd,12),data,len); + WFIFOSET(inter_fd,len+12); + return 0; +} + +/** + * Requests guild castles data from char-server. + * @param num Number of castles, size of castle_ids array. + * @param castle_ids Pointer to array of castle IDs. + */ +int intif_guild_castle_dataload(int num, int *castle_ids) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 4 + num * sizeof(int)); + WFIFOW(inter_fd, 0) = 0x3040; + WFIFOW(inter_fd, 2) = 4 + num * sizeof(int); + memcpy(WFIFOP(inter_fd, 4), castle_ids, num * sizeof(int)); + WFIFOSET(inter_fd, WFIFOW(inter_fd, 2)); + return 1; +} + + +// Request change castle guild owner and save data +int intif_guild_castle_datasave(int castle_id,int index, int value) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd,9); + WFIFOW(inter_fd,0)=0x3041; + WFIFOW(inter_fd,2)=castle_id; + WFIFOB(inter_fd,4)=index; + WFIFOL(inter_fd,5)=value; + WFIFOSET(inter_fd,9); + return 1; +} + +//----------------------------------------------------------------- +// Homunculus Packets send to Inter server [albator] +//----------------------------------------------------------------- + +int intif_homunculus_create(int account_id, struct s_homunculus *sh) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, sizeof(struct s_homunculus)+8); + WFIFOW(inter_fd,0) = 0x3090; + WFIFOW(inter_fd,2) = sizeof(struct s_homunculus)+8; + WFIFOL(inter_fd,4) = account_id; + memcpy(WFIFOP(inter_fd,8),sh,sizeof(struct s_homunculus)); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + return 0; +} + +bool intif_homunculus_requestload(int account_id, int homun_id) { + if (intif->CheckForCharServer()) + return false; + WFIFOHEAD(inter_fd, 10); + WFIFOW(inter_fd,0) = 0x3091; + WFIFOL(inter_fd,2) = account_id; + WFIFOL(inter_fd,6) = homun_id; + WFIFOSET(inter_fd, 10); + return true; +} + +int intif_homunculus_requestsave(int account_id, struct s_homunculus* sh) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, sizeof(struct s_homunculus)+8); + WFIFOW(inter_fd,0) = 0x3092; + WFIFOW(inter_fd,2) = sizeof(struct s_homunculus)+8; + WFIFOL(inter_fd,4) = account_id; + memcpy(WFIFOP(inter_fd,8),sh,sizeof(struct s_homunculus)); + WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); + return 0; + +} + +int intif_homunculus_requestdelete(int homun_id) +{ + if (intif->CheckForCharServer()) + return 0; + WFIFOHEAD(inter_fd, 6); + WFIFOW(inter_fd, 0) = 0x3093; + WFIFOL(inter_fd,2) = homun_id; + WFIFOSET(inter_fd,6); + return 0; + +} + + +//----------------------------------------------------------------- +// Packets receive from inter server + +// Wisp/Page reception // rewritten by [Yor] +int intif_parse_WisMessage(int fd) +{ + struct map_session_data* sd; + char *wisp_source; + char name[NAME_LENGTH]; + int id, i; + + id=RFIFOL(fd,4); + + safestrncpy(name, (char*)RFIFOP(fd,32), NAME_LENGTH); + sd = iMap->nick2sd(name); + if(sd == NULL || strcmp(sd->status.name, name) != 0) + { //Not found + intif_wis_replay(id,1); + return 0; + } + if(sd->state.ignoreAll) { + intif_wis_replay(id, 2); + return 0; + } + wisp_source = (char *) RFIFOP(fd,8); // speed up [Yor] + for(i=0; i < MAX_IGNORE_LIST && + sd->ignore[i].name[0] != '\0' && + strcmp(sd->ignore[i].name, wisp_source) != 0 + ; i++); + + if (i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0') + { //Ignored + intif_wis_replay(id, 2); + return 0; + } + //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) +{ + struct map_session_data* sd; + + if (battle_config.etc_log) + ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + sd = (struct map_session_data *)iMap->nick2sd((char *) RFIFOP(fd,2)); + if (sd != NULL) + clif->wis_end(sd->fd, RFIFOB(fd,26)); + + return 0; +} + +static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) +{ + int permission = va_arg(va, int); + char *wisp_name; + char *message; + int len; + + if (!pc_has_permission(sd, permission)) + return 0; + wisp_name = va_arg(va, char*); + message = va_arg(va, char*); + len = va_arg(va, int); + clif->wis_message(sd->fd, wisp_name, message, len); + return 1; +} + +// Received wisp message from map-server via char-server for ALL gm +// 0x3003/0x3803 .w .24B .l .?B +int mapif_parse_WisToGM(int fd) +{ + int permission, mes_len; + char Wisp_name[NAME_LENGTH]; + char mbuf[255]; + char *message; + + mes_len = RFIFOW(fd,2) - 32; + message = (char *) (mes_len >= 255 ? (char *) aMalloc(mes_len) : mbuf); + + permission = RFIFOL(fd,28); + safestrncpy(Wisp_name, (char*)RFIFOP(fd,4), NAME_LENGTH); + safestrncpy(message, (char*)RFIFOP(fd,32), mes_len); + // information is sent to all online GM + iMap->map_foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len); + + if (message != mbuf) + aFree(message); + return 0; +} + +// Request player registre +int intif_parse_Registers(int fd) +{ + int j,p,len,max, flag; + struct map_session_data *sd; + struct global_reg *reg; + int *qty; + int account_id = RFIFOL(fd,4), char_id = RFIFOL(fd,8); + struct auth_node *node = chrif->auth_check(account_id, char_id, ST_LOGIN); + if (node) + sd = node->sd; + else { //Normally registries should arrive for in log-in chars. + sd = iMap->id2sd(account_id); + if (sd && RFIFOB(fd,12) == 3 && sd->status.char_id != char_id) + sd = NULL; //Character registry from another character. + } + if (!sd) return 1; + + flag = (sd->save_reg.global_num == -1 || sd->save_reg.account_num == -1 || sd->save_reg.account2_num == -1); + + switch (RFIFOB(fd,12)) { + case 3: //Character Registry + reg = sd->save_reg.global; + qty = &sd->save_reg.global_num; + max = GLOBAL_REG_NUM; + break; + case 2: //Account Registry + reg = sd->save_reg.account; + qty = &sd->save_reg.account_num; + max = ACCOUNT_REG_NUM; + break; + case 1: //Account2 Registry + reg = sd->save_reg.account2; + qty = &sd->save_reg.account2_num; + max = ACCOUNT_REG2_NUM; + break; + default: + ShowError("intif_parse_Registers: Unrecognized type %d\n",RFIFOB(fd,12)); + return 0; + } + for(j=0,p=13;jsave_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) +{ + struct guild_storage *gstor; + struct map_session_data *sd; + int guild_id; + + guild_id = RFIFOL(fd,8); + if(guild_id <= 0) + return 1; + sd=iMap->id2sd( RFIFOL(fd,4) ); + if(sd==NULL){ + ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); + return 1; + } + gstor=gstorage->id2storage(guild_id); + if(!gstor) { + ShowWarning("intif_parse_LoadGuildStorage: error guild_id %d not exist\n",guild_id); + return 1; + } + 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; + } + 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; + } + 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; + } + + memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage)); + gstorage->open(sd); + return 0; +} + +// ACK guild_storage saved +int intif_parse_SaveGuildStorage(int fd) +{ + gstorage->saved(/*RFIFOL(fd,2), */RFIFOL(fd,6)); + return 0; +} + +// ACK party creation +int 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) +{ + 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; + } + + 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) +{ + 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) +{ + 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) +{ + 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) +{ + party->broken(RFIFOL(fd,2)); + return 0; +} + +// ACK party on new map +int 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) +{ + 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) +{ + guild->created(RFIFOL(fd,2),RFIFOL(fd,6)); + return 0; +} + +// ACK guild infos +int 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; + } + 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) +{ + 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) +{ + 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) +{ + 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) +{ + guild->broken(RFIFOL(fd,2),RFIFOB(fd,6)); + return 0; +} + +// basic guild info change notice +// 0x3839 .w .l .w .?b +int intif_parse_GuildBasicInfoChanged(int fd) +{ + //int len = RFIFOW(fd,2) - 10; + int guild_id = RFIFOL(fd,4); + int type = RFIFOW(fd,8); + //void* data = RFIFOP(fd,10); + + struct guild* g = guild->search(guild_id); + if( g == NULL ) + return 0; + + 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; + } + + return 0; +} + +// guild member info change notice +// 0x383a .w .l .l .l .w .?b +int intif_parse_GuildMemberInfoChanged(int fd) +{ + //int len = RFIFOW(fd,2) - 18; + int guild_id = RFIFOL(fd,4); + int account_id = RFIFOL(fd,8); + int char_id = RFIFOL(fd,12); + int type = RFIFOW(fd,16); + //void* data = RFIFOP(fd,18); + + struct guild* g; + int idx; + + g = guild->search(guild_id); + if( g == NULL ) + return 0; + + idx = guild->getindex(g,account_id,char_id); + if( idx == -1 ) + return 0; + + 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; + } + return 0; +} + +// ACK change of guild title +int 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) +{ + guild->skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10)); + return 0; +} + +// ACK change of guild relationship +int 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) +{ + 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) +{ + 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) +{ + 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)); +} + +// ACK change of guildmaster +int intif_parse_GuildMasterChanged(int fd) +{ + return guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10)); +} + +// Request pet creation +int 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) +{ + 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{ + memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet)); + pet_recv_petdata(RFIFOL(fd,4),&p,RFIFOB(fd,8)); + } + + return 0; +} + +// ACK pet save data +int intif_parse_SavePetOk(int fd) +{ + if(RFIFOB(fd,6) == 1) + ShowError("pet data save failure\n"); + + return 0; +} + +// ACK deleting pet +int 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) +{ + struct map_session_data *sd = NULL; + if((sd=iMap->id2sd(RFIFOL(fd,2)))==NULL || + sd->status.char_id != RFIFOL(fd,6)) + return 0; + + switch (RFIFOB(fd,10)) { + case 0: //Players [NOT SUPPORTED YET] + break; + case 1: //Pets + pet_change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11)); + break; + case 2: //Hom + homun->change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11)); + break; + } + return 0; +} + +//---------------------------------------------------------------- +// Homunculus recv packets [albator] + +int intif_parse_CreateHomunculus(int fd) +{ + int len; + 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; + } + 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; + + 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; + } + homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8)); + return 0; +} + +int 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) +{ + if(RFIFOB(fd,2) != 1) + ShowError("Homunculus data delete failure\n"); + + return 0; +} + +/************************************** + +QUESTLOG SYSTEM FUNCTIONS + +***************************************/ + +int intif_request_questlog(TBL_PC *sd) +{ + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3060; + WFIFOL(inter_fd,2) = sd->status.char_id; + WFIFOSET(inter_fd,6); + return 0; +} + +int intif_parse_questlog(int fd) +{ + int char_id = RFIFOL(fd, 4); + int i; + TBL_PC * sd = iMap->charid2sd(char_id); + + //User not online anymore + if(!sd) + return -1; + + sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest); + + memset(&sd->quest_log, 0, sizeof(sd->quest_log)); + + for( i = 0; i < sd->num_quests; i++ ) + { + memcpy(&sd->quest_log[i], RFIFOP(fd, i*sizeof(struct quest)+8), sizeof(struct quest)); + + sd->quest_index[i] = quest_search_db(sd->quest_log[i].quest_id); + + if( sd->quest_index[i] < 0 ) + { + ShowError("intif_parse_questlog: quest %d not found in DB.\n",sd->quest_log[i].quest_id); + sd->avail_quests--; + sd->num_quests--; + i--; + continue; + } + + if( sd->quest_log[i].state == Q_COMPLETE ) + sd->avail_quests--; + } + + quest_pc_login(sd); + + return 0; +} + +int intif_parse_questsave(int fd) +{ + int cid = RFIFOL(fd, 2); + TBL_PC *sd = iMap->id2sd(cid); + + if( !RFIFOB(fd, 6) ) + 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) +{ + int len; + + if(intif->CheckForCharServer()) + return 0; + + len = sizeof(struct quest)*sd->num_quests + 8; + + WFIFOHEAD(inter_fd, len); + WFIFOW(inter_fd,0) = 0x3061; + WFIFOW(inter_fd,2) = len; + WFIFOL(inter_fd,4) = sd->status.char_id; + if( sd->num_quests ) + memcpy(WFIFOP(inter_fd,8), &sd->quest_log, sizeof(struct quest)*sd->num_quests); + WFIFOSET(inter_fd, len); + + return 0; +} + +/*========================================== + * MAIL SYSTEM + * By Zephyrus + *==========================================*/ + +/*------------------------------------------ + * Inbox Request + * flag: 0 Update Inbox | 1 OpenMail + *------------------------------------------*/ +int intif_Mail_requestinbox(int char_id, unsigned char flag) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,7); + WFIFOW(inter_fd,0) = 0x3048; + WFIFOL(inter_fd,2) = char_id; + WFIFOB(inter_fd,6) = flag; + WFIFOSET(inter_fd,7); + + return 0; +} + +int intif_parse_Mail_inboxreceived(int fd) +{ + struct map_session_data *sd; + unsigned char flag = RFIFOB(fd,8); + + sd = iMap->charid2sd(RFIFOL(fd,4)); + + if (sd == NULL) + { + ShowError("intif_parse_Mail_inboxreceived: char not found %d\n",RFIFOL(fd,4)); + return 1; + } + + 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; + } + + //FIXME: this operation is not safe [ultramage] + memcpy(&sd->mail.inbox, RFIFOP(fd,9), sizeof(struct mail_data)); + sd->mail.changed = false; // cache is now in sync + + if (flag) + clif->mail_refreshinbox(sd); + 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 + *------------------------------------------*/ +int intif_Mail_read(int mail_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3049; + WFIFOL(inter_fd,2) = mail_id; + WFIFOSET(inter_fd,6); + + return 0; +} +/*------------------------------------------ + * Get Attachment + *------------------------------------------*/ +int intif_Mail_getattach(int char_id, int mail_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x304a; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = mail_id; + WFIFOSET(inter_fd, 10); + + return 0; +} + +int intif_parse_Mail_getattach(int fd) +{ + struct map_session_data *sd; + struct item item; + int zeny = RFIFOL(fd,8); + + sd = iMap->charid2sd( RFIFOL(fd,4) ); + + if (sd == NULL) + { + ShowError("intif_parse_Mail_getattach: char not found %d\n",RFIFOL(fd,4)); + return 1; + } + + 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; + } + + memcpy(&item, RFIFOP(fd,12), sizeof(struct item)); + + mail->getattachment(sd, zeny, &item); + return 0; +} +/*------------------------------------------ + * Delete Message + *------------------------------------------*/ +int intif_Mail_delete(int char_id, int mail_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x304b; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = mail_id; + WFIFOSET(inter_fd,10); + + return 0; +} + +int intif_parse_Mail_delete(int fd) +{ + int char_id = RFIFOL(fd,2); + int mail_id = RFIFOL(fd,6); + bool failed = RFIFOB(fd,10); + + struct map_session_data *sd = iMap->charid2sd(char_id); + if (sd == NULL) + { + ShowError("intif_parse_Mail_delete: char not found %d\n", char_id); + return 1; + } + + if (!failed) + { + int i; + ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); + if( i < MAIL_MAX_INBOX ) + { + memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); + sd->mail.inbox.amount--; + } + + if( sd->mail.inbox.full ) + intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails + } + + clif->mail_delete(sd->fd, mail_id, failed); + return 0; +} +/*------------------------------------------ + * Return Message + *------------------------------------------*/ +int intif_Mail_return(int char_id, int mail_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x304c; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = mail_id; + WFIFOSET(inter_fd,10); + + return 0; +} + +int intif_parse_Mail_return(int fd) +{ + struct map_session_data *sd = iMap->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( !fail ) + { + int i; + ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); + if( i < MAIL_MAX_INBOX ) + { + memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); + sd->mail.inbox.amount--; + } + + if( sd->mail.inbox.full ) + intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails + } + + clif->mail_return(sd->fd, mail_id, fail); + return 0; +} +/*------------------------------------------ + * Send Mail + *------------------------------------------*/ +int intif_Mail_send(int account_id, struct mail_message *msg) +{ + int len = sizeof(struct mail_message) + 8; + + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,len); + WFIFOW(inter_fd,0) = 0x304d; + WFIFOW(inter_fd,2) = len; + WFIFOL(inter_fd,4) = account_id; + memcpy(WFIFOP(inter_fd,8), msg, sizeof(struct mail_message)); + WFIFOSET(inter_fd,len); + + return 1; +} + +static void intif_parse_Mail_send(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)); + return; + } + + memcpy(&msg, RFIFOP(fd,4), sizeof(struct mail_message)); + fail = (msg.id == 0); + + // notify sender + sd = iMap->charid2sd(msg.send_id); + if( sd != NULL ) + { + if( fail ) + mail->deliveryfail(sd, &msg); + else + { + clif->mail_send(sd->fd, false); + if( iMap->save_settings&16 ) + chrif->save(sd, 0); + } + } +} + +static void intif_parse_Mail_new(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); + int mail_id = RFIFOL(fd,6); + const char* sender_name = (char*)RFIFOP(fd,10); + const char* title = (char*)RFIFOP(fd,34); + + if( sd == NULL ) + return; + + sd->mail.changed = true; + clif->mail_new(sd->fd, mail_id, sender_name, title); +} + +/*========================================== + * AUCTION SYSTEM + * By Zephyrus + *==========================================*/ +int intif_Auction_requestlist(int char_id, short type, int price, const char* searchtext, short page) +{ + int len = NAME_LENGTH + 16; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,len); + WFIFOW(inter_fd,0) = 0x3050; + WFIFOW(inter_fd,2) = len; + WFIFOL(inter_fd,4) = char_id; + WFIFOW(inter_fd,8) = type; + WFIFOL(inter_fd,10) = price; + WFIFOW(inter_fd,14) = page; + memcpy(WFIFOP(inter_fd,16), searchtext, NAME_LENGTH); + WFIFOSET(inter_fd,len); + + return 0; +} + +static void intif_parse_Auction_results(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,4)); + short count = RFIFOW(fd,8); + short pages = RFIFOW(fd,10); + uint8* data = RFIFOP(fd,12); + + if( sd == NULL ) + return; + + clif->auction_results(sd, count, pages, data); +} + +int intif_Auction_register(struct auction_data *auction) +{ + int len = sizeof(struct auction_data) + 4; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,len); + WFIFOW(inter_fd,0) = 0x3051; + WFIFOW(inter_fd,2) = len; + memcpy(WFIFOP(inter_fd,4), auction, sizeof(struct auction_data)); + WFIFOSET(inter_fd,len); + + return 1; +} + +static void intif_parse_Auction_register(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)); + return; + } + + memcpy(&auction, RFIFOP(fd,4), sizeof(struct auction_data)); + if( (sd = iMap->charid2sd(auction.seller_id)) == NULL ) + return; + + if( auction.auction_id > 0 ) + { + clif->auction_message(sd->fd, 1); // Confirmation Packet ?? + if( iMap->save_settings&32 ) + chrif->save(sd,0); + } + else + { + int zeny = auction.hours*battle_config.auction_feeperhour; + + clif->auction_message(sd->fd, 4); + pc->additem(sd, &auction.item, auction.item.amount, LOG_TYPE_AUCTION); + + pc->getzeny(sd, zeny, LOG_TYPE_AUCTION, NULL); + } +} + +int intif_Auction_cancel(int char_id, unsigned int auction_id) +{ + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x3052; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = auction_id; + WFIFOSET(inter_fd,10); + + return 0; +} + +static void intif_parse_Auction_cancel(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); + int result = RFIFOB(fd,6); + + if( sd == NULL ) + 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; + } +} + +int intif_Auction_close(int char_id, unsigned int auction_id) +{ + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x3053; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = auction_id; + WFIFOSET(inter_fd,10); + + return 0; +} + +static void intif_parse_Auction_close(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); + unsigned char result = RFIFOB(fd,6); + + if( sd == NULL ) + return; + + clif->auction_close(sd->fd, result); + if( result == 0 ) + { + // FIXME: Leeching off a parse function + clif->pAuction_cancelreg(fd, sd); + intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1); + } +} + +int intif_Auction_bid(int char_id, const char* name, unsigned int auction_id, int bid) +{ + int len = 16 + NAME_LENGTH; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,len); + WFIFOW(inter_fd,0) = 0x3055; + WFIFOW(inter_fd,2) = len; + WFIFOL(inter_fd,4) = char_id; + WFIFOL(inter_fd,8) = auction_id; + WFIFOL(inter_fd,12) = bid; + memcpy(WFIFOP(inter_fd,16), name, NAME_LENGTH); + WFIFOSET(inter_fd,len); + + return 0; +} + +static void intif_parse_Auction_bid(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); + int bid = RFIFOL(fd,6); + unsigned char result = RFIFOB(fd,10); + + if( sd == NULL ) + return; + + clif->auction_message(sd->fd, result); + if( bid > 0 ) { + pc->getzeny(sd, bid, LOG_TYPE_AUCTION,NULL); + } + if( result == 1 ) { // To update the list, display your buy list + clif->pAuction_cancelreg(fd, sd); + intif_Auction_requestlist(sd->status.char_id, 7, 0, "", 1); + } +} + +// Used to send 'You have won the auction' and 'You failed to won the auction' messages +static void intif_parse_Auction_message(int fd) +{ + struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); + unsigned char result = RFIFOB(fd,6); + + if( sd == NULL ) + return; + + clif->auction_message(sd->fd, result); +} + +/*========================================== + * Mercenary's System + *------------------------------------------*/ +int intif_mercenary_create(struct s_mercenary *merc) +{ + int size = sizeof(struct s_mercenary) + 4; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,size); + WFIFOW(inter_fd,0) = 0x3070; + WFIFOW(inter_fd,2) = size; + memcpy(WFIFOP(inter_fd,4), merc, sizeof(struct s_mercenary)); + WFIFOSET(inter_fd,size); + return 0; +} + +int intif_parse_mercenary_received(int fd) +{ + int len = RFIFOW(fd,2) - 5; + 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; + } + + merc_data_received((struct s_mercenary*)RFIFOP(fd,5), RFIFOB(fd,4)); + return 0; +} + +int intif_mercenary_request(int merc_id, int char_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x3071; + WFIFOL(inter_fd,2) = merc_id; + WFIFOL(inter_fd,6) = char_id; + WFIFOSET(inter_fd,10); + return 0; +} + +int intif_mercenary_delete(int merc_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x3072; + WFIFOL(inter_fd,2) = merc_id; + WFIFOSET(inter_fd,6); + return 0; +} + +int intif_parse_mercenary_deleted(int fd) +{ + if( RFIFOB(fd,2) != 1 ) + ShowError("Mercenary data delete failure\n"); + + return 0; +} + +int intif_mercenary_save(struct s_mercenary *merc) +{ + int size = sizeof(struct s_mercenary) + 4; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,size); + WFIFOW(inter_fd,0) = 0x3073; + WFIFOW(inter_fd,2) = size; + memcpy(WFIFOP(inter_fd,4), merc, sizeof(struct s_mercenary)); + WFIFOSET(inter_fd,size); + return 0; +} + +int intif_parse_mercenary_saved(int fd) +{ + if( RFIFOB(fd,2) != 1 ) + ShowError("Mercenary data save failure\n"); + + return 0; +} + +/*========================================== + * Elemental's System + *------------------------------------------*/ +int intif_elemental_create(struct s_elemental *ele) +{ + int size = sizeof(struct s_elemental) + 4; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,size); + WFIFOW(inter_fd,0) = 0x307c; + WFIFOW(inter_fd,2) = size; + memcpy(WFIFOP(inter_fd,4), ele, sizeof(struct s_elemental)); + WFIFOSET(inter_fd,size); + return 0; +} + +int intif_parse_elemental_received(int fd) +{ + int len = RFIFOW(fd,2) - 5; + 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; + } + + elemental->data_received((struct s_elemental*)RFIFOP(fd,5), RFIFOB(fd,4)); + return 0; +} + +int intif_elemental_request(int ele_id, int char_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,10); + WFIFOW(inter_fd,0) = 0x307d; + WFIFOL(inter_fd,2) = ele_id; + WFIFOL(inter_fd,6) = char_id; + WFIFOSET(inter_fd,10); + return 0; +} + +int intif_elemental_delete(int ele_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd,6); + WFIFOW(inter_fd,0) = 0x307e; + WFIFOL(inter_fd,2) = ele_id; + WFIFOSET(inter_fd,6); + return 0; +} + +int intif_parse_elemental_deleted(int fd) +{ + if( RFIFOB(fd,2) != 1 ) + ShowError("Elemental data delete failure\n"); + + return 0; +} + +int intif_elemental_save(struct s_elemental *ele) +{ + int size = sizeof(struct s_elemental) + 4; + + if( intif->CheckForCharServer() ) + return 0; + + WFIFOHEAD(inter_fd,size); + WFIFOW(inter_fd,0) = 0x307f; + WFIFOW(inter_fd,2) = size; + memcpy(WFIFOP(inter_fd,4), ele, sizeof(struct s_elemental)); + WFIFOSET(inter_fd,size); + return 0; +} + +int intif_parse_elemental_saved(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 ) { + + + WFIFOHEAD(inter_fd,2 + 4 + 4 + 4 + NAME_LENGTH); + + WFIFOW(inter_fd,0) = 0x3007; + WFIFOL(inter_fd,2) = u_fd; + WFIFOL(inter_fd,6) = aid; + WFIFOL(inter_fd,10) = group_lv; + safestrncpy((char *)WFIFOP(inter_fd,14), query, NAME_LENGTH); + + WFIFOSET(inter_fd,2 + 4 + 4 + 4 + NAME_LENGTH); + + return; +} + +void intif_parse_MessageToFD(int fd) { + int u_fd = RFIFOL(fd,4); + + if( session[u_fd] && session[u_fd]->session_data ) { + int aid = RFIFOL(fd,8); + struct map_session_data * sd = session[u_fd]->session_data; + /* matching e.g. previous fd owner didn't dc during request or is still the same */ + if( sd->bl.id == aid ) { + char msg[512]; + safestrncpy(msg, (char*)RFIFOP(fd,12), RFIFOW(fd,2) - 12); + clif->message(u_fd,msg); + } + + } + + return; +} + +//----------------------------------------------------------------- +// Communication from the inter server +// Return a 0 (false) if there were any errors. +// 1, 2 if there are not enough to return the length of the packet if the packet processing +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){ + return 0; + } + // Check the length of the packet + packet_len = packet_len_table[cmd-0x3800]; + if(packet_len==-1){ + if(RFIFOREST(fd)<4) + return 2; + packet_len = RFIFOW(fd,2); + } + if((int)RFIFOREST(fd)broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, 0, 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; + default: + ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0)); + return 0; + } + // Skip packet + RFIFOSKIP(fd,packet_len); + return 1; +} + +/*===================================== +* Default Functions : intif.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +void intif_defaults(void) { + intif = &intif_s; + /* funcs */ + + intif->parse = intif_parse; + + 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; + intif->party_changemap = intif_party_changemap; + 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; + intif->guild_leave = intif_guild_leave; + intif->guild_memberinfoshort = intif_guild_memberinfoshort; + intif->guild_break = intif_guild_break; + intif->guild_message = intif_guild_message; + intif->guild_change_gm = intif_guild_change_gm; + intif->guild_change_basicinfo = intif_guild_change_basicinfo; + intif->guild_change_memberinfo = intif_guild_change_memberinfo; + intif->guild_position = intif_guild_position; + intif->guild_skillup = intif_guild_skillup; + intif->guild_alliance = intif_guild_alliance; + intif->guild_notice = intif_guild_notice; + intif->guild_emblem = intif_guild_emblem; + intif->guild_castle_dataload = intif_guild_castle_dataload; + intif->guild_castle_datasave = intif_guild_castle_datasave; + intif->request_petdata = intif_request_petdata; + intif->save_petdata = intif_save_petdata; + intif->delete_petdata = intif_delete_petdata; + intif->rename = intif_rename; + intif->homunculus_create = intif_homunculus_create; + intif->homunculus_requestload = intif_homunculus_requestload; + intif->homunculus_requestsave = intif_homunculus_requestsave; + intif->homunculus_requestdelete = intif_homunculus_requestdelete; + /******QUEST SYTEM*******/ + intif->request_questlog = intif_request_questlog; + intif->quest_save = intif_quest_save; + // MERCENARY SYSTEM + intif->mercenary_create = intif_mercenary_create; + intif->mercenary_request = intif_mercenary_request; + intif->mercenary_delete = intif_mercenary_delete; + intif->mercenary_save = intif_mercenary_save; + // MAIL SYSTEM + intif->Mail_requestinbox = intif_Mail_requestinbox; + intif->Mail_read = intif_Mail_read; + intif->Mail_getattach = intif_Mail_getattach; + intif->Mail_delete = intif_Mail_delete; + intif->Mail_return = intif_Mail_return; + intif->Mail_send = intif_Mail_send; + // AUCTION SYSTEM + intif->Auction_requestlist = intif_Auction_requestlist; + intif->Auction_register = intif_Auction_register; + intif->Auction_cancel = intif_Auction_cancel; + intif->Auction_close = intif_Auction_close; + intif->Auction_bid = intif_Auction_bid; + // ELEMENTAL SYSTEM + intif->elemental_create = intif_elemental_create; + intif->elemental_request = intif_elemental_request; + intif->elemental_delete = intif_elemental_delete; + intif->elemental_save = intif_elemental_save; + /* @accinfo */ + intif->request_accinfo = intif_request_accinfo; + + intif->CheckForCharServer = CheckForCharServer; +} diff --git a/src/map/intif.h b/src/map/intif.h index 43bbc0859..f0c1067fb 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -1,112 +1,128 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -#ifndef _INTIF_H_ -#define _INFIF_H_ - -//#include "../common/mmo.h" -struct party_member; -struct guild_member; -struct guild_position; -struct s_pet; -struct s_homunculus; -struct s_mercenary; -struct s_elemental; -struct mail_message; -struct auction_data; - -int intif_parse(int fd); - -int intif_broadcast(const char* mes, int len, int type); -int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY); -int intif_main_message(struct map_session_data* sd, const char* message); - -int intif_wis_message(struct map_session_data *sd,char *nick,char *mes,int mes_len); -int intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes); - -int intif_saveregistry(struct map_session_data *sd, int type); -int intif_request_registry(struct map_session_data *sd, int flag); - -int intif_request_guild_storage(int account_id, int guild_id); -int intif_send_guild_storage(int account_id, struct guild_storage *gstor); - - -int intif_create_party(struct party_member *member,char *name,int item,int item2); -int intif_request_partyinfo(int party_id, int char_id); - -int intif_party_addmember(int party_id,struct party_member *member); -int intif_party_changeoption(int party_id, int account_id, int exp, int item); -int intif_party_leave(int party_id,int account_id, int char_id); -int intif_party_changemap(struct map_session_data *sd, int online); -int intif_break_party(int party_id); -int intif_party_message(int party_id, int account_id, const char *mes,int len); -int intif_party_leaderchange(int party_id,int account_id,int char_id); - - -int intif_guild_create(const char *name, const struct guild_member *master); -int intif_guild_request_info(int guild_id); -int intif_guild_addmember(int guild_id, struct guild_member *m); -int intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes); -int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_); -int intif_guild_break(int guild_id); -int intif_guild_message(int guild_id, int account_id, const char *mes, int len); -int intif_guild_change_gm(int guild_id, const char* name, int len); -int intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len); -int intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int type, const void *data, int len); -int intif_guild_position(int guild_id, int idx, struct guild_position *p); -int intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max); -int intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); -int intif_guild_notice(int guild_id, const char *mes1, const char *mes2); -int intif_guild_emblem(int guild_id, int len, const char *data); -int intif_guild_castle_dataload(int num, int *castle_ids); -int intif_guild_castle_datasave(int castle_id, int index, int value); - -int intif_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); -int intif_request_petdata(int account_id, int char_id, int pet_id); -int intif_save_petdata(int account_id, struct s_pet *p); -int intif_delete_petdata(int pet_id); -int intif_rename(struct map_session_data *sd, int type, char *name); -#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) -int intif_homunculus_create(int account_id, struct s_homunculus *sh); -bool intif_homunculus_requestload(int account_id, int homun_id); -int intif_homunculus_requestsave(int account_id, struct s_homunculus* sh); -int intif_homunculus_requestdelete(int homun_id); - -/******QUEST SYTEM*******/ -int intif_request_questlog(struct map_session_data * sd); -int intif_quest_save(struct map_session_data * sd); - -// MERCENARY SYSTEM -int intif_mercenary_create(struct s_mercenary *merc); -int intif_mercenary_request(int merc_id, int char_id); -int intif_mercenary_delete(int merc_id); -int intif_mercenary_save(struct s_mercenary *merc); - -// MAIL SYSTEM -int intif_Mail_requestinbox(int char_id, unsigned char flag); -int intif_Mail_read(int mail_id); -int intif_Mail_getattach(int char_id, int mail_id); -int intif_Mail_delete(int char_id, int mail_id); -int intif_Mail_return(int char_id, int mail_id); -int intif_Mail_send(int account_id, struct mail_message *msg); -// AUCTION SYSTEM -int intif_Auction_requestlist(int char_id, short type, int price, const char* searchtext, short page); -int intif_Auction_register(struct auction_data *auction); -int intif_Auction_cancel(int char_id, unsigned int auction_id); -int intif_Auction_close(int char_id, unsigned int auction_id); -int intif_Auction_bid(int char_id, const char* name, unsigned int auction_id, int bid); -// ELEMENTAL SYSTEM -int intif_elemental_create(struct s_elemental *ele); -int intif_elemental_request(int ele_id, int char_id); -int intif_elemental_delete(int ele_id); -int intif_elemental_save(struct s_elemental *ele); - -/* @accinfo */ -void intif_request_accinfo( int u_fd, int aid, int group_lv, char* query ); - -int CheckForCharServer(void); - -#endif /* _INTIF_H_ */ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder +#ifndef _INTIF_H_ +#define _INFIF_H_ +//#include "../common/mmo.h" +struct party_member; +struct guild_member; +struct guild_position; +struct s_pet; +struct s_homunculus; +struct s_mercenary; +struct s_elemental; +struct mail_message; +struct auction_data; + + + + + +#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) + + + + + + +/*===================================== +* Interface : intif.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +struct intif_interface { + /* 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); + + 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); + int (*party_changemap) (struct map_session_data *sd, int online); + 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); + int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes); + int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*guild_break) (int guild_id); + int (*guild_message) (int guild_id, int account_id, const char *mes, int len); + int (*guild_change_gm) (int guild_id, const char* name, int len); + int (*guild_change_basicinfo) (int guild_id, int type, const void *data, int len); + int (*guild_change_memberinfo) (int guild_id, int account_id, int char_id, int type, const void *data, int len); + int (*guild_position) (int guild_id, int idx, struct guild_position *p); + int (*guild_skillup) (int guild_id, uint16 skill_id, int account_id, int max); + int (*guild_alliance) (int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); + int (*guild_notice) (int guild_id, const char *mes1, const char *mes2); + int (*guild_emblem) (int guild_id, int len, const char *data); + int (*guild_castle_dataload) (int num, int *castle_ids); + int (*guild_castle_datasave) (int castle_id, int index, int value); + int (*request_petdata) (int account_id, int char_id, int pet_id); + int (*save_petdata) (int account_id, struct s_pet *p); + int (*delete_petdata) (int pet_id); + int (*rename) (struct map_session_data *sd, int type, char *name); + int (*homunculus_create) (int account_id, struct s_homunculus *sh); + bool (*homunculus_requestload) (int account_id, int homun_id); + int (*homunculus_requestsave) (int account_id, struct s_homunculus* sh); + int (*homunculus_requestdelete) (int homun_id); + /******QUEST SYTEM*******/ + int (*request_questlog) (struct map_session_data * sd); + int (*quest_save) (struct map_session_data * sd); + // MERCENARY SYSTEM + int (*mercenary_create) (struct s_mercenary *merc); + int (*mercenary_request) (int merc_id, int char_id); + int (*mercenary_delete) (int merc_id); + int (*mercenary_save) (struct s_mercenary *merc); + // MAIL SYSTEM + int (*Mail_requestinbox) (int char_id, unsigned char flag); + int (*Mail_read) (int mail_id); + int (*Mail_getattach) (int char_id, int mail_id); + int (*Mail_delete) (int char_id, int mail_id); + int (*Mail_return) (int char_id, int mail_id); + int (*Mail_send) (int account_id, struct mail_message *msg); + // AUCTION SYSTEM + int (*Auction_requestlist) (int char_id, short type, int price, const char* searchtext, short page); + int (*Auction_register) (struct auction_data *auction); + int (*Auction_cancel) (int char_id, unsigned int auction_id); + int (*Auction_close) (int char_id, unsigned int auction_id); + int (*Auction_bid) (int char_id, const char* name, unsigned int auction_id, int bid); + // ELEMENTAL SYSTEM + int (*elemental_create) (struct s_elemental *ele); + int (*elemental_request) (int ele_id, int char_id); + int (*elemental_delete) (int ele_id); + 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; + +struct intif_interface *intif; + +void intif_defaults(void); + +#endif /* _INTIF_H_ */ diff --git a/src/map/map.c b/src/map/map.c index 5e8102ea0..5db5431a8 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1185,7 +1185,7 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) if (search_petDB_index(fitem->item_data.nameid, PET_EGG) >= 0) - intif_delete_petdata(MakeDWord(fitem->item_data.card[1], fitem->item_data.card[2])); + intif->delete_petdata(MakeDWord(fitem->item_data.card[1], fitem->item_data.card[2])); clif->clearflooritem(fitem, 0); iMap->deliddb(&fitem->bl); @@ -5158,6 +5158,7 @@ void map_hp_symbols(void) { HPM->share(chat, "chat"); HPM->share(iDuel,"iDuel"); HPM->share(elemental,"elemental"); + HPM->share(intif,"intif"); /* partial */ @@ -5199,6 +5200,7 @@ void map_load_defaults(void) { chat_defaults(); iDuel_defaults(); elemental_defaults(); + intif_defaults(); } int do_init(int argc, char *argv[]) { diff --git a/src/map/mercenary.c b/src/map/mercenary.c index a08b587e7..72ed7628a 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -82,7 +82,7 @@ int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime) merc.life_time = lifetime; // Request Char Server to create this mercenary - intif_mercenary_create(&merc); + intif->mercenary_create(&merc); return 1; } @@ -213,7 +213,7 @@ int mercenary_save(struct mercenary_data *md) md->mercenary.sp = md->battle_status.sp; md->mercenary.life_time = mercenary_get_lifetime(md); - intif_mercenary_save(&md->mercenary); + intif->mercenary_save(&md->mercenary); return 1; } diff --git a/src/map/mob.c b/src/map/mob.c index 9cd05a8a3..04f3063e5 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1605,7 +1605,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) memcpy (&md->lootitem[md->lootitem_count++], &fitem->item_data, sizeof(md->lootitem[0])); } else { //Destroy first looted item... if (md->lootitem[0].card[0] == CARD0_PET) - intif_delete_petdata( MakeDWord(md->lootitem[0].card[1],md->lootitem[0].card[2]) ); + intif->delete_petdata( MakeDWord(md->lootitem[0].card[1],md->lootitem[0].card[2]) ); memmove(&md->lootitem[0], &md->lootitem[1], (LOOTITEM_SIZE-1)*sizeof(md->lootitem[0])); memcpy (&md->lootitem[LOOTITEM_SIZE-1], &fitem->item_data, sizeof(md->lootitem[0])); } @@ -2386,7 +2386,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) char message[128]; sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, it->jname, (float)drop_rate/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" - intif_broadcast(message,strlen(message)+1,0); + intif->broadcast(message,strlen(message)+1,0); } // Announce first, or else ditem will be freed. [Lance] // By popular demand, use base drop rate for autoloot code. [Skotlex] @@ -2527,7 +2527,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) char message[128]; sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, data->jname, temp/100.); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" - intif_broadcast(message,strlen(message)+1,0); + intif->broadcast(message,strlen(message)+1,0); } if((temp = pc->additem(mvp_sd,&item,1,LOG_TYPE_PICKDROP_PLAYER)) != 0) { diff --git a/src/map/npc.c b/src/map/npc.c index 6bb058229..8a2c0f746 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1710,7 +1710,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET ) { if( search_petDB_index(sd->status.inventory[idx].nameid, PET_EGG) >= 0 ) { - intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2])); + intif->delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2])); } } @@ -3865,7 +3865,7 @@ int npc_reload(void) { ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit")); // Execute rest of the startup events if connected to char-server. [Lance] - if(!CheckForCharServer()){ + if(!intif->CheckForCharServer()){ ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit")); ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); } diff --git a/src/map/party.c b/src/map/party.c index 30740b058..0d9859345 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -95,7 +95,7 @@ static TBL_PC* party_sd_check(int party_id, int account_id, int char_id) sd->status.party_id = party_id;// auto-join if not in a party if (sd->status.party_id != party_id) { //If player belongs to a different party, kick him out. - intif_party_leave(party_id,account_id,char_id); + intif->party_leave(party_id,account_id,char_id); return NULL; } @@ -174,7 +174,7 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2) party_fill_member(&leader, sd, 1); - intif_create_party(&leader,name,item,item2); + intif->create_party(&leader,name,item,item2); return 0; } @@ -187,7 +187,7 @@ void party_created(int account_id,int char_id,int fail,int party_id,char *name) if (!sd || sd->status.char_id != char_id || !sd->party_creating ) { //Character logged off before creation ack? if (!fail) //break up party since player could not be added to it. - intif_party_leave(party_id,account_id,char_id); + intif->party_leave(party_id,account_id,char_id); return; } @@ -205,7 +205,7 @@ void party_created(int account_id,int char_id,int fail,int party_id,char *name) int party_request_info(int party_id, int char_id) { - return intif_request_partyinfo(party_id, char_id); + return intif->request_partyinfo(party_id, char_id); } /// Invoked (from char-server) when the party info is not found. @@ -417,7 +417,7 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag) {// accepted and allowed sd->party_joining = true; party_fill_member(&member, sd, 0); - intif_party_addmember(sd->party_invite, &member); + intif->party_addmember(sd->party_invite, &member); } else {// rejected or failure @@ -466,7 +466,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) if(sd == NULL || sd->status.char_id != char_id || !sd->party_joining ) { if (!flag) //Char logged off before being accepted into party. - intif_party_leave(party_id,account_id,char_id); + intif->party_leave(party_id,account_id,char_id); return 0; } @@ -478,7 +478,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) if (!p) { ShowError("party_member_added: party %d not found.\n",party_id); - intif_party_leave(party_id,account_id,char_id); + intif->party_leave(party_id,account_id,char_id); return 0; } @@ -540,7 +540,7 @@ int party_removemember(struct map_session_data* sd, int account_id, char* name) if( i == MAX_PARTY ) return 0; // no such char in party - intif_party_leave(p->party.party_id,account_id,p->party.member[i].char_id); + intif->party_leave(p->party.party_id,account_id,p->party.member[i].char_id); return 1; } @@ -558,7 +558,7 @@ int party_leave(struct map_session_data *sd) if( i == MAX_PARTY ) return 0; - intif_party_leave(p->party.party_id,sd->status.account_id,sd->status.char_id); + intif->party_leave(p->party.party_id,sd->status.account_id,sd->status.char_id); return 1; } @@ -630,7 +630,7 @@ int party_changeoption(struct map_session_data *sd,int exp,int item) if( sd->status.party_id==0) return 0; - intif_party_changeoption(sd->status.party_id,sd->status.account_id,exp,item); + intif->party_changeoption(sd->status.party_id,sd->status.account_id,exp,item); return 0; } @@ -698,7 +698,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts clif->message(p->data[tmi].sd->fd, msg_txt(285)); //Update info. - intif_party_leaderchange(p->party.party_id,p->party.member[tmi].account_id,p->party.member[tmi].char_id); + intif->party_leaderchange(p->party.party_id,p->party.member[tmi].account_id,p->party.member[tmi].char_id); clif->party_info(p,NULL); return true; } @@ -742,7 +742,7 @@ void party_send_movemap(struct map_session_data *sd) if( sd->status.party_id==0 ) return; - intif_party_changemap(sd,1); + intif->party_changemap(sd,1); p=party->search(sd->status.party_id); if (!p) return; @@ -770,7 +770,7 @@ void party_send_movemap(struct map_session_data *sd) void party_send_levelup(struct map_session_data *sd) { - intif_party_changemap(sd,1); + intif->party_changemap(sd,1); } int party_send_logout(struct map_session_data *sd) @@ -781,7 +781,7 @@ int party_send_logout(struct map_session_data *sd) if(!sd->status.party_id) return 0; - intif_party_changemap(sd,0); + intif->party_changemap(sd,0); p=party->search(sd->status.party_id); if(!p) return 0; @@ -798,7 +798,7 @@ int party_send_message(struct map_session_data *sd,const char *mes,int len) { if(sd->status.party_id==0) return 0; - intif_party_message(sd->status.party_id,sd->status.account_id,mes,len); + intif->party_message(sd->status.party_id,sd->status.account_id,mes,len); party->recv_message(sd->status.party_id,sd->status.account_id,mes,len); // Chat logging type 'P' / Party Chat diff --git a/src/map/pc.c b/src/map/pc.c index 30ef9848c..e6c3721c3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1129,7 +1129,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim sd->sc_display_count = 0; // Request all registries (auth is considered completed whence they arrive) - intif_request_registry(sd,7); + intif->request_registry(sd,7); return true; } @@ -1236,15 +1236,15 @@ int pc_reg_received(struct map_session_data *sd) // pet if (sd->status.pet_id > 0) - intif_request_petdata(sd->status.account_id, sd->status.char_id, sd->status.pet_id); + intif->request_petdata(sd->status.account_id, sd->status.char_id, sd->status.pet_id); // Homunculus [albator] if( sd->status.hom_id > 0 ) - intif_homunculus_requestload(sd->status.account_id, sd->status.hom_id); + intif->homunculus_requestload(sd->status.account_id, sd->status.hom_id); if( sd->status.mer_id > 0 ) - intif_mercenary_request(sd->status.mer_id, sd->status.char_id); + intif->mercenary_request(sd->status.mer_id, sd->status.char_id); if( sd->status.ele_id > 0 ) - intif_elemental_request(sd->status.ele_id, sd->status.char_id); + intif->elemental_request(sd->status.ele_id, sd->status.char_id); iMap->addiddb(&sd->bl); iMap->delnickdb(sd->status.char_id, sd->status.name); @@ -1256,8 +1256,8 @@ int pc_reg_received(struct map_session_data *sd) status_calc_pc(sd,1); chrif->scdata_request(sd->status.account_id, sd->status.char_id); - intif_Mail_requestinbox(sd->status.char_id, 0); // MAIL SYSTEM - Request Mail Inbox - intif_request_questlog(sd); + intif->Mail_requestinbox(sd->status.char_id, 0); // MAIL SYSTEM - Request Mail Inbox + intif->request_questlog(sd); if (sd->state.connect_new == 0 && sd->fd) { //Character already loaded map! Gotta trigger LoadEndAck manually. sd->state.connect_new = 1; @@ -4681,7 +4681,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil char message[128]; sprintf (message, msg_txt(542), (sd->status.name != NULL)?sd->status.name :"GM", md->db->jname, data->jname, (float)md->db->dropitem[i].p/100); //MSG: "'%s' stole %s's %s (chance: %0.02f%%)" - intif_broadcast(message,strlen(message)+1,0); + intif->broadcast(message,strlen(message)+1,0); } return 1; } @@ -7720,7 +7720,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val) if (sd->status.hair != val) { sd->status.hair=val; if (sd->status.guild_id) //Update Guild Window. [Skotlex] - intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, + intif->guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, GMI_HAIR,&sd->status.hair,sizeof(sd->status.hair)); } break; @@ -7742,7 +7742,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val) if (sd->status.hair_color != val) { sd->status.hair_color=val; if (sd->status.guild_id) //Update Guild Window. [Skotlex] - intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, + intif->guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, GMI_HAIR_COLOR,&sd->status.hair_color,sizeof(sd->status.hair_color)); } break; @@ -8094,7 +8094,7 @@ int pc_readregistry(struct map_session_data *sd,const char *reg,int type) if (max == -1) { ShowError("pc_readregistry: Trying to read reg value %s (type %d) before it's been loaded!\n", reg, type); //This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again. - intif_request_registry(sd,type==3?4:type); + intif->request_registry(sd,type==3?4:type); return 0; } @@ -8127,7 +8127,7 @@ char* pc_readregistry_str(struct map_session_data *sd,const char *reg,int type) if (max == -1) { ShowError("pc_readregistry: Trying to read reg value %s (type %d) before it's been loaded!\n", reg, type); //This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again. - intif_request_registry(sd,type==3?4:type); + intif->request_registry(sd,type==3?4:type); return NULL; } @@ -8272,7 +8272,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v memset(&sd_reg[*max - 1], 0, sizeof(struct global_reg)); (*max)--; sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved" - if (type!=3) intif_saveregistry(sd,type); + if (type!=3) intif->saveregistry(sd,type); } return 1; } @@ -8283,7 +8283,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v { safestrncpy(sd_reg[i].value, val, sizeof(sd_reg[i].value)); sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved" - if (type!=3) intif_saveregistry(sd,type); + if (type!=3) intif->saveregistry(sd,type); return 1; } @@ -8294,7 +8294,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v safestrncpy(sd_reg[i].value, val, sizeof(sd_reg[i].value)); (*max)++; sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved" - if (type!=3) intif_saveregistry(sd,type); + if (type!=3) intif->saveregistry(sd,type); return 1; } @@ -9356,7 +9356,7 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) iMap->night_flag = 0; // 0=day, 1=night [Yor] iMap->map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived! - intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); + intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } @@ -9377,7 +9377,7 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) iMap->night_flag = 1; // 0=day, 1=night [Yor] iMap->map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen... - intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); + intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } diff --git a/src/map/pet.c b/src/map/pet.c index c83027f2a..236ffe98b 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -78,7 +78,7 @@ int pet_create_egg(struct map_session_data *sd, int item_id) if (pet_id < 0) return 0; //No pet egg here. if (!pc->inventoryblank(sd)) return 0; // Inventory full sd->catch_target_class = pet_db[pet_id].class_; - intif_create_pet(sd->status.account_id, sd->status.char_id, + intif->create_pet(sd->status.account_id, sd->status.char_id, (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv, (short)pet_db[pet_id].EggID, 0, @@ -334,7 +334,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *pet) if (sd->status.pet_id) { //Wrong pet?? Set incuvate to no and send it back for saving. pet->incuvate = 1; - intif_save_petdata(sd->status.account_id,pet); + intif->save_petdata(sd->status.account_id,pet); sd->status.pet_id = 0; return 1; } @@ -406,7 +406,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *pet) return 1; } - intif_save_petdata(sd->status.account_id,pet); + intif->save_petdata(sd->status.account_id,pet); if (iMap->save_settings&8) chrif->save(sd,0); //is it REALLY Needed to save the char for hatching a pet? [Skotlex] @@ -472,7 +472,7 @@ int pet_select_egg(struct map_session_data *sd,short egg_index) return 0; //Forged packet! if(sd->status.inventory[egg_index].card[0] == CARD0_PET) - intif_request_petdata(sd->status.account_id, sd->status.char_id, MakeDWord(sd->status.inventory[egg_index].card[1], sd->status.inventory[egg_index].card[2]) ); + intif->request_petdata(sd->status.account_id, sd->status.char_id, MakeDWord(sd->status.inventory[egg_index].card[1], sd->status.inventory[egg_index].card[2]) ); else ShowError("wrong egg item inventory %d\n",egg_index); @@ -529,7 +529,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id) unit_remove_map(&md->bl,CLR_OUTSIGHT); status_kill(&md->bl); clif->pet_roulette(sd,1); - intif_create_pet(sd->status.account_id,sd->status.char_id,pet_db[i].class_,mob_db(pet_db[i].class_)->lv, + intif->create_pet(sd->status.account_id,sd->status.char_id,pet_db[i].class_,mob_db(pet_db[i].class_)->lv, pet_db[i].EggID,0,pet_db[i].intimate,100,0,1,pet_db[i].jname); } else @@ -558,7 +558,7 @@ int pet_get_egg(int account_id,int pet_id,int flag) sd->catch_target_class = -1; if(i < 0) { - intif_delete_petdata(pet_id); + intif->delete_petdata(pet_id); return 0; } diff --git a/src/map/quest.c b/src/map/quest.c index 3776d603f..e1e180786 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -23,7 +23,6 @@ #include "log.h" #include "clif.h" #include "quest.h" -#include "intif.h" #include "chrif.h" #include diff --git a/src/map/script.c b/src/map/script.c index 0827eb497..5e99d2e62 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3532,9 +3532,9 @@ void run_script_main(struct script_state *st) //Restore previous script if any. script_detach_state(st, true); if (sd->state.reg_dirty&2) - intif_saveregistry(sd,2); + intif->saveregistry(sd,2); if (sd->state.reg_dirty&1) - intif_saveregistry(sd,1); + intif->saveregistry(sd,1); } script->free_state(st); st = NULL; @@ -6252,7 +6252,7 @@ static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* am { if( sd->inventory_data[idx]->type == IT_PETEGG && inv->card[0] == CARD0_PET ) {// delete associated pet - intif_delete_petdata(MakeDWord(inv->card[1], inv->card[2])); + intif->delete_petdata(MakeDWord(inv->card[1], inv->card[2])); } pc->delitem(sd, idx, delamount, 0, 0, LOG_TYPE_SCRIPT); } @@ -6316,7 +6316,7 @@ static bool buildin_delitem_search(struct map_session_data* sd, struct item* it, { if( sd->inventory_data[i]->type == IT_PETEGG ) { - if( inv->card[0] == CARD0_PET && CheckForCharServer() ) + if( inv->card[0] == CARD0_PET && intif->CheckForCharServer() ) {// pet which cannot be deleted continue; } @@ -6346,7 +6346,7 @@ static bool buildin_delitem_search(struct map_session_data* sd, struct item* it, continue; } - if( sd->inventory_data[i]->type == IT_PETEGG && inv->card[0] == CARD0_PET && CheckForCharServer() ) + if( sd->inventory_data[i]->type == IT_PETEGG && inv->card[0] == CARD0_PET && intif->CheckForCharServer() ) {// pet which cannot be deleted continue; } @@ -8311,7 +8311,7 @@ BUILDIN(makepet) pet_id = search_petDB_index(id, PET_EGG); if (pet_id >= 0 && sd) { sd->catch_target_class = pet_db[pet_id].class_; - intif_create_pet( + intif->create_pet( sd->status.account_id, sd->status.char_id, (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv, (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate, @@ -9124,9 +9124,9 @@ BUILDIN(announce) else { if (fontColor) - intif_broadcast2(mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY); + intif->broadcast2(mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY); else - intif_broadcast(mes, (int)strlen(mes)+1, flag&0xf0); + intif->broadcast(mes, (int)strlen(mes)+1, flag&0xf0); } return true; } diff --git a/src/map/storage.c b/src/map/storage.c index 5ebbb0dde..81d746cc8 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -400,7 +400,7 @@ int storage_guild_storageopen(struct map_session_data* sd) } if((gstor = gstorage->id2storage2(sd->status.guild_id)) == NULL) { - intif_request_guild_storage(sd->status.account_id,sd->status.guild_id); + intif->request_guild_storage(sd->status.account_id,sd->status.guild_id); return 0; } if(gstor->storage_status) @@ -657,7 +657,7 @@ int storage_guild_storagesave(int account_id, int guild_id, int flag) if (flag) //Char quitting, close it. stor->storage_status = 0; if (stor->dirty) - intif_send_guild_storage(account_id,stor); + intif->send_guild_storage(account_id,stor); return 1; } return 0; diff --git a/src/map/trade.c b/src/map/trade.c index 13b5f5431..9bf63c428 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -203,9 +203,9 @@ int impossible_trade_check(struct map_session_data *sd) if (inventory[index].amount < sd->deal.item[i].amount) { // if more than the player have -> hack sprintf(message_to_gm, msg_txt(538), sd->status.name, sd->status.account_id); // Hack on trade: character '%s' (account: %d) try to trade more items that he has. - intif_wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); sprintf(message_to_gm, msg_txt(539), inventory[index].amount, inventory[index].nameid, sd->deal.item[i].amount); // This player has %d of a kind of item (id: %d), and try to trade %d of them. - intif_wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); // if we block people if (battle_config.ban_hack_trade < 0) { chrif->char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block @@ -222,7 +222,7 @@ int impossible_trade_check(struct map_session_data *sd) // message about the ban strcpy(message_to_gm, msg_txt(508)); // This player hasn't been banned (Ban option is disabled). - intif_wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); return 1; } inventory[index].amount -= sd->deal.item[i].amount; // remove item from inventory diff --git a/src/map/unit.c b/src/map/unit.c index 8a11363cb..b9cdfa278 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2443,10 +2443,10 @@ int unit_free(struct block_list *bl, clr_type clrtype) pd->loot = NULL; } if( pd->pet.intimate > 0 ) - intif_save_petdata(pd->pet.account_id,&pd->pet); + intif->save_petdata(pd->pet.account_id,&pd->pet); else { //Remove pet. - intif_delete_petdata(pd->pet.pet_id); + intif->delete_petdata(pd->pet.pet_id); if (sd) sd->status.pet_id = 0; } if( sd ) @@ -2519,7 +2519,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) if( hd->homunculus.intimacy > 0 ) homun->save(hd); else { - intif_homunculus_requestdelete(hd->homunculus.hom_id); + intif->homunculus_requestdelete(hd->homunculus.hom_id); if( sd ) sd->status.hom_id = 0; } @@ -2535,7 +2535,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) mercenary_save(md); else { - intif_mercenary_delete(md->mercenary.mercenary_id); + intif->mercenary_delete(md->mercenary.mercenary_id); if( sd ) sd->status.mer_id = 0; } @@ -2551,7 +2551,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) if( elemental->get_lifetime(ed) > 0 ) elemental->save(ed); else { - intif_elemental_delete(ed->elemental.elemental_id); + intif->elemental_delete(ed->elemental.elemental_id); if( sd ) sd->status.ele_id = 0; } -- cgit v1.2.3-70-g09d2 From 5ac2ced45782fc15a9da9c0e714d201acfa5d20c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 17 Sep 2013 08:25:07 -0300 Subject: HPM: Itemdb.c Interface Fully Integrated. Closes #110 Signed-off-by: shennetsind --- src/map/atcommand.c | 6 +- src/map/buyingstore.c | 2 +- src/map/clif.c | 12 +-- src/map/itemdb.c | 246 +++++++++++++++++++++++++++++--------------------- src/map/itemdb.h | 82 +++++++++++------ src/map/mob.c | 4 +- src/map/npc.c | 8 +- src/map/pc.c | 14 +-- src/map/script.c | 20 ++-- src/map/skill.c | 2 +- src/map/storage.c | 4 +- src/map/trade.c | 4 +- 12 files changed, 233 insertions(+), 171 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index f13ad0a4e..2466c2cca 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1157,7 +1157,7 @@ ACMD(item) item_id = item_data->nameid; get_count = number; //Check if it's stackable. - if (!itemdb_isstackable2(item_data)) + if (!itemdb->isstackable2(item_data)) get_count = 1; for (i = 0; i < number; i += get_count) { @@ -2138,7 +2138,7 @@ ACMD(produce) item_id = item_data->nameid; - if (itemdb_isequip2(item_data)) { + if (itemdb->isequip2(item_data)) { int flag = 0; if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE) attribute = ATTRIBUTE_NORMAL; @@ -7222,7 +7222,7 @@ ACMD(iteminfo) item_data = item_array[i]; sprintf(atcmd_output, msg_txt(1277), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s item_data->name,item_data->jname,item_data->slot,item_data->nameid, - itemdb_typename(item_data->type), + itemdb->typename(item_data->type), (item_data->script==NULL)? msg_txt(1278) : msg_txt(1279) // None / With script ); clif->message(fd, atcmd_output); diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 73c50b0bf..5edf9a321 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -147,7 +147,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha break; } - if( !id->flag.buyingstore || !itemdb_cantrade_sub(id, pc->get_group_level(sd), pc->get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) + if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc->get_group_level(sd), pc->get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) {// restrictions: allowed, no character-bound items and at least one must be owned break; } diff --git a/src/map/clif.c b/src/map/clif.c index da8af5543..bdb7eefc7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2326,7 +2326,7 @@ void clif_inventorylist(struct map_session_data *sd) { if( sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL ) continue; - if( !itemdb_isstackable2(sd->inventory_data[i]) ) + if( !itemdb->isstackable2(sd->inventory_data[i]) ) { //Non-stackable (Equippable) WBUFW(bufe,ne*se+4)=i+2; clif->item_sub(bufe, ne*se+6, &sd->status.inventory[i], sd->inventory_data[i], pc->equippoint(sd,i)); @@ -2415,7 +2415,7 @@ void clif_equiplist(struct map_session_data *sd) if (sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL) continue; - if(itemdb_isstackable2(sd->inventory_data[i])) + if(itemdb->isstackable2(sd->inventory_data[i])) continue; //Equippable WBUFW(buf,n*cmd+4)=i+2; @@ -2473,7 +2473,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items if( items[i].nameid <= 0 ) continue; id = itemdb->search(items[i].nameid); - if( !itemdb_isstackable2(id) ) + if( !itemdb->isstackable2(id) ) { //Equippable WBUFW(bufe,ne*cmd+4)=i+1; clif->item_sub(bufe, ne*cmd+6, &items[i], id, id->equip); @@ -2553,7 +2553,7 @@ void clif_cartlist(struct map_session_data *sd) if( sd->status.cart[i].nameid <= 0 ) continue; id = itemdb->search(sd->status.cart[i].nameid); - if( !itemdb_isstackable2(id) ) + if( !itemdb->isstackable2(id) ) { //Equippable WBUFW(bufe,ne*cmd+4)=i+2; clif->item_sub(bufe, ne*cmd+6, &sd->status.cart[i], id, id->equip); @@ -9012,7 +9012,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts { if (tsd->status.inventory[i].nameid <= 0 || tsd->inventory_data[i] == NULL) // Item doesn't exist continue; - if (!itemdb_isequip2(tsd->inventory_data[i])) // Is not equippable + if (!itemdb->isequip2(tsd->inventory_data[i])) // Is not equippable continue; // Inventory position @@ -17314,7 +17314,7 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { get_count = qty; - if (!itemdb_isstackable2(data)) + if (!itemdb->isstackable2(data)) get_count = 1; pc->paycash(sd, clif->cs.data[tab][j]->price * qty, kafra_pay);// [Ryuuzaki] diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 7045bd358..c2a25c2d4 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -19,11 +19,6 @@ #include #include -static struct item_data* itemdb_array[MAX_ITEMDB]; -static DBMap* itemdb_other;// int nameid -> struct item_data* - -struct item_data dummy_item; //This is the default dummy item used for non-existant items. [Skotlex] - struct itemdb_interface itemdb_s; /** @@ -31,14 +26,14 @@ struct itemdb_interface itemdb_s; * name = item alias, so we should find items aliases first. if not found then look for "jname" (full name) * @see DBApply */ -static int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) +int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) { struct item_data *item = DB->data2ptr(data), **dst, **dst2; char *str; str=va_arg(ap,char *); dst=va_arg(ap,struct item_data **); dst2=va_arg(ap,struct item_data **); - if(item == &dummy_item) return 0; + if(item == &itemdb->dummy) return 0; //Absolute priority to Aegis code name. if (*dst != NULL) return 0; @@ -60,8 +55,8 @@ struct item_data* itemdb_searchname(const char *str) { struct item_data* item2=NULL; int i; - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) { - item = itemdb_array[i]; + for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) { + item = itemdb->array[i]; if( item == NULL ) continue; @@ -75,7 +70,7 @@ struct item_data* itemdb_searchname(const char *str) { } item = NULL; - itemdb_other->foreach(itemdb_other,itemdb_searchname_sub,str,&item,&item2); + itemdb->other->foreach(itemdb->other,itemdb->searchname_sub,str,&item,&item2); return item?item:item2; } /* name to item data */ @@ -86,12 +81,12 @@ struct item_data* itemdb_name2id(const char *str) { /** * @see DBMatcher */ -static int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) +int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) { struct item_data *item = DB->data2ptr(&data); char *str; str=va_arg(ap,char *); - if (item == &dummy_item) + if (item == &itemdb->dummy) return 1; //Invalid item. if(stristr(item->jname,str)) return 0; @@ -112,9 +107,9 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str, int count=0; // Search in the array - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) + for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) { - item = itemdb_array[i]; + item = itemdb->array[i]; if( item == NULL ) continue; @@ -133,7 +128,7 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str, DBData *db_data[MAX_SEARCH]; int db_count = 0; size -= count; - db_count = itemdb_other->getall(itemdb_other, (DBData**)&db_data, size, itemdb_searchname_array_sub, str); + db_count = itemdb->other->getall(itemdb->other, (DBData**)&db_data, size, itemdb->searchname_array_sub, str); for (i = 0; i < db_count; i++) data[count++] = DB->data2ptr(db_data[i]); count += db_count; @@ -190,7 +185,7 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa if( package->must_items[i].announce ) clif->package_announce(sd,package->must_items[i].id,package->id); - get_count = itemdb_isstackable(package->must_items[i].id) ? package->must_items[i].qty : 1; + get_count = itemdb->isstackable(package->must_items[i].id) ? package->must_items[i].qty : 1; it.amount = get_count == 1 ? 1 : get_count; @@ -231,7 +226,7 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa if( entry->announce ) clif->package_announce(sd,entry->id,package->id); - get_count = itemdb_isstackable(entry->id) ? entry->qty : 1; + get_count = itemdb->isstackable(entry->id) ? entry->qty : 1; it.amount = get_count == 1 ? 1 : get_count; @@ -274,10 +269,10 @@ struct item_data* itemdb_exists(int nameid) { struct item_data* item; - if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb_array) ) - return itemdb_array[nameid]; - item = (struct item_data*)idb_get(itemdb_other,nameid); - if( item == &dummy_item ) + if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb->array) ) + return itemdb->array[nameid]; + item = (struct item_data*)idb_get(itemdb->other,nameid); + if( item == &itemdb->dummy ) return NULL;// dummy data, doesn't exist return item; } @@ -307,7 +302,7 @@ const char* itemdb_typename(int type) * Converts the jobid from the format in itemdb * to the format used by the map server. [Skotlex] *------------------------------------------*/ -static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) +void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) { int i; bclass[0]= bclass[1]= bclass[2]= 0; @@ -373,19 +368,19 @@ static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) bclass[1] |= 1<dummy, 0, sizeof(struct item_data)); + itemdb->dummy.nameid=500; + itemdb->dummy.weight=1; + itemdb->dummy.value_sell=1; + itemdb->dummy.type=IT_ETC; //Etc item + safestrncpy(itemdb->dummy.name,"UNKNOWN_ITEM",sizeof(itemdb->dummy.name)); + safestrncpy(itemdb->dummy.jname,"UNKNOWN_ITEM",sizeof(itemdb->dummy.jname)); + itemdb->dummy.view_id=UNKNOWN_ITEM_ID; } -static struct item_data* create_item_data(int nameid) +struct item_data* create_item_data(int nameid) { struct item_data *id; CREATE(id, struct item_data, 1); @@ -401,19 +396,19 @@ static struct item_data* create_item_data(int nameid) struct item_data* itemdb_load(int nameid) { struct item_data *id; - if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb_array) ) + if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb->array) ) { - id = itemdb_array[nameid]; - if( id == NULL || id == &dummy_item ) - id = itemdb_array[nameid] = create_item_data(nameid); + id = itemdb->array[nameid]; + if( id == NULL || id == &itemdb->dummy ) + id = itemdb->array[nameid] = itemdb->create_item_data(nameid); return id; } - id = (struct item_data*)idb_get(itemdb_other, nameid); - if( id == NULL || id == &dummy_item ) + id = (struct item_data*)idb_get(itemdb->other, nameid); + if( id == NULL || id == &itemdb->dummy ) { - id = create_item_data(nameid); - idb_put(itemdb_other, nameid, id); + id = itemdb->create_item_data(nameid); + idb_put(itemdb->other, nameid, id); } return id; } @@ -424,16 +419,16 @@ struct item_data* itemdb_load(int nameid) { struct item_data* itemdb_search(int nameid) { struct item_data* id; - if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb_array) ) - id = itemdb_array[nameid]; + if( nameid >= 0 && nameid < ARRAYLENGTH(itemdb->array) ) + id = itemdb->array[nameid]; else - id = (struct item_data*)idb_get(itemdb_other, nameid); + id = (struct item_data*)idb_get(itemdb->other, nameid); if( id == NULL ) { ShowWarning("itemdb_search: Item ID %d does not exists in the item_db. Using dummy data.\n", nameid); - id = &dummy_item; - dummy_item.nameid = nameid; + id = &itemdb->dummy; + itemdb->dummy.nameid = nameid; } return id; } @@ -546,7 +541,7 @@ int itemdb_canauction_sub(struct item_data* item, int gmlv, int unused) { int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(struct item_data*, int, int)) { - struct item_data* item_data = itemdb_search(item->nameid); + struct item_data* item_data = itemdb->search(item->nameid); int i; if (!func(item_data, gmlv, gmlv2)) @@ -557,7 +552,7 @@ int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(stru for(i = 0; i < item_data->slot; i++) { if (!item->card[i]) continue; - if (!func(itemdb_search(item->card[i]), gmlv, gmlv2)) + if (!func(itemdb->search(item->card[i]), gmlv, gmlv2)) return 0; } return 1; @@ -594,7 +589,7 @@ int itemdb_isidentified2(struct item_data *data) { * Search by name for the override flags available items * (Give item another sprite) *------------------------------------------*/ -static bool itemdb_read_itemavail(char* str[], int columns, int current) +bool itemdb_read_itemavail(char* str[], int columns, int current) {// , int nameid, sprite; struct item_data *id; @@ -1202,7 +1197,7 @@ void itemdb_read_chains(void) { /*========================================== * Reads item trade restrictions [Skotlex] *------------------------------------------*/ -static bool itemdb_read_itemtrade(char* str[], int columns, int current) +bool itemdb_read_itemtrade(char* str[], int columns, int current) {// ,, int nameid, flag, gmlv; struct item_data *id; @@ -1239,7 +1234,7 @@ static bool itemdb_read_itemtrade(char* str[], int columns, int current) /*========================================== * Reads item delay amounts [Paradox924X] *------------------------------------------*/ -static bool itemdb_read_itemdelay(char* str[], int columns, int current) +bool itemdb_read_itemdelay(char* str[], int columns, int current) {// , int nameid, delay; struct item_data *id; @@ -1268,7 +1263,7 @@ static bool itemdb_read_itemdelay(char* str[], int columns, int current) /*================================================================== * Reads item stacking restrictions *----------------------------------------------------------------*/ -static bool itemdb_read_stack(char* fields[], int columns, int current) +bool itemdb_read_stack(char* fields[], int columns, int current) {// ,, unsigned short nameid, amount; unsigned int type; @@ -1282,7 +1277,7 @@ static bool itemdb_read_stack(char* fields[], int columns, int current) return false; } - if( !itemdb_isstackable2(id) ) + if( !itemdb->isstackable2(id) ) { ShowWarning("itemdb_read_stack: Item id '%hu' is not stackable.\n", nameid); return false; @@ -1307,7 +1302,7 @@ static bool itemdb_read_stack(char* fields[], int columns, int current) /// Reads items allowed to be sold in buying stores -static bool itemdb_read_buyingstore(char* fields[], int columns, int current) +bool itemdb_read_buyingstore(char* fields[], int columns, int current) {// int nameid; struct item_data* id; @@ -1320,7 +1315,7 @@ static bool itemdb_read_buyingstore(char* fields[], int columns, int current) return false; } - if( !itemdb_isstackable2(id) ) + if( !itemdb->isstackable2(id) ) { ShowWarning("itemdb_read_buyingstore: Non-stackable item id %d cannot be enabled for buying store.\n", nameid); return false; @@ -1334,7 +1329,7 @@ static bool itemdb_read_buyingstore(char* fields[], int columns, int current) /******************************************* ** Item usage restriction (item_nouse.txt) ********************************************/ -static bool itemdb_read_nouse(char* fields[], int columns, int current) +bool itemdb_read_nouse(char* fields[], int columns, int current) {// ,, int nameid, flag, override; struct item_data* id; @@ -1443,7 +1438,7 @@ void itemdb_read_combos() { struct item_data * id = NULL; int idx = 0; - if((retcount = itemdb_combo_split_atoi(str[0], items)) < 2) { + if((retcount = itemdb->combo_split_atoi(str[0], items)) < 2) { ShowError("itemdb_read_combos: line %d of \"%s\" doesn't have enough items to make for a combo (min:2), skipping.\n", lines, path); continue; } @@ -1524,7 +1519,7 @@ void itemdb_read_combos() { /*====================================== * Applies gender restrictions according to settings. [Skotlex] *======================================*/ -static int itemdb_gendercheck(struct item_data *id) +int itemdb_gendercheck(struct item_data *id) { if (id->nameid == WEDDING_RING_M) //Grom Ring return 1; @@ -1588,7 +1583,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) } //ID,Name,Jname,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Job Upper,Gender,Loc,wLV,eLV,refineable,View - id = itemdb_load(nameid); + id = itemdb->load(nameid); safestrncpy(id->name, str[1], sizeof(id->name)); safestrncpy(id->jname, str[2], sizeof(id->jname)); @@ -1637,7 +1632,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->matk = atoi(str[8]); offset += 1; } else - itemdb_re_split_atoi(str[7],&id->atk,&id->matk); + itemdb->re_split_atoi(str[7],&id->atk,&id->matk); #else id->atk = atoi(str[7]); #endif @@ -1650,12 +1645,12 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->slot = MAX_SLOTS; } - itemdb_jobid2mapid(id->class_base, (unsigned int)strtoul(str[11+offset],NULL,0)); + itemdb->jobid2mapid(id->class_base, (unsigned int)strtoul(str[11+offset],NULL,0)); id->class_upper = atoi(str[12+offset]); id->sex = atoi(str[13+offset]); id->equip = atoi(str[14+offset]); - if (!id->equip && itemdb_isequip2(id)) { + if (!id->equip && itemdb->isequip2(id)) { ShowWarning("Item %d (%s) is an equipment with no equip-field! Making it an etc item.\n", nameid, id->jname); id->type = IT_ETC; } @@ -1667,7 +1662,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->elvmax = atoi(str[17+offset]); offset += 1; } else - itemdb_re_split_atoi(str[16],&id->elv,&id->elvmax); + itemdb->re_split_atoi(str[16],&id->elv,&id->elvmax); #else id->elv = atoi(str[16]); #endif @@ -1676,7 +1671,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->flag.available = 1; id->view_id = 0; - id->sex = itemdb_gendercheck(id); //Apply gender filtering. + id->sex = itemdb->gendercheck(id); //Apply gender filtering. if (id->script) { script->free_code(id->script); @@ -1705,7 +1700,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) * Reading item from item db * item_db2 overwriting item_db *------------------------------------------*/ -static int itemdb_readdb(void) +int itemdb_readdb(void) { const char* filename[] = { DBPATH"item_db.txt", @@ -1831,7 +1826,7 @@ static int itemdb_readdb(void) /*====================================== * item_db table reading *======================================*/ -static int itemdb_read_sqldb(void) { +int itemdb_read_sqldb(void) { const char* item_db_name[] = { #ifdef RENEWAL @@ -1914,7 +1909,7 @@ int itemdb_uid_load() { } SQL->GetData(mmysql_handle, 0, &uid, NULL); - itemdb_unique_id(1, (uint64)strtoull(uid, NULL, 10)); + itemdb->unique_id(1, (uint64)strtoull(uid, NULL, 10)); SQL->FreeResult(mmysql_handle); return 0; @@ -1923,37 +1918,37 @@ int itemdb_uid_load() { /*==================================== * read all item-related databases *------------------------------------*/ -static void itemdb_read(void) { +void itemdb_read(void) { int i; DBData prev; if (iMap->db_use_sql_item_db) - itemdb_read_sqldb(); + itemdb->read_sqldb(); else - itemdb_readdb(); + itemdb->readdb(); - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) { - if( itemdb_array[i] ) { - if( itemdb->names->put(itemdb->names,DB->str2key(itemdb_array[i]->name),DB->ptr2data(itemdb_array[i]),&prev) ) { + for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) { + if( itemdb->array[i] ) { + if( itemdb->names->put(itemdb->names,DB->str2key(itemdb->array[i]->name),DB->ptr2data(itemdb->array[i]),&prev) ) { struct item_data *data = DB->data2ptr(&prev); - ShowError("itemdb_read: duplicate AegisName '%s' in item ID %d and %d\n",itemdb_array[i]->name,itemdb_array[i]->nameid,data->nameid); + ShowError("itemdb_read: duplicate AegisName '%s' in item ID %d and %d\n",itemdb->array[i]->name,itemdb->array[i]->nameid,data->nameid); } } } - itemdb_read_combos(); + itemdb->read_combos(); itemdb->read_groups(); itemdb->read_chains(); itemdb->read_packages(); - sv->readdb(iMap->db_path, "item_avail.txt", ',', 2, 2, -1, &itemdb_read_itemavail); - sv->readdb(iMap->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, &itemdb_read_itemtrade); - sv->readdb(iMap->db_path, "item_delay.txt", ',', 2, 2, -1, &itemdb_read_itemdelay); - sv->readdb(iMap->db_path, "item_stack.txt", ',', 3, 3, -1, &itemdb_read_stack); - sv->readdb(iMap->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, &itemdb_read_buyingstore); - sv->readdb(iMap->db_path, "item_nouse.txt", ',', 3, 3, -1, &itemdb_read_nouse); + sv->readdb(iMap->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail); + sv->readdb(iMap->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade); + sv->readdb(iMap->db_path, "item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); + sv->readdb(iMap->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack); + sv->readdb(iMap->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore); + sv->readdb(iMap->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse); - itemdb_uid_load(); + itemdb->uid_load(); } /*========================================== @@ -1961,7 +1956,7 @@ static void itemdb_read(void) { *------------------------------------------*/ /// Destroys the item_data. -static void destroy_item_data(struct item_data* self, int free_self) +void destroy_item_data(struct item_data* self, int free_self) { if( self == NULL ) return; @@ -1995,12 +1990,12 @@ static void destroy_item_data(struct item_data* self, int free_self) /** * @see DBApply */ -static int itemdb_final_sub(DBKey key, DBData *data, va_list ap) +int itemdb_final_sub(DBKey key, DBData *data, va_list ap) { struct item_data *id = DB->data2ptr(data); - if( id != &dummy_item ) - destroy_item_data(id, 1); + if( id != &itemdb->dummy ) + itemdb->destroy_item_data(id, 1); return 0; } @@ -2012,9 +2007,9 @@ void itemdb_reload(void) { int i,d,k; // clear the previous itemdb data - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) - if( itemdb_array[i] ) - destroy_item_data(itemdb_array[i], 1); + for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) + if( itemdb->array[i] ) + itemdb->destroy_item_data(itemdb->array[i], 1); for( i = 0; i < itemdb->group_count; i++ ) { if( itemdb->groups[i].nameid ) @@ -2054,14 +2049,14 @@ void itemdb_reload(void) { itemdb->packages = NULL; itemdb->package_count = 0; - itemdb_other->clear(itemdb_other, itemdb_final_sub); + itemdb->other->clear(itemdb->other, itemdb->final_sub); - memset(itemdb_array, 0, sizeof(itemdb_array)); + memset(itemdb->array, 0, sizeof(itemdb->array)); db_clear(itemdb->names); // read new data - itemdb_read(); + itemdb->read(); //Epoque's awesome @reloaditemdb fix - thanks! [Ind] //- Fixes the need of a @reloadmobdb after a @reloaditemdb to re-link monster drop data @@ -2074,7 +2069,7 @@ void itemdb_reload(void) { struct item_data *id; if( !entry->dropitem[d].nameid ) continue; - id = itemdb_search(entry->dropitem[d].nameid); + id = itemdb->search(entry->dropitem[d].nameid); for (k = 0; k < MAX_SEARCH; k++) { if (id->mob[k].chance <= entry->dropitem[d].p) @@ -2132,9 +2127,9 @@ void itemdb_force_name_constants(void) { void do_final_itemdb(void) { int i; - for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) - if( itemdb_array[i] ) - destroy_item_data(itemdb_array[i], 1); + for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) + if( itemdb->array[i] ) + itemdb->destroy_item_data(itemdb->array[i], 1); for( i = 0; i < itemdb->group_count; i++ ) { if( itemdb->groups[i].nameid ) @@ -2165,26 +2160,25 @@ void do_final_itemdb(void) { if( itemdb->packages ) aFree(itemdb->packages); - itemdb_other->destroy(itemdb_other, itemdb_final_sub); - destroy_item_data(&dummy_item, 0); + itemdb->other->destroy(itemdb->other, itemdb->final_sub); + itemdb->destroy_item_data(&itemdb->dummy, 0); db_destroy(itemdb->names); } void do_init_itemdb(void) { - memset(itemdb_array, 0, sizeof(itemdb_array)); - itemdb_other = idb_alloc(DB_OPT_BASE); + memset(itemdb->array, 0, sizeof(itemdb->array)); + itemdb->other = idb_alloc(DB_OPT_BASE); itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH); - create_dummy_data(); //Dummy data item. - itemdb_read(); + itemdb->create_dummy_data(); //Dummy data item. + itemdb->read(); clif->cashshop_load(); } -/* incomplete */ void itemdb_defaults(void) { itemdb = &itemdb_s; itemdb->init = do_init_itemdb; itemdb->final = do_final_itemdb; - itemdb->reload = itemdb_reload;//incomplete + itemdb->reload = itemdb_reload; itemdb->name_constants = itemdb_name_constants; itemdb->force_name_constants = itemdb_force_name_constants; /* */ @@ -2199,6 +2193,10 @@ void itemdb_defaults(void) { /* */ itemdb->names = NULL; /* */ + /* itemdb->array is cleared on itemdb->init() */ + itemdb->other = NULL; + memset(&itemdb->dummy, 0, sizeof(struct item_data)); + /* */ itemdb->read_groups = itemdb_read_groups; itemdb->read_chains = itemdb_read_chains; itemdb->read_packages = itemdb_read_packages; @@ -2212,9 +2210,49 @@ void itemdb_defaults(void) { itemdb->load = itemdb_load; itemdb->search = itemdb_search; itemdb->parse_dbrow = itemdb_parse_dbrow; - itemdb->exists = itemdb_exists;//incomplete + itemdb->exists = itemdb_exists; itemdb->in_group = itemdb_in_group; itemdb->group_item = itemdb_searchrandomid; itemdb->chain_item = itemdb_chain_item; itemdb->package_item = itemdb_package_item; + itemdb->searchname_sub = itemdb_searchname_sub; + itemdb->searchname_array_sub = itemdb_searchname_array_sub; + itemdb->searchrandomid = itemdb_searchrandomid; + itemdb->typename = itemdb_typename; + itemdb->jobid2mapid = itemdb_jobid2mapid; + itemdb->create_dummy_data = create_dummy_data; + itemdb->create_item_data = create_item_data; + itemdb->isequip = itemdb_isequip; + itemdb->isequip2 = itemdb_isequip2; + itemdb->isstackable = itemdb_isstackable; + itemdb->isstackable2 = itemdb_isstackable2; + itemdb->isdropable_sub = itemdb_isdropable_sub; + itemdb->cantrade_sub = itemdb_cantrade_sub; + itemdb->canpartnertrade_sub = itemdb_canpartnertrade_sub; + itemdb->cansell_sub = itemdb_cansell_sub; + itemdb->cancartstore_sub = itemdb_cancartstore_sub; + itemdb->canstore_sub = itemdb_canstore_sub; + itemdb->canguildstore_sub = itemdb_canguildstore_sub; + itemdb->canmail_sub = itemdb_canmail_sub; + itemdb->canauction_sub = itemdb_canauction_sub; + itemdb->isrestricted = itemdb_isrestricted; + itemdb->isidentified = itemdb_isidentified; + itemdb->isidentified2 = itemdb_isidentified2; + itemdb->read_itemavail = itemdb_read_itemavail; + itemdb->read_itemtrade = itemdb_read_itemtrade; + itemdb->read_itemdelay = itemdb_read_itemdelay; + itemdb->read_stack = itemdb_read_stack; + itemdb->read_buyingstore = itemdb_read_buyingstore; + itemdb->read_nouse = itemdb_read_nouse; + itemdb->combo_split_atoi = itemdb_combo_split_atoi; + itemdb->read_combos = itemdb_read_combos; + itemdb->gendercheck = itemdb_gendercheck; + itemdb->re_split_atoi = itemdb_re_split_atoi; + itemdb->readdb = itemdb_readdb; + itemdb->read_sqldb = itemdb_read_sqldb; + itemdb->unique_id = itemdb_unique_id; + itemdb->uid_load = itemdb_uid_load; + itemdb->read = itemdb_read; + itemdb->destroy_item_data = destroy_item_data; + itemdb->final_sub = itemdb_final_sub; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 126ba6334..fe67ebbef 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -240,41 +240,21 @@ struct item_package { #define itemdb_iscashfood(id) ( (id) >= 12202 && (id) <= 12207 ) #define itemdb_is_GNbomb(n) (n >= 13260 && n <= 13267) #define itemdb_is_GNthrowable(n) (n >= 13268 && n <= 13290) -const char* itemdb_typename(int type); #define itemdb_value_buy(n) itemdb->search(n)->value_buy #define itemdb_value_sell(n) itemdb->search(n)->value_sell #define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) //Item trade restrictions [Skotlex] -int itemdb_isdropable_sub(struct item_data *, int, int); -int itemdb_cantrade_sub(struct item_data*, int, int); -int itemdb_canpartnertrade_sub(struct item_data*, int, int); -int itemdb_cansell_sub(struct item_data*,int, int); -int itemdb_cancartstore_sub(struct item_data*, int, int); -int itemdb_canstore_sub(struct item_data*, int, int); -int itemdb_canguildstore_sub(struct item_data*, int, int); -int itemdb_canmail_sub(struct item_data*, int, int); -int itemdb_canauction_sub(struct item_data*, int, int); -int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(struct item_data*, int, int)); -#define itemdb_isdropable(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_isdropable_sub) -#define itemdb_cantrade(item, gmlv, gmlv2) itemdb_isrestricted(item, gmlv, gmlv2, itemdb_cantrade_sub) -#define itemdb_canpartnertrade(item, gmlv, gmlv2) itemdb_isrestricted(item, gmlv, gmlv2, itemdb_canpartnertrade_sub) -#define itemdb_cansell(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_cansell_sub) -#define itemdb_cancartstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_cancartstore_sub) -#define itemdb_canstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_canstore_sub) -#define itemdb_canguildstore(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canguildstore_sub) -#define itemdb_canmail(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canmail_sub) -#define itemdb_canauction(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canauction_sub) +#define itemdb_isdropable(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->isdropable_sub) +#define itemdb_cantrade(item, gmlv, gmlv2) itemdb->isrestricted(item, gmlv, gmlv2, itemdb->cantrade_sub) +#define itemdb_canpartnertrade(item, gmlv, gmlv2) itemdb->isrestricted(item, gmlv, gmlv2, itemdb->canpartnertrade_sub) +#define itemdb_cansell(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->cansell_sub) +#define itemdb_cancartstore(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->cancartstore_sub) +#define itemdb_canstore(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->canstore_sub) +#define itemdb_canguildstore(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canguildstore_sub) +#define itemdb_canmail(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canmail_sub) +#define itemdb_canauction(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canauction_sub) -int itemdb_isequip(int); -int itemdb_isequip2(struct item_data *); -int itemdb_isidentified(int); -int itemdb_isidentified2(struct item_data *data); -int itemdb_isstackable(int); -int itemdb_isstackable2(struct item_data *); -uint64 itemdb_unique_id(int8 flag, int64 value); // Unique Item ID - -/* incomplete */ struct itemdb_interface { void (*init) (void); void (*final) (void); @@ -294,6 +274,10 @@ struct itemdb_interface { /* */ DBMap *names; /* */ + struct item_data *array[MAX_ITEMDB]; + DBMap *other;// int nameid -> struct item_data* + struct item_data dummy; //This is the default dummy item used for non-existant items. [Skotlex] + /* */ void (*read_groups) (void); void (*read_chains) (void); void (*read_packages) (void); @@ -312,6 +296,46 @@ struct itemdb_interface { int (*group_item) (struct item_group *group); int (*chain_item) (unsigned short chain_id, int *rate); void (*package_item) (struct map_session_data *sd, struct item_package *package); + int (*searchname_sub) (DBKey key, DBData *data, va_list ap); + int (*searchname_array_sub) (DBKey key, DBData data, va_list ap); + int (*searchrandomid) (struct item_group *group); + const char* (*typename) (int type); + void (*jobid2mapid) (unsigned int *bclass, unsigned int jobmask); + void (*create_dummy_data) (void); + struct item_data* (*create_item_data) (int nameid); + int (*isequip) (int nameid); + int (*isequip2) (struct item_data *data); + int (*isstackable) (int nameid); + int (*isstackable2) (struct item_data *data); + int (*isdropable_sub) (struct item_data *item, int gmlv, int unused); + int (*cantrade_sub) (struct item_data *item, int gmlv, int gmlv2); + int (*canpartnertrade_sub) (struct item_data *item, int gmlv, int gmlv2); + int (*cansell_sub) (struct item_data *item, int gmlv, int unused); + int (*cancartstore_sub) (struct item_data *item, int gmlv, int unused); + int (*canstore_sub) (struct item_data *item, int gmlv, int unused); + int (*canguildstore_sub) (struct item_data *item, int gmlv, int unused); + int (*canmail_sub) (struct item_data *item, int gmlv, int unused); + int (*canauction_sub) (struct item_data *item, int gmlv, int unused); + int (*isrestricted) (struct item *item, int gmlv, int gmlv2, int(*func)(struct item_data *, int, int)); + int (*isidentified) (int nameid); + int (*isidentified2) (struct item_data *data); + bool (*read_itemavail) (char *str[], int columns, int current); + bool (*read_itemtrade) (char *str[], int columns, int current); + bool (*read_itemdelay) (char *str[], int columns, int current); + bool (*read_stack) (char *fields[], int columns, int current); + bool (*read_buyingstore) (char *fields[], int columns, int current); + bool (*read_nouse) (char *fields[], int columns, int current); + int (*combo_split_atoi) (char *str, int *val); + void (*read_combos) (); + int (*gendercheck) (struct item_data *id); + void (*re_split_atoi) (char *str, int *atk, int *matk); + int (*readdb) (void); + int (*read_sqldb) (void); + uint64 (*unique_id) (int8 flag, int64 value); + int (*uid_load) (); + void (*read) (void); + void (*destroy_item_data) (struct item_data *self, int free_self); + int (*final_sub) (DBKey key, DBData *data, va_list ap); }; struct itemdb_interface *itemdb; diff --git a/src/map/mob.c b/src/map/mob.c index 3b3ff0797..146f82239 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1786,7 +1786,7 @@ struct item_drop* mob_setdropitem(int nameid, int qty, struct item_data *data) { memset(&drop->item_data, 0, sizeof(struct item)); drop->item_data.nameid = nameid; drop->item_data.amount = qty; - drop->item_data.identify = data ? itemdb_isidentified2(data) : itemdb_isidentified(nameid); + drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid); drop->next = NULL; return drop; } @@ -2513,7 +2513,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) memset(&item,0,sizeof(item)); item.nameid=mdrop_id[i]; - item.identify= itemdb_isidentified2(data); + item.identify= itemdb->isidentified2(data); clif->mvp_item(mvp_sd,item.nameid); log_mvp[0] = item.nameid; diff --git a/src/map/npc.c b/src/map/npc.c index bb3a4b38e..13a625f07 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1296,7 +1296,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns if( j == nd->u.shop.count || nd->u.shop.shop_item[j].value <= 0 ) return 5; - if( !itemdb_isstackable(nameid) && amount > 1 ) + if( !itemdb->isstackable(nameid) && amount > 1 ) { ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; @@ -1402,7 +1402,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po if( nd->u.shop.shop_item[i].value <= 0 ) return 5; - if(!itemdb_isstackable(nameid) && amount > 1) + if(!itemdb->isstackable(nameid) && amount > 1) { ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); @@ -1495,7 +1495,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) if( !itemdb->exists(nameid) ) return 3; // item no longer in itemdb - if( !itemdb_isstackable(nameid) && amount > 1 ) { + if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); @@ -1605,7 +1605,7 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li script->setarray_pc(sd, "@sold_nameid", i, (void*)(intptr_t)sd->status.inventory[idx].nameid, &key_nameid); script->setarray_pc(sd, "@sold_quantity", i, (void*)(intptr_t)item_list[i*2+1], &key_amount); - if( itemdb_isequip(sd->status.inventory[idx].nameid) ) + if( itemdb->isequip(sd->status.inventory[idx].nameid) ) {// process equipment based information into the arrays script->setarray_pc(sd, "@sold_refine", i, (void*)(intptr_t)sd->status.inventory[idx].refine, &key_refine); script->setarray_pc(sd, "@sold_attribute", i, (void*)(intptr_t)sd->status.inventory[idx].attribute, &key_attribute); diff --git a/src/map/pc.c b/src/map/pc.c index dc52c88e1..6399d9f25 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -652,7 +652,7 @@ int pc_equippoint(struct map_session_data *sd,int n) if(!sd->inventory_data[n]) return 0; - if (!itemdb_isequip2(sd->inventory_data[n])) + if (!itemdb->isequip2(sd->inventory_data[n])) return 0; //Not equippable by players. ep = sd->inventory_data[n]->equip; @@ -3699,7 +3699,7 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount) data = itemdb->search(nameid); - if(!itemdb_isstackable2(data)) + if(!itemdb->isstackable2(data)) return ADDITEM_NEW; if( data->stack.inventory && amount > data->stack.amount ) @@ -3945,7 +3945,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l i = MAX_INVENTORY; - if( itemdb_isstackable2(data) && item_data->expire_time == 0 ) + if( itemdb->isstackable2(data) && item_data->expire_time == 0 ) { // Stackable | Non Rental for( i = 0; i < MAX_INVENTORY; i++ ) { @@ -3976,8 +3976,8 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l clif->additem(sd,i,amount,0); } #ifdef NSI_UNIQUE_ID - if( !itemdb_isstackable2(data) && !item_data->unique_id ) - sd->status.inventory[i].unique_id = itemdb_unique_id(0,0); + if( !itemdb->isstackable2(data) && !item_data->unique_id ) + sd->status.inventory[i].unique_id = itemdb->unique_id(0,0); #endif logs->pick_pc(sd, log_type, amount, &sd->status.inventory[i],sd->inventory_data[i]); @@ -4517,7 +4517,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; i = MAX_CART; - if( itemdb_isstackable2(data) && !item_data->expire_time ) + if( itemdb->isstackable2(data) && !item_data->expire_time ) { ARR_FIND( 0, MAX_CART, i, sd->status.cart[i].nameid == item_data->nameid && @@ -4731,7 +4731,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil memset(&tmp_item,0,sizeof(tmp_item)); tmp_item.nameid = itemid; tmp_item.amount = 1; - tmp_item.identify = itemdb_isidentified2(data); + tmp_item.identify = itemdb->isidentified2(data); flag = pc->additem(sd,&tmp_item,1,LOG_TYPE_PICKDROP_PLAYER); //TODO: Should we disable stealing when the item you stole couldn't be added to your inventory? Perhaps players will figure out a way to exploit this behaviour otherwise? diff --git a/src/map/script.c b/src/map/script.c index 3ea26694e..efd743d13 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5759,7 +5759,7 @@ BUILDIN(checkweight) // item is already in inventory, but there is still space for the requested amount break; case ADDITEM_NEW: - if( itemdb_isstackable(nameid) ) {// stackable + if( itemdb->isstackable(nameid) ) {// stackable amount2++; if( slots < amount2 ) { script_pushint(st,0); @@ -5864,7 +5864,7 @@ BUILDIN(checkweight2) // item is already in inventory, but there is still space for the requested amount break; case ADDITEM_NEW: - if( itemdb_isstackable(nameid) ){// stackable + if( itemdb->isstackable(nameid) ){// stackable amount2++; if( slots < amount2 ) fail = 1; @@ -5932,7 +5932,7 @@ BUILDIN(getitem) if(!flag) it.identify=1; else - it.identify=itemdb_isidentified2(item_data); + it.identify=itemdb->isidentified2(item_data); if( script_hasdata(st,4) ) sd=iMap->id2sd(script_getnum(st,4)); // @@ -5943,7 +5943,7 @@ BUILDIN(getitem) return true; //Check if it's stackable. - if (!itemdb_isstackable(nameid)) + if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = amount; @@ -6041,7 +6041,7 @@ BUILDIN(getitem2) item_tmp.card[3]=(short)c4; //Check if it's stackable. - if (!itemdb_isstackable(nameid)) + if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = amount; @@ -6157,7 +6157,7 @@ BUILDIN(getnameditem) }else nameid = script->conv_num(st,data); - if(!itemdb->exists(nameid)/* || itemdb_isstackable(nameid)*/) + if(!itemdb->exists(nameid)/* || itemdb->isstackable(nameid)*/) { //Even though named stackable items "could" be risky, they are required for certain quests. script_pushint(st,0); return true; @@ -6275,7 +6275,7 @@ BUILDIN(makeitem) if(!flag) item_tmp.identify=1; else - item_tmp.identify=itemdb_isidentified2(item_data); + item_tmp.identify=itemdb->isidentified2(item_data); iMap->addflooritem(&item_tmp,amount,m,x,y,0,0,0,0); @@ -13220,7 +13220,7 @@ BUILDIN(autoequip) return false; } - if( !itemdb_isequip2(item_data) ) + if( !itemdb->isequip2(item_data) ) { ShowError("buildin_autoequip: Item '%d' cannot be equipped.\n", nameid); return false; @@ -17037,9 +17037,9 @@ BUILDIN(getrandgroupitem) { nameid = itemdb->group_item(data->group); it.nameid = nameid; - it.identify = itemdb_isidentified(nameid); + it.identify = itemdb->isidentified(nameid); - if (!itemdb_isstackable(nameid)) + if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = count; diff --git a/src/map/skill.c b/src/map/skill.c index ecd672319..ded169677 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -16125,7 +16125,7 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid, }while( j>=0 && x>0 ); } - if( (equip = (itemdb_isequip(nameid) && skill_id != GN_CHANGEMATERIAL && skill_id != GN_MAKEBOMB )) ) + if( (equip = (itemdb->isequip(nameid) && skill_id != GN_CHANGEMATERIAL && skill_id != GN_MAKEBOMB )) ) wlv = itemdb_wlv(nameid); if(!equip) { switch(skill_id){ diff --git a/src/map/storage.c b/src/map/storage.c index 81d746cc8..2fe7607c3 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -152,7 +152,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } - if( itemdb_isstackable2(data) ) + if( itemdb->isstackable2(data) ) {//Stackable for( i = 0; i < MAX_STORAGE; i++ ) { @@ -448,7 +448,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if(itemdb_isstackable2(data)){ //Stackable + if(itemdb->isstackable2(data)){ //Stackable for(i=0;iitems[i], item_data)) { if( amount > MAX_AMOUNT - stor->items[i].amount || ( data->stack.guildstorage && amount > data->stack.amount - stor->items[i].amount ) ) diff --git a/src/map/trade.c b/src/map/trade.c index 9bf63c428..3134fa3e4 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -261,7 +261,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) data = itemdb->search(inventory[n].nameid); i = MAX_INVENTORY; - if (itemdb_isstackable2(data)) { //Stackable item. + if (itemdb->isstackable2(data)) { //Stackable item. for(i = 0; i < MAX_INVENTORY; i++) if (inventory2[i].nameid == inventory[n].nameid && inventory2[i].card[0] == inventory[n].card[0] && inventory2[i].card[1] == inventory[n].card[1] && @@ -292,7 +292,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) // search if it's possible to add item (for full inventory) data = itemdb->search(inventory2[n].nameid); i = MAX_INVENTORY; - if (itemdb_isstackable2(data)) { + if (itemdb->isstackable2(data)) { for(i = 0; i < MAX_INVENTORY; i++) if (inventory[i].nameid == inventory2[n].nameid && inventory[i].card[0] == inventory2[n].card[0] && inventory[i].card[1] == inventory2[n].card[1] && -- cgit v1.2.3-70-g09d2 From b89f58edd8b368e2548ace86f06354bd6ea1c8d2 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 27 Sep 2013 05:30:37 +0200 Subject: Renamed iMap interface to map Signed-off-by: Haru --- src/map/atcommand.c | 489 ++++++++++------------ src/map/battle.c | 246 +++++------ src/map/battleground.c | 10 +- src/map/buyingstore.c | 23 +- src/map/chat.c | 74 ++-- src/map/chrif.c | 64 +-- src/map/clif.c | 304 ++++++-------- src/map/duel.c | 4 +- src/map/elemental.c | 22 +- src/map/guild.c | 151 ++++--- src/map/homunculus.c | 24 +- src/map/instance.c | 32 +- src/map/intif.c | 101 ++--- src/map/itemdb.c | 37 +- src/map/log.c | 2 +- src/map/map.c | 581 +++++++++++++------------ src/map/map.h | 12 +- src/map/mercenary.c | 24 +- src/map/mob.c | 282 ++++++------- src/map/npc.c | 372 ++++++++-------- src/map/npc_chat.c | 8 +- src/map/party.c | 55 ++- src/map/pc.c | 199 ++++----- src/map/pet.c | 84 ++-- src/map/quest.c | 13 +- src/map/script.c | 966 ++++++++++++++++++------------------------ src/map/searchstore.c | 2 +- src/map/skill.c | 1093 +++++++++++++++++++++++------------------------- src/map/status.c | 224 +++++----- src/map/storage.c | 29 +- src/map/trade.c | 42 +- src/map/unit.c | 227 +++++----- src/map/vending.c | 8 +- src/plugins/db2sql.c | 34 +- 34 files changed, 2711 insertions(+), 3127 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9dbe0ab33..f61a4bd45 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -384,8 +384,7 @@ return false;\ /*========================================== * @rura, @warp, @mapmove *------------------------------------------*/ -ACMD(mapmove) -{ +ACMD(mapmove) { char map_name[MAP_NAME_LENGTH_EXT]; unsigned short mapindex; short x = 0, y = 0; @@ -405,17 +404,17 @@ ACMD(mapmove) mapindex = mapindex_name2id(map_name); if (mapindex) - m = iMap->mapindex2mapid(mapindex); + m = map->mapindex2mapid(mapindex); if (!mapindex || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin] clif->message(fd, msg_txt(1)); // Map not found. return false; } - if ((x || y) && iMap->getcell(m, x, y, CELL_CHKNOPASS) && pc->get_group_level(sd) < battle_config.gm_ignore_warpable_area) - { //This is to prevent the pc->setpos call from printing an error. + if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc->get_group_level(sd) < battle_config.gm_ignore_warpable_area) { + //This is to prevent the pc->setpos call from printing an error. clif->message(fd, msg_txt(2)); - if (!iMap->search_freecell(NULL, m, &x, &y, 10, 10, 1)) + if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } if (maplist[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { @@ -438,8 +437,7 @@ ACMD(mapmove) /*========================================== * Displays where a character is. Corrected version by Silent. [Skotlex] *------------------------------------------*/ -ACMD(where) -{ +ACMD(where) { struct map_session_data* pl_sd; nullpo_retr(-1, sd); @@ -450,7 +448,7 @@ ACMD(where) return false; } - pl_sd = iMap->nick2sd(atcmd_player_name); + pl_sd = map->nick2sd(atcmd_player_name); if (pl_sd == NULL || strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 || (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > pc->get_group_level(sd) && !pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) @@ -478,7 +476,7 @@ ACMD(jumpto) { return false; } - if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) { + if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -529,10 +527,10 @@ ACMD(jump) return false; } - if ((x || y) && iMap->getcell(sd->bl.m, x, y, CELL_CHKNOPASS)) - { //This is to prevent the pc->setpos call from printing an error. + if ((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKNOPASS)) { + //This is to prevent the pc->setpos call from printing an error. clif->message(fd, msg_txt(2)); - if (!iMap->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1)) + if (!map->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } @@ -546,8 +544,7 @@ ACMD(jump) * Display list of online characters with * various info. *------------------------------------------*/ -ACMD(who) -{ +ACMD(who) { struct map_session_data *pl_sd = NULL; struct s_mapiterator *iter = NULL; char map_name[MAP_NAME_LENGTH_EXT] = ""; @@ -566,7 +563,7 @@ ACMD(who) nullpo_retr(-1, sd); if (strstr(command, "map") != NULL) { - if (sscanf(message, "%15s %23s", map_name, player_name) < 1 || (map_id = iMap->mapname2mapid(map_name)) < 0) + if (sscanf(message, "%15s %23s", map_name, player_name) < 1 || (map_id = map->mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } else { sscanf(message, "%23s", player_name); @@ -757,7 +754,7 @@ ACMD(load) { nullpo_retr(-1, sd); - m = iMap->mapindex2mapid(sd->status.save_point.map); + m = map->mapindex2mapid(sd->status.save_point.map); if (m >= 0 && maplist[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map. return false; @@ -908,7 +905,7 @@ ACMD(hide) { sd->pvp_timer = timer->add( timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0 ); } //bugreport:2266 - iMap->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); + map->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); } else { sd->sc.option |= OPTION_INVISIBLE; sd->vd.class_ = INVISIBLE_CLASS; @@ -1476,15 +1473,15 @@ ACMD(pvpoff) { return false; } - iMap->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); + map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); maplist[sd->bl.m].flag.pvp = 0; if (!battle_config.pk_mode) { clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); } - iMap->foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC); - iMap->foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); + map->foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC); + map->foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); clif->message(fd, msg_txt(31)); // PvP: Off. return true; } @@ -1514,13 +1511,13 @@ ACMD(pvpon) { return false; } - iMap->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME)); + map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME)); maplist[sd->bl.m].flag.pvp = 1; if (!battle_config.pk_mode) {// display pvp circle and rank clif->map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); - iMap->foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC); + map->foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC); } clif->message(fd, msg_txt(32)); // PvP: On. @@ -1539,11 +1536,11 @@ ACMD(gvgoff) { return false; } - iMap->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); + map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); maplist[sd->bl.m].flag.gvg = 0; clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); - iMap->foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); + map->foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); clif->message(fd, msg_txt(33)); // GvG: Off. return true; @@ -1560,7 +1557,7 @@ ACMD(gvgon) { return false; } - iMap->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME)); + map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME)); maplist[sd->bl.m].flag.gvg = 1; clif->map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); @@ -1852,7 +1849,7 @@ ACMD(go) } if (town >= 0 && town < ARRAYLENGTH(data)) { - m = iMap->mapname2mapid(data[town].map); + m = map->mapname2mapid(data[town].map); if (m >= 0 && maplist[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); return false; @@ -1952,7 +1949,7 @@ ACMD(monster) count = 0; range = (int)sqrt((float)number) +2; // calculation of an odd number (+ 4 area around) for (i = 0; i < number; i++) { - iMap->search_freecell(&sd->bl, 0, &mx, &my, range, range, 0); + map->search_freecell(&sd->bl, 0, &mx, &my, range, range, 0); k = mob->once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, eventname, size, AI_NONE); count += (k != 0) ? 1 : 0; } @@ -1993,8 +1990,7 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap) return 1; } -ACMD(killmonster) -{ +ACMD(killmonster) { int map_id, drop_flag; char map_name[MAP_NAME_LENGTH_EXT]; nullpo_retr(-1, sd); @@ -2004,13 +2000,13 @@ ACMD(killmonster) if (!message || !*message || sscanf(message, "%15s", map_name) < 1) map_id = sd->bl.m; else { - if ((map_id = iMap->mapname2mapid(map_name)) < 0) + if ((map_id = map->mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } drop_flag = strcmp(command+1, "killmonster2"); - iMap->foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag); + map->foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag); clif->message(fd, msg_txt(165)); // All monsters killed! @@ -2193,8 +2189,7 @@ ACMD(memo) /*========================================== * *------------------------------------------*/ -ACMD(gat) -{ +ACMD(gat) { int y; nullpo_retr(-1, sd); @@ -2203,11 +2198,11 @@ ACMD(gat) for (y = 2; y >= -2; y--) { sprintf(atcmd_output, "%s (x= %d, y= %d) %02X %02X %02X %02X %02X", maplist[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y, - iMap->getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), - iMap->getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), - iMap->getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), - iMap->getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), - iMap->getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); + map->getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); clif->message(fd, atcmd_output); } @@ -2687,8 +2682,7 @@ ACMD(recall) { return false; } - if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) - { + if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -2880,11 +2874,10 @@ ACMD(char_unban) /*========================================== * *------------------------------------------*/ -ACMD(night) -{ +ACMD(night) { nullpo_retr(-1, sd); - if (iMap->night_flag != 1) { + if (map->night_flag != 1) { pc->map_night_timer(pc->night_timer_tid, 0, 0, 1); } else { clif->message(fd, msg_txt(89)); // Night mode is already enabled. @@ -2897,11 +2890,10 @@ ACMD(night) /*========================================== * *------------------------------------------*/ -ACMD(day) -{ +ACMD(day) { nullpo_retr(-1, sd); - if (iMap->night_flag != 0) { + if (map->night_flag != 0) { pc->map_day_timer(pc->day_timer_tid, 0, 0, 1); } else { clif->message(fd, msg_txt(90)); // Day mode is already enabled. @@ -3033,8 +3025,7 @@ ACMD(kick) return false; } - if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) - { + if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -3282,15 +3273,14 @@ ACMD(breakguild) /*========================================== * *------------------------------------------*/ -ACMD(agitstart) -{ +ACMD(agitstart) { nullpo_retr(-1, sd); - if (iMap->agit_flag == 1) { + if (map->agit_flag == 1) { clif->message(fd, msg_txt(73)); // War of Emperium is currently in progress. return false; } - iMap->agit_flag = 1; + map->agit_flag = 1; guild->agit_start(); clif->message(fd, msg_txt(72)); // War of Emperium has been initiated. @@ -3300,15 +3290,14 @@ ACMD(agitstart) /*========================================== * *------------------------------------------*/ -ACMD(agitstart2) -{ +ACMD(agitstart2) { nullpo_retr(-1, sd); - if (iMap->agit2_flag == 1) { + if (map->agit2_flag == 1) { clif->message(fd, msg_txt(404)); // "War of Emperium SE is currently in progress." return false; } - iMap->agit2_flag = 1; + map->agit2_flag = 1; guild->agit2_start(); clif->message(fd, msg_txt(403)); // "War of Emperium SE has been initiated." @@ -3318,15 +3307,14 @@ ACMD(agitstart2) /*========================================== * *------------------------------------------*/ -ACMD(agitend) -{ +ACMD(agitend) { nullpo_retr(-1, sd); - if (iMap->agit_flag == 0) { + if (map->agit_flag == 0) { clif->message(fd, msg_txt(75)); // War of Emperium is currently not in progress. return false; } - iMap->agit_flag = 0; + map->agit_flag = 0; guild->agit_end(); clif->message(fd, msg_txt(74)); // War of Emperium has been ended. @@ -3336,15 +3324,14 @@ ACMD(agitend) /*========================================== * *------------------------------------------*/ -ACMD(agitend2) -{ +ACMD(agitend2) { nullpo_retr(-1, sd); - if (iMap->agit2_flag == 0) { + if (map->agit2_flag == 0) { clif->message(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress." return false; } - iMap->agit2_flag = 0; + map->agit2_flag = 0; guild->agit2_end(); clif->message(fd, msg_txt(405)); // "War of Emperium SE has been ended." @@ -3354,11 +3341,10 @@ ACMD(agitend2) /*========================================== * @mapexit - shuts down the map server *------------------------------------------*/ -ACMD(mapexit) -{ +ACMD(mapexit) { nullpo_retr(-1, sd); - iMap->do_shutdown(); + map->do_shutdown(); return true; } @@ -3615,7 +3601,7 @@ ACMD(reloadatcommand) { config_destroy(&run_test); - if (conf_read_file(&run_test, iMap->ATCOMMAND_CONF_FILENAME)) { + if (conf_read_file(&run_test, map->ATCOMMAND_CONF_FILENAME)) { clif->message(fd, msg_txt(1037)); // Error reading atcommand.conf, reload failed. return false; } @@ -3635,7 +3621,7 @@ ACMD(reloadbattleconf) struct Battle_Config prev_config; memcpy(&prev_config, &battle_config, sizeof(prev_config)); - battle->config_read(iMap->BATTLE_CONF_FILENAME); + battle->config_read(map->BATTLE_CONF_FILENAME); if( prev_config.item_rate_mvp != battle_config.item_rate_mvp || prev_config.item_rate_common != battle_config.item_rate_common @@ -3696,8 +3682,7 @@ ACMD(reloadpcdb) /*========================================== * @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...) *------------------------------------------*/ -ACMD(reloadscript) -{ +ACMD(reloadscript) { struct s_mapiterator* iter; struct map_session_data* pl_sd; @@ -3726,7 +3711,7 @@ ACMD(reloadscript) mapit->free(iter); flush_fifos(); - iMap->reloadnpc(true); // reload config files seeking for npcs + map->reloadnpc(true); // reload config files seeking for npcs script->reload(); npc->reload(); @@ -3769,9 +3754,9 @@ ACMD(mapinfo) { if (mapname[0] == '\0') { safestrncpy(mapname, mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH); - m_id = iMap->mapindex2mapid(sd->mapindex); + m_id = map->mapindex2mapid(sd->mapindex); } else { - m_id = iMap->mapname2mapid(mapname); + m_id = map->mapname2mapid(mapname); } if (m_id < 0) { @@ -3789,7 +3774,7 @@ ACMD(mapinfo) { if( pl_sd->mapindex == m_index ) { if( pl_sd->state.vending ) vend_num++; - else if( (cd = (struct chat_data*)iMap->id2bl(pl_sd->chatID)) != NULL && cd->usersd[0] == pl_sd ) + else if( (cd = (struct chat_data*)map->id2bl(pl_sd->chatID)) != NULL && cd->usersd[0] == pl_sd ) chat_num++; } } @@ -3968,7 +3953,7 @@ ACMD(mapinfo) { iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if ((cd = (struct chat_data*)iMap->id2bl(pl_sd->chatID)) != NULL && + if ((cd = (struct chat_data*)map->id2bl(pl_sd->chatID)) != NULL && pl_sd->mapindex == m_index && cd->usersd[0] == pl_sd) { @@ -4058,8 +4043,7 @@ ACMD(mount_peco) /*========================================== *Spy Commands by Syrus22 *------------------------------------------*/ -ACMD(guildspy) -{ +ACMD(guildspy) { char guild_name[NAME_LENGTH]; struct guild *g; nullpo_retr(-1, sd); @@ -4067,7 +4051,7 @@ ACMD(guildspy) memset(guild_name, '\0', sizeof(guild_name)); memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (!iMap->enable_spy) + if (!map->enable_spy) { clif->message(fd, msg_txt(1125)); // The mapserver has spy command support disabled. return false; @@ -4099,8 +4083,7 @@ ACMD(guildspy) /*========================================== * *------------------------------------------*/ -ACMD(partyspy) -{ +ACMD(partyspy) { char party_name[NAME_LENGTH]; struct party_data *p; nullpo_retr(-1, sd); @@ -4108,7 +4091,7 @@ ACMD(partyspy) memset(party_name, '\0', sizeof(party_name)); memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (!iMap->enable_spy) + if (!map->enable_spy) { clif->message(fd, msg_txt(1125)); // The mapserver has spy command support disabled. return false; @@ -4170,8 +4153,7 @@ ACMD(repairall) /*========================================== * @nuke [Valaris] *------------------------------------------*/ -ACMD(nuke) -{ +ACMD(nuke) { struct map_session_data *pl_sd; nullpo_retr(-1, sd); @@ -4182,7 +4164,7 @@ ACMD(nuke) return false; } - if ((pl_sd = iMap->nick2sd(atcmd_player_name)) != NULL) { + if ((pl_sd = map->nick2sd(atcmd_player_name)) != NULL) { if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kill only lower or same GM level skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); clif->message(fd, msg_txt(109)); // Player has been nuked! @@ -4372,8 +4354,7 @@ char* txt_time(unsigned int duration) * @time/@date/@serverdate/@servertime: Display the date/time of the server (by [Yor] * Calculation management of GM modification (@day/@night GM commands) is done *------------------------------------------*/ -ACMD(servertime) -{ +ACMD(servertime) { const struct TimerData * timer_data; const struct TimerData * timer_data2; time_t time_server; // variable for number of seconds (used with time() function) @@ -4390,53 +4371,51 @@ ACMD(servertime) clif->message(fd, temp); if (battle_config.night_duration == 0 && battle_config.day_duration == 0) { - if (iMap->night_flag == 0) + if (map->night_flag == 0) clif->message(fd, msg_txt(231)); // Game time: The game is in permanent daylight. else clif->message(fd, msg_txt(232)); // Game time: The game is in permanent night. - } else if (battle_config.night_duration == 0) - if (iMap->night_flag == 1) { // we start with night + } else if (battle_config.night_duration == 0) { + if (map->night_flag == 1) { // we start with night timer_data = timer->get(pc->day_timer_tid); sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in night for %s. clif->message(fd, temp); clif->message(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight. } else clif->message(fd, msg_txt(231)); // Game time: The game is in permanent daylight. - else if (battle_config.day_duration == 0) - if (iMap->night_flag == 0) { // we start with day - timer_data = timer->get(pc->night_timer_tid); - sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. - clif->message(fd, temp); - clif->message(fd, msg_txt(236)); // Game time: After, the game will be in permanent night. - } else - clif->message(fd, msg_txt(232)); // Game time: The game is in permanent night. - else { - if (iMap->night_flag == 0) { - timer_data = timer->get(pc->night_timer_tid); - timer_data2 = timer->get(pc->day_timer_tid); - sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. - clif->message(fd, temp); - if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0) - sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s. - else - sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s. - clif->message(fd, temp); - sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s. - clif->message(fd, temp); - } else { - timer_data = timer->get(pc->day_timer_tid); - timer_data2 = timer->get(pc->night_timer_tid); - sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick()) / 1000)); // Game time: The game is actualy in night for %s. - clif->message(fd, temp); - if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0) - sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s. - else - sprintf(temp, msg_txt(239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s. - clif->message(fd, temp); - sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s. - clif->message(fd, temp); - } - } + } else if (battle_config.day_duration == 0) { + if (map->night_flag == 0) { // we start with day + timer_data = timer->get(pc->night_timer_tid); + sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. + clif->message(fd, temp); + clif->message(fd, msg_txt(236)); // Game time: After, the game will be in permanent night. + } else + clif->message(fd, msg_txt(232)); // Game time: The game is in permanent night. + } else { + if (map->night_flag == 0) { + timer_data = timer->get(pc->night_timer_tid); + timer_data2 = timer->get(pc->day_timer_tid); + sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. + clif->message(fd, temp); + if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0) + sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s. + else + sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s. + clif->message(fd, temp); + } else { + timer_data = timer->get(pc->day_timer_tid); + timer_data2 = timer->get(pc->night_timer_tid); + sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick()) / 1000)); // Game time: The game is actualy in night for %s. + clif->message(fd, temp); + if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0) + sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s. + else + sprintf(temp, msg_txt(239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s. + clif->message(fd, temp); + } + sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s. + clif->message(fd, temp); + } return true; } @@ -4473,8 +4452,7 @@ static void get_jail_time(int jailtime, int* year, int* month, int* day, int* ho * @jail by [Yor] * Special warp! No check with nowarp and nowarpto flag *------------------------------------------*/ -ACMD(jail) -{ +ACMD(jail) { struct map_session_data *pl_sd; int x, y; unsigned short m_index; @@ -4487,7 +4465,7 @@ ACMD(jail) return false; } - if ((pl_sd = iMap->nick2sd(atcmd_player_name)) == NULL) { + if ((pl_sd = map->nick2sd(atcmd_player_name)) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -4528,8 +4506,7 @@ ACMD(jail) * @unjail/@discharge by [Yor] * Special warp! No check with nowarp and nowarpto flag *------------------------------------------*/ -ACMD(unjail) -{ +ACMD(unjail) { struct map_session_data *pl_sd; memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); @@ -4539,7 +4516,7 @@ ACMD(unjail) return false; } - if ((pl_sd = iMap->nick2sd(atcmd_player_name)) == NULL) { + if ((pl_sd = map->nick2sd(atcmd_player_name)) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -4563,8 +4540,7 @@ ACMD(unjail) return true; } -ACMD(jailfor) -{ +ACMD(jailfor) { struct map_session_data *pl_sd = NULL; int year, month, day, hour, minute, value; char * modif_p; @@ -4619,7 +4595,7 @@ ACMD(jailfor) return false; } - if ((pl_sd = iMap->nick2sd(atcmd_player_name)) == NULL) { + if ((pl_sd = map->nick2sd(atcmd_player_name)) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -5039,8 +5015,7 @@ ACMD(killer) * @killable by MouseJstr * enable other people killing you *------------------------------------------*/ -ACMD(killable) -{ +ACMD(killable) { nullpo_retr(-1, sd); sd->state.killable = !sd->state.killable; @@ -5048,7 +5023,7 @@ ACMD(killable) clif->message(fd, msg_txt(242)); else { clif->message(fd, msg_txt(288)); - iMap->foreachinrange(atcommand_stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id); + map->foreachinrange(atcommand_stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id); } return true; } @@ -5079,8 +5054,7 @@ ACMD(skilloff) { * @npcmove by MouseJstr * move a npc *------------------------------------------*/ -ACMD(npcmove) -{ +ACMD(npcmove) { int x = 0, y = 0, m; struct npc_data *nd = 0; nullpo_retr(-1, sd); @@ -5091,23 +5065,21 @@ ACMD(npcmove) return false; } - if ((nd = npc->name2id(atcmd_player_name)) == NULL) - { + if ((nd = npc->name2id(atcmd_player_name)) == NULL) { clif->message(fd, msg_txt(111)); // This NPC doesn't exist. return false; } - if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL) - { + if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL) { clif->message(fd, msg_txt(1154)); // NPC is not on this map. return false; //Not on a map. } x = cap_value(x, 0, maplist[m].xs-1); y = cap_value(y, 0, maplist[m].ys-1); - iMap->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); - iMap->moveblock(&nd->bl, x, y, timer->gettick()); - iMap->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); + map->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); + map->moveblock(&nd->bl, x, y, timer->gettick()); + map->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); clif->message(fd, msg_txt(1155)); // NPC moved. return true; @@ -5153,8 +5125,7 @@ ACMD(addwarp) * @follow by [MouseJstr] * Follow a player .. staying no more then 5 spaces away *------------------------------------------*/ -ACMD(follow) -{ +ACMD(follow) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -5167,7 +5138,7 @@ ACMD(follow) return true; } - if ( (pl_sd = iMap->nick2sd((char *)message)) == NULL ) + if ( (pl_sd = map->nick2sd((char *)message)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; @@ -5371,8 +5342,7 @@ ACMD(skillid) { * @useskill by [MouseJstr] * A way of using skills without having to find them in the skills menu *------------------------------------------*/ -ACMD(useskill) -{ +ACMD(useskill) { struct map_session_data *pl_sd = NULL; struct block_list *bl; uint16 skill_id; @@ -5385,8 +5355,9 @@ ACMD(useskill) return false; } - if(!strcmp(target,"self")) pl_sd = sd; //quick keyword - else if ( (pl_sd = iMap->nick2sd(target)) == NULL ){ + if(!strcmp(target,"self")) + pl_sd = sd; //quick keyword + else if ( (pl_sd = map->nick2sd(target)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -5439,8 +5410,7 @@ ACMD(displayskill) { * @skilltree by [MouseJstr] * prints the skill tree for a player required to get to a skill *------------------------------------------*/ -ACMD(skilltree) -{ +ACMD(skilltree) { struct map_session_data *pl_sd = NULL; uint16 skill_id; int meets, j, c=0; @@ -5453,8 +5423,7 @@ ACMD(skilltree) return false; } - if ( (pl_sd = iMap->nick2sd(target)) == NULL ) - { + if ( (pl_sd = map->nick2sd(target)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -5492,8 +5461,7 @@ ACMD(skilltree) } // Hand a ring with partners name on it to this char -void getring (struct map_session_data* sd) -{ +void getring(struct map_session_data* sd) { int flag, item_id; struct item item_tmp; item_id = (sd->status.sex) ? WEDDING_RING_M : WEDDING_RING_F; @@ -5507,7 +5475,7 @@ void getring (struct map_session_data* sd) if((flag = pc->additem(sd,&item_tmp,1,LOG_TYPE_COMMAND))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -5515,8 +5483,7 @@ void getring (struct map_session_data* sd) * @marry by [MouseJstr], fixed by Lupus * Marry two players *------------------------------------------*/ -ACMD(marry) -{ +ACMD(marry) { struct map_session_data *pl_sd = NULL; char player_name[NAME_LENGTH] = ""; @@ -5527,7 +5494,7 @@ ACMD(marry) return false; } - if ((pl_sd = iMap->nick2sd(player_name)) == NULL) { + if ((pl_sd = map->nick2sd(player_name)) == NULL) { clif->message(fd, msg_txt(3)); return false; } @@ -5628,8 +5595,7 @@ ACMD(autotrade) { * @changegm by durf (changed by Lupus) * Changes Master of your Guild to a specified guild member *------------------------------------------*/ -ACMD(changegm) -{ +ACMD(changegm) { struct guild *g; struct map_session_data *pl_sd; nullpo_retr(-1, sd); @@ -5649,7 +5615,7 @@ ACMD(changegm) return false; } - if((pl_sd=iMap->nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) { + if((pl_sd=map->nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) { clif->message(fd, msg_txt(1184)); // Target character must be online and be a guild member. return false; } @@ -5662,17 +5628,15 @@ ACMD(changegm) * @changeleader by Skotlex * Changes the leader of a party. *------------------------------------------*/ -ACMD(changeleader) -{ +ACMD(changeleader) { nullpo_retr(-1, sd); - if( !message[0] ) - { + if( !message[0] ) { clif->message(fd, msg_txt(1185)); // Usage: @changeleader return false; } - if (party->changeleader(sd, iMap->nick2sd((char *) message))) + if (party->changeleader(sd, map->nick2sd((char *) message))) return true; return false; } @@ -6096,33 +6060,28 @@ ACMD(mobsearch) * @cleanmap - cleans items on the ground * @cleanarea - cleans items on the ground within an specified area *------------------------------------------*/ -static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) -{ +static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { nullpo_ret(bl); - iMap->clearflooritem(bl); + map->clearflooritem(bl); return 0; } -ACMD(cleanmap) -{ - iMap->foreachinmap(atcommand_cleanfloor_sub, sd->bl.m, BL_ITEM); +ACMD(cleanmap) { + map->foreachinmap(atcommand_cleanfloor_sub, sd->bl.m, BL_ITEM); clif->message(fd, msg_txt(1221)); // All dropped items have been cleaned up. return true; } -ACMD(cleanarea) -{ +ACMD(cleanarea) { int x0 = 0, y0 = 0, x1 = 0, y1 = 0; if (!message || !*message || sscanf(message, "%d %d %d %d", &x0, &y0, &x1, &y1) < 1) { - iMap->foreachinrange(atcommand_cleanfloor_sub, &sd->bl, AREA_SIZE * 2, BL_ITEM); - } - else if (sscanf(message, "%d %d %d %d", &x0, &y0, &x1, &y1) == 1) { - iMap->foreachinrange(atcommand_cleanfloor_sub, &sd->bl, x0, BL_ITEM); - } - else if (sscanf(message, "%d %d %d %d", &x0, &y0, &x1, &y1) == 4) { - iMap->foreachinarea(atcommand_cleanfloor_sub, sd->bl.m, x0, y0, x1, y1, BL_ITEM); + map->foreachinrange(atcommand_cleanfloor_sub, &sd->bl, AREA_SIZE * 2, BL_ITEM); + } else if (sscanf(message, "%d %d %d %d", &x0, &y0, &x1, &y1) == 1) { + map->foreachinrange(atcommand_cleanfloor_sub, &sd->bl, x0, BL_ITEM); + } else if (sscanf(message, "%d %d %d %d", &x0, &y0, &x1, &y1) == 4) { + map->foreachinarea(atcommand_cleanfloor_sub, sd->bl.m, x0, y0, x1, y1, BL_ITEM); } clif->message(fd, msg_txt(1221)); // All dropped items have been cleaned up. @@ -6372,8 +6331,7 @@ ACMD(adjgroup) * @trade by [MouseJstr] * Open a trade window with a remote player *------------------------------------------*/ -ACMD(trade) -{ +ACMD(trade) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -6382,8 +6340,7 @@ ACMD(trade) return false; } - if ( (pl_sd = iMap->nick2sd((char *)message)) == NULL ) - { + if ( (pl_sd = map->nick2sd((char *)message)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -6419,8 +6376,7 @@ ACMD(setbattleflag) /*========================================== * @unmute [Valaris] *------------------------------------------*/ -ACMD(unmute) -{ +ACMD(unmute) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -6429,7 +6385,7 @@ ACMD(unmute) return false; } - if ( (pl_sd = iMap->nick2sd((char *)message)) == NULL ) + if ( (pl_sd = map->nick2sd((char *)message)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; @@ -6489,8 +6445,7 @@ ACMD(changesex) /*================================================ * @mute - Mutes a player for a set amount of time *------------------------------------------------*/ -ACMD(mute) -{ +ACMD(mute) { struct map_session_data *pl_sd = NULL; int manner; nullpo_retr(-1, sd); @@ -6500,8 +6455,7 @@ ACMD(mute) return false; } - if ( (pl_sd = iMap->nick2sd(atcmd_player_name)) == NULL ) - { + if ( (pl_sd = map->nick2sd(atcmd_player_name)) == NULL ) { clif->message(fd, msg_txt(3)); // Character not found. return false; } @@ -7288,7 +7242,7 @@ ACMD(whereis) clif->message(fd, atcmd_output); for (i = 0; i < ARRAYLENGTH(monster->spawn) && monster->spawn[i].qty; i++) { - j = iMap->mapindex2mapid(monster->spawn[i].mapindex); + j = map->mapindex2mapid(monster->spawn[i].mapindex); if (j < 0) continue; snprintf(atcmd_output, sizeof atcmd_output, "%s (%d)", maplist[j].name, monster->spawn[i].qty); clif->message(fd, atcmd_output); @@ -7340,8 +7294,7 @@ static int atcommand_mutearea_sub(struct block_list *bl,va_list ap) return 0; } -ACMD(mutearea) -{ +ACMD(mutearea) { int time; nullpo_ret(sd); @@ -7352,9 +7305,9 @@ ACMD(mutearea) time = atoi(message); - iMap->foreachinarea(atcommand_mutearea_sub,sd->bl.m, - sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, - sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd->bl.id, time); + map->foreachinarea(atcommand_mutearea_sub,sd->bl.m, + sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, + sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd->bl.id, time); return true; } @@ -7566,8 +7519,8 @@ ACMD(fakename) * Ragnarok Resources *------------------------------------------*/ ACMD(mapflag) { -#define checkflag( cmd ) if ( maplist[ sd->bl.m ].flag.cmd ) clif->message(sd->fd,#cmd) -#define setflag( cmd ) do {\ +#define CHECKFLAG( cmd ) do { if ( maplist[ sd->bl.m ].flag.cmd ) clif->message(sd->fd,#cmd); } while(0) +#define SETFLAG( cmd ) do { \ if ( strcmp( flag_name , #cmd ) == 0 ) { \ maplist[ sd->bl.m ].flag.cmd = flag; \ sprintf(atcmd_output,"[ @mapflag ] %s flag has been set to %s value = %hd",#cmd,flag?"On":"Off",flag); \ @@ -7584,19 +7537,19 @@ ACMD(mapflag) { if (!message || !*message || (sscanf(message, "%99s %hd", flag_name, &flag) < 1)) { clif->message(sd->fd,msg_txt(1311)); // Enabled Mapflags in this map: clif->message(sd->fd,"----------------------------------"); - checkflag(autotrade); checkflag(allowks); checkflag(nomemo); checkflag(noteleport); - checkflag(noreturn); checkflag(monster_noteleport); checkflag(nosave); checkflag(nobranch); - checkflag(noexppenalty); checkflag(pvp); checkflag(pvp_noparty); checkflag(pvp_noguild); - checkflag(pvp_nightmaredrop); checkflag(pvp_nocalcrank); checkflag(gvg_castle); checkflag(gvg); - checkflag(gvg_dungeon); checkflag(gvg_noparty); checkflag(battleground);checkflag(nozenypenalty); - checkflag(notrade); checkflag(noskill); checkflag(nowarp); checkflag(nowarpto); - checkflag(noicewall); checkflag(snow); checkflag(clouds); checkflag(clouds2); - checkflag(fog); checkflag(fireworks); checkflag(sakura); checkflag(leaves); - checkflag(nobaseexp); - checkflag(nojobexp); checkflag(nomobloot); checkflag(nomvploot); checkflag(nightenabled); - checkflag(nodrop); checkflag(novending); checkflag(loadevent); - checkflag(nochat); checkflag(partylock); checkflag(guildlock); checkflag(src4instance); - checkflag(notomb); + CHECKFLAG(autotrade); CHECKFLAG(allowks); CHECKFLAG(nomemo); CHECKFLAG(noteleport); + CHECKFLAG(noreturn); CHECKFLAG(monster_noteleport); CHECKFLAG(nosave); CHECKFLAG(nobranch); + CHECKFLAG(noexppenalty); CHECKFLAG(pvp); CHECKFLAG(pvp_noparty); CHECKFLAG(pvp_noguild); + CHECKFLAG(pvp_nightmaredrop); CHECKFLAG(pvp_nocalcrank); CHECKFLAG(gvg_castle); CHECKFLAG(gvg); + CHECKFLAG(gvg_dungeon); CHECKFLAG(gvg_noparty); CHECKFLAG(battleground); CHECKFLAG(nozenypenalty); + CHECKFLAG(notrade); CHECKFLAG(noskill); CHECKFLAG(nowarp); CHECKFLAG(nowarpto); + CHECKFLAG(noicewall); CHECKFLAG(snow); CHECKFLAG(clouds); CHECKFLAG(clouds2); + CHECKFLAG(fog); CHECKFLAG(fireworks); CHECKFLAG(sakura); CHECKFLAG(leaves); + CHECKFLAG(nobaseexp); + CHECKFLAG(nojobexp); CHECKFLAG(nomobloot); CHECKFLAG(nomvploot); CHECKFLAG(nightenabled); + CHECKFLAG(nodrop); CHECKFLAG(novending); CHECKFLAG(loadevent); + CHECKFLAG(nochat); CHECKFLAG(partylock); CHECKFLAG(guildlock); CHECKFLAG(src4instance); + CHECKFLAG(notomb); clif->message(sd->fd," "); clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On) clif->message(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags. @@ -7606,34 +7559,34 @@ ACMD(mapflag) { if ( strcmp( flag_name , "gvg" ) == 0 ) { if( flag && !maplist[sd->bl.m].flag.gvg ) - iMap->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME)); + map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME)); else if ( !flag && maplist[sd->bl.m].flag.gvg ) - iMap->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); + map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); } else if ( strcmp( flag_name , "pvp" ) == 0 ) { if( flag && !maplist[sd->bl.m].flag.pvp ) - iMap->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME)); + map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME)); else if ( !flag && maplist[sd->bl.m].flag.pvp ) - iMap->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); + map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); } else if ( strcmp( flag_name , "battleground" ) == 0 ) { if( flag && !maplist[sd->bl.m].flag.battleground ) - iMap->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_BG_NAME)); + map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_BG_NAME)); else if ( !flag && maplist[sd->bl.m].flag.battleground ) - iMap->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); - } - - setflag(autotrade); setflag(allowks); setflag(nomemo); setflag(noteleport); - setflag(noreturn); setflag(monster_noteleport);setflag(nosave); setflag(nobranch); - setflag(noexppenalty); setflag(pvp); setflag(pvp_noparty); setflag(pvp_noguild); - setflag(pvp_nightmaredrop); setflag(pvp_nocalcrank); setflag(gvg_castle); setflag(gvg); - setflag(gvg_dungeon); setflag(gvg_noparty); setflag(battleground); setflag(nozenypenalty); - setflag(notrade); setflag(noskill); setflag(nowarp); setflag(nowarpto); - setflag(noicewall); setflag(snow); setflag(clouds); setflag(clouds2); - setflag(fog); setflag(fireworks); setflag(sakura); setflag(leaves); - setflag(nobaseexp); - setflag(nojobexp); setflag(nomobloot); setflag(nomvploot); setflag(nightenabled); - setflag(nodrop); setflag(novending); setflag(loadevent); - setflag(nochat); setflag(partylock); setflag(guildlock); setflag(src4instance); - setflag(notomb); + map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone); + } + + SETFLAG(autotrade); SETFLAG(allowks); SETFLAG(nomemo); SETFLAG(noteleport); + SETFLAG(noreturn); SETFLAG(monster_noteleport); SETFLAG(nosave); SETFLAG(nobranch); + SETFLAG(noexppenalty); SETFLAG(pvp); SETFLAG(pvp_noparty); SETFLAG(pvp_noguild); + SETFLAG(pvp_nightmaredrop); SETFLAG(pvp_nocalcrank); SETFLAG(gvg_castle); SETFLAG(gvg); + SETFLAG(gvg_dungeon); SETFLAG(gvg_noparty); SETFLAG(battleground); SETFLAG(nozenypenalty); + SETFLAG(notrade); SETFLAG(noskill); SETFLAG(nowarp); SETFLAG(nowarpto); + SETFLAG(noicewall); SETFLAG(snow); SETFLAG(clouds); SETFLAG(clouds2); + SETFLAG(fog); SETFLAG(fireworks); SETFLAG(sakura); SETFLAG(leaves); + SETFLAG(nobaseexp); + SETFLAG(nojobexp); SETFLAG(nomobloot); SETFLAG(nomvploot); SETFLAG(nightenabled); + SETFLAG(nodrop); SETFLAG(novending); SETFLAG(loadevent); + SETFLAG(nochat); SETFLAG(partylock); SETFLAG(guildlock); SETFLAG(src4instance); + SETFLAG(notomb); clif->message(sd->fd,msg_txt(1314)); // Invalid flag name or flag. clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On) @@ -7647,8 +7600,8 @@ ACMD(mapflag) { clif->message(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,"); clif->message(sd->fd,"guildlock, src4instance, notomb"); -#undef checkflag -#undef setflag +#undef CHECKFLAG +#undef SETFLAG return true; } @@ -7706,7 +7659,7 @@ ACMD(showdelay) *------------------------------------------*/ ACMD(invite) { unsigned int did = sd->duel_group; - struct map_session_data *target_sd = iMap->nick2sd((char *)message); + struct map_session_data *target_sd = map->nick2sd((char *)message); if(did == 0) { // "Duel: @invite without @duel." @@ -7778,7 +7731,7 @@ ACMD(duel) { duel->create(sd, maxpl); } else { struct map_session_data *target_sd; - target_sd = iMap->nick2sd((char *)message); + target_sd = map->nick2sd((char *)message); if(target_sd != NULL) { unsigned int newduel; if((newduel = duel->create(sd, 2)) != -1) { @@ -7907,8 +7860,7 @@ ACMD(cash) } // @clone/@slaveclone/@evilclone [Valaris] -ACMD(clone) -{ +ACMD(clone) { int x=0,y=0,flag=0,master=0,i=0; struct map_session_data *pl_sd=NULL; @@ -7917,7 +7869,7 @@ ACMD(clone) return true; } - if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) { + if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. return true; } @@ -7946,7 +7898,7 @@ ACMD(clone) do { x = sd->bl.x + (rnd() % 10 - 5); y = sd->bl.y + (rnd() % 10 - 5); - } while (iMap->getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10); + } while (map->getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10); if (i >= 10) { x = sd->bl.x; @@ -9060,15 +9012,15 @@ ACMD(channel) { } if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; } - if( sub2[0] == '\0' || ( pl_sd = iMap->nick2sd(sub2) ) == NULL ) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; + if( sub2[0] == '\0' || ( pl_sd = map->nick2sd(sub2) ) == NULL ) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; } if( pc->has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { @@ -9121,7 +9073,7 @@ ACMD(channel) { return false; } - if( sub2[0] == '\0' || ( pl_sd = iMap->nick2sd(sub2) ) == NULL ) { + if( sub2[0] == '\0' || ( pl_sd = map->nick2sd(sub2) ) == NULL ) { sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found clif->message(fd, atcmd_output); return false; @@ -9942,16 +9894,21 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message binding = atcommand->get_bind_byname(command); // Check if the binding isn't NULL and there is a NPC event, level of usage met, et cetera - if( binding != NULL && binding->npc_event[0] && - ((*atcmd_msg == atcommand->at_symbol && pc->get_group_level(sd) >= binding->group_lv) || - (*atcmd_msg == atcommand->char_symbol && pc->get_group_level(sd) >= binding->group_lv_char))) - { + if( binding != NULL + && binding->npc_event[0] + && ( + (*atcmd_msg == atcommand->at_symbol && pc->get_group_level(sd) >= binding->group_lv) + || (*atcmd_msg == atcommand->char_symbol && pc->get_group_level(sd) >= binding->group_lv_char) + ) + ) { // Check if self or character invoking; if self == character invoked, then self invoke. bool invokeFlag = ((*atcmd_msg == atcommand->at_symbol) ? 1 : 0); // Check if the command initiated is a character command - if (*message == atcommand->char_symbol && - (ssd = iMap->nick2sd(charname)) == NULL && (ssd = iMap->nick2sd(charname2)) == NULL ) { + if (*message == atcommand->char_symbol + && (ssd = map->nick2sd(charname)) == NULL + && (ssd = map->nick2sd(charname2)) == NULL + ) { sprintf(output, msg_txt(1389), command); // %s failed. Player not found. clif->message(fd, output); return true; @@ -10000,8 +9957,10 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message } // Check if target is valid only if confirmed that player can use command. - if (*message == atcommand->char_symbol && - (ssd = iMap->nick2sd(charname)) == NULL && (ssd = iMap->nick2sd(charname2)) == NULL ) { + if (*message == atcommand->char_symbol + && (ssd = map->nick2sd(charname)) == NULL + && (ssd = map->nick2sd(charname2)) == NULL + ) { sprintf(output, msg_txt(1389), command); // %s failed. Player not found. clif->message(fd, output); return true; @@ -10299,7 +10258,7 @@ void atcommand_doload(void) { if( atcommand->alias_db == NULL ) atcommand->alias_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, ATCOMMAND_LENGTH); atcommand_basecommands(); //fills initial atcommand_db with known commands - atcommand_config_read(iMap->ATCOMMAND_CONF_FILENAME); + atcommand_config_read(map->ATCOMMAND_CONF_FILENAME); } void do_init_atcommand(void) { diff --git a/src/map/battle.c b/src/map/battle.c index abbef8c77..64ccfd6c6 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -91,7 +91,7 @@ struct block_list* battle_gettargeted(struct block_list *target) { nullpo_retr(NULL, target); memset(bl_list, 0, sizeof(bl_list)); - iMap->foreachinrange(battle->get_targeted_sub, target, AREA_SIZE, BL_CHAR, bl_list, &c, target->id); + map->foreachinrange(battle->get_targeted_sub, target, AREA_SIZE, BL_CHAR, bl_list, &c, target->id); if ( c == 0 ) return NULL; if( c > 24 ) @@ -147,7 +147,7 @@ struct block_list* battle_getenemy(struct block_list *target, int type, int rang int c = 0; memset(bl_list, 0, sizeof(bl_list)); - iMap->foreachinrange(battle->get_enemy_sub, target, range, type, bl_list, &c, target); + map->foreachinrange(battle->get_enemy_sub, target, range, type, bl_list, &c, target); if ( c == 0 ) return NULL; @@ -189,7 +189,7 @@ struct block_list* battle_getenemyarea(struct block_list *src, int x, int y, int int c = 0; memset(bl_list, 0, sizeof(bl_list)); - iMap->foreachinarea(battle->get_enemy_area_sub, src->m, x - range, y - range, x + range, y + range, type, bl_list, &c, src, ignore_id); + map->foreachinarea(battle->get_enemy_area_sub, src->m, x - range, y - range, x + range, y + range, type, bl_list, &c, src, ignore_id); if( c == 0 ) return NULL; @@ -219,10 +219,10 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { if ( dat ) { struct block_list* src = NULL; - struct block_list* target = iMap->id2bl(dat->target_id); + struct block_list* target = map->id2bl(dat->target_id); if( !target || status->isdead(target) ) {/* nothing we can do */ - if( dat->src_type == BL_PC && ( src = iMap->id2bl(dat->src_id) ) && --((TBL_PC*)src)->delayed_damage == 0 && ((TBL_PC*)src)->state.hold_recalc ) { + if( dat->src_type == BL_PC && ( src = map->id2bl(dat->src_id) ) && --((TBL_PC*)src)->delayed_damage == 0 && ((TBL_PC*)src)->state.hold_recalc ) { ((TBL_PC*)src)->state.hold_recalc = 0; status_calc_pc(((TBL_PC*)src),0); } @@ -230,26 +230,27 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { return 0; } - src = iMap->id2bl(dat->src_id); + src = map->id2bl(dat->src_id); - if( src && target->m == src->m && - (target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == INVALID_TIMER) && - check_distance_bl(src, target, dat->distance) ) //Check to see if you haven't teleported. [Skotlex] - { - iMap->freeblock_lock(); + //Check to see if you haven't teleported. [Skotlex] + if( src && target->m == src->m + && (target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == INVALID_TIMER) + && check_distance_bl(src, target, dat->distance) + ) { + map->freeblock_lock(); status_fix_damage(src, target, dat->damage, dat->delay); if( dat->attack_type && !status->isdead(target) && dat->additional_effects ) skill->additional_effect(src,target,dat->skill_id,dat->skill_lv,dat->attack_type,dat->dmg_lv,tick); if( dat->dmg_lv > ATK_BLOCK && dat->attack_type ) skill->counter_additional_effect(src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick); - iMap->freeblock_unlock(); + map->freeblock_unlock(); } else if( !src && dat->skill_id == CR_REFLECTSHIELD ) { /** * it was monster reflected damage, and the monster died, we pass the damage to the character as expected **/ - iMap->freeblock_lock(); + map->freeblock_lock(); status_fix_damage(target, target, dat->damage, dat->delay); - iMap->freeblock_unlock(); + map->freeblock_unlock(); } if( src && src->type == BL_PC && --((TBL_PC*)src)->delayed_damage == 0 && ((TBL_PC*)src)->state.hold_recalc ) { @@ -273,13 +274,13 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, damage = 0; if ( !battle_config.delay_battle_damage || amotion <= 1 ) { - iMap->freeblock_lock(); + map->freeblock_lock(); status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope] if( attack_type && !status->isdead(target) && additional_effects ) skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, timer->gettick()); if( dmg_lv > ATK_BLOCK && attack_type ) skill->counter_additional_effect(src, target, skill_id, skill_lv, attack_type, timer->gettick()); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } dat = ers_alloc(delay_damage_ers, struct delay_damage); @@ -354,8 +355,10 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d struct skill_unit_group *sg; struct block_list *src; - if( !su || !su->alive || (sg = su->group) == NULL || !sg || sg->val3 == -1 || - (src = iMap->id2bl(sg->src_id)) == NULL || status->isdead(src) ) + if( !su || !su->alive + || (sg = su->group) == NULL || sg->val3 == -1 + || (src = map->id2bl(sg->src_id)) == NULL || status->isdead(src) + ) return 0; if( sg->unit_id != UNT_FIREWALL ) { @@ -370,39 +373,39 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d } if( tsc && tsc->count ) { //since an atk can only have one type let's optimise this a bit switch(atk_elem){ - case ELE_FIRE: - if( tsc->data[SC_SPIDERWEB]) { - tsc->data[SC_SPIDERWEB]->val1 = 0; // free to move now - if( tsc->data[SC_SPIDERWEB]->val2-- > 0 ) - damage <<= 1; // double damage - if( tsc->data[SC_SPIDERWEB]->val2 == 0 ) - status_change_end(target, SC_SPIDERWEB, INVALID_TIMER); - } - if( tsc->data[SC_THORNS_TRAP]) - status_change_end(target, SC_THORNS_TRAP, INVALID_TIMER); - if( tsc->data[SC_FIRE_CLOAK_OPTION]) - damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100; - if( tsc->data[SC_COLD] && target->type != BL_MOB) - status_change_end(target, SC_COLD, INVALID_TIMER); - if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2; - if( tsc->data[SC_VOLCANIC_ASH]) damage += damage/2; //150% - break; - case ELE_HOLY: - if( tsc->data[SC_ORATIO]) ratio += tsc->data[SC_ORATIO]->val1 * 2; - break; - case ELE_POISON: - if( tsc->data[SC_VENOMIMPRESS]) ratio += tsc->data[SC_VENOMIMPRESS]->val2; - break; - case ELE_WIND: - if( tsc->data[SC_COLD] && target->type != BL_MOB) damage += damage/2; - if( tsc->data[SC_WATER_INSIGNIA]) damage += damage/2; - break; - case ELE_WATER: - if( tsc->data[SC_FIRE_INSIGNIA]) damage += damage/2; - break; - case ELE_EARTH: - if( tsc->data[SC_WIND_INSIGNIA]) damage += damage/2; - break; + case ELE_FIRE: + if( tsc->data[SC_SPIDERWEB]) { + tsc->data[SC_SPIDERWEB]->val1 = 0; // free to move now + if( tsc->data[SC_SPIDERWEB]->val2-- > 0 ) + damage <<= 1; // double damage + if( tsc->data[SC_SPIDERWEB]->val2 == 0 ) + status_change_end(target, SC_SPIDERWEB, INVALID_TIMER); + } + if( tsc->data[SC_THORNS_TRAP]) + status_change_end(target, SC_THORNS_TRAP, INVALID_TIMER); + if( tsc->data[SC_FIRE_CLOAK_OPTION]) + damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100; + if( tsc->data[SC_COLD] && target->type != BL_MOB) + status_change_end(target, SC_COLD, INVALID_TIMER); + if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2; + if( tsc->data[SC_VOLCANIC_ASH]) damage += damage/2; //150% + break; + case ELE_HOLY: + if( tsc->data[SC_ORATIO]) ratio += tsc->data[SC_ORATIO]->val1 * 2; + break; + case ELE_POISON: + if( tsc->data[SC_VENOMIMPRESS]) ratio += tsc->data[SC_VENOMIMPRESS]->val2; + break; + case ELE_WIND: + if( tsc->data[SC_COLD] && target->type != BL_MOB) damage += damage/2; + if( tsc->data[SC_WATER_INSIGNIA]) damage += damage/2; + break; + case ELE_WATER: + if( tsc->data[SC_FIRE_INSIGNIA]) damage += damage/2; + break; + case ELE_EARTH: + if( tsc->data[SC_WIND_INSIGNIA]) damage += damage/2; + break; } } //end tsc check if( src && src->type == BL_PC ){ @@ -1574,7 +1577,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block party_foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id); c = ( c > 1 ? rand()%c : 0 ); - if( (psd = iMap->id2sd(p_sd[c])) && pc->checkskill(psd,WL_COMET) > 0 ){ + if( (psd = map->id2sd(p_sd[c])) && pc->checkskill(psd,WL_COMET) > 0 ){ skillratio = skill_lv * 400; //MATK [{( Skill Level x 400 ) x ( Caster's Base Level / 120 )} + 2500 ] % RE_LVL_DMOD(120); skillratio += 2500; @@ -2536,8 +2539,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block * ATK may be MISS, BLOCKED FAIL, reduc, increase, end status... * After this we apply bg/gvg reduction *------------------------------------------*/ -int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) -{ +int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) { struct map_session_data *sd = NULL; struct status_change *sc; struct status_change_entry *sce; @@ -2549,7 +2551,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam return 0; if( battle_config.ksprotection && mob->ksprotected(src, bl) ) return 0; - if( iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKMAELSTROM) && skill->get_type(skill_id) != BF_MISC + if( map->getcell(bl->m, bl->x, bl->y, CELL_CHKMAELSTROM) && skill->get_type(skill_id) != BF_MISC && skill->get_casttype(skill_id) == CAST_GROUND ) return 0; if (bl->type == BL_PC) { @@ -2909,7 +2911,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if(sce->val2>=0) damage=0; else - damage=-sce->val2; + damage=-sce->val2; } if((--sce->val3)<=0 || (sce->val2<=0) || skill_id == AL_HOLYLIGHT) status_change_end(bl, SC_KYRIE, INVALID_TIMER); @@ -2924,7 +2926,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if( (sce = sc->data[SC_LIGHTNINGWALK]) && flag&BF_LONG && rnd()%100 < sce->val1 ) { int dx[8]={0,-1,-1,-1,0,1,1,1}; int dy[8]={1,1,0,-1,-1,-1,0,1}; - uint8 dir = iMap->calc_dir(bl, src->x, src->y); + uint8 dir = map->calc_dir(bl, src->x, src->y); if( unit->movepos(bl, src->x-dx[dir], src->y-dy[dir], 1, 1) ) { clif->slide(bl,src->x-dx[dir],src->y-dy[dir]); unit->setdir(bl, dir); @@ -2943,15 +2945,15 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 ) pc->addspiritball(sd,skill->get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3); if (sc->data[SC_STYLE_CHANGE] && rnd()%2) { - TBL_HOM *hd = BL_CAST(BL_HOM,bl); - if (hd) homun->addspiritball(hd, 10); //add a sphere - } + TBL_HOM *hd = BL_CAST(BL_HOM,bl); + if (hd) homun->addspiritball(hd, 10); //add a sphere + } if( sc->data[SC__DEADLYINFECT] && damage > 0 && rnd()%100 < 65 + 5 * sc->data[SC__DEADLYINFECT]->val1 ) status->change_spread(bl, src); // Deadly infect attacked side if( sc && sc->data[SC__SHADOWFORM] ) { - struct block_list *s_bl = iMap->id2bl(sc->data[SC__SHADOWFORM]->val2); + struct block_list *s_bl = map->id2bl(sc->data[SC__SHADOWFORM]->val2); if( !s_bl || s_bl->m != bl->m ) { // If the shadow form target is not present remove the sc. status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); } else if( status->isdead(s_bl) || !battle->check_target(src,s_bl,BCT_ENEMY)) { // If the shadow form target is dead or not your enemy remove the sc in both. @@ -5046,7 +5048,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list change = true; if( change ) sd->state.autocast = 1; - iMap->foreachinshootrange(battle->damage_area,target,skill->get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,timer->gettick(),target,wd.amotion,sstatus->dmotion,rdamage,tstatus->race); + map->foreachinshootrange(battle->damage_area,target,skill->get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,timer->gettick(),target,wd.amotion,sstatus->dmotion,rdamage,tstatus->race); if( change ) sd->state.autocast = 0; } @@ -5212,10 +5214,10 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i } } if( sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && !is_boss(src) ) { - uint8 dir = iMap->calc_dir(bl,src->x,src->y), + uint8 dir = map->calc_dir(bl,src->x,src->y), t_dir = unit->getdir(bl); - if( !iMap->check_dir(dir,t_dir) ) { + if( !map->check_dir(dir,t_dir) ) { int64 rd1 = damage * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. trdamage += rdamage = rd1 - (*dmg = rd1 * 30 / 100); // not normalized as intended. clif->skill_damage(src, bl, timer->gettick(), status_get_amotion(src), 0, -3000, 1, RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1, 6); @@ -5312,7 +5314,7 @@ int battle_damage_area( struct block_list *bl, va_list ap) { if( bl->type == BL_MOB && ((TBL_MOB*)bl)->class_ == MOBID_EMPERIUM ) return 0; if( bl != src && battle->check_target(src,bl,BCT_ENEMY) > 0 ) { - iMap->freeblock_lock(); + map->freeblock_lock(); if( src->type == BL_PC ) battle->drain((TBL_PC*)src, bl, damage, damage, status_get_race(bl), is_boss(bl)); if( amotion ) @@ -5322,7 +5324,7 @@ int battle_damage_area( struct block_list *bl, va_list ap) { clif->damage(bl,bl,tick,amotion,dmotion,damage,1,ATK_BLOCK,0); if( !(src && src->type == BL_PC && ((TBL_PC*)src)->state.autocast) ) skill->additional_effect(src, bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); - iMap->freeblock_unlock(); + map->freeblock_unlock(); } return 0; @@ -5395,19 +5397,17 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t } } } - if (sc && sc->count) { - if (sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4 & 2)) - status_change_end(src, SC_CLOAKING, INVALID_TIMER); - else if (sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4 & 2)) - status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER); - } - if( tsc && tsc->data[SC_AUTOCOUNTER] && status->check_skilluse(target, src, KN_AUTOCOUNTER, 1) ) - { - uint8 dir = iMap->calc_dir(target,src->x,src->y); + if (sc && sc->count) { + if (sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4 & 2)) + status_change_end(src, SC_CLOAKING, INVALID_TIMER); + else if (sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4 & 2)) + status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER); + } + if( tsc && tsc->data[SC_AUTOCOUNTER] && status->check_skilluse(target, src, KN_AUTOCOUNTER, 1) ) { + uint8 dir = map->calc_dir(target,src->x,src->y); int t_dir = unit->getdir(target); int dist = distance_bl(src, target); - if(dist <= 0 || (!iMap->check_dir(dir,t_dir) && dist <= tstatus->rhw.range+1)) - { + if(dist <= 0 || (!map->check_dir(dir,t_dir) && dist <= tstatus->rhw.range+1)) { uint16 skill_lv = tsc->data[SC_AUTOCOUNTER]->val1; clif->skillcastcancel(target); //Remove the casting bar. [Skotlex] clif->damage(src, target, tick, sstatus->amotion, 1, 0, 1, 0, 0); //Display MISS. @@ -5422,8 +5422,8 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t uint16 skill_lv = tsc->data[SC_BLADESTOP_WAIT]->val1; int duration = skill->get_time2(MO_BLADESTOP,skill_lv); status_change_end(target, SC_BLADESTOP_WAIT, INVALID_TIMER); - if(sc_start4(src, SC_BLADESTOP, 100, sd?pc->checkskill(sd, MO_BLADESTOP):5, 0, 0, target->id, duration)) - { //Target locked. + if(sc_start4(src, SC_BLADESTOP, 100, sd?pc->checkskill(sd, MO_BLADESTOP):5, 0, 0, target->id, duration)) { + //Target locked. clif->damage(src, target, tick, sstatus->amotion, 1, 0, 1, 0, 0); //Display MISS. clif->bladestop(target, src->id, 1); sc_start4(target, SC_BLADESTOP, 100, skill_lv, 0, 0, src->id, duration); @@ -5537,13 +5537,13 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if( su->group && su->group->skill_id == HT_BLASTMINE) skill->blown(src, target, 3, -1, 0); } - iMap->freeblock_lock(); + map->freeblock_lock(); battle->delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion, true); if( tsc ) { if( tsc->data[SC_DEVOTION] ) { struct status_change_entry *sce = tsc->data[SC_DEVOTION]; - struct block_list *d_bl = iMap->id2bl(sce->val1); + struct block_list *d_bl = map->id2bl(sce->val1); if( d_bl && ( (d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == target->id) || @@ -5562,13 +5562,13 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t skill->attack(BF_MAGIC,&ed->bl,&ed->bl,src,EL_CIRCLE_OF_FIRE,tsc->data[SC_CIRCLE_OF_FIRE_OPTION]->val1,tick,wd.flag); } } else if( tsc->data[SC_WATER_SCREEN_OPTION] && tsc->data[SC_WATER_SCREEN_OPTION]->val1 ) { - struct block_list *e_bl = iMap->id2bl(tsc->data[SC_WATER_SCREEN_OPTION]->val1); + struct block_list *e_bl = map->id2bl(tsc->data[SC_WATER_SCREEN_OPTION]->val1); if( e_bl && !status->isdead(e_bl) ) { clif->damage(e_bl,e_bl,tick,wd.amotion,wd.dmotion,damage,wd.div_,wd.type,wd.damage2); status->damage(target,e_bl,damage,0,0,0); // Just show damage in target. clif->damage(src, target, tick, wd.amotion, wd.dmotion, damage, wd.div_, wd.type, wd.damage2 ); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return ATK_NONE; } } @@ -5600,28 +5600,30 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t } } if (sd) { - if( wd.flag&BF_SHORT && sc && sc->data[SC__AUTOSHADOWSPELL] && rnd()%100 < sc->data[SC__AUTOSHADOWSPELL]->val3 && - sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].id != 0 && sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].flag == SKILL_FLAG_PLAGIARIZED ) - { - int r_skill = sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].id, - r_lv = sc->data[SC__AUTOSHADOWSPELL]->val2; + if( wd.flag&BF_SHORT && sc + && sc->data[SC__AUTOSHADOWSPELL] && rnd()%100 < sc->data[SC__AUTOSHADOWSPELL]->val3 + && sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].id != 0 + && sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].flag == SKILL_FLAG_PLAGIARIZED + ) { + int r_skill = sd->status.skill[skill->get_index(sc->data[SC__AUTOSHADOWSPELL]->val1)].id; + int r_lv = sc->data[SC__AUTOSHADOWSPELL]->val2; if (r_skill != AL_HOLYLIGHT && r_skill != PR_MAGNUS) { int type; if( (type = skill->get_casttype(r_skill)) == CAST_GROUND ) { int maxcount = 0; - if( !(BL_PC&battle_config.skill_reiteration) && - skill->get_unit_flag(r_skill)&UF_NOREITERATION ) - type = -1; + if( !(BL_PC&battle_config.skill_reiteration) + && skill->get_unit_flag(r_skill)&UF_NOREITERATION ) + type = -1; - if( BL_PC&battle_config.skill_nofootset && - skill->get_unit_flag(r_skill)&UF_NOFOOTSET ) - type = -1; + if( BL_PC&battle_config.skill_nofootset + && skill->get_unit_flag(r_skill)&UF_NOFOOTSET ) + type = -1; - if( BL_PC&battle_config.land_skill_limit && - (maxcount = skill->get_maxcount(r_skill, r_lv)) > 0 - ) { + if( BL_PC&battle_config.land_skill_limit + && (maxcount = skill->get_maxcount(r_skill, r_lv)) > 0 + ) { int v; for(v=0;vud.skillunit[v] && maxcount;v++) { if(sd->ud.skillunit[v]->skill_id == r_skill) @@ -5631,10 +5633,10 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t type = -1; } - if( type != CAST_GROUND ){ - clif->skill_fail(sd,r_skill,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); - return wd.dmg_lv; + if( type != CAST_GROUND ) { + clif->skill_fail(sd,r_skill,USESKILL_FAIL_LEVEL,0); + map->freeblock_unlock(); + return wd.dmg_lv; } } @@ -5667,12 +5669,14 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t } if (tsc) { - if (tsc->data[SC_POISONREACT] && - (rnd()%100 < tsc->data[SC_POISONREACT]->val3 - || sstatus->def_ele == ELE_POISON) && -// check_distance_bl(src, target, tstatus->rhw.range+1) && Doesn't checks range! o.O; - status->check_skilluse(target, src, TF_POISON, 0) - ) { //Poison React + if (tsc->data[SC_POISONREACT] + && ( rnd()%100 < tsc->data[SC_POISONREACT]->val3 + || sstatus->def_ele == ELE_POISON + ) + /* && check_distance_bl(src, target, tstatus->rhw.range+1) Doesn't check range! o.O; */ + && status->check_skilluse(target, src, TF_POISON, 0) + ) { + //Poison React struct status_change_entry *sce = tsc->data[SC_POISONREACT]; if (sstatus->def_ele == ELE_POISON) { sce->val2 = 0; @@ -5685,7 +5689,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t status_change_end(target, SC_POISONREACT, INVALID_TIMER); } } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return wd.dmg_lv; } @@ -5707,8 +5711,7 @@ int battle_check_undead(int race,int element) } //Returns the upmost level master starting with the given object -struct block_list* battle_get_master(struct block_list *src) -{ +struct block_list* battle_get_master(struct block_list *src) { struct block_list *prev; //Used for infinite loop check (master of yourself?) do { prev = src; @@ -5719,7 +5722,7 @@ struct block_list* battle_get_master(struct block_list *src) break; case BL_MOB: if (((TBL_MOB*)src)->master_id) - src = iMap->id2bl(((TBL_MOB*)src)->master_id); + src = map->id2bl(((TBL_MOB*)src)->master_id); break; case BL_HOM: if (((TBL_HOM*)src)->master) @@ -5735,7 +5738,7 @@ struct block_list* battle_get_master(struct block_list *src) break; case BL_SKILL: if (((TBL_SKILL*)src)->group && ((TBL_SKILL*)src)->group->src_id) - src = iMap->id2bl(((TBL_SKILL*)src)->group->src_id); + src = map->id2bl(((TBL_SKILL*)src)->group->src_id); break; } } while (src && src != prev); @@ -5880,8 +5883,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } //end switch actual target - switch( t_bl->type ) - { //Checks on target master + switch( t_bl->type ) { //Checks on target master case BL_PC: { struct map_session_data *sd; @@ -5902,12 +5904,12 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f { struct mob_data *md = BL_CAST(BL_MOB, t_bl); - if( !((iMap->agit_flag || iMap->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) + if( !((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) return 0; // Disable guardians/emperiums owned by Guilds on non-woe times. break; } default: break; //other type doesn't have slave yet - } //end switch master target + } //end switch master target switch( src->type ) { //Checks on actual src type case BL_PET: @@ -5934,7 +5936,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM && flag&BCT_ENEMY) return 0; //mercenary may not attack Emperium break; - } //end switch actual src + } //end switch actual src switch( s_bl->type ) { //Checks on source master case BL_PC: @@ -5962,7 +5964,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f case BL_MOB: { struct mob_data *md = BL_CAST(BL_MOB, s_bl); - if( !((iMap->agit_flag || iMap->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) + if( !((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) return 0; // Disable guardians/emperium owned by Guilds on non-woe times. if( !md->special_state.ai ) @@ -5987,7 +5989,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if (t_bl->type != s_bl->type) state |= BCT_ENEMY; break; - } //end switch on src master + } //end switch on src master if( (flag&BCT_ALL) == BCT_ALL ) { //All actually stands for all attackable chars @@ -6050,7 +6052,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f ) state &= ~BCT_ENEMY; } - }//end map_flag_vs chk rivality + }//end map_flag_vs chk rivality else { //Non pvp/gvg, check party/guild settings. if( flag&BCT_PARTY || state&BCT_ENEMY ) { @@ -6580,7 +6582,7 @@ void Hercules_report(char* date, char *time_c) { #endif /* non-define part */ - if( iMap->db_use_sql_item_db || iMap->db_use_sql_mob_db || iMap->db_use_sql_mob_skill_db ) + if( map->db_use_sql_item_db || map->db_use_sql_mob_db || map->db_use_sql_mob_skill_db ) config |= C_SQL_DBS; //TODO: split this config into three. if( logs->config.sql_logs ) @@ -6615,7 +6617,7 @@ void Hercules_report(char* date, char *time_c) { safestrncpy((char*)WBUFP(buf,6 + 12 + 9), timestring, 24); safestrncpy((char*)WBUFP(buf,6 + 12 + 9 + 24), git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown", 41); - WBUFL(buf,6 + 12 + 9 + 24 + 41) = iMap->getusers(); + WBUFL(buf,6 + 12 + 9 + 24 + 41) = map->getusers(); WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4) = config; WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4) = bd_size; diff --git a/src/map/battleground.c b/src/map/battleground.c index 25d942226..160d2f96e 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -200,7 +200,7 @@ int bg_team_get_id(struct block_list *bl) { { struct map_session_data *msd; struct mob_data *md = (TBL_MOB*)bl; - if( md->special_state.ai && (msd = iMap->id2sd(md->master_id)) != NULL ) + if( md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL ) return msd->bg_id; return md->bg_id; } @@ -448,7 +448,7 @@ void bg_queue_ready_ack (struct bg_arena *arena, struct map_session_data *sd, bo sd->bg_queue.ready = 1; for( i = 0; i < queue->size; i++ ) { - if( queue->item[i] > 0 && ( sd = iMap->id2sd(queue->item[i]) ) ) { + if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) { if( sd->bg_queue.ready == 1 ) count++; } @@ -488,7 +488,7 @@ void bg_match_over(struct bg_arena *arena, bool canceled) { for( i = 0; i < queue->size; i++ ) { struct map_session_data * sd = NULL; - if( queue->item[i] > 0 && ( sd = iMap->id2sd(queue->item[i]) ) ) { + if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) { if( sd->bg_queue.arena ) { bg->team_leave(sd, 0); bg->queue_pc_cleanup(sd); @@ -513,7 +513,7 @@ void bg_begin(struct bg_arena *arena) { for( i = 0; i < queue->size; i++ ) { struct map_session_data * sd = NULL; - if( queue->item[i] > 0 && ( sd = iMap->id2sd(queue->item[i]) ) ) { + if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) { if( sd->bg_queue.ready == 1 ) count++; else @@ -547,7 +547,7 @@ void bg_queue_pregame(struct bg_arena *arena) { for( i = 0; i < queue->size; i++ ) { struct map_session_data * sd = NULL; - if( queue->item[i] > 0 && ( sd = iMap->id2sd(queue->item[i]) ) ) { + if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) { clif->bgqueue_battlebegins(sd,arena->id,SELF); } } diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index f943b2a20..fb511505b 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -64,8 +64,8 @@ bool buyingstore_setup(struct map_session_data* sd, unsigned char slots) return false; } - if( iMap->getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) - {// custom: no vending cells + if( map->getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) { + // custom: no vending cells clif->message(sd->fd, msg_txt(204)); // "You can't open a shop on this cell." return false; } @@ -119,8 +119,8 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha return; } - if( iMap->getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) - {// custom: no vending cells + if( map->getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) { + // custom: no vending cells clif->message(sd->fd, msg_txt(204)); // "You can't open a shop on this cell." return; } @@ -227,8 +227,8 @@ void buyingstore_open(struct map_session_data* sd, int account_id) return; } - if( ( pl_sd = iMap->id2sd(account_id) ) == NULL || !pl_sd->state.buyingstore ) - {// not online or not buying + if( ( pl_sd = map->id2sd(account_id) ) == NULL || !pl_sd->state.buyingstore ) { + // not online or not buying return; } @@ -266,8 +266,8 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( ( pl_sd = iMap->id2sd(account_id) ) == NULL || !pl_sd->state.buyingstore || pl_sd->buyer_id != buyer_id ) - {// not online, not buying or not same store + if( ( pl_sd = map->id2sd(account_id) ) == NULL || !pl_sd->state.buyingstore || pl_sd->buyer_id != buyer_id ) { + // not online, not buying or not same store clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0); return; } @@ -383,7 +383,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int clif->buyingstore_update_item(pl_sd, nameid, amount); } - if( iMap->save_settings&128 ) { + if( map->save_settings&128 ) { chrif->save(sd, 0); chrif->save(pl_sd, 0); } @@ -407,9 +407,8 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int buyingstore_close(pl_sd); // remove auto-trader - if( pl_sd->state.autotrade ) - { - iMap->quit(pl_sd); + if( pl_sd->state.autotrade ) { + map->quit(pl_sd); } } diff --git a/src/map/chat.c b/src/map/chat.c index 21d49cfc8..3886b69da 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -44,20 +44,19 @@ static struct chat_data* chat_createchat(struct block_list* bl, const char* titl cd->owner = bl; safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event)); - cd->bl.id = iMap->get_new_object_id(); + cd->bl.id = map->get_new_object_id(); cd->bl.m = bl->m; cd->bl.x = bl->x; cd->bl.y = bl->y; cd->bl.type = BL_CHAT; cd->bl.next = cd->bl.prev = NULL; - if( cd->bl.id == 0 ) - { + if( cd->bl.id == 0 ) { aFree(cd); cd = NULL; } - iMap->addiddb(&cd->bl); + map->addiddb(&cd->bl); if( bl->type != BL_NPC ) cd->kick_list = idb_alloc(DB_OPT_BASE); @@ -85,8 +84,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char return 0; //Can't create chatrooms on this map. } - if( iMap->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOCHAT) ) - { + if( map->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOCHAT) ) { clif->message (sd->fd, msg_txt(665)); return 0; } @@ -110,12 +108,11 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char /*========================================== * join an existing chatroom *------------------------------------------*/ -int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) -{ +int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) { struct chat_data* cd; nullpo_ret(sd); - cd = (struct chat_data*)iMap->id2bl(chatid); + cd = (struct chat_data*)map->id2bl(chatid); if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->state.vending || sd->state.buyingstore || sd->chatID || ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit ) { @@ -167,17 +164,15 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) /*========================================== * leave a chatroom *------------------------------------------*/ -int chat_leavechat(struct map_session_data* sd, bool kicked) -{ +int chat_leavechat(struct map_session_data* sd, bool kicked) { struct chat_data* cd; int i; int leavechar; nullpo_retr(1, sd); - cd = (struct chat_data*)iMap->id2bl(sd->chatID); - if( cd == NULL ) - { + cd = (struct chat_data*)map->id2bl(sd->chatID); + if( cd == NULL ) { pc_setchatid(sd, 0); return 1; } @@ -201,15 +196,15 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) if( cd->users == 0 && cd->owner->type == BL_PC ) { // Delete empty chatroom struct skill_unit* su; - struct skill_unit_group* group; + struct skill_unit_group* group; clif->clearchat(cd, 0); db_destroy(cd->kick_list); - iMap->deliddb(&cd->bl); - iMap->delblock(&cd->bl); - iMap->freeblock(&cd->bl); + map->deliddb(&cd->bl); + map->delblock(&cd->bl); + map->freeblock(&cd->bl); - su = iMap->find_skill_unit_oncell(&sd->bl, sd->bl.x, sd->bl.y, AL_WARP, NULL, 0); + su = map->find_skill_unit_oncell(&sd->bl, sd->bl.x, sd->bl.y, AL_WARP, NULL, 0); group = (su != NULL) ? su->group : NULL; if (group != NULL) skill->unit_onplace(su, &sd->bl, group->tick); @@ -217,21 +212,20 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) return 1; } - if( leavechar == 0 && cd->owner->type == BL_PC ) - { // Set and announce new owner + if( leavechar == 0 && cd->owner->type == BL_PC ) { + // Set and announce new owner cd->owner = (struct block_list*) cd->usersd[0]; clif->changechatowner(cd, cd->usersd[0]); clif->clearchat(cd, 0); //Adjust Chat location after owner has been changed. - iMap->delblock( &cd->bl ); + map->delblock( &cd->bl ); cd->bl.x=cd->usersd[0]->bl.x; cd->bl.y=cd->usersd[0]->bl.y; - iMap->addblock( &cd->bl ); + map->addblock( &cd->bl ); clif->dispchat(cd,0); - } - else + } else clif->dispchat(cd,0); // refresh chatroom return 0; @@ -240,15 +234,14 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) /*========================================== * change a chatroom's owner *------------------------------------------*/ -int chat_changechatowner(struct map_session_data* sd, const char* nextownername) -{ +int chat_changechatowner(struct map_session_data* sd, const char* nextownername) { struct chat_data* cd; struct map_session_data* tmpsd; int i; nullpo_retr(1, sd); - cd = (struct chat_data*)iMap->id2bl(sd->chatID); + cd = (struct chat_data*)map->id2bl(sd->chatID); if( cd == NULL || (struct block_list*) sd != cd->owner ) return 1; @@ -269,10 +262,10 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername) cd->usersd[0] = tmpsd; // set the new chatroom position - iMap->delblock( &cd->bl ); + map->delblock( &cd->bl ); cd->bl.x = cd->owner->x; cd->bl.y = cd->owner->y; - iMap->addblock( &cd->bl ); + map->addblock( &cd->bl ); // and display again clif->dispchat(cd,0); @@ -283,13 +276,12 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername) /*========================================== * change a chatroom's status (title, etc) *------------------------------------------*/ -int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub) -{ +int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub) { struct chat_data* cd; nullpo_retr(1, sd); - cd = (struct chat_data*)iMap->id2bl(sd->chatID); + cd = (struct chat_data*)map->id2bl(sd->chatID); if( cd==NULL || (struct block_list *)sd != cd->owner ) return 1; @@ -307,14 +299,13 @@ int chat_changechatstatus(struct map_session_data* sd, const char* title, const /*========================================== * kick an user from a chatroom *------------------------------------------*/ -int chat_kickchat(struct map_session_data* sd, const char* kickusername) -{ +int chat_kickchat(struct map_session_data* sd, const char* kickusername) { struct chat_data* cd; int i; nullpo_retr(1, sd); - cd = (struct chat_data *)iMap->id2bl(sd->chatID); + cd = (struct chat_data *)map->id2bl(sd->chatID); if( cd==NULL || (struct block_list *)sd != cd->owner ) return -1; @@ -359,20 +350,19 @@ int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool p } /// Removes the chatroom from the npc. -int chat_deletenpcchat(struct npc_data* nd) -{ +int chat_deletenpcchat(struct npc_data* nd) { struct chat_data *cd; nullpo_ret(nd); - cd = (struct chat_data*)iMap->id2bl(nd->chat_id); + cd = (struct chat_data*)map->id2bl(nd->chat_id); if( cd == NULL ) return 0; chat->npckickall(cd); clif->clearchat(cd, 0); - iMap->deliddb(&cd->bl); - iMap->delblock(&cd->bl); - iMap->freeblock(&cd->bl); + map->deliddb(&cd->bl); + map->delblock(&cd->bl); + map->freeblock(&cd->bl); nd->chat_id = 0; return 0; diff --git a/src/map/chrif.c b/src/map/chrif.c index 7277bfe33..cc0797596 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -60,7 +60,7 @@ struct chrif_interface chrif_s; //2afd: Incoming, chrif->authok -> 'client authentication ok' //2afe: Outgoing, send_usercount_tochar -> 'sends player count of this map server to charserver' //2aff: Outgoing, chrif->send_users_tochar -> 'sends all actual connected character ids to charserver' -//2b00: Incoming, iMap->setusers -> 'set the actual usercount? PACKET.2B COUNT.L.. ?' (not sure) +//2b00: Incoming, map->setusers -> 'set the actual usercount? PACKET.2B COUNT.L.. ?' (not sure) //2b01: Outgoing, chrif->save -> 'charsave of char XY account XY (complete struct)' //2b02: Outgoing, chrif->charselectreq -> 'player returns from ingame to charserver to select another char.., this packets includes sessid etc' ? (not 100% sure) //2b03: Incoming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure) @@ -362,7 +362,7 @@ int chrif_recvmap(int fd) { uint16 port = ntohs(RFIFOW(fd,8)); for(i = 10, j = 0; i < RFIFOW(fd,2); i += 4, j++) { - iMap->setipport(RFIFOW(fd,i), ip, port); + map->setipport(RFIFOW(fd,i), ip, port); } if (battle_config.etc_log) @@ -380,7 +380,7 @@ int chrif_removemap(int fd) { uint16 port = RFIFOW(fd,8); for(i = 10, j = 0; i < RFIFOW(fd, 2); i += 4, j++) - iMap->eraseipport(RFIFOW(fd, i), ip, port); + map->eraseipport(RFIFOW(fd, i), ip, port); chrif->other_mapserver_count--; @@ -499,7 +499,7 @@ static int chrif_reconnect(DBKey key, DBData *data, va_list ap) { uint32 ip; uint16 port; - if( iMap->mapname2ipport(sd->mapindex,&ip,&port) == 0 ) + if( map->mapname2ipport(sd->mapindex,&ip,&port) == 0 ) chrif->changemapserver(sd, ip, port); else //too much lag/timeout is the closest explanation for this error. clif->authfail_fd(sd->fd, 3); @@ -544,7 +544,7 @@ int chrif_sendmapack(int fd) { exit(EXIT_FAILURE); } - memcpy(iMap->wisp_server_name, RFIFOP(fd,3), NAME_LENGTH); + memcpy(map->wisp_server_name, RFIFOP(fd,3), NAME_LENGTH); chrif_on_ready(); @@ -620,7 +620,7 @@ void chrif_authok(int fd) { //Check if we don't already have player data in our server //Causes problems if the currently connected player tries to quit or this data belongs to an already connected player which is trying to re-auth. - if ( ( sd = iMap->id2sd(account_id) ) != NULL ) + if ( ( sd = map->id2sd(account_id) ) != NULL ) return; if ( ( node = chrif->search(account_id) ) == NULL ) @@ -820,7 +820,7 @@ int chrif_changesex(struct map_session_data *sd) { if (sd->fd) clif->authfail_fd(sd->fd, 15); else - iMap->quit(sd); + map->quit(sd); return 0; } @@ -840,7 +840,7 @@ static void chrif_char_ask_name_answer(int acc, const char* player_name, uint16 char action[25]; char output[256]; - sd = iMap->id2sd(acc); + sd = map->id2sd(acc); if( acc < 0 || sd == NULL ) { ShowError("chrif_char_ask_name_answer failed - player not online.\n"); @@ -876,7 +876,7 @@ int chrif_changedsex(int fd) { if ( battle_config.etc_log ) ShowNotice("chrif_changedsex %d.\n", acc); - sd = iMap->id2sd(acc); + sd = map->id2sd(acc); if ( sd ) { //Normally there should not be a char logged on right now! if ( sd->status.sex == sex ) return 0; //Do nothing? Likely safe. @@ -916,7 +916,7 @@ int chrif_changedsex(int fd) { // do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it) clif->message(sd->fd, msg_txt(409)); //"Your sex has been changed (need disconnection by the server)..." set_eof(sd->fd); // forced to disconnect for the change - iMap->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X] + map->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X] } return 0; } @@ -946,14 +946,14 @@ int chrif_divorceack(int char_id, int partner_id) { if( !char_id || !partner_id ) return 0; - if( ( sd = iMap->charid2sd(char_id) ) != NULL && sd->status.partner_id == partner_id ) { + if( ( sd = map->charid2sd(char_id) ) != NULL && sd->status.partner_id == partner_id ) { sd->status.partner_id = 0; for(i = 0; i < MAX_INVENTORY; i++) if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F) pc->delitem(sd, i, 1, 0, 0, LOG_TYPE_OTHER); } - if( ( sd = iMap->charid2sd(partner_id) ) != NULL && sd->status.partner_id == char_id ) { + if( ( sd = map->charid2sd(partner_id) ) != NULL && sd->status.partner_id == char_id ) { sd->status.partner_id = 0; for(i = 0; i < MAX_INVENTORY; i++) if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F) @@ -969,7 +969,7 @@ int chrif_deadopt(int father_id, int mother_id, int child_id) { struct map_session_data* sd; int idx = skill->get_index(WE_CALLBABY); - if( father_id && ( sd = iMap->charid2sd(father_id) ) != NULL && sd->status.child == child_id ) { + if( father_id && ( sd = map->charid2sd(father_id) ) != NULL && sd->status.child == child_id ) { sd->status.child = 0; sd->status.skill[idx].id = 0; sd->status.skill[idx].lv = 0; @@ -977,7 +977,7 @@ int chrif_deadopt(int father_id, int mother_id, int child_id) { clif->deleteskill(sd,WE_CALLBABY); } - if( mother_id && ( sd = iMap->charid2sd(mother_id) ) != NULL && sd->status.child == child_id ) { + if( mother_id && ( sd = map->charid2sd(mother_id) ) != NULL && sd->status.child == child_id ) { sd->status.child = 0; sd->status.skill[idx].id = 0; sd->status.skill[idx].lv = 0; @@ -1000,7 +1000,7 @@ int chrif_accountban(int fd) { if ( battle_config.etc_log ) ShowNotice("chrif_accountban %d.\n", acc); - sd = iMap->id2sd(acc); + sd = map->id2sd(acc); if ( acc < 0 || sd == NULL ) { ShowError("chrif_accountban failed - player not online.\n"); @@ -1009,13 +1009,13 @@ int chrif_accountban(int fd) { sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters if (RFIFOB(fd,6) == 0) { // 0: change of statut, 1: ban - int ret_status = RFIFOL(fd,7); // status or final date of a banishment - if(0message(sd->fd, msg_txt(411+ret_status)); - else if(ret_status==100) - clif->message(sd->fd, msg_txt(421)); - else - clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorised." + int ret_status = RFIFOL(fd,7); // status or final date of a banishment + if(0message(sd->fd, msg_txt(411+ret_status)); + else if(ret_status==100) + clif->message(sd->fd, msg_txt(421)); + else + clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorised." } else if (RFIFOB(fd,6) == 1) { // 0: change of statut, 1: ban time_t timestamp; char tmpstr[2048]; @@ -1026,7 +1026,7 @@ int chrif_accountban(int fd) { } set_eof(sd->fd); // forced to disconnect for the change - iMap->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X] + map->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X] return 0; } @@ -1036,7 +1036,7 @@ int chrif_disconnectplayer(int fd) { struct map_session_data* sd; int account_id = RFIFOL(fd, 2); - sd = iMap->id2sd(account_id); + sd = map->id2sd(account_id); if( sd == NULL ) { struct auth_node* auth = chrif->search(account_id); @@ -1048,7 +1048,7 @@ int chrif_disconnectplayer(int fd) { if (!sd->fd) { //No connection if (sd->state.autotrade) - iMap->quit(sd); //Remove it. + map->quit(sd); //Remove it. //Else we don't remove it because the char should have a timer to remove the player because it force-quit before, //and we don't want them kicking their previous instance before the 10 secs penalty time passes. [Skotlex] return 0; @@ -1222,7 +1222,7 @@ int chrif_load_scdata(int fd) { aid = RFIFOL(fd,4); //Player Account ID cid = RFIFOL(fd,8); //Player Char ID - sd = iMap->id2sd(aid); + sd = map->id2sd(aid); if ( !sd ) { ShowError("chrif_load_scdata: Player of AID %d not found!\n", aid); @@ -1338,8 +1338,8 @@ void chrif_on_disconnect(void) { ShowWarning("Connection to Char Server lost.\n\n"); chrif->connected = 0; - chrif->other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect. - iMap->eraseallipport(); + chrif->other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect. + map->eraseallipport(); //Attempt to reconnect in a second. [Skotlex] timer->add(timer->gettick() + 1000, check_connect_char_server, 0, 0); @@ -1458,11 +1458,11 @@ int chrif_parse(int fd) { case 0x2af9: chrif_connectack(fd); break; case 0x2afb: chrif_sendmapack(fd); break; case 0x2afd: chrif->authok(fd); break; - case 0x2b00: iMap->setusers(RFIFOL(fd,2)); chrif_keepalive(fd); break; + case 0x2b00: map->setusers(RFIFOL(fd,2)); chrif_keepalive(fd); break; case 0x2b03: clif->charselectok(RFIFOL(fd,2), RFIFOB(fd,6)); break; case 0x2b04: chrif_recvmap(fd); break; case 0x2b06: chrif_changemapserverack(RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOW(fd,18), RFIFOW(fd,20), RFIFOW(fd,22), RFIFOL(fd,24), RFIFOW(fd,28)); break; - case 0x2b09: iMap->addnickdb(RFIFOL(fd,2), (char*)RFIFOP(fd,6)); break; + case 0x2b09: map->addnickdb(RFIFOL(fd,2), (char*)RFIFOP(fd,6)); break; case 0x2b0a: socket_datasync(fd, false); break; case 0x2b0d: chrif_changedsex(fd); break; case 0x2b0f: chrif_char_ask_name_answer(RFIFOL(fd,2), (char*)RFIFOP(fd,6), RFIFOW(fd,30), RFIFOW(fd,32)); break; @@ -1496,7 +1496,7 @@ int send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data) { WFIFOHEAD(char_fd,4); WFIFOW(char_fd,0) = 0x2afe; - WFIFOW(char_fd,2) = iMap->usercount(); + WFIFOW(char_fd,2) = map->usercount(); WFIFOSET(char_fd,4); return 0; } @@ -1512,7 +1512,7 @@ int send_users_tochar(void) { chrif_check(-1); - users = iMap->usercount(); + users = map->usercount(); WFIFOHEAD(char_fd, 6+8*users); WFIFOW(char_fd,0) = 0x2aff; diff --git a/src/map/clif.c b/src/map/clif.c index 59b0723fc..1d18559df 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -378,12 +378,12 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target clif->send (buf, len, bl, SELF); case AREA_WOC: case AREA_WOS: - iMap->foreachinarea(clif->send_sub, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE, + map->foreachinarea(clif->send_sub, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE, BL_PC, buf, len, bl, type); break; case AREA_CHAT_WOC: - iMap->foreachinarea(clif->send_sub, bl->m, bl->x-(AREA_SIZE-5), bl->y-(AREA_SIZE-5), - bl->x+(AREA_SIZE-5), bl->y+(AREA_SIZE-5), BL_PC, buf, len, bl, AREA_WOC); + map->foreachinarea(clif->send_sub, bl->m, bl->x-(AREA_SIZE-5), bl->y-(AREA_SIZE-5), + bl->x+(AREA_SIZE-5), bl->y+(AREA_SIZE-5), BL_PC, buf, len, bl, AREA_WOC); break; case CHAT: @@ -391,7 +391,7 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target { struct chat_data *cd; if (sd) { - cd = (struct chat_data*)iMap->id2bl(sd->chatID); + cd = (struct chat_data*)map->id2bl(sd->chatID); } else if (bl->type == BL_CHAT) { cd = (struct chat_data*)bl; } else break; @@ -443,7 +443,7 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target memcpy(WFIFOP(fd,0), buf, len); WFIFOSET(fd,len); } - if (!iMap->enable_spy) //Skip unnecessary parsing. [Skotlex] + if (!map->enable_spy) //Skip unnecessary parsing. [Skotlex] break; iter = mapit_getallusers(); @@ -520,7 +520,7 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target WFIFOSET(fd,len); } } - if (!iMap->enable_spy) //Skip unnecessary parsing. [Skotlex] + if (!map->enable_spy) //Skip unnecessary parsing. [Skotlex] break; iter = mapit_getallusers(); @@ -569,7 +569,7 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target for( i = 0; i < queue->size; i++ ) { struct map_session_data * sd = NULL; - if( queue->item[i] > 0 && ( sd = iMap->id2sd(queue->item[i]) ) ) { + if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) { WFIFOHEAD(sd->fd,len); memcpy(WFIFOP(sd->fd,0), buf, len); WFIFOSET(sd->fd,len); @@ -674,12 +674,11 @@ void clif_authfail_fd(int fd, int type) /// type: /// 1 = disconnect, char-select /// ? = nothing -void clif_charselectok(int id, uint8 ok) -{ +void clif_charselectok(int id, uint8 ok) { struct map_session_data* sd; int fd; - if ((sd = iMap->id2sd(id)) == NULL || !sd->fd) + if ((sd = map->id2sd(id)) == NULL || !sd->fd) return; fd = sd->fd; @@ -1603,14 +1602,14 @@ void clif_move(struct unit_data *ud) /*========================================== - * Delays the iMap->quit of a player after they are disconnected. [Skotlex] + * Delays the map->quit of a player after they are disconnected. [Skotlex] *------------------------------------------*/ int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd = NULL; //Remove player from map server - if ((sd = iMap->id2sd(id)) != NULL && sd->fd == 0) //Should be a disconnected player. - iMap->quit(sd); + if ((sd = map->id2sd(id)) != NULL && sd->fd == 0) //Should be a disconnected player. + map->quit(sd); return 0; } @@ -1620,7 +1619,7 @@ int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) { void clif_quitsave(int fd,struct map_session_data *sd) { if (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) - iMap->quit(sd); + map->quit(sd); else if (sd->fd) { //Disassociate session from player (session is deleted after this function was called) //And set a timer to make him quit later. @@ -1914,16 +1913,15 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) { /// WARNING: the 'cancel' button closes other windows besides the dialog window and the menu window. /// Which suggests their have intertwined behavior. (probably the mouse targeting) /// TODO investigate behavior of other windows [FlavioJS] -void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) -{ +void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) { int fd = sd->fd; int slen = strlen(mes) + 9; struct block_list *bl = NULL; - if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || - bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || - bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) - clif->sendfakenpc(sd, npcid); + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = map->id2bl(npcid)) && (bl->m!=sd->bl.m || + bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || + bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) + clif->sendfakenpc(sd, npcid); WFIFOHEAD(fd, slen); WFIFOW(fd,0)=0xb7; @@ -1945,17 +1943,16 @@ void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) /// - if npcid exists in the client: /// - 0143 .L .L /// - close inputnum window -void clif_scriptinput(struct map_session_data *sd, int npcid) -{ +void clif_scriptinput(struct map_session_data *sd, int npcid) { int fd; struct block_list *bl = NULL; nullpo_retv(sd); - if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || - bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || - bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) - clif->sendfakenpc(sd, npcid); + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = map->id2bl(npcid)) && (bl->m!=sd->bl.m || + bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || + bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) + clif->sendfakenpc(sd, npcid); fd=sd->fd; WFIFOHEAD(fd, packet_len(0x142)); @@ -1976,17 +1973,16 @@ void clif_scriptinput(struct map_session_data *sd, int npcid) /// - if npcid is 0 or npcid exists in the client: /// - 01d5 .W .L .?B /// - close inputstr window -void clif_scriptinputstr(struct map_session_data *sd, int npcid) -{ +void clif_scriptinputstr(struct map_session_data *sd, int npcid) { int fd; struct block_list *bl = NULL; nullpo_retv(sd); - if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || - bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || - bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) - clif->sendfakenpc(sd, npcid); + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = map->id2bl(npcid)) && (bl->m!=sd->bl.m || + bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || + bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) + clif->sendfakenpc(sd, npcid); fd=sd->fd; WFIFOHEAD(fd, packet_len(0x1d4)); @@ -2922,7 +2918,7 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap) { *------------------------------------------*/ int clif_hpmeter(struct map_session_data *sd) { nullpo_ret(sd); - iMap->foreachinarea(clif->hpmeter_sub, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd); + map->foreachinarea(clif->hpmeter_sub, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd); return 0; } @@ -3975,8 +3971,7 @@ void clif_leavechat(struct chat_data* cd, struct map_session_data* sd, bool flag /// Opens a trade request window from char 'name'. /// 00e5 .24B (ZC_REQ_EXCHANGE_ITEM) /// 01f4 .24B .L .W (ZC_REQ_EXCHANGE_ITEM2) -void clif_traderequest(struct map_session_data* sd, const char* name) -{ +void clif_traderequest(struct map_session_data* sd, const char* name) { int fd = sd->fd; #if PACKETVER < 6 @@ -3984,8 +3979,8 @@ void clif_traderequest(struct map_session_data* sd, const char* name) WFIFOW(fd,0) = 0xe5; safestrncpy((char*)WFIFOP(fd,2), name, NAME_LENGTH); WFIFOSET(fd,packet_len(0xe5)); -#else - struct map_session_data* tsd = iMap->id2sd(sd->trade_partner); +#else // PACKETVER >= 6 + struct map_session_data* tsd = map->id2sd(sd->trade_partner); if( !tsd ) return; WFIFOHEAD(fd,packet_len(0x1f4)); @@ -3994,7 +3989,7 @@ void clif_traderequest(struct map_session_data* sd, const char* name) WFIFOL(fd,26) = tsd->status.char_id; WFIFOW(fd,30) = tsd->status.base_level; WFIFOSET(fd,packet_len(0x1f4)); -#endif +#endif // PACKETVER < 6 } @@ -4008,23 +4003,24 @@ void clif_traderequest(struct map_session_data* sd, const char* name) /// 3 = Accept /// 4 = Cancel /// 5 = Busy -void clif_tradestart(struct map_session_data* sd, uint8 type) -{ +void clif_tradestart(struct map_session_data* sd, uint8 type) { int fd = sd->fd; - struct map_session_data* tsd = iMap->id2sd(sd->trade_partner); - if( PACKETVER < 6 || !tsd ) { - WFIFOHEAD(fd,packet_len(0xe7)); - WFIFOW(fd,0) = 0xe7; - WFIFOB(fd,2) = type; - WFIFOSET(fd,packet_len(0xe7)); - } else { +#if PACKETVER >= 6 + struct map_session_data* tsd = map->id2sd(sd->trade_partner); + if( tsd ) { WFIFOHEAD(fd,packet_len(0x1f5)); WFIFOW(fd,0) = 0x1f5; WFIFOB(fd,2) = type; WFIFOL(fd,3) = tsd->status.char_id; WFIFOW(fd,7) = tsd->status.base_level; WFIFOSET(fd,packet_len(0x1f5)); + return; } +#endif // PACKETVER >= 6 + WFIFOHEAD(fd,packet_len(0xe7)); + WFIFOW(fd,0) = 0xe7; + WFIFOB(fd,2) = type; + WFIFOSET(fd,packet_len(0xe7)); } @@ -4273,7 +4269,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds if( dstsd->chatID ) { struct chat_data *cd = NULL; - if( (cd = (struct chat_data*)iMap->id2bl(dstsd->chatID)) && cd->usersd[0]==dstsd) + if( (cd = (struct chat_data*)map->id2bl(dstsd->chatID)) && cd->usersd[0]==dstsd) clif->dispchat(cd,sd->fd); } else if( dstsd->state.vending ) clif->showvendingboard(&dstsd->bl,dstsd->message,sd->fd); @@ -4302,7 +4298,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds ARR_FIND( 0, 5, i, dstsd->devotion[i] > 0 ); if( i < 5 ) clif->devotion(&dstsd->bl, sd); // display link (dstsd - crusader) to sd - if( dstsd->sc.data[SC_DEVOTION] && (d_bl = iMap->id2bl(dstsd->sc.data[SC_DEVOTION]->val1)) != NULL ) + if( dstsd->sc.data[SC_DEVOTION] && (d_bl = map->id2bl(dstsd->sc.data[SC_DEVOTION]->val1)) != NULL ) clif->devotion(d_bl, sd); } @@ -4350,7 +4346,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { { TBL_NPC* nd = (TBL_NPC*)bl; if( nd->chat_id ) - clif->dispchat((struct chat_data*)iMap->id2bl(nd->chat_id),sd->fd); + clif->dispchat((struct chat_data*)map->id2bl(nd->chat_id),sd->fd); if( nd->size == SZ_BIG ) clif->specialeffect_single(bl,423,sd->fd); else if( nd->size == SZ_MEDIUM ) @@ -4772,7 +4768,7 @@ int clif_outsight(struct block_list *bl,va_list ap) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); if(sd->chatID){ struct chat_data *cd; - cd=(struct chat_data*)iMap->id2bl(sd->chatID); + cd=(struct chat_data*)map->id2bl(sd->chatID); if(cd->usersd[0]==sd) clif->dispchat(cd,tsd->fd); } @@ -5928,8 +5924,7 @@ void clif_upgrademessage(int fd, int result, int item_id) /// Whisper is transmitted to the destination player (ZC_WHISPER). /// 0097 .W .24B .?B /// 0097 .W .24B .L .?B (PACKETVER >= 20091104) -void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) -{ +void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) { #if PACKETVER < 20091104 WFIFOHEAD(fd, mes_len + NAME_LENGTH + 4); WFIFOW(fd,0) = 0x97; @@ -5938,7 +5933,7 @@ void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) safestrncpy((char*)WFIFOP(fd,28), mes, mes_len); WFIFOSET(fd,WFIFOW(fd,2)); #else - struct map_session_data *ssd = iMap->nick2sd(nick); + struct map_session_data *ssd = map->nick2sd(nick); WFIFOHEAD(fd, mes_len + NAME_LENGTH + 8); WFIFOW(fd,0) = 0x97; @@ -6373,7 +6368,7 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven nullpo_retv(sd); nullpo_retv(vending_items); - nullpo_retv(vsd=iMap->id2sd(id)); + nullpo_retv(vsd=map->id2sd(id)); fd = sd->fd; count = vsd->vend_num; @@ -8077,28 +8072,22 @@ void clif_wedding_effect(struct block_list *bl) /// Notifies the client of the name of the partner character (ZC_COUPLENAME). /// 01e6 .24B -void clif_callpartner(struct map_session_data *sd) -{ +void clif_callpartner(struct map_session_data *sd) { unsigned char buf[26]; nullpo_retv(sd); WBUFW(buf,0) = 0x1e6; - if( sd->status.partner_id ) - { + if( sd->status.partner_id ) { const char *p; - if( ( p = iMap->charid2nick(sd->status.partner_id) ) != NULL ) - { + if( ( p = map->charid2nick(sd->status.partner_id) ) != NULL ) { memcpy(WBUFP(buf,2), p, NAME_LENGTH); - } - else - { + } else { WBUFB(buf,2) = 0; } - } - else - {// Send zero-length name if no partner, to initialize the client buffer. + } else { + // Send zero-length name if no partner, to initialize the client buffer. WBUFB(buf,2) = 0; } @@ -8204,14 +8193,13 @@ void clif_GM_kickack(struct map_session_data *sd, int id) } -void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) -{ +void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) { int fd = tsd->fd; if( fd > 0 ) clif->authfail_fd(fd, 15); else - iMap->quit(tsd); + map->quit(tsd); if( sd ) clif->GM_kickack(sd,tsd->status.account_id); @@ -8516,7 +8504,7 @@ void clif_refresh(struct map_session_data *sd) } if( sd->ed ) clif->elemental_info(sd); - iMap->foreachinrange(clif->getareachar,&sd->bl,AREA_SIZE,BL_ALL,sd); + map->foreachinrange(clif->getareachar,&sd->bl,AREA_SIZE,BL_ALL,sd); clif->weather_check(sd); if( sd->chatID ) chat->leavechat(sd,0); @@ -9253,7 +9241,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) { } //Check for double login. - bl = iMap->id2bl(account_id); + bl = map->id2bl(account_id); if(bl && bl->type != BL_PC) { ShowError("clif_parse_WantToConnection: a non-player object already has id %d, please increase the starting account number\n", account_id); WFIFOHEAD(fd,packet_len(0x6a)); @@ -9375,7 +9363,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { } if( maplist[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs ) - iMap->spawnmobs(sd->bl.m); + map->spawnmobs(sd->bl.m); if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map maplist[sd->bl.m].users_pvp++; } @@ -9388,7 +9376,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { // reset the callshop flag if the player changes map sd->state.callshop = 0; - iMap->addblock(&sd->bl); + map->addblock(&sd->bl); clif->spawn(&sd->bl); // Party @@ -9424,7 +9412,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { // info about nearby objects // must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange) - iMap->foreachinarea(clif->getareachar, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_ALL, sd); + map->foreachinarea(clif->getareachar, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_ALL, sd); // pet if( sd->pd ) { @@ -9432,7 +9420,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { clif->message(sd->fd, msg_txt(666)); pet->menu(sd, 3); //Option 3 is return to egg. } else { - iMap->addblock(&sd->pd->bl); + map->addblock(&sd->pd->bl); clif->spawn(&sd->pd->bl); clif->send_petdata(sd,sd->pd,0,0); clif->send_petstatus(sd); @@ -9442,7 +9430,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { //homunculus [blackhole89] if( homun_alive(sd->hd) ) { - iMap->addblock(&sd->hd->bl); + map->addblock(&sd->hd->bl); clif->spawn(&sd->hd->bl); clif->send_homdata(sd,SP_ACK,0); clif->hominfo(sd,sd->hd,1); @@ -9455,7 +9443,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { } if( sd->md ) { - iMap->addblock(&sd->md->bl); + map->addblock(&sd->md->bl); clif->spawn(&sd->md->bl); clif->mercenary_info(sd); clif->mercenary_skillblock(sd); @@ -9463,7 +9451,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { } if( sd->ed ) { - iMap->addblock(&sd->ed->bl); + map->addblock(&sd->ed->bl); clif->spawn(&sd->ed->bl); clif->elemental_info(sd); clif->elemental_updatestatus(sd,SP_HP); @@ -9508,13 +9496,13 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if(homun_alive(sd->hd)) homun->init_timers(sd->hd); - if (iMap->night_flag && maplist[sd->bl.m].flag.nightenabled) { + if (map->night_flag && maplist[sd->bl.m].flag.nightenabled) { sd->state.night = 1; clif->status_change(&sd->bl, SI_SKE, 1, 0, 0, 0, 0); } // Notify everyone that this char logged in [Skotlex]. - iMap->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); + map->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); //Login Event npc->script_event(sd, NPCE_LOGIN); @@ -9549,7 +9537,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { || maplist[sd->state.pmap].flag.battleground || maplist[sd->bl.m].flag.battleground) ) status_calc_bl(&sd->bl, SCB_FLEE); //Refresh flee penalty - if( iMap->night_flag && maplist[sd->bl.m].flag.nightenabled ) { //Display night. + if( map->night_flag && maplist[sd->bl.m].flag.nightenabled ) { + //Display night. if( !sd->state.night ) { sd->state.night = 1; clif->status_change(&sd->bl, SI_SKE, 1, 0, 0, 0, 0); @@ -9571,7 +9560,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF); } - iMap->iwall_get(sd); // Updates Walls Info on this Map to Client + map->iwall_get(sd); // Updates Walls Info on this Map to Client status_calc_pc(sd, false);/* some conditions are map-dependent so we must recalculate */ sd->state.changemap = false; @@ -9609,7 +9598,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { clif->weather_check(sd); // For automatic triggering of NPCs after map loading (so you don't need to walk 1 step first) - if (iMap->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC)) + if (map->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC)) npc->touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y); else sd->areanpc_id = 0; @@ -9815,8 +9804,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) /// 0094 .L (CZ_REQNAME) /// 0368 .L (CZ_REQNAME2) /// There are various variants of this packet, some of them have padding between fields. -void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) -{ +void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) { int id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); struct block_list* bl; //struct status_change *sc; @@ -9824,7 +9812,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) if( id < 0 && -id == sd->bl.id ) // for disguises [Valaris] id = sd->bl.id; - bl = iMap->id2bl(id); + bl = map->id2bl(id); if( bl == NULL ) return; // Lagged clients could request names of already gone mobs/players. [Skotlex] @@ -9842,7 +9830,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id); ShowWarning(gm_msg); // information is sent to all online GMs - intif->wis_message_to_gm(iMap->wisp_server_name, battle_config.hack_info_GM_level, gm_msg); + intif->wis_message_to_gm(map->wisp_server_name, battle_config.hack_info_GM_level, gm_msg); return; } #endif // 0 @@ -9851,7 +9839,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) } int clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data * sd; - if( (sd = iMap->id2sd(id)) ) { + if( (sd = map->id2sd(id)) ) { sd->fontcolor_tid = INVALID_TIMER; if( sd->fontcolor && sd->disguise == sd->status.class_ ) pc->disguise(sd,-1); @@ -9987,7 +9975,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) WFIFOSET(fd, WFIFOW(fd,2)); #ifdef PCRE_SUPPORT // trigger listening npcs - iMap->foreachinrange(npc_chat->sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl); + map->foreachinrange(npc_chat->sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl); #endif // Chat logging type 'O' / Global Chat @@ -10106,9 +10094,8 @@ void clif_user_count(struct map_session_data* sd, int count) { /// /w /who (CZ_REQ_USER_COUNT). /// Request to display amount of currently connected players. /// 00c1 -void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) -{ - clif->user_count(sd, iMap->getusers()); +void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) { + clif->user_count(sd, map->getusers()); } @@ -10466,7 +10453,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) } // searching destination character - dstsd = iMap->nick2sd(target); + dstsd = map->nick2sd(target); if (dstsd == NULL || strcmp(dstsd->status.name, target) != 0) { // player is not on this map-server @@ -10491,7 +10478,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) if( dstsd->state.autotrade == 1 ) { char output[256]; sprintf(output, "%s is in autotrade mode and cannot receive whispered messages.", dstsd->status.name); - clif->wis_message(fd, iMap->wisp_server_name, output, strlen(output) + 1); + clif->wis_message(fd, map->wisp_server_name, output, strlen(output) + 1); return; } @@ -10532,14 +10519,13 @@ void clif_parse_Broadcast(int fd, struct map_session_data* sd) { /// 009f .L (CZ_ITEM_PICKUP) /// 0362 .L (CZ_ITEM_PICKUP2) /// There are various variants of this packet, some of them have padding between fields. -void clif_parse_TakeItem(int fd, struct map_session_data *sd) -{ +void clif_parse_TakeItem(int fd, struct map_session_data *sd) { struct flooritem_data *fitem; int map_object_id; map_object_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); - fitem = (struct flooritem_data*)iMap->id2bl(map_object_id); + fitem = (struct flooritem_data*)map->id2bl(map_object_id); do { if (pc_isdead(sd)) { @@ -10808,7 +10794,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) #endif return; } - if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) || sd->state.vending ) + if ( pc_cant_act2(sd) || !(bl = map->id2bl(RFIFOL(fd,2))) || sd->state.vending ) return; switch (bl->type) { @@ -11035,11 +11021,10 @@ void clif_noask_sub(struct map_session_data *src, struct map_session_data *targe /// Request to begin a trade (CZ_REQ_EXCHANGE_ITEM). /// 00e4 .L -void clif_parse_TradeRequest(int fd,struct map_session_data *sd) -{ +void clif_parse_TradeRequest(int fd,struct map_session_data *sd) { struct map_session_data *t_sd; - t_sd = iMap->id2sd(RFIFOL(fd,2)); + t_sd = map->id2sd(RFIFOL(fd,2)); if(!sd->chatID && pc_cant_act(sd)) return; //You can trade while in a chatroom. @@ -11672,7 +11657,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) #ifdef SECURE_NPCTIMEOUT if( sd->npc_idle_timer != INVALID_TIMER ) { #endif - TBL_NPC* nd = iMap->id2nd(npc_id); + TBL_NPC* nd = map->id2nd(npc_id); ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name); clif->GM_kick(NULL,sd); #ifdef SECURE_NPCTIMEOUT @@ -11828,12 +11813,11 @@ void clif_parse_InsertCard(int fd,struct map_session_data *sd) /// 0193 .L (CZ_REQNAME_BYGID) /// 0369 .L (CZ_REQNAME_BYGID2) /// There are various variants of this packet, some of them have padding between fields. -void clif_parse_SolveCharName(int fd, struct map_session_data *sd) -{ +void clif_parse_SolveCharName(int fd, struct map_session_data *sd) { int charid; charid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); - iMap->reqnickdb(sd, charid); + map->reqnickdb(sd, charid); } @@ -12061,7 +12045,7 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) { return; } - t_sd = iMap->id2sd(RFIFOL(fd,2)); + t_sd = map->id2sd(RFIFOL(fd,2)); if(t_sd && t_sd->state.noask) {// @noask [LuzZza] clif->noask_sub(sd, t_sd, 1); @@ -12082,7 +12066,7 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) { return; } - t_sd = iMap->nick2sd(name); + t_sd = map->nick2sd(name); if(t_sd && t_sd->state.noask) { // @noask [LuzZza] clif->noask_sub(sd, t_sd, 1); @@ -12198,9 +12182,8 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd) /// Changes Party Leader (CZ_CHANGE_GROUP_MASTER). /// 07da .L -void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) -{ - party->changeleader(sd, iMap->id2sd(RFIFOL(fd,2))); +void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) { + party->changeleader(sd, map->id2sd(RFIFOL(fd,2))); } #ifndef PARTY_RECRUIT @@ -12751,7 +12734,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) { clif->message (sd->fd, msg_txt(276)); // "You can't open a shop on this map" return; } - if( iMap->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) { + if( map->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) { clif->message (sd->fd, msg_txt(204)); // "You can't open a shop on this cell." return; } @@ -12948,9 +12931,8 @@ clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_da /// Guild invite request (CZ_REQ_JOIN_GUILD). /// 0168 .L .L .L -void clif_parse_GuildInvite(int fd,struct map_session_data *sd) -{ - struct map_session_data *t_sd = iMap->id2sd(RFIFOL(fd,2)); +void clif_parse_GuildInvite(int fd,struct map_session_data *sd) { + struct map_session_data *t_sd = map->id2sd(RFIFOL(fd,2)); if (clif_sub_guild_invite(fd, sd, t_sd)) return; @@ -12958,9 +12940,8 @@ void clif_parse_GuildInvite(int fd,struct map_session_data *sd) /// Guild invite request (/guildinvite) (CZ_REQ_JOIN_GUILD2). /// 0916 .24B -void clif_parse_GuildInvite2(int fd, struct map_session_data *sd) -{ - struct map_session_data *t_sd = iMap->nick2sd((char *)RFIFOP(fd, 2)); +void clif_parse_GuildInvite2(int fd, struct map_session_data *sd) { + struct map_session_data *t_sd = map->nick2sd((char *)RFIFOP(fd, 2)); if (clif_sub_guild_invite(fd, sd, t_sd)) return; @@ -13054,7 +13035,7 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) { return; } - t_sd = iMap->id2sd(RFIFOL(fd,2)); + t_sd = map->id2sd(RFIFOL(fd,2)); // @noask [LuzZza] if(t_sd && t_sd->state.noask) { @@ -13109,7 +13090,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) { return; } - t_sd = iMap->id2sd(RFIFOL(fd,2)); + t_sd = map->id2sd(RFIFOL(fd,2)); // @noask [LuzZza] if(t_sd && t_sd->state.noask) { @@ -13218,13 +13199,12 @@ void clif_parse_ChangePetName(int fd, struct map_session_data *sd) /// Request to disconnect a character. /// 00cc .L /// NOTE: Also sent when using GM right click menu "(name) force to quit" -void clif_parse_GMKick(int fd, struct map_session_data *sd) -{ +void clif_parse_GMKick(int fd, struct map_session_data *sd) { struct block_list *target; int tid; tid = RFIFOL(fd,2); - target = iMap->id2bl(tid); + target = map->id2bl(tid); if (!target) { clif->GM_kickack(sd, 0); return; @@ -13307,13 +13287,12 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd) /// /remove (CZ_REMOVE_AID_SSO). /// Request to warp to a character with given account ID. /// 0843 .L -void clif_parse_GMRemove2(int fd, struct map_session_data* sd) -{ +void clif_parse_GMRemove2(int fd, struct map_session_data* sd) { int account_id; struct map_session_data* pl_sd; account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); - if( (pl_sd = iMap->id2sd(account_id)) != NULL ) { + if( (pl_sd = map->id2sd(account_id)) != NULL ) { char command[NAME_LENGTH+8]; sprintf(command, "%cjumpto %s", atcommand->at_symbol, pl_sd->status.name); atcommand->parse(fd, sd, command, 1); @@ -13344,13 +13323,12 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd) /// /recall (CZ_RECALL_SSO). /// Request to summon a player with given account ID to own position. /// 0842 .L -void clif_parse_GMRecall2(int fd, struct map_session_data* sd) -{ +void clif_parse_GMRecall2(int fd, struct map_session_data* sd) { int account_id; struct map_session_data* pl_sd; account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); - if( (pl_sd = iMap->id2sd(account_id)) != NULL ) { + if( (pl_sd = map->id2sd(account_id)) != NULL ) { char command[NAME_LENGTH+8]; sprintf(command, "%crecall %s", atcommand->at_symbol, pl_sd->status.name); atcommand->parse(fd, sd, command, 1); @@ -13436,8 +13414,7 @@ void clif_parse_GMHide(int fd, struct map_session_data *sd) { /// 0 = positive points /// 1 = negative points /// 2 = self mute (+10 minutes) -void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) -{ +void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) { int id, type, value; struct map_session_data *dstsd; char command[NAME_LENGTH+15]; @@ -13449,8 +13426,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) if( type == 0 ) value = -value; - if (type == 2) - { + if (type == 2) { if (!battle_config.client_accept_chatdori) return; if (pc->get_group_level(sd) > 0 || sd->bl.id != id) @@ -13458,27 +13434,21 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) value = battle_config.client_accept_chatdori; dstsd = sd; - } - else - { - dstsd = iMap->id2sd(id); + } else { + dstsd = map->id2sd(id); if( dstsd == NULL ) return; } - if (type == 2 || ( (pc->get_group_level(sd)) > pc->get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) - { + if (type == 2 || ( (pc->get_group_level(sd)) > pc->get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) { clif->manner_message(sd, 0); clif->manner_message(dstsd, 5); - if (dstsd->status.manner < value) - { + if (dstsd->status.manner < value) { dstsd->status.manner -= value; sc_start(&dstsd->bl,SC_NOCHAT,100,0,0); - } - else - { + } else { dstsd->status.manner = 0; status_change_end(&dstsd->bl, SC_NOCHAT, INVALID_TIMER); } @@ -13536,8 +13506,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) /// type: /// 0 = not walkable /// 1 = walkable -void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) -{ +void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) { int x,y,type; if (!pc->has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE)) @@ -13547,7 +13516,7 @@ void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) y = RFIFOW(fd,4); type = RFIFOW(fd,6); - iMap->setgatcell(sd->bl.m,x,y,type); + map->setgatcell(sd->bl.m,x,y,type); clif->changemapcell(0,sd->bl.m,x,y,type,ALL_SAMEMAP); //FIXME: once players leave the map, the client 'forgets' this information. } @@ -13559,8 +13528,7 @@ void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) /// type: /// 0 = (/ex nick) deny speech from nick /// 1 = (/in nick) allow speech from nick -void clif_parse_PMIgnore(int fd, struct map_session_data* sd) -{ +void clif_parse_PMIgnore(int fd, struct map_session_data* sd) { char* nick; uint8 type; int i; @@ -13570,7 +13538,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd) type = RFIFOB(fd,26); if( type == 0 ) { // Add name to ignore list (block) - if (strcmp(iMap->wisp_server_name, nick) == 0) { + if (strcmp(map->wisp_server_name, nick) == 0) { clif->wisexin(sd, type, 1); // fail return; } @@ -13775,7 +13743,7 @@ void clif_friendslist_send(struct map_session_data *sd) } for (n = 0; n < i; n++) { //Sending the online players - if (iMap->charid2sd(sd->status.friends[n].char_id)) + if (map->charid2sd(sd->status.friends[n].char_id)) clif->friendslist_toggle(sd, sd->status.friends[n].account_id, sd->status.friends[n].char_id, 1); } } @@ -13822,12 +13790,11 @@ void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_i /// Request to add a player as friend (CZ_ADD_FRIENDS). /// 0202 .24B -void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) -{ +void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) { struct map_session_data *f_sd; int i; - f_sd = iMap->nick2sd((char*)RFIFOP(fd,2)); + f_sd = map->nick2sd((char*)RFIFOP(fd,2)); // ensure that the request player's friend list is not full ARR_FIND(0, MAX_FRIENDS, i, sd->status.friends[i].char_id == 0); @@ -13892,7 +13859,7 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) return; } - f_sd = iMap->id2sd(account_id); //The account id is the same as the bl.id of players. + f_sd = map->id2sd(account_id); //The account id is the same as the bl.id of players. if (f_sd == NULL) return; @@ -13957,7 +13924,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) } //remove from friend's list first - if( (f_sd = iMap->id2sd(account_id)) && f_sd->status.char_id == char_id) { + if( (f_sd = map->id2sd(account_id)) && f_sd->status.char_id == char_id) { for (i = 0; i < MAX_FRIENDS && (f_sd->status.friends[i].char_id != sd->status.char_id || f_sd->status.friends[i].account_id != sd->status.account_id); i++); @@ -14042,7 +14009,7 @@ void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) { // Packet size limits this list to 10 elements. [Skotlex] for( i = 0; i < 10 && i < MAX_FAME_LIST; i++ ) { if( list[i].id > 0 ) { - if( strcmp(list[i].name, "-") == 0 && (name = iMap->charid2nick(list[i].id)) != NULL ) { + if( strcmp(list[i].name, "-") == 0 && (name = map->charid2nick(list[i].id)) != NULL ) { strncpy((char *)(WBUFP(buf, 24 * i)), name, NAME_LENGTH); } else { strncpy((char *)(WBUFP(buf, 24 * i)), list[i].name, NAME_LENGTH); @@ -14431,7 +14398,7 @@ void clif_parse_Check(int fd, struct map_session_data *sd) safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname)); - if( ( pl_sd = iMap->nick2sd(charname) ) == NULL || pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) { + if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) { return; } @@ -15356,9 +15323,8 @@ void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *sr /// Request to adopt a player (CZ_REQ_JOIN_BABY). /// 01f9 .L -void clif_parse_Adopt_request(int fd, struct map_session_data *sd) -{ - struct map_session_data *tsd = iMap->id2sd(RFIFOL(fd,2)), *p_sd = iMap->charid2sd(sd->status.partner_id); +void clif_parse_Adopt_request(int fd, struct map_session_data *sd) { + struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2)), *p_sd = map->charid2sd(sd->status.partner_id); if( pc->can_Adopt(sd, p_sd, tsd) ) { tsd->adopt_invite = sd->status.account_id; @@ -15372,13 +15338,12 @@ void clif_parse_Adopt_request(int fd, struct map_session_data *sd) /// answer: /// 0 = rejected /// 1 = accepted -void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) -{ +void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) { int p1_id = RFIFOL(fd,2); int p2_id = RFIFOL(fd,6); int result = RFIFOL(fd,10); - struct map_session_data* p1_sd = iMap->id2sd(p1_id); - struct map_session_data* p2_sd = iMap->id2sd(p2_id); + struct map_session_data* p1_sd = map->id2sd(p1_id); + struct map_session_data* p2_sd = map->id2sd(p2_id); int pid = sd->adopt_invite; sd->adopt_invite = 0; @@ -15440,10 +15405,9 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag) /// Requesting equip of a player (CZ_EQUIPWIN_MICROSCOPE). /// 02d6 .L -void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) -{ +void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) { int charid = RFIFOL(fd, 2); - struct map_session_data* tsd = iMap->id2sd(charid); + struct map_session_data* tsd = map->id2sd(charid); if (!tsd) return; @@ -16066,7 +16030,7 @@ int clif_instance(int instance_id, int type, int flag) { break; case IOT_CHAR: target = SELF; - sd = iMap->id2sd(instances[instance_id].owner_id); + sd = map->id2sd(instances[instance_id].owner_id); break; } @@ -17713,7 +17677,7 @@ int clif_parse(int fd) { } else { //Unusual logout (during log on/off/map-changer procedure) ShowInfo("Player AID:%d/CID:%d logged off.\n", sd->status.account_id, sd->status.char_id); - iMap->quit(sd); + map->quit(sd); } } else { ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip2str(session[fd]->client_addr, NULL)); diff --git a/src/map/duel.c b/src/map/duel.c index 1291dd02b..a993ee667 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -69,7 +69,7 @@ void duel_showinfo(const unsigned int did, struct map_session_data* sd) { duel->list[did].members_count + duel->list[did].invites_count); clif->disp_onlyself(sd, output, strlen(output)); - iMap->map_foreachpc(duel_showinfo_sub, sd, &p); + map->map_foreachpc(duel_showinfo_sub, sd, &p); } int duel_create(struct map_session_data* sd, const unsigned int maxpl) { @@ -126,7 +126,7 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) { duel->list[did].members_count--; if(duel->list[did].members_count == 0) { - iMap->map_foreachpc(duel_leave_sub, did); + map->map_foreachpc(duel_leave_sub, did); duel->count--; } diff --git a/src/map/elemental.c b/src/map/elemental.c index e28a64874..09fc6c379 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -171,7 +171,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat struct map_session_data *sd; struct elemental_data *ed; - if( (sd = iMap->id2sd(id)) == NULL ) + if( (sd = map->id2sd(id)) == NULL ) return 1; if( (ed = sd->ed) == NULL ) return 1; @@ -226,7 +226,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { struct s_elemental_db *db; int i = elemental_search_index(ele->class_); - if( (sd = iMap->charid2sd(ele->char_id)) == NULL ) + if( (sd = map->charid2sd(ele->char_id)) == NULL ) return 0; if( !flag || i < 0 ) { // Not created - loaded - DB info @@ -255,7 +255,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { ed->bl.x = ed->ud.to_x; ed->bl.y = ed->ud.to_y; - iMap->addiddb(&ed->bl); + map->addiddb(&ed->bl); status_calc_elemental(ed,1); ed->last_spdrain_time = ed->last_thinktime = timer->gettick(); ed->summon_timer = INVALID_TIMER; @@ -268,7 +268,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { sd->status.ele_id = ele->elemental_id; if( ed->bl.prev == NULL && sd->bl.prev != NULL ) { - iMap->addblock(&ed->bl); + map->addblock(&ed->bl); clif->spawn(&ed->bl); clif->elemental_info(sd); clif->elemental_updatestatus(sd,SP_HP); @@ -704,16 +704,16 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_ return 0; //Already walking to him if( DIFF_TICK(tick, ed->ud.canmove_tick) < 0 ) return 0; //Can't move yet. - if( iMap->search_freecell(&ed->bl, sd->bl.m, &x, &y, MIN_ELEDISTANCE, MIN_ELEDISTANCE, 1) - && unit->walktoxy(&ed->bl, x, y, 0) ) + if( map->search_freecell(&ed->bl, sd->bl.m, &x, &y, MIN_ELEDISTANCE, MIN_ELEDISTANCE, 1) + && unit->walktoxy(&ed->bl, x, y, 0) ) return 0; } if( mode == EL_MODE_AGGRESSIVE ) { - target = iMap->id2bl(ed->ud.target); + target = map->id2bl(ed->ud.target); if( !target ) - iMap->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); @@ -752,7 +752,7 @@ static int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list a } static int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) { - iMap->map_foreachpc(elemental_ai_sub_foreachclient,tick); + map->map_foreachpc(elemental_ai_sub_foreachclient,tick); return 0; } @@ -764,7 +764,7 @@ int read_elementaldb(void) { struct s_elemental_db *db; struct status_data *estatus; - sprintf(line, "%s/%s", iMap->db_path, "elemental_db.txt"); + sprintf(line, "%s/%s", map->db_path, "elemental_db.txt"); memset(elemental->elemental_db,0,sizeof(elemental->elemental_db)); fp = fopen(line, "r"); @@ -855,7 +855,7 @@ int read_elemental_skilldb(void) { uint16 skill_id, skill_lv; int skillmode; - sprintf(line, "%s/%s", iMap->db_path, "elemental_skill_db.txt"); + sprintf(line, "%s/%s", map->db_path, "elemental_skill_db.txt"); fp = fopen(line, "r"); if( !fp ) { ShowError("read_elemental_skilldb : can't read elemental_skill_db.txt\n"); diff --git a/src/map/guild.c b/src/map/guild.c index 253dbcf1c..797b3b370 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -75,16 +75,15 @@ 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* sd = iMap->id2sd(account_id); +static 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)) return NULL; - if (sd->status.guild_id != guild_id) - { //If player belongs to a different guild, kick him out. - intif->guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **"); + if (sd->status.guild_id != guild_id) { + //If player belongs to a different guild, kick him out. + intif->guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **"); return NULL; } @@ -168,7 +167,7 @@ static bool guild_read_castledb(char* str[], int columns, int current) struct guild_castle *gc; int mapindex = mapindex_name2id(str[1]); - if (iMap->mapindex2mapid(mapindex) < 0) // Map not found or on another map-server + if (map->mapindex2mapid(mapindex) < 0) // Map not found or on another map-server return false; CREATE(gc, struct guild_castle, 1); @@ -401,7 +400,7 @@ int guild_create(struct map_session_data *sd, const char *name) //Whether or not to create guild int guild_created(int account_id,int guild_id) { - struct map_session_data *sd=iMap->id2sd(account_id); + struct map_session_data *sd=map->id2sd(account_id); if(sd==NULL) return 0; @@ -554,9 +553,9 @@ int guild_recv_info(struct guild *sg) { } before=*sg; - //Perform the check on the user because the first load + //Perform the check on the user because the first load guild_check_member(sg); - if ((sd = iMap->nick2sd(sg->master)) != NULL) { + 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. if( battle_config.guild_skill_relog_delay ) @@ -663,7 +662,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { if( tsd->status.guild_id > 0 || tsd->guild_invite > 0 - || ((iMap->agit_flag || iMap->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle) + || ((map->agit_flag || map->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle) ) { //Can't invite people inside castles. [Skotlex] clif->guild_inviteack(sd,0); @@ -686,8 +685,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { /// Guild invitation reply. /// flag: 0:rejected, 1:accepted -int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) -{ +int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) { struct map_session_data* tsd; nullpo_ret(sd); @@ -698,10 +696,10 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) // look up the person who sent the invite //NOTE: this can be NULL because the person might have logged off in the meantime - tsd = iMap->id2sd(sd->guild_invite_account); + tsd = map->id2sd(sd->guild_invite_account); - if ( sd->status.guild_id > 0 ) // [Paradox924X] - { // Already in another guild. + if ( sd->status.guild_id > 0 ) { + // Already in another guild. [Paradox924X] if ( tsd ) clif->guild_inviteack(tsd,0); return 0; } @@ -788,33 +786,32 @@ void guild_member_joined(struct map_session_data *sd) /*========================================== * Add a player to a given guild_id *----------------------------------------*/ -int guild_member_added(int guild_id,int account_id,int char_id,int flag) -{ - struct map_session_data *sd= iMap->id2sd(account_id),*sd2; +int guild_member_added(int guild_id,int account_id,int char_id,int flag) { + struct map_session_data *sd = map->id2sd(account_id),*sd2; struct guild *g; if( (g=guild->search(guild_id))==NULL ) return 0; if(sd==NULL || sd->guild_invite==0){ - // cancel if player not present or invalide guild_id invitation + // cancel if player not present or invalide guild_id invitation if (flag == 0) { ShowError("guild: member added error %d is not online\n",account_id); - intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); + intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); } return 0; } - sd2 = iMap->id2sd(sd->guild_invite_account); + sd2 = map->id2sd(sd->guild_invite_account); sd->guild_invite = 0; sd->guild_invite_account = 0; - if (flag == 1) { //failure + if (flag == 1) { //failure if( sd2!=NULL ) clif->guild_inviteack(sd2,3); return 0; } - //if all ok add player to guild + //if all ok add player to guild sd->status.guild_id = g->guild_id; sd->guild_emblem_id = g->emblem_id; sd->guild = g; @@ -850,7 +847,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c if( sd->status.account_id != account_id || sd->status.char_id != char_id || sd->status.guild_id != guild_id - || ((iMap->agit_flag || iMap->agit2_flag) && maplist[sd->bl.m].flag.gvg_castle) + || ((map->agit_flag || map->agit2_flag) && maplist[sd->bl.m].flag.gvg_castle) ) return 0; @@ -861,8 +858,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c /*========================================== * Request remove a player to a given guild_id *----------------------------------------*/ -int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes) -{ +int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes) { struct map_session_data *tsd; struct guild *g; int i,ps; @@ -880,10 +876,10 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i if( (ps=guild->getposition(g,sd))<0 || !(g->position[ps].mode&0x0010) ) return 0; //Expulsion permission - //Can't leave inside guild castles. - if ((tsd = iMap->id2sd(account_id)) + //Can't leave inside guild castles. + if ((tsd = map->id2sd(account_id)) && tsd->status.char_id == char_id - && ((iMap->agit_flag || iMap->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle) + && ((map->agit_flag || map->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle) ) return 0; @@ -899,7 +895,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c { int i; struct guild* g = guild->search(guild_id); - struct map_session_data* sd = iMap->charid2sd(char_id); + struct map_session_data* sd = map->charid2sd(char_id); struct map_session_data* online_member_sd; if(g == NULL) @@ -1005,13 +1001,13 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin } if(idx == -1 || c == 0) { - //Treat char_id who doesn't match guild_id (not found as member) - struct map_session_data *sd = iMap->id2sd(account_id); + //Treat char_id who doesn't match guild_id (not found as member) + struct map_session_data *sd = map->id2sd(account_id); if(sd && sd->status.char_id == char_id) { sd->status.guild_id=0; sd->guild_emblem_id=0; } - ShowWarning("guild: not found member %d,%d on %d[%s]\n", account_id,char_id,guild_id,g->name); + ShowWarning("guild: not found member %d,%d on %d[%s]\n", account_id,char_id,guild_id,g->name); return 0; } @@ -1213,18 +1209,16 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data) if( gc->guild_id != guild_id ) continue; // update permanent guardians - for( i = 0; i < ARRAYLENGTH(gc->guardian); ++i ) - { - TBL_MOB* md = (gc->guardian[i].id ? iMap->id2md(gc->guardian[i].id) : NULL); + for( i = 0; i < ARRAYLENGTH(gc->guardian); ++i ) { + TBL_MOB* md = (gc->guardian[i].id ? map->id2md(gc->guardian[i].id) : NULL); if( md == NULL || md->guardian_data == NULL ) continue; md->guardian_data->emblem_id = emblem_id; clif->guild_emblem_area(&md->bl); } // update temporary guardians - for( i = 0; i < gc->temp_guardians_max; ++i ) - { - TBL_MOB* md = (gc->temp_guardians[i] ? iMap->id2md(gc->temp_guardians[i]) : NULL); + for( i = 0; i < gc->temp_guardians_max; ++i ) { + TBL_MOB* md = (gc->temp_guardians[i] ? map->id2md(gc->temp_guardians[i]) : NULL); if( md == NULL || md->guardian_data == NULL ) continue; md->guardian_data->emblem_id = emblem_id; @@ -1340,9 +1334,8 @@ int guild_skillup(TBL_PC* sd, uint16 skill_id) /*==================================================== * Notification of guildskill skill_id increase request *---------------------------------------------------*/ -int guild_skillupack(int guild_id,uint16 skill_id,int account_id) -{ - struct map_session_data *sd=iMap->id2sd(account_id); +int guild_skillupack(int guild_id,uint16 skill_id,int account_id) { + struct map_session_data *sd=map->id2sd(account_id); struct guild *g=guild->search(guild_id); int i; if(g==NULL) @@ -1356,7 +1349,7 @@ int guild_skillupack(int guild_id,uint16 skill_id,int account_id) case GD_GLORYWOUNDS: case GD_SOULCOLD: case GD_HAWKEYES: - guild->aura_refresh(sd,skill_id,g->skill[skill_id-GD_SKILLBASE].lv); + guild->aura_refresh(sd,skill_id,g->skill[skill_id-GD_SKILLBASE].lv); break; } } @@ -1372,8 +1365,8 @@ int guild_skillupack(int guild_id,uint16 skill_id,int account_id) void guild_guildaura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { struct skill_unit_group* group = NULL; int type = status->skill2sc(skill_id); - if( !(battle_config.guild_aura&((iMap->agit_flag || iMap->agit2_flag)?2:1)) && - !(battle_config.guild_aura&(map_flag_gvg2(sd->bl.m)?8:4)) ) + if( !(battle_config.guild_aura&((map->agit_flag || map->agit2_flag)?2:1)) + && !(battle_config.guild_aura&(map_flag_gvg2(sd->bl.m)?8:4)) ) return; if( !skill_lv ) return; @@ -1440,15 +1433,15 @@ int guild_check_alliance(int guild_id1, int guild_id2, int flag) /*==================================================== * Player sd, asking player tsd an alliance between their 2 guilds *---------------------------------------------------*/ -int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd) -{ +int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd) { struct guild *g[2]; int i; - if(iMap->agit_flag || iMap->agit2_flag) { // Disable alliance creation during woe [Valaris] + if(map->agit_flag || map->agit2_flag) { + // Disable alliance creation during woe [Valaris] clif->message(sd->fd,msg_txt(676)); //"Alliances cannot be made during Guild Wars!" return 0; - } // end addition [Valaris] + } nullpo_ret(sd); @@ -1498,12 +1491,11 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd) /*==================================================== * Player sd, answer to player tsd (account_id) for an alliance request *---------------------------------------------------*/ -int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) -{ +int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) { struct map_session_data *tsd; nullpo_ret(sd); - tsd= iMap->id2sd( account_id ); + tsd = map->id2sd( account_id ); if (!tsd) { //Character left? Cancel alliance. clif->guild_allianceack(sd,3); return 0; @@ -1559,14 +1551,14 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) /*==================================================== * Player sd asking to break alliance with guild guild_id *---------------------------------------------------*/ -int guild_delalliance(struct map_session_data *sd,int guild_id,int flag) -{ +int guild_delalliance(struct map_session_data *sd,int guild_id,int flag) { nullpo_ret(sd); - if(iMap->agit_flag || iMap->agit2_flag) { // Disable alliance breaking during woe [Valaris] + if(map->agit_flag || map->agit2_flag) { + // Disable alliance breaking during woe [Valaris] clif->message(sd->fd,msg_txt(677)); //"Alliances cannot be broken during Guild Wars!" return 0; - } // end addition [Valaris] + } intif->guild_alliance( sd->status.guild_id,guild_id,sd->status.account_id,0,flag|8 ); return 0; @@ -1595,31 +1587,30 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd) return 0; } - for (i = 0; i < MAX_GUILDALLIANCE; i++) { // checking relations + for (i = 0; i < MAX_GUILDALLIANCE; i++) { // checking relations if(g->alliance[i].guild_id==tsd->status.guild_id){ - if (g->alliance[i].opposition == 1) { // check if not already hostile + if (g->alliance[i].opposition == 1) { // check if not already hostile clif->guild_oppositionack(sd,2); return 0; } - if(iMap->agit_flag || iMap->agit2_flag) // Prevent the changing of alliances to oppositions during WoE. + if(map->agit_flag || map->agit2_flag) // Prevent the changing of alliances to oppositions during WoE. return 0; //Change alliance to opposition. - intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, - sd->status.account_id,tsd->status.account_id,8 ); + intif->guild_alliance(sd->status.guild_id,tsd->status.guild_id, + sd->status.account_id,tsd->status.account_id,8); } } - // inform other serv - intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id, - sd->status.account_id,tsd->status.account_id,1 ); + // inform other serv + intif->guild_alliance(sd->status.guild_id,tsd->status.guild_id, + sd->status.account_id,tsd->status.account_id,1); return 0; } /*==================================================== * Notification of a relationship between 2 guilds *---------------------------------------------------*/ -int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2) -{ +int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2) { struct guild *g[2]; int guild_id[2]; const char *guild_name[2]; @@ -1630,8 +1621,8 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id guild_id[1] = guild_id2; guild_name[0] = name1; guild_name[1] = name2; - sd[0] = iMap->id2sd(account_id1); - sd[1] = iMap->id2sd(account_id2); + sd[0] = map->id2sd(account_id1); + sd[1] = map->id2sd(account_id2); g[0]=guild->search(guild_id1); g[1]=guild->search(guild_id2); @@ -1641,7 +1632,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id sd[0]->guild_alliance_account=0; } - if (flag & 0x70) { // failure + if (flag & 0x70) { // failure for(i=0;i<2-(flag&1);i++) if( sd[i]!=NULL ) clif->guild_allianceack(sd[i],((flag>>4)==i+1)?3:4); @@ -1657,7 +1648,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id } } - if (!(flag & 0x08)) { // new relationship + if (!(flag & 0x08)) { // new relationship for(i=0;i<2-(flag&1);i++) { if(g[i]!=NULL) { ARR_FIND( 0, MAX_GUILDALLIANCE, j, g[i]->alliance[j].guild_id == 0 ); @@ -1668,28 +1659,28 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id } } } - } else { // remove relationship + } else { // remove relationship for(i=0;i<2-(flag&1);i++) { if( g[i] != NULL ) { ARR_FIND( 0, MAX_GUILDALLIANCE, j, g[i]->alliance[j].guild_id == guild_id[1-i] && g[i]->alliance[j].opposition == (flag&1) ); if( j < MAX_GUILDALLIANCE ) g[i]->alliance[j].guild_id = 0; } - if (sd[i] != NULL) // notify players + if (sd[i] != NULL) // notify players clif->guild_delalliance(sd[i],guild_id[1-i],(flag&1)); } } - if ((flag & 0x0f) == 0) { // alliance notification + if ((flag & 0x0f) == 0) { // alliance notification if( sd[1]!=NULL ) clif->guild_allianceack(sd[1],2); - } else if ((flag & 0x0f) == 1) { // enemy notification + } else if ((flag & 0x0f) == 1) { // enemy notification if( sd[0]!=NULL ) clif->guild_oppositionack(sd[0],0); } - for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members + for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members struct map_session_data *sd; if(g[i]!=NULL) for(j=0;jmax_member;j++) @@ -1963,7 +1954,7 @@ int guild_castledatasave(int castle_id, int index, int value) struct mob_data *gd; gc->guild_id = value; for (i = 0; i < MAX_GUARDIANS; i++) - if (gc->guardian[i].visible && (gd = iMap->id2md(gc->guardian[i].id)) != NULL) + if (gc->guardian[i].visible && (gd = map->id2md(gc->guardian[i].id)) != NULL) mob->guardian_guildchange(gd); break; } @@ -1975,7 +1966,7 @@ int guild_castledatasave(int castle_id, int index, int value) struct mob_data *gd; gc->defense = value; for (i = 0; i < MAX_GUARDIANS; i++) - if (gc->guardian[i].visible && (gd = iMap->id2md(gc->guardian[i].id)) != NULL) + if (gc->guardian[i].visible && (gd = map->id2md(gc->guardian[i].id)) != NULL) status_calc_mob(gd, 0); break; } @@ -2234,10 +2225,10 @@ void do_init_guild(void) { guild_flags_count = 0; - sv->readdb(iMap->db_path, "castle_db.txt", ',', 4, 5, -1, &guild_read_castledb); + 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(iMap->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"); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index fb954cdec..45e9af2b0 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -404,7 +404,7 @@ bool homunculus_evolve(struct homun_data *hd) { hom->intimacy = 500; unit->remove_map(&hd->bl, CLR_OUTSIGHT, ALC_MARK); - iMap->addblock(&hd->bl); + map->addblock(&hd->bl); clif->spawn(&hd->bl); clif->emotion(&sd->bl, E_NO1); @@ -448,7 +448,7 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) { } unit->remove_map(&hd->bl, CLR_OUTSIGHT, ALC_MARK); - iMap->addblock(&hd->bl); + map->addblock(&hd->bl); clif->spawn(&hd->bl); clif->emotion(&sd->bl, E_NO1); @@ -619,7 +619,7 @@ int homunculus_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; struct homun_data *hd; - if(!(sd=iMap->id2sd(id)) || !sd->status.hom_id || !(hd=sd->hd)) + if(!(sd=map->id2sd(id)) || !sd->status.hom_id || !(hd=sd->hd)) return 1; if(hd->hungry_timer != tid){ @@ -756,7 +756,7 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) { hd->bl.x = hd->ud.to_x; hd->bl.y = hd->ud.to_y; - iMap->addiddb(&hd->bl); + map->addiddb(&hd->bl); status_calc_homunculus(hd,1); hd->hungry_timer = INVALID_TIMER; @@ -790,7 +790,7 @@ bool homunculus_call(struct map_session_data *sd) { hd->bl.x = sd->bl.x; hd->bl.y = sd->bl.y; hd->bl.m = sd->bl.m; - iMap->addblock(&hd->bl); + map->addblock(&hd->bl); clif->spawn(&hd->bl); clif->send_homdata(sd,SP_ACK,0); clif->hominfo(sd,hd,1); @@ -810,7 +810,7 @@ bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) { struct map_session_data *sd; struct homun_data *hd; - sd = iMap->id2sd(account_id); + sd = map->id2sd(account_id); if(!sd) return false; if (sd->status.char_id != sh->char_id) { @@ -836,7 +836,7 @@ bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) { if(hd && hd->homunculus.hp && !hd->homunculus.vaporize && hd->bl.prev == NULL && sd->bl.prev != NULL) { enum homun_type htype = homun->class2type(hd->homunculus.class_); - iMap->addblock(&hd->bl); + map->addblock(&hd->bl); clif->spawn(&hd->bl); clif->send_homdata(sd,SP_ACK,0); clif->hominfo(sd,hd,1); @@ -921,7 +921,7 @@ bool homunculus_ressurect(struct map_session_data* sd, unsigned char per, short hd->bl.m = sd->bl.m; hd->bl.x = x; hd->bl.y = y; - iMap->addblock(&hd->bl); + map->addblock(&hd->bl); clif->spawn(&hd->bl); } status->revive(&hd->bl, per, 0); @@ -1129,14 +1129,14 @@ void homunculus_read_db(void) { if( i > 0 ) { char filepath[256]; - sprintf(filepath, "%s/%s", iMap->db_path, filename[i]); + sprintf(filepath, "%s/%s", map->db_path, filename[i]); if( !exists(filepath) ) { continue; } } - sv->readdb(iMap->db_path, filename[i], ',', 50, 50, MAX_HOMUNCULUS_CLASS, homun->read_db_sub); + sv->readdb(map->db_path, filename[i], ',', 50, 50, MAX_HOMUNCULUS_CLASS, homun->read_db_sub); } } @@ -1182,7 +1182,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) { void homunculus_skill_db_read(void) { memset(homun->skill_tree,0,sizeof(homun->skill_tree)); - sv->readdb(iMap->db_path, "homun_skill_tree.txt", ',', 13, 15, -1, homun->read_skill_db_sub); + sv->readdb(map->db_path, "homun_skill_tree.txt", ',', 13, 15, -1, homun->read_skill_db_sub); } @@ -1196,7 +1196,7 @@ void homunculus_exp_db_read(void) { memset(homun->exptable,0,sizeof(homun->exptable)); for(i = 0; i < 2; i++) { - sprintf(line, "%s/%s", iMap->db_path, filename[i]); + sprintf(line, "%s/%s", map->db_path, filename[i]); if( (fp=fopen(line,"r")) == NULL) { if(i != 0) continue; diff --git a/src/map/instance.c b/src/map/instance.c index 548a34b1d..5ef089fae 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -59,7 +59,7 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ case IOT_NONE: break; case IOT_CHAR: - if( ( sd = iMap->id2sd(owner_id) ) == NULL ) { + if( ( sd = map->id2sd(owner_id) ) == NULL ) { ShowError("instance_create: character %d not found for instance '%s'.\n", owner_id, name); return -2; } @@ -142,7 +142,7 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ * Add a map to the instance using src map "name" *--------------------------------------*/ int instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) { - int16 m = iMap->mapname2mapid(name); + int16 m = map->mapname2mapid(name); int i, im = -1; size_t num_cell, size; @@ -165,17 +165,17 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const return -4; } - ARR_FIND( instance->start_id, iMap->map_num, i, maplist[i].name[0] == 0 ); // Searching for a Free Map + ARR_FIND( instance->start_id, map->map_num, i, maplist[i].name[0] == 0 ); // Searching for a Free Map - if( i < iMap->map_num ) + if( i < map->map_num ) im = i; // Unused map found (old instance) else { - im = iMap->map_num; // Using next map index - RECREATE(maplist,struct map_data,++iMap->map_num); + im = map->map_num; // Using next map index + RECREATE(maplist,struct map_data,++map->map_num); } if( maplist[m].cell == (struct mapcell *)0xdeadbeaf ) - iMap->cellfromcache(&maplist[m]); + map->cellfromcache(&maplist[m]); memcpy( &maplist[im], &maplist[m], sizeof(struct map_data) ); // Copy source map if( map_name != NULL ) { @@ -247,7 +247,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const RECREATE(instances[instance_id].map, unsigned short, ++instances[instance_id].num_map); instances[instance_id].map[instances[instance_id].num_map - 1] = im; // Attach to actual instance - iMap->addmap2db(&maplist[im]); + map->addmap2db(&maplist[im]); return im; } @@ -314,7 +314,7 @@ void instance_init(int instance_id) { return; // nothing to do for( i = 0; i < instances[instance_id].num_map; i++ ) - iMap->foreachinmap(instance_map_npcsub, maplist[instances[instance_id].map[i]].instance_src_map, BL_NPC, instances[instance_id].map[i]); + map->foreachinmap(instance_map_npcsub, maplist[instances[instance_id].map[i]].instance_src_map, BL_NPC, instances[instance_id].map[i]); instances[instance_id].state = INSTANCE_BUSY; } @@ -339,7 +339,7 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) { switch(bl->type) { case BL_PC: - iMap->quit((struct map_session_data *) bl); + map->quit((struct map_session_data *) bl); break; case BL_NPC: npc->unload((struct npc_data *)bl,true); @@ -351,7 +351,7 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) { //There is no need for this, the pet is removed together with the player. [Skotlex] break; case BL_ITEM: - iMap->clearflooritem(bl); + map->clearflooritem(bl); break; case BL_SKILL: skill->delunit((struct skill_unit *) bl); @@ -372,11 +372,11 @@ void instance_del_map(int16 m) { return; } - iMap->map_foreachpc(instance_del_load, m); - iMap->foreachinmap(instance_cleanup_sub, m, BL_ALL); + map->map_foreachpc(instance_del_load, m); + map->foreachinmap(instance_cleanup_sub, m, BL_ALL); if( maplist[m].mob_delete_timer != INVALID_TIMER ) - timer->delete(maplist[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer); mapindex_removemap(map_id2index(m)); @@ -426,7 +426,7 @@ void instance_del_map(int16 m) { if( maplist[m].channel ) clif->chsys_delete(maplist[m].channel); - iMap->removemapdb(&maplist[m]); + map->removemapdb(&maplist[m]); memset(&maplist[m], 0x00, sizeof(maplist[0])); maplist[m].name[0] = 0; maplist[m].instance_id = -1; @@ -469,7 +469,7 @@ void instance_destroy(int instance_id) { case IOT_NONE: break; case IOT_CHAR: - if( ( sd = iMap->id2sd(instances[instance_id].owner_id) ) == NULL ) { + if( ( sd = map->id2sd(instances[instance_id].owner_id) ) == NULL ) { break; } iptr = sd->instance; diff --git a/src/map/intif.c b/src/map/intif.c index cae2561a0..097c41edb 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -466,7 +466,7 @@ int intif_party_changemap(struct map_session_data *sd,int online) { if(!sd) return 0; - if( (m=iMap->mapindex2mapid(sd->mapindex)) >= 0 && maplist[m].instance_id >= 0 ) + if( (m=map->mapindex2mapid(sd->mapindex)) >= 0 && maplist[m].instance_id >= 0 ) mapindex = map_id2index(maplist[m].instance_src_map); else mapindex = sd->mapindex; @@ -851,8 +851,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) -{ +int intif_parse_WisMessage(int fd) { struct map_session_data* sd; char *wisp_source; char name[NAME_LENGTH]; @@ -861,9 +860,9 @@ int intif_parse_WisMessage(int fd) id=RFIFOL(fd,4); safestrncpy(name, (char*)RFIFOP(fd,32), NAME_LENGTH); - sd = iMap->nick2sd(name); - if(sd == NULL || strcmp(sd->status.name, name) != 0) - { //Not found + sd = map->nick2sd(name); + if(sd == NULL || strcmp(sd->status.name, name) != 0) { + //Not found intif_wis_replay(id,1); return 0; } @@ -895,7 +894,7 @@ int intif_parse_WisEnd(int fd) if (battle_config.etc_log) ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target - sd = (struct map_session_data *)iMap->nick2sd((char *) RFIFOP(fd,2)); + sd = (struct map_session_data *)map->nick2sd((char *) RFIFOP(fd,2)); if (sd != NULL) clif->wis_end(sd->fd, RFIFOB(fd,26)); @@ -934,7 +933,7 @@ int mapif_parse_WisToGM(int fd) safestrncpy(Wisp_name, (char*)RFIFOP(fd,4), NAME_LENGTH); safestrncpy(message, (char*)RFIFOP(fd,32), mes_len); // information is sent to all online GM - iMap->map_foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len); + map->map_foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len); if (message != mbuf) aFree(message); @@ -953,7 +952,7 @@ int intif_parse_Registers(int fd) if (node) sd = node->sd; else { //Normally registries should arrive for in log-in chars. - sd = iMap->id2sd(account_id); + sd = map->id2sd(account_id); if (sd && RFIFOB(fd,12) == 3 && sd->status.char_id != char_id) sd = NULL; //Character registry from another character. } @@ -1005,7 +1004,7 @@ int intif_parse_LoadGuildStorage(int fd) guild_id = RFIFOL(fd,8); if(guild_id <= 0) return 1; - sd=iMap->id2sd( RFIFOL(fd,4) ); + sd=map->id2sd( RFIFOL(fd,4) ); if(sd==NULL){ ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); return 1; @@ -1321,7 +1320,7 @@ int intif_parse_DeletePetOk(int fd) int intif_parse_ChangeNameOk(int fd) { struct map_session_data *sd = NULL; - if((sd=iMap->id2sd(RFIFOL(fd,2)))==NULL || + if((sd=map->id2sd(RFIFOL(fd,2)))==NULL || sd->status.char_id != RFIFOL(fd,6)) return 0; @@ -1404,7 +1403,7 @@ int intif_parse_questlog(int fd) { int char_id = RFIFOL(fd, 4); int i; - TBL_PC * sd = iMap->charid2sd(char_id); + TBL_PC * sd = map->charid2sd(char_id); //User not online anymore if(!sd) @@ -1438,10 +1437,9 @@ int intif_parse_questlog(int fd) return 0; } -int intif_parse_questsave(int fd) -{ +int intif_parse_questsave(int fd) { int cid = RFIFOL(fd, 2); - TBL_PC *sd = iMap->id2sd(cid); + TBL_PC *sd = map->id2sd(cid); if( !RFIFOB(fd, 6) ) ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", cid); @@ -1499,7 +1497,7 @@ int intif_parse_Mail_inboxreceived(int fd) struct map_session_data *sd; unsigned char flag = RFIFOB(fd,8); - sd = iMap->charid2sd(RFIFOL(fd,4)); + sd = map->charid2sd(RFIFOL(fd,4)); if (sd == NULL) { @@ -1559,13 +1557,12 @@ int intif_Mail_getattach(int char_id, int mail_id) return 0; } -int intif_parse_Mail_getattach(int fd) -{ +int intif_parse_Mail_getattach(int fd) { struct map_session_data *sd; struct item item; int zeny = RFIFOL(fd,8); - sd = iMap->charid2sd( RFIFOL(fd,4) ); + sd = map->charid2sd( RFIFOL(fd,4) ); if (sd == NULL) { @@ -1601,13 +1598,12 @@ int intif_Mail_delete(int char_id, int mail_id) return 0; } -int intif_parse_Mail_delete(int fd) -{ +int intif_parse_Mail_delete(int fd) { int char_id = RFIFOL(fd,2); int mail_id = RFIFOL(fd,6); bool failed = RFIFOB(fd,10); - struct map_session_data *sd = iMap->charid2sd(char_id); + struct map_session_data *sd = map->charid2sd(char_id); if (sd == NULL) { ShowError("intif_parse_Mail_delete: char not found %d\n", char_id); @@ -1648,9 +1644,8 @@ int intif_Mail_return(int char_id, int mail_id) return 0; } -int intif_parse_Mail_return(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +int intif_parse_Mail_return(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2)); int mail_id = RFIFOL(fd,6); short fail = RFIFOB(fd,10); @@ -1713,23 +1708,20 @@ static void intif_parse_Mail_send(int fd) fail = (msg.id == 0); // notify sender - sd = iMap->charid2sd(msg.send_id); - if( sd != NULL ) - { + sd = map->charid2sd(msg.send_id); + if( sd != NULL ) { if( fail ) mail->deliveryfail(sd, &msg); - else - { + else { clif->mail_send(sd->fd, false); - if( iMap->save_settings&16 ) + if( map->save_settings&16 ) chrif->save(sd, 0); } } } -static void intif_parse_Mail_new(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +static void intif_parse_Mail_new(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); const char* title = (char*)RFIFOP(fd,34); @@ -1765,9 +1757,8 @@ int intif_Auction_requestlist(int char_id, short type, int price, const char* se return 0; } -static void intif_parse_Auction_results(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,4)); +static void intif_parse_Auction_results(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,4)); short count = RFIFOW(fd,8); short pages = RFIFOW(fd,10); uint8* data = RFIFOP(fd,12); @@ -1794,25 +1785,22 @@ int intif_Auction_register(struct auction_data *auction) return 1; } -static void intif_parse_Auction_register(int fd) -{ +static void intif_parse_Auction_register(int fd) { struct map_session_data *sd; struct auction_data auction; - if( RFIFOW(fd,2) - 4 != sizeof(struct auction_data) ) - { + 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)); return; } memcpy(&auction, RFIFOP(fd,4), sizeof(struct auction_data)); - if( (sd = iMap->charid2sd(auction.seller_id)) == NULL ) + if( (sd = map->charid2sd(auction.seller_id)) == NULL ) return; - if( auction.auction_id > 0 ) - { + if( auction.auction_id > 0 ) { clif->auction_message(sd->fd, 1); // Confirmation Packet ?? - if( iMap->save_settings&32 ) + if( map->save_settings&32 ) chrif->save(sd,0); } else @@ -1840,16 +1828,14 @@ int intif_Auction_cancel(int char_id, unsigned int auction_id) return 0; } -static void intif_parse_Auction_cancel(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +static void intif_parse_Auction_cancel(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2)); int result = RFIFOB(fd,6); if( sd == NULL ) return; - switch( result ) - { + 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; @@ -1871,9 +1857,8 @@ int intif_Auction_close(int char_id, unsigned int auction_id) return 0; } -static void intif_parse_Auction_close(int fd) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +static void intif_parse_Auction_close(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2)); unsigned char result = RFIFOB(fd,6); if( sd == NULL ) @@ -1907,9 +1892,8 @@ 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) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +static void intif_parse_Auction_bid(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2)); int bid = RFIFOL(fd,6); unsigned char result = RFIFOB(fd,10); @@ -1927,9 +1911,8 @@ 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) -{ - struct map_session_data *sd = iMap->charid2sd(RFIFOL(fd,2)); +static void intif_parse_Auction_message(int fd) { + struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2)); unsigned char result = RFIFOB(fd,6); if( sd == NULL ) diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 2398ba04c..ee0eea5ff 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1382,7 +1382,7 @@ void itemdb_read_combos() { char filepath[256]; FILE* fp; - sprintf(filepath, "%s/%s", iMap->db_path, DBPATH"item_combo_db.txt"); + sprintf(filepath, "%s/%s", map->db_path, DBPATH"item_combo_db.txt"); if ((fp = fopen(filepath, "r")) == NULL) { ShowError("itemdb_read_combos: File not found \"%s\".\n", filepath); @@ -1626,7 +1626,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->weight = atoi(str[6]); #ifdef RENEWAL - if( iMap->db_use_sql_item_db ) { + if( map->db_use_sql_item_db ) { id->atk = atoi(str[7]); id->matk = atoi(str[8]); offset += 1; @@ -1656,7 +1656,7 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt) id->wlv = cap_value(atoi(str[15+offset]), REFINE_TYPE_ARMOR, REFINE_TYPE_MAX); #ifdef RENEWAL - if( iMap->db_use_sql_item_db ) { + if( map->db_use_sql_item_db ) { id->elv = atoi(str[16+offset]); id->elvmax = atoi(str[17+offset]); offset += 1; @@ -1714,7 +1714,7 @@ int itemdb_readdb(void) char filepath[256]; FILE* fp; - sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + sprintf(filepath, "%s/%s", map->db_path, filename[fi]); fp = fopen(filepath, "r"); if( fp == NULL ) { ShowWarning("itemdb_readdb: File not found \"%s\", skipping.\n", filepath); @@ -1821,12 +1821,12 @@ int itemdb_readdb(void) int itemdb_read_sqldb(void) { const char* item_db_name[] = { - #ifdef RENEWAL - iMap->item_db_re_db, - #else - iMap->item_db_db, - #endif - iMap->item_db2_db }; +#ifdef RENEWAL + map->item_db_re_db, +#else // not RENEWAL + map->item_db_db, +#endif // RENEWAL + map->item_db2_db }; int fi; for( fi = 0; fi < ARRAYLENGTH(item_db_name); ++fi ) { @@ -1889,9 +1889,8 @@ uint64 itemdb_unique_id(int8 flag, int64 value) { return ++item_uid; } int itemdb_uid_load() { - char * uid; - if (SQL_ERROR == SQL->Query(mmysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",iMap->interreg_db)) + if (SQL_ERROR == SQL->Query(mmysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",map->interreg_db)) Sql_ShowDebug(mmysql_handle); if( SQL_SUCCESS != SQL->NextRow(mmysql_handle) ) { @@ -1914,7 +1913,7 @@ void itemdb_read(void) { int i; DBData prev; - if (iMap->db_use_sql_item_db) + if (map->db_use_sql_item_db) itemdb->read_sqldb(); else itemdb->readdb(); @@ -1933,12 +1932,12 @@ void itemdb_read(void) { itemdb->read_chains(); itemdb->read_packages(); - sv->readdb(iMap->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail); - sv->readdb(iMap->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade); - sv->readdb(iMap->db_path, "item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); - sv->readdb(iMap->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack); - sv->readdb(iMap->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore); - sv->readdb(iMap->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse); + sv->readdb(map->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail); + sv->readdb(map->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade); + sv->readdb(map->db_path, "item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); + sv->readdb(map->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack); + sv->readdb(map->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore); + sv->readdb(map->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse); itemdb->uid_load(); } diff --git a/src/map/log.c b/src/map/log.c index a10549972..929143ba7 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -374,7 +374,7 @@ void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, return; } - if( logs->config.log_chat_woe_disable && ( iMap->agit_flag || iMap->agit2_flag ) ) { + if( logs->config.log_chat_woe_disable && ( map->agit_flag || map->agit2_flag ) ) { // no chat logging during woe return; } diff --git a/src/map/map.c b/src/map/map.c index 1d679a79e..935492dbd 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -133,7 +133,7 @@ int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing m struct eri *map_iterator_ers; char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made -struct map_interface iMap_s; +struct map_interface map_s; struct map_session_data *cpsd; @@ -177,7 +177,7 @@ int map_freeblock (struct block_list *bl) return block_free_lock; } /*========================================== -* Lock blocklist, (prevent iMap->freeblock usage) +* Lock blocklist, (prevent map->freeblock usage) *------------------------------------------*/ int map_freeblock_lock (void) { @@ -207,12 +207,11 @@ int map_freeblock_unlock (void) // Timer function to check if there some remaining lock and remove them if so. // Called each 1s -int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) { if (block_free_lock > 0) { ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", block_free_lock); block_free_lock = 1; - iMap->freeblock_unlock(); + map->freeblock_unlock(); } return 0; @@ -269,9 +268,8 @@ int map_addblock(struct block_list* bl) m = bl->m; x = bl->x; y = bl->y; - if( m < 0 || m >= iMap->map_num ) - { - ShowError("map_addblock: invalid map id (%d), only %d are loaded.\n", m, iMap->map_num); + if( m < 0 || m >= map->map_num ) { + ShowError("map_addblock: invalid map id (%d), only %d are loaded.\n", m, map->map_num); return 1; } if( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) { @@ -375,13 +373,13 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) } else if (bl->type == BL_NPC) npc->unsetcells((TBL_NPC*)bl); - if (moveblock) iMap->delblock(bl); + if (moveblock) map->delblock(bl); #ifdef CELL_NOSTACK else map_delblcell(bl); #endif bl->x = x1; bl->y = y1; - if (moveblock) iMap->addblock(bl); + if (moveblock) map->addblock(bl); #ifdef CELL_NOSTACK else map_addblcell(bl); #endif @@ -392,7 +390,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) if( bl->type == BL_PC && ((TBL_PC*)bl)->shadowform_id ) {//Shadow Form Target Moving struct block_list *d_bl; - if( (d_bl = iMap->id2bl(((TBL_PC*)bl)->shadowform_id)) == NULL || !check_distance_bl(bl,d_bl,10) ) { + if( (d_bl = map->id2bl(((TBL_PC*)bl)->shadowform_id)) == NULL || !check_distance_bl(bl,d_bl,10) ) { if( d_bl ) status_change_end(d_bl,SC__SHADOWFORM,INVALID_TIMER); ((TBL_PC*)bl)->shadowform_id = 0; @@ -417,16 +415,17 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) if( sc->data[SC__SHADOWFORM] ) {//Shadow Form Caster Moving struct block_list *d_bl; - if( (d_bl = iMap->id2bl(sc->data[SC__SHADOWFORM]->val2)) == NULL || !check_distance_bl(bl,d_bl,10) ) + if( (d_bl = map->id2bl(sc->data[SC__SHADOWFORM]->val2)) == NULL || !check_distance_bl(bl,d_bl,10) ) status_change_end(bl,SC__SHADOWFORM,INVALID_TIMER); } if (sc->data[SC_PROPERTYWALK] - && sc->data[SC_PROPERTYWALK]->val3 < skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) - && iMap->find_skill_unit_oncell(bl,bl->x,bl->y,SO_ELECTRICWALK,NULL,0) == NULL - && iMap->find_skill_unit_oncell(bl,bl->x,bl->y,SO_FIREWALK,NULL,0) == NULL - && skill->unitsetting(bl,sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2,x0, y0,0)) { - sc->data[SC_PROPERTYWALK]->val3++; + && sc->data[SC_PROPERTYWALK]->val3 < skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) + && map->find_skill_unit_oncell(bl,bl->x,bl->y,SO_ELECTRICWALK,NULL,0) == NULL + && map->find_skill_unit_oncell(bl,bl->x,bl->y,SO_FIREWALK,NULL,0) == NULL + && skill->unitsetting(bl,sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2,x0, y0,0) + ) { + sc->data[SC_PROPERTYWALK]->val3++; } @@ -519,12 +518,11 @@ struct skill_unit* map_find_skill_unit_oncell(struct block_list* target,int16 x, * @param args Extra arguments for func * @return Sum of the values returned by func */ -static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, int max, va_list args) -{ +static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, int max, va_list args) { int i; int returnCount = 0; - iMap->freeblock_lock(); + map->freeblock_lock(); for (i = blockcount; i < bl_list_count && returnCount < max; i++) { if (bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion. va_list argscopy; @@ -533,7 +531,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, va_end(argscopy); } } - iMap->freeblock_unlock(); + map->freeblock_unlock(); bl_list_count = blockcount; @@ -1174,8 +1172,7 @@ int map_get_new_object_id(void) * Timered function to clear the floor (remove remaining item) * Called each flooritem_lifetime ms *------------------------------------------*/ -int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) { struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id); if (fitem == NULL || fitem->bl.type != BL_ITEM || (fitem->cleartimer != tid)) { @@ -1188,9 +1185,9 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) intif->delete_petdata(MakeDWord(fitem->item_data.card[1], fitem->item_data.card[2])); clif->clearflooritem(fitem, 0); - iMap->deliddb(&fitem->bl); - iMap->delblock(&fitem->bl); - iMap->freeblock(&fitem->bl); + map->deliddb(&fitem->bl); + map->delblock(&fitem->bl); + map->freeblock(&fitem->bl); return 0; } @@ -1201,12 +1198,12 @@ void map_clearflooritem(struct block_list *bl) { struct flooritem_data* fitem = (struct flooritem_data*)bl; if( fitem->cleartimer ) - timer->delete(fitem->cleartimer,iMap->clearflooritem_timer); + timer->delete(fitem->cleartimer,map->clearflooritem_timer); clif->clearflooritem(fitem, 0); - iMap->deliddb(&fitem->bl); - iMap->delblock(&fitem->bl); - iMap->freeblock(&fitem->bl); + map->deliddb(&fitem->bl); + map->delblock(&fitem->bl); + map->freeblock(&fitem->bl); } /*========================================== @@ -1224,10 +1221,10 @@ int map_searchrandfreecell(int16 m,int16 *x,int16 *y,int stack) { for(j=-1;j<=1;j++){ if(j+*x<0 || j+*x>=maplist[m].xs) continue; - if(iMap->getcell(m,j+*x,i+*y,CELL_CHKNOPASS) && !iMap->getcell(m,j+*x,i+*y,CELL_CHKICEWALL)) + if(map->getcell(m,j+*x,i+*y,CELL_CHKNOPASS) && !map->getcell(m,j+*x,i+*y,CELL_CHKICEWALL)) continue; //Avoid item stacking to prevent against exploits. [Skotlex] - if(stack && iMap->count_oncell(m,j+*x,i+*y, BL_ITEM) > stack) + if(stack && map->count_oncell(m,j+*x,i+*y, BL_ITEM) > stack) continue; free_cells[free_cell][0] = j+*x; free_cells[free_cell++][1] = i+*y; @@ -1284,7 +1281,7 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1 //No range? Return the target cell then.... *x = bx; *y = by; - return iMap->getcell(m,*x,*y,CELL_CHKREACH); + return map->getcell(m,*x,*y,CELL_CHKREACH); } if (rx >= 0 && ry >= 0) { @@ -1302,8 +1299,7 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1 if (*x == bx && *y == by) continue; //Avoid picking the same target tile. - if (iMap->getcell(m,*x,*y,CELL_CHKREACH)) - { + if (map->getcell(m,*x,*y,CELL_CHKREACH)) { if(flag&2 && !unit->can_reach_pos(src, *x, *y, 1)) continue; if(flag&4) { @@ -1349,7 +1345,7 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i fitem->bl.m=m; fitem->bl.x=x; fitem->bl.y=y; - fitem->bl.id = iMap->get_new_object_id(); + fitem->bl.id = map->get_new_object_id(); if(fitem->bl.id==0){ aFree(fitem); return 0; @@ -1366,10 +1362,10 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i fitem->item_data.amount=amount; fitem->subx=(r&3)*3+3; fitem->suby=((r>>2)&3)*3+3; - fitem->cleartimer=timer->add(timer->gettick()+battle_config.flooritem_lifetime,iMap->clearflooritem_timer,fitem->bl.id,0); + fitem->cleartimer=timer->add(timer->gettick()+battle_config.flooritem_lifetime,map->clearflooritem_timer,fitem->bl.id,0); - iMap->addiddb(&fitem->bl); - iMap->addblock(&fitem->bl); + map->addiddb(&fitem->bl); + map->addblock(&fitem->bl); clif->dropflooritem(fitem); return fitem->bl.id; @@ -1393,7 +1389,7 @@ void map_addnickdb(int charid, const char* nick) struct charid_request* req; struct map_session_data* sd; - if( iMap->charid2sd(charid) ) + if( map->charid2sd(charid) ) return;// already online p = idb_ensure(nick_db, charid, create_charid2nick); @@ -1402,7 +1398,7 @@ void map_addnickdb(int charid, const char* nick) while( p->requests ) { req = p->requests; p->requests = req->next; - sd = iMap->charid2sd(req->charid); + sd = map->charid2sd(req->charid); if( sd ) clif->solved_charname(sd->fd, charid, p->nick); aFree(req); @@ -1424,7 +1420,7 @@ void map_delnickdb(int charid, const char* name) while( p->requests ) { req = p->requests; p->requests = req->next; - sd = iMap->charid2sd(req->charid); + sd = map->charid2sd(req->charid); if( sd ) clif->solved_charname(sd->fd, charid, name); aFree(req); @@ -1443,7 +1439,7 @@ void map_reqnickdb(struct map_session_data * sd, int charid) nullpo_retv(sd); - tsd = iMap->charid2sd(charid); + tsd = map->charid2sd(charid); if( tsd ) { clif->solved_charname(sd->fd, charid, tsd->status.name); return; @@ -1557,8 +1553,8 @@ int map_quit(struct map_session_data *sd) { npc->script_event(sd, NPCE_LOGOUT); //Unit_free handles clearing the player related data, - //iMap->quit handles extra specific data which is related to quitting normally - //(changing map-servers invokes unit_free but bypasses iMap->quit) + //map->quit handles extra specific data which is related to quitting normally + //(changing map-servers invokes unit_free but bypasses map->quit) if( sd->sc.count ) { //Status that are not saved... for(i=0; i < SC_MAX; i++){ @@ -1611,7 +1607,7 @@ int map_quit(struct map_session_data *sd) { else pt = &sd->status.save_point; - if( (m=iMap->mapindex2mapid(pt->map)) >= 0 ) { + if( (m=map->mapindex2mapid(pt->map)) >= 0 ) { sd->bl.m = m; sd->bl.x = pt->x; sd->bl.y = pt->y; @@ -1634,53 +1630,47 @@ int map_quit(struct map_session_data *sd) { /*========================================== * Lookup, id to session (player,mob,npc,homon,merc..) *------------------------------------------*/ -struct map_session_data * map_id2sd(int id) -{ +struct map_session_data *map_id2sd(int id) { if (id <= 0) return NULL; return (struct map_session_data*)idb_get(pc_db,id); } -struct mob_data * map_id2md(int id) -{ +struct mob_data *map_id2md(int id) { if (id <= 0) return NULL; return (struct mob_data*)idb_get(mobid_db,id); } -struct npc_data * map_id2nd(int id) -{// just a id2bl lookup because there's no npc_db - struct block_list* bl = iMap->id2bl(id); +struct npc_data *map_id2nd(int id) { + // just a id2bl lookup because there's no npc_db + struct block_list* bl = map->id2bl(id); return BL_CAST(BL_NPC, bl); } -struct homun_data* map_id2hd(int id) -{ - struct block_list* bl = iMap->id2bl(id); +struct homun_data *map_id2hd(int id) { + struct block_list* bl = map->id2bl(id); return BL_CAST(BL_HOM, bl); } -struct mercenary_data* map_id2mc(int id) -{ - struct block_list* bl = iMap->id2bl(id); +struct mercenary_data *map_id2mc(int id) { + struct block_list* bl = map->id2bl(id); return BL_CAST(BL_MER, bl); } -struct chat_data* map_id2cd(int id) -{ - struct block_list* bl = iMap->id2bl(id); +struct chat_data *map_id2cd(int id) { + struct block_list* bl = map->id2bl(id); return BL_CAST(BL_CHAT, bl); } /// Returns the nick of the target charid or NULL if unknown (requests the nick to the char server). -const char* map_charid2nick(int charid) -{ +const char *map_charid2nick(int charid) { struct charid2nick *p; struct map_session_data* sd; - sd = iMap->charid2sd(charid); + sd = map->charid2sd(charid); if( sd ) return sd->status.name;// character is online, return it's name @@ -1757,7 +1747,7 @@ struct block_list * map_id2bl(int id) { } /** -* Same as iMap->id2bl except it only checks for its existence +* Same as map->id2bl except it only checks for its existence **/ bool map_blid_exists( int id ) { return (idb_exists(id_db,id)); @@ -2046,7 +2036,7 @@ bool mapit_exists(struct s_mapiterator* iter) { bool map_addnpc(int16 m,struct npc_data *nd) { nullpo_ret(nd); - if( m < 0 || m >= iMap->map_num ) + if( m < 0 || m >= map->map_num ) return false; if( maplist[m].npc_num == MAX_NPC_PER_MAP ) { @@ -2079,7 +2069,7 @@ void map_spawnmobs(int16 m) { int i, k=0; if (maplist[m].mob_delete_timer != INVALID_TIMER) { //Mobs have not been removed yet [Skotlex] - timer->delete(maplist[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer); maplist[m].mob_delete_timer = INVALID_TIMER; return; } @@ -2126,7 +2116,7 @@ int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) int count; const int16 m = id; - if (m < 0 || m >= iMap->map_num) { //Incorrect map id! + if (m < 0 || m >= map->map_num) { //Incorrect map id! ShowError("map_removemobs_timer error: timer %d points to invalid map %d\n",tid, m); return 0; } @@ -2146,12 +2136,11 @@ int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) return 1; } -void map_removemobs(int16 m) -{ +void map_removemobs(int16 m) { if (maplist[m].mob_delete_timer != INVALID_TIMER) // should never happen return; //Mobs are already scheduled for removal - maplist[m].mob_delete_timer = timer->add(timer->gettick()+battle_config.mob_remove_delay, iMap->removemobs_timer, m, 0); + maplist[m].mob_delete_timer = timer->add(timer->gettick()+battle_config.mob_remove_delay, map->removemobs_timer, m, 0); } /*========================================== @@ -2162,7 +2151,7 @@ int16 map_mapname2mapid(const char* name) { map_index = mapindex_name2id(name); if (!map_index) return -1; - return iMap->mapindex2mapid(map_index); + return map->mapindex2mapid(map_index); } /*========================================== @@ -2276,9 +2265,8 @@ int map_random_dir(struct block_list *bl, int16 *x, int16 *y) xi = bl->x + segment*dirx[j]; segment = (short)sqrt((float)(dist2 - segment*segment)); //The complement of the previously picked segment yi = bl->y + segment*diry[j]; - } while ( - (iMap->getcell(bl->m,xi,yi,CELL_CHKNOPASS) || !path->search(NULL,bl->m,bl->x,bl->y,xi,yi,1,CELL_CHKNOREACH)) - && (++i)<100 ); + } while ( (map->getcell(bl->m,xi,yi,CELL_CHKNOPASS) || !path->search(NULL,bl->m,bl->x,bl->y,xi,yi,1,CELL_CHKNOREACH)) + && (++i)<100 ); if (i < 100) { *x = xi; @@ -2351,7 +2339,7 @@ void map_cellfromcache(struct map_data *m) { * Confirm if celltype in (m,x,y) match the one given in cellchk *------------------------------------------*/ int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk) { - return (m < 0 || m >= iMap->map_num) ? 0 : maplist[m].getcellp(&maplist[m],x,y,cellchk); + return (m < 0 || m >= map->map_num) ? 0 : maplist[m].getcellp(&maplist[m],x,y,cellchk); } int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) { @@ -2426,7 +2414,7 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) { /* [Ind/Hercules] */ int map_sub_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) { - iMap->cellfromcache(m); + map->cellfromcache(m); m->getcellp = map_getcellp; m->setcell = map_setcell; return m->getcellp(m,x,y,cellchk); @@ -2439,7 +2427,7 @@ int map_sub_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) { void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { int j; - if( m < 0 || m >= iMap->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) + if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) return; j = x + y*maplist[m].xs; @@ -2462,10 +2450,10 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { } } void map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { - if( m < 0 || m >= iMap->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) + if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) return; - iMap->cellfromcache(&maplist[m]); + map->cellfromcache(&maplist[m]); maplist[m].setcell = map_setcell; maplist[m].getcellp = map_getcellp; maplist[m].setcell(m,x,y,cell,flag); @@ -2474,7 +2462,7 @@ void map_setgatcell(int16 m, int16 x, int16 y, int gat) { int j; struct mapcell cell; - if( m < 0 || m >= iMap->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) + if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) return; j = x + y*maplist[m].xs; @@ -2519,7 +2507,7 @@ bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable if( (iwall = (struct iwall_data *)strdb_get(iwall_db, wall_name)) != NULL ) return false; // Already Exists - if( iMap->getcell(m, x, y, CELL_CHKNOREACH) ) + if( map->getcell(m, x, y, CELL_CHKNOREACH) ) return false; // Starting cell problem CREATE(iwall, struct iwall_data, 1); @@ -2534,13 +2522,13 @@ bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable for( i = 0; i < size; i++ ) { map_iwall_nextxy(x, y, dir, i, &x1, &y1); - if( iMap->getcell(m, x1, y1, CELL_CHKNOREACH) ) + if( map->getcell(m, x1, y1, CELL_CHKNOREACH) ) break; // Collision maplist[m].setcell(m, x1, y1, CELL_WALKABLE, false); maplist[m].setcell(m, x1, y1, CELL_SHOOTABLE, shootable); - clif->changemapcell(0, m, x1, y1, iMap->getcell(m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); + clif->changemapcell(0, m, x1, y1, map->getcell(m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); } iwall->size = i; @@ -2567,7 +2555,7 @@ void map_iwall_get(struct map_session_data *sd) { for( i = 0; i < iwall->size; i++ ) { map_iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1); - clif->changemapcell(sd->fd, iwall->m, x1, y1, iMap->getcell(iwall->m, x1, y1, CELL_GETTYPE), SELF); + clif->changemapcell(sd->fd, iwall->m, x1, y1, map->getcell(iwall->m, x1, y1, CELL_GETTYPE), SELF); } } dbi_destroy(iter); @@ -2587,7 +2575,7 @@ void map_iwall_remove(const char *wall_name) maplist[iwall->m].setcell(iwall->m, x1, y1, CELL_SHOOTABLE, true); maplist[iwall->m].setcell(iwall->m, x1, y1, CELL_WALKABLE, true); - clif->changemapcell(0, iwall->m, x1, y1, iMap->getcell(iwall->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); + clif->changemapcell(0, iwall->m, x1, y1, map->getcell(iwall->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); } maplist[iwall->m].iwall_num--; @@ -2742,15 +2730,15 @@ int map_readfromcache(struct map_data *m, char *buffer) { int map_addmap(char* mapname) { - maplist[iMap->map_num].instance_id = -1; - mapindex_getmapname(mapname, maplist[iMap->map_num++].name); + maplist[map->map_num].instance_id = -1; + mapindex_getmapname(mapname, maplist[map->map_num++].name); return 0; } static void map_delmapid(int id) { ShowNotice("Removing map [ %s ] from maplist"CL_CLL"\n",maplist[id].name); - memmove(maplist+id, maplist+id+1, sizeof(maplist[0])*(iMap->map_num-id-1)); - iMap->map_num--; + memmove(maplist+id, maplist+id+1, sizeof(maplist[0])*(map->map_num-id-1)); + map->map_num--; } int map_delmap(char* mapname) { @@ -2758,12 +2746,12 @@ int map_delmap(char* mapname) { char map_name[MAP_NAME_LENGTH]; if (strcmpi(mapname, "all") == 0) { - iMap->map_num = 0; + map->map_num = 0; return 0; } mapindex_getmapname(mapname, map_name); - for(i = 0; i < iMap->map_num; i++) { + for(i = 0; i < map->map_num; i++) { if (strcmp(maplist[i].name, map_name) == 0) { map_delmapid(i); return 1; @@ -2845,7 +2833,7 @@ void map_clean(int i) { if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random] int j; if(maplist[i].mob_delete_timer != INVALID_TIMER) - timer->delete(maplist[i].mob_delete_timer, iMap->removemobs_timer); + timer->delete(maplist[i].mob_delete_timer, map->removemobs_timer); for (j=0; jmap_num; i++ ) { + for( i = 0; i < map->map_num; i++ ) { if(maplist[i].cell && maplist[i].cell != (struct mapcell *)0xdeadbeaf ) aFree(maplist[i].cell); if(maplist[i].block) aFree(maplist[i].block); @@ -2898,7 +2886,7 @@ void do_final_maps(void) { if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random] int j; if(maplist[i].mob_delete_timer != INVALID_TIMER) - timer->delete(maplist[i].mob_delete_timer, iMap->removemobs_timer); + timer->delete(maplist[i].mob_delete_timer, map->removemobs_timer); for (j=0; jmap_num; i++ ) { + for( i = 0; i < map->map_num; i++ ) { // mapflags memset(&maplist[i].flag, 0, sizeof(maplist[i].flag)); @@ -3109,7 +3097,7 @@ int map_readallmaps (void) { ShowStatus("Loading maps (using GRF files)...\n"); else { char mapcachefilepath[254]; - sprintf(mapcachefilepath,"%s/%s%s",iMap->db_path,DBPATH,"map_cache.dat"); + sprintf(mapcachefilepath,"%s/%s%s",map->db_path,DBPATH,"map_cache.dat"); ShowStatus("Loading maps (using %s as map cache)...\n", mapcachefilepath); if( (fp = fopen(mapcachefilepath, "rb")) == NULL ) { ShowFatalError("Unable to open map cache file "CL_WHITE"%s"CL_RESET"\n", mapcachefilepath); @@ -3124,12 +3112,12 @@ int map_readallmaps (void) { } } - for(i = 0; i < iMap->map_num; i++) { + for(i = 0; i < map->map_num; i++) { size_t size; // show progress if(enable_grf) - ShowStatus("Loading maps [%i/%i]: %s"CL_CLL"\r", i, iMap->map_num, maplist[i].name); + ShowStatus("Loading maps [%i/%i]: %s"CL_CLL"\r", i, map->map_num, maplist[i].name); // try to load the map if( ! @@ -3158,7 +3146,7 @@ int map_readallmaps (void) { } maplist[i].m = i; - iMap->addmap2db(&maplist[i]); + map->addmap2db(&maplist[i]); memset(maplist[i].moblist, 0, sizeof(maplist[i].moblist)); //Initialize moblist [Skotlex] maplist[i].mob_delete_timer = INVALID_TIMER; //Initialize timer [Skotlex] @@ -3175,15 +3163,15 @@ int map_readallmaps (void) { } // intialization and configuration-dependent adjustments of mapflags - iMap->flags_init(); + map->flags_init(); if( !enable_grf ) { fclose(fp); } // finished map loading - ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps."CL_CLL"\n",iMap->map_num); - instance->start_id = iMap->map_num; // Next Map Index will be instances + ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps."CL_CLL"\n",map->map_num); + instance->start_id = map->map_num; // Next Map Index will be instances if (maps_removed) ShowNotice("Maps removed: '"CL_WHITE"%d"CL_RESET"'\n",maps_removed); @@ -3248,35 +3236,35 @@ int map_config_read(char *cfgName) { clif->setport(atoi(w2)); map_port = (atoi(w2)); } else if (strcmpi(w1, "map") == 0) - iMap->map_num++; + map->map_num++; else if (strcmpi(w1, "delmap") == 0) - iMap->map_num--; + map->map_num--; else if (strcmpi(w1, "npc") == 0) npc->addsrcfile(w2); else if (strcmpi(w1, "delnpc") == 0) npc->delsrcfile(w2); else if (strcmpi(w1, "autosave_time") == 0) { - iMap->autosave_interval = atoi(w2); - if (iMap->autosave_interval < 1) //Revert to default saving. - iMap->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; + map->autosave_interval = atoi(w2); + if (map->autosave_interval < 1) //Revert to default saving. + map->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; else - iMap->autosave_interval *= 1000; //Pass from sec to ms + map->autosave_interval *= 1000; //Pass from sec to ms } else if (strcmpi(w1, "minsave_time") == 0) { - iMap->minsave_interval= atoi(w2); - if (iMap->minsave_interval < 1) - iMap->minsave_interval = 1; + map->minsave_interval= atoi(w2); + if (map->minsave_interval < 1) + map->minsave_interval = 1; } else if (strcmpi(w1, "save_settings") == 0) - iMap->save_settings = atoi(w2); + map->save_settings = atoi(w2); else if (strcmpi(w1, "help_txt") == 0) - strcpy(iMap->help_txt, w2); + strcpy(map->help_txt, w2); else if (strcmpi(w1, "help2_txt") == 0) - strcpy(iMap->help2_txt, w2); + strcpy(map->help2_txt, w2); else if (strcmpi(w1, "charhelp_txt") == 0) - strcpy(iMap->charhelp_txt, w2); + strcpy(map->charhelp_txt, w2); else if(strcmpi(w1,"db_path") == 0) - safestrncpy(iMap->db_path,w2,255); + safestrncpy(map->db_path,w2,255); else if (strcmpi(w1, "enable_spy") == 0) - iMap->enable_spy = config_switch(w2); + map->enable_spy = config_switch(w2); else if (strcmpi(w1, "use_grf") == 0) enable_grf = config_switch(w2); else if (strcmpi(w1, "console_msg_log") == 0) @@ -3319,7 +3307,7 @@ int map_config_read_sub(char *cfgName) { if (strcmpi(w1, "map") == 0) map_addmap(w2); else if (strcmpi(w1, "delmap") == 0) - iMap->delmap(w2); + map->delmap(w2); else if (strcmpi(w1, "import") == 0) map_config_read_sub(w2); } @@ -3395,21 +3383,21 @@ int inter_config_read(char *cfgName) { continue; /* table names */ if(strcmpi(w1,"item_db_db")==0) - strcpy(iMap->item_db_db,w2); + strcpy(map->item_db_db,w2); else if(strcmpi(w1,"mob_db_db")==0) - strcpy(iMap->mob_db_db,w2); + strcpy(map->mob_db_db,w2); else if(strcmpi(w1,"item_db2_db")==0) - strcpy(iMap->item_db2_db,w2); + strcpy(map->item_db2_db,w2); else if(strcmpi(w1,"item_db_re_db")==0) - strcpy(iMap->item_db_re_db,w2); + strcpy(map->item_db_re_db,w2); else if(strcmpi(w1,"mob_db2_db")==0) - strcpy(iMap->mob_db2_db,w2); + strcpy(map->mob_db2_db,w2); else if(strcmpi(w1,"mob_skill_db_db")==0) - strcpy(iMap->mob_skill_db_db,w2); + strcpy(map->mob_skill_db_db,w2); else if(strcmpi(w1,"mob_skill_db2_db")==0) - strcpy(iMap->mob_skill_db2_db,w2); + strcpy(map->mob_skill_db2_db,w2); else if(strcmpi(w1,"interreg_db")==0) - strcpy(iMap->interreg_db,w2); + strcpy(map->interreg_db,w2); /* map sql stuff */ else if(strcmpi(w1,"map_server_ip")==0) strcpy(map_server_ip, w2); @@ -3424,15 +3412,15 @@ int inter_config_read(char *cfgName) { else if(strcmpi(w1,"default_codepage")==0) strcpy(default_codepage, w2); else if(strcmpi(w1,"use_sql_item_db")==0) { - iMap->db_use_sql_item_db = config_switch(w2); + map->db_use_sql_item_db = config_switch(w2); ShowStatus ("Using item database as SQL: '%s'\n", w2); } else if(strcmpi(w1,"use_sql_mob_db")==0) { - iMap->db_use_sql_mob_db = config_switch(w2); + map->db_use_sql_mob_db = config_switch(w2); ShowStatus ("Using monster database as SQL: '%s'\n", w2); } else if(strcmpi(w1,"use_sql_mob_skill_db")==0) { - iMap->db_use_sql_mob_skill_db = config_switch(w2); + map->db_use_sql_mob_skill_db = config_switch(w2); ShowStatus ("Using monster skill database as SQL: '%s'\n", w2); } /* sql log db */ @@ -3512,17 +3500,17 @@ void map_zone_change2(int m, struct map_zone_data *zone) { maplist[m].prev_zone = maplist[m].zone; if( maplist[m].zone_mf_count ) - iMap->zone_remove(m); + map->zone_remove(m); - iMap->zone_apply(m,zone,empty,empty,empty); + map->zone_apply(m,zone,empty,empty,empty); } /* when changing from a mapflag to another during runtime */ void map_zone_change(int m, struct map_zone_data *zone, const char* start, const char* buffer, const char* filepath) { maplist[m].prev_zone = maplist[m].zone; if( maplist[m].zone_mf_count ) - iMap->zone_remove(m); - iMap->zone_apply(m,zone,start,buffer,filepath); + map->zone_remove(m); + map->zone_apply(m,zone,start,buffer,filepath); } /* removes previous mapflags from this map */ void map_zone_remove(int m) { @@ -4289,7 +4277,7 @@ void map_zone_init(void) { } } - for(j = 0; j < iMap->map_num; j++) { + for(j = 0; j < map->map_num; j++) { if( maplist[j].zone == zone ) { if( map_zone_mf_cache(j,flag,params) ) break; @@ -4311,7 +4299,7 @@ void map_zone_init(void) { break; } } - for(j = 0; j < iMap->map_num; j++) { + for(j = 0; j < map->map_num; j++) { if( maplist[j].zone == zone ) { if( map_zone_mf_cache(j,flag,params) ) break; @@ -4844,7 +4832,7 @@ int cleanup_sub(struct block_list *bl, va_list ap) { switch(bl->type) { case BL_PC: - iMap->quit((struct map_session_data *) bl); + map->quit((struct map_session_data *) bl); break; case BL_NPC: npc->unload((struct npc_data *)bl,false); @@ -4856,7 +4844,7 @@ int cleanup_sub(struct block_list *bl, va_list ap) { //There is no need for this, the pet is removed together with the player. [Skotlex] break; case BL_ITEM: - iMap->clearflooritem(bl); + map->clearflooritem(bl); break; case BL_SKILL: skill->delunit((struct skill_unit *) bl); @@ -4869,9 +4857,8 @@ int cleanup_sub(struct block_list *bl, va_list ap) { /** * @see DBApply */ -static int cleanup_db_sub(DBKey key, DBData *data, va_list va) -{ - return iMap->cleanup_sub(DB->data2ptr(data), va); +static int cleanup_db_sub(DBKey key, DBData *data, va_list va) { + return map->cleanup_sub(DB->data2ptr(data), va); } /*========================================== @@ -4891,19 +4878,19 @@ void do_final(void) //Ladies and babies first. iter = mapit_getallusers(); for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) - iMap->quit(sd); + map->quit(sd); mapit->free(iter); /* prepares npcs for a faster shutdown process */ npc->do_clear_npc(); // remove all objects on maps - for (i = 0; i < iMap->map_num; i++) { - ShowStatus("Cleaning up maps [%d/%d]: %s..."CL_CLL"\r", i+1, iMap->map_num, maplist[i].name); + for (i = 0; i < map->map_num; i++) { + ShowStatus("Cleaning up maps [%d/%d]: %s..."CL_CLL"\r", i+1, map->map_num, maplist[i].name); if (maplist[i].m >= 0) - map_foreachinmap(iMap->cleanup_sub, i, BL_ALL); + map_foreachinmap(map->cleanup_sub, i, BL_ALL); } - ShowStatus("Cleaned up %d maps."CL_CLL"\n", iMap->map_num); + ShowStatus("Cleaned up %d maps."CL_CLL"\n", map->map_num); id_db->foreach(id_db,cleanup_db_sub); chrif->char_reset_offline(); @@ -4988,7 +4975,7 @@ void do_abort(void) return; } ShowError("Server received crash signal! Attempting to save all online characters!\n"); - iMap->map_foreachpc(map_abort_sub); + map->map_foreachpc(map_abort_sub); chrif->flush_fifo(); } @@ -5072,7 +5059,7 @@ CPCMD(gm_position) { return; } - if ( (m = iMap->mapname2mapid(map_name) <= 0 ) ) { + if ( (m = map->mapname2mapid(map_name) <= 0 ) ) { ShowError("gm:info '"CL_WHITE"%s"CL_RESET"' is not a known map\n",map_name); return; } @@ -5109,7 +5096,7 @@ void map_cp_defaults(void) { strcpy(cpsd->status.name, "Hercules Console"); cpsd->bl.x = MAP_DEFAULT_X; cpsd->bl.y = MAP_DEFAULT_Y; - cpsd->bl.m = iMap->mapname2mapid(MAP_DEFAULT); + cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); console->addCommand("gm:info",CPCMD_A(gm_position)); console->addCommand("gm:use",CPCMD_A(gm_use)); @@ -5127,7 +5114,7 @@ void map_hp_symbols(void) { HPM->share(guild,"guild"); HPM->share(gstorage,"gstorage"); HPM->share(homun,"homun"); - HPM->share(iMap,"iMap"); + HPM->share(map,"map"); HPM->share(ircbot,"ircbot"); HPM->share(itemdb,"itemdb"); HPM->share(logs,"logs"); @@ -5220,44 +5207,44 @@ int do_init(int argc, char *argv[]) map_defaults(); - iMap->map_num = 0; - - sprintf(iMap->db_path ,"db"); - sprintf(iMap->help_txt ,"conf/help.txt"); - sprintf(iMap->help2_txt ,"conf/help2.txt"); - sprintf(iMap->charhelp_txt ,"conf/charhelp.txt"); - - sprintf(iMap->wisp_server_name ,"Server"); // can be modified in char-server configuration file - - iMap->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; - iMap->minsave_interval = 100; - iMap->save_settings = 0xFFFF; - iMap->agit_flag = 0; - iMap->agit2_flag = 0; - iMap->night_flag = 0; // 0=day, 1=night [Yor] - iMap->enable_spy = 0; //To enable/disable @spy commands, which consume too much cpu time when sending packets. [Skotlex] - - iMap->db_use_sql_item_db = 0; - iMap->db_use_sql_mob_db = 0; - iMap->db_use_sql_mob_skill_db = 0; - - sprintf(iMap->item_db_db, "item_db"); - sprintf(iMap->item_db2_db, "item_db2"); - sprintf(iMap->item_db_re_db, "item_db_re"); - sprintf(iMap->mob_db_db, "mob_db"); - sprintf(iMap->mob_db2_db, "mob_db2"); - sprintf(iMap->mob_skill_db_db, "mob_skill_db"); - sprintf(iMap->mob_skill_db2_db, "mob_skill_db2"); - sprintf(iMap->interreg_db, "interreg"); - - iMap->INTER_CONF_NAME="conf/inter-server.conf"; - iMap->LOG_CONF_NAME="conf/logs.conf"; - iMap->MAP_CONF_NAME = "conf/map-server.conf"; - iMap->BATTLE_CONF_FILENAME = "conf/battle.conf"; - iMap->ATCOMMAND_CONF_FILENAME = "conf/atcommand.conf"; - iMap->SCRIPT_CONF_NAME = "conf/script.conf"; - iMap->MSG_CONF_NAME = "conf/messages.conf"; - iMap->GRF_PATH_FILENAME = "conf/grf-files.txt"; + map->map_num = 0; + + sprintf(map->db_path ,"db"); + sprintf(map->help_txt ,"conf/help.txt"); + sprintf(map->help2_txt ,"conf/help2.txt"); + sprintf(map->charhelp_txt ,"conf/charhelp.txt"); + + sprintf(map->wisp_server_name ,"Server"); // can be modified in char-server configuration file + + map->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; + map->minsave_interval = 100; + map->save_settings = 0xFFFF; + map->agit_flag = 0; + map->agit2_flag = 0; + map->night_flag = 0; // 0=day, 1=night [Yor] + map->enable_spy = 0; //To enable/disable @spy commands, which consume too much cpu time when sending packets. [Skotlex] + + map->db_use_sql_item_db = 0; + map->db_use_sql_mob_db = 0; + map->db_use_sql_mob_skill_db = 0; + + sprintf(map->item_db_db, "item_db"); + sprintf(map->item_db2_db, "item_db2"); + sprintf(map->item_db_re_db, "item_db_re"); + sprintf(map->mob_db_db, "mob_db"); + sprintf(map->mob_db2_db, "mob_db2"); + sprintf(map->mob_skill_db_db, "mob_skill_db"); + sprintf(map->mob_skill_db2_db, "mob_skill_db2"); + sprintf(map->interreg_db, "interreg"); + + map->INTER_CONF_NAME="conf/inter-server.conf"; + map->LOG_CONF_NAME="conf/logs.conf"; + map->MAP_CONF_NAME = "conf/map-server.conf"; + map->BATTLE_CONF_FILENAME = "conf/battle.conf"; + map->ATCOMMAND_CONF_FILENAME = "conf/atcommand.conf"; + map->SCRIPT_CONF_NAME = "conf/script.conf"; + map->MSG_CONF_NAME = "conf/messages.conf"; + map->GRF_PATH_FILENAME = "conf/grf-files.txt"; rnd_init(); for( i = 1; i < argc ; i++ ) { @@ -5275,28 +5262,28 @@ int do_init(int argc, char *argv[]) map_versionscreen(true); } else if( strcmp(arg, "map-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->MAP_CONF_NAME = argv[++i]; + map->MAP_CONF_NAME = argv[++i]; } else if( strcmp(arg, "battle-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->BATTLE_CONF_FILENAME = argv[++i]; + map->BATTLE_CONF_FILENAME = argv[++i]; } else if( strcmp(arg, "atcommand-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->ATCOMMAND_CONF_FILENAME = argv[++i]; + map->ATCOMMAND_CONF_FILENAME = argv[++i]; } else if( strcmp(arg, "script-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->SCRIPT_CONF_NAME = argv[++i]; + map->SCRIPT_CONF_NAME = argv[++i]; } else if( strcmp(arg, "msg-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->MSG_CONF_NAME = argv[++i]; + map->MSG_CONF_NAME = argv[++i]; } else if( strcmp(arg, "grf-path-file") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->GRF_PATH_FILENAME = argv[++i]; + map->GRF_PATH_FILENAME = argv[++i]; } else if( strcmp(arg, "inter-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->INTER_CONF_NAME = argv[++i]; + map->INTER_CONF_NAME = argv[++i]; } else if( strcmp(arg, "log-config") == 0 ) { if( map_arg_next_value(arg, i, argc) ) - iMap->LOG_CONF_NAME = argv[++i]; + map->LOG_CONF_NAME = argv[++i]; } else if( strcmp(arg, "run-once") == 0 ) { // close the map-server as soon as its done.. for testing [Celest] runflag = CORE_ST_STOP; } else { @@ -5319,12 +5306,12 @@ int do_init(int argc, char *argv[]) memset(&index2mapid, -1, sizeof(index2mapid)); map_load_defaults(); - map_config_read(iMap->MAP_CONF_NAME); - CREATE(maplist,struct map_data,iMap->map_num); - iMap->map_num = 0; - map_config_read_sub(iMap->MAP_CONF_NAME); + map_config_read(map->MAP_CONF_NAME); + CREATE(maplist,struct map_data,map->map_num); + map->map_num = 0; + map_config_read_sub(map->MAP_CONF_NAME); // loads npcs - iMap->reloadnpc(false); + map->reloadnpc(false); chrif->checkdefaultlogin(); @@ -5347,14 +5334,14 @@ int do_init(int argc, char *argv[]) chrif->setip(ip_str); } - battle->config_read(iMap->BATTLE_CONF_FILENAME); - atcommand->msg_read(iMap->MSG_CONF_NAME); - script->config_read(iMap->SCRIPT_CONF_NAME); - inter_config_read(iMap->INTER_CONF_NAME); - logs->config_read(iMap->LOG_CONF_NAME); + battle->config_read(map->BATTLE_CONF_FILENAME); + atcommand->msg_read(map->MSG_CONF_NAME); + script->config_read(map->SCRIPT_CONF_NAME); + inter_config_read(map->INTER_CONF_NAME); + logs->config_read(map->LOG_CONF_NAME); id_db = idb_alloc(DB_OPT_BASE); - pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable iMap->id2sd() use. [Skotlex] + pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex] mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex] bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search map_db = uidb_alloc(DB_OPT_BASE); @@ -5373,7 +5360,7 @@ int do_init(int argc, char *argv[]) mapindex_init(); if(enable_grf) - grfio_init(iMap->GRF_PATH_FILENAME); + grfio_init(map->GRF_PATH_FILENAME); map_readallmaps(); @@ -5428,7 +5415,7 @@ int do_init(int argc, char *argv[]) ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port); if( runflag != CORE_ST_STOP ) { - shutdown_callback = iMap->do_shutdown; + shutdown_callback = map->do_shutdown; runflag = MAPSERVER_ST_RUNNING; } @@ -5445,114 +5432,114 @@ int do_init(int argc, char *argv[]) * created by Susu *-------------------------------------*/ void map_defaults(void) { - iMap = &iMap_s; + map = &map_s; /* funcs */ - iMap->zone_init = map_zone_init; - iMap->zone_remove = map_zone_remove; - iMap->zone_apply = map_zone_apply; - iMap->zone_change = map_zone_change; - iMap->zone_change2 = map_zone_change2; + map->zone_init = map_zone_init; + map->zone_remove = map_zone_remove; + map->zone_apply = map_zone_apply; + map->zone_change = map_zone_change; + map->zone_change2 = map_zone_change2; - iMap->getcell = map_getcell; - iMap->setgatcell = map_setgatcell; + map->getcell = map_getcell; + map->setgatcell = map_setgatcell; - iMap->cellfromcache = map_cellfromcache; + map->cellfromcache = map_cellfromcache; // users - iMap->setusers = map_setusers; - iMap->getusers = map_getusers; - iMap->usercount = map_usercount; + map->setusers = map_setusers; + map->getusers = map_getusers; + map->usercount = map_usercount; // blocklist lock - iMap->freeblock = map_freeblock; - iMap->freeblock_lock = map_freeblock_lock; - iMap->freeblock_unlock = map_freeblock_unlock; + map->freeblock = map_freeblock; + map->freeblock_lock = map_freeblock_lock; + map->freeblock_unlock = map_freeblock_unlock; // blocklist manipulation - iMap->addblock = map_addblock; - iMap->delblock = map_delblock; - iMap->moveblock = map_moveblock; + map->addblock = map_addblock; + map->delblock = map_delblock; + map->moveblock = map_moveblock; //blocklist nb in one cell - iMap->count_oncell = map_count_oncell; - iMap->find_skill_unit_oncell = map_find_skill_unit_oncell; + map->count_oncell = map_count_oncell; + map->find_skill_unit_oncell = map_find_skill_unit_oncell; // search and creation - iMap->get_new_object_id = map_get_new_object_id; - iMap->search_freecell = map_search_freecell; + map->get_new_object_id = map_get_new_object_id; + map->search_freecell = map_search_freecell; // - iMap->quit = map_quit; + map->quit = map_quit; // npc - iMap->addnpc = map_addnpc; + map->addnpc = map_addnpc; // map item - iMap->clearflooritem_timer = map_clearflooritem_timer; - iMap->removemobs_timer = map_removemobs_timer; - iMap->clearflooritem = map_clearflooritem; - iMap->addflooritem = map_addflooritem; + map->clearflooritem_timer = map_clearflooritem_timer; + map->removemobs_timer = map_removemobs_timer; + map->clearflooritem = map_clearflooritem; + map->addflooritem = map_addflooritem; // player to map session - iMap->addnickdb = map_addnickdb; - iMap->delnickdb = map_delnickdb; - iMap->reqnickdb = map_reqnickdb; - iMap->charid2nick = map_charid2nick; - iMap->charid2sd = map_charid2sd; - - iMap->map_foreachpc = map_map_foreachpc; - iMap->map_foreachmob = map_map_foreachmob; - iMap->map_foreachnpc = map_map_foreachnpc; - iMap->map_foreachregen = map_map_foreachregen; - iMap->map_foreachiddb = map_map_foreachiddb; - - iMap->foreachinrange = map_foreachinrange; - iMap->foreachinshootrange = map_foreachinshootrange; - iMap->foreachinarea = map_foreachinarea; - iMap->forcountinrange = map_forcountinrange; - iMap->forcountinarea = map_forcountinarea; - iMap->foreachinmovearea = map_foreachinmovearea; - iMap->foreachincell = map_foreachincell; - iMap->foreachinpath = map_foreachinpath; - iMap->foreachinmap = map_foreachinmap; - iMap->foreachininstance = map_foreachininstance; - - iMap->id2sd = map_id2sd; - iMap->id2md = map_id2md; - iMap->id2nd = map_id2nd; - iMap->id2hd = map_id2hd; - iMap->id2mc = map_id2mc; - iMap->id2cd = map_id2cd; - iMap->id2bl = map_id2bl; - iMap->blid_exists = map_blid_exists; - iMap->mapindex2mapid = map_mapindex2mapid; - iMap->mapname2mapid = map_mapname2mapid; - iMap->mapname2ipport = map_mapname2ipport; - iMap->setipport = map_setipport; - iMap->eraseipport = map_eraseipport; - iMap->eraseallipport = map_eraseallipport; - iMap->addiddb = map_addiddb; - iMap->deliddb = map_deliddb; + map->addnickdb = map_addnickdb; + map->delnickdb = map_delnickdb; + map->reqnickdb = map_reqnickdb; + map->charid2nick = map_charid2nick; + map->charid2sd = map_charid2sd; + + map->map_foreachpc = map_map_foreachpc; + map->map_foreachmob = map_map_foreachmob; + map->map_foreachnpc = map_map_foreachnpc; + map->map_foreachregen = map_map_foreachregen; + map->map_foreachiddb = map_map_foreachiddb; + + map->foreachinrange = map_foreachinrange; + map->foreachinshootrange = map_foreachinshootrange; + map->foreachinarea = map_foreachinarea; + map->forcountinrange = map_forcountinrange; + map->forcountinarea = map_forcountinarea; + map->foreachinmovearea = map_foreachinmovearea; + map->foreachincell = map_foreachincell; + map->foreachinpath = map_foreachinpath; + map->foreachinmap = map_foreachinmap; + map->foreachininstance = map_foreachininstance; + + map->id2sd = map_id2sd; + map->id2md = map_id2md; + map->id2nd = map_id2nd; + map->id2hd = map_id2hd; + map->id2mc = map_id2mc; + map->id2cd = map_id2cd; + map->id2bl = map_id2bl; + map->blid_exists = map_blid_exists; + map->mapindex2mapid = map_mapindex2mapid; + map->mapname2mapid = map_mapname2mapid; + map->mapname2ipport = map_mapname2ipport; + map->setipport = map_setipport; + map->eraseipport = map_eraseipport; + map->eraseallipport = map_eraseallipport; + map->addiddb = map_addiddb; + map->deliddb = map_deliddb; /* */ - iMap->nick2sd = map_nick2sd; - iMap->getmob_boss = map_getmob_boss; - iMap->id2boss = map_id2boss; + map->nick2sd = map_nick2sd; + map->getmob_boss = map_getmob_boss; + map->id2boss = map_id2boss; // reload config file looking only for npcs - iMap->reloadnpc = map_reloadnpc; + map->reloadnpc = map_reloadnpc; - iMap->check_dir = map_check_dir; - iMap->calc_dir = map_calc_dir; - iMap->random_dir = map_random_dir; // [Skotlex] + map->check_dir = map_check_dir; + map->calc_dir = map_calc_dir; + map->random_dir = map_random_dir; // [Skotlex] - iMap->cleanup_sub = cleanup_sub; + map->cleanup_sub = cleanup_sub; - iMap->delmap = map_delmap; - iMap->flags_init = map_flags_init; + map->delmap = map_delmap; + map->flags_init = map_flags_init; - iMap->iwall_set = map_iwall_set; - iMap->iwall_get = map_iwall_get; - iMap->iwall_remove = map_iwall_remove; + map->iwall_set = map_iwall_set; + map->iwall_get = map_iwall_get; + map->iwall_remove = map_iwall_remove; - iMap->addmobtolist = map_addmobtolist; // [Wizputer] - iMap->spawnmobs = map_spawnmobs; // [Wizputer] - iMap->removemobs = map_removemobs; // [Wizputer] - iMap->addmap2db = map_addmap2db; - iMap->removemapdb = map_removemapdb; - iMap->clean = map_clean; + map->addmobtolist = map_addmobtolist; // [Wizputer] + map->spawnmobs = map_spawnmobs; // [Wizputer] + map->removemobs = map_removemobs; // [Wizputer] + map->addmap2db = map_addmap2db; + map->removemapdb = map_removemapdb; + map->clean = map_clean; - iMap->do_shutdown = do_shutdown; + map->do_shutdown = do_shutdown; /* FIXME: temporary until the map.c "Hercules Renewal Phase One" design is complete. [Ind] */ mapit = &mapit_s; diff --git a/src/map/map.h b/src/map/map.h index 963234ff3..4b06a065b 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -214,10 +214,10 @@ enum { #define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 ) #define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000 // Specifies maps where players may hit each other -#define map_flag_vs(m) (maplist[m].flag.pvp || maplist[m].flag.gvg_dungeon || maplist[m].flag.gvg || ((iMap->agit_flag || iMap->agit2_flag) && maplist[m].flag.gvg_castle) || maplist[m].flag.battleground) +#define map_flag_vs(m) (maplist[m].flag.pvp || maplist[m].flag.gvg_dungeon || maplist[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) || maplist[m].flag.battleground) // Specifies maps that have special GvG/WoE restrictions -#define map_flag_gvg(m) (maplist[m].flag.gvg || ((iMap->agit_flag || iMap->agit2_flag) && maplist[m].flag.gvg_castle)) -// Specifies if the map is tagged as GvG/WoE (regardless of iMap->agit_flag status) +#define map_flag_gvg(m) (maplist[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle)) +// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status) #define map_flag_gvg2(m) (maplist[m].flag.gvg || maplist[m].flag.gvg_castle) // No Kill Steal Protection #define map_flag_ks(m) (maplist[m].flag.town || maplist[m].flag.pvp || maplist[m].flag.gvg || maplist[m].flag.battleground) @@ -432,7 +432,7 @@ typedef enum { } cell_t; -// used by iMap->getcell() +// used by map->getcell() typedef enum { CELL_GETTYPE, // retrieves a cell's 'gat' type @@ -524,7 +524,7 @@ struct map_zone_skill_damage_cap_entry { #define MAP_ZONE_PK_NAME "PK Mode" #define MAP_ZONE_MAPFLAG_LENGTH 50 -//TODO place it in iMap +//TODO place it in the map interface DBMap *zone_db;/* string => struct map_zone_data */ struct map_zone_data { @@ -904,7 +904,7 @@ struct map_interface { void (*do_shutdown) (void); }; -struct map_interface *iMap; +struct map_interface *map; void map_defaults(void); diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 881038eb4..a1e2986b2 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -217,12 +217,11 @@ int mercenary_save(struct mercenary_data *md) return 1; } -static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data) -{ +static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; struct mercenary_data *md; - if( (sd = iMap->id2sd(id)) == NULL ) + if( (sd = map->id2sd(id)) == NULL ) return 1; if( (md = sd->md) == NULL ) return 1; @@ -281,14 +280,13 @@ void merc_contract_init(struct mercenary_data *md) md->regen.state.block = 0; } -int merc_data_received(struct s_mercenary *merc, bool flag) -{ +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_); - if( (sd = iMap->charid2sd(merc->char_id)) == NULL ) + if( (sd = map->charid2sd(merc->char_id)) == NULL ) return 0; if( !flag || i < 0 ) { // Not created - loaded - DB info @@ -318,7 +316,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag) md->bl.x = md->ud.to_x; md->bl.y = md->ud.to_y; - iMap->addiddb(&md->bl); + map->addiddb(&md->bl); status_calc_mercenary(md,1); md->contract_timer = INVALID_TIMER; merc_contract_init(md); @@ -333,9 +331,8 @@ int merc_data_received(struct s_mercenary *merc, bool flag) mercenary->set_calls(md, 1); sd->status.mer_id = merc->mercenary_id; - if( md && md->bl.prev == NULL && sd->bl.prev != NULL ) - { - iMap->addblock(&md->bl); + if( md && md->bl.prev == NULL && sd->bl.prev != NULL ) { + map->addblock(&md->bl); clif->spawn(&md->bl); clif->mercenary_info(sd); clif->mercenary_skillblock(sd); @@ -451,7 +448,7 @@ static bool read_mercenarydb_sub(char* str[], int columns, int current) { int read_mercenarydb(void) { memset(mercenary->db,0,sizeof(mercenary->db)); - sv->readdb(iMap->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, &read_mercenarydb_sub); return 0; } @@ -487,9 +484,8 @@ static bool read_mercenary_skilldb_sub(char* str[], int columns, int current) return true; } -int read_mercenary_skilldb(void) -{ - sv->readdb(iMap->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, &read_mercenary_skilldb_sub); +int read_mercenary_skilldb(void) { + sv->readdb(map->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, &read_mercenary_skilldb_sub); return 0; } diff --git a/src/map/mob.c b/src/map/mob.c index ff949a3ff..b41f7488f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -154,8 +154,8 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time) else nd->u.tomb.killer_name[0] = '\0'; - iMap->addnpc(nd->bl.m, nd); - iMap->addblock(&nd->bl); + map->addnpc(nd->bl.m, nd); + map->addblock(&nd->bl); status->set_viewdata(&nd->bl, nd->class_); clif->spawn(&nd->bl); @@ -164,14 +164,14 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time) void mvptomb_destroy(struct mob_data *md) { struct npc_data *nd; - if ( (nd = iMap->id2nd(md->tomb_nid)) ) { + if ( (nd = map->id2nd(md->tomb_nid)) ) { int16 m, i; m = nd->bl.m; clif->clearunit_area(&nd->bl,CLR_OUTSIGHT); - iMap->delblock(&nd->bl); + map->delblock(&nd->bl); ARR_FIND( 0, maplist[m].npc_num, i, maplist[m].npc[i] == nd ); if( !(i == maplist[m].npc_num) ) { @@ -180,7 +180,7 @@ void mvptomb_destroy(struct mob_data *md) { maplist[m].npc[maplist[m].npc_num] = NULL; } - iMap->deliddb(&nd->bl); + map->deliddb(&nd->bl); aFree(nd); } @@ -285,7 +285,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data) { status->change_init(&md->bl); unit->dataset(&md->bl); - iMap->addiddb(&md->bl); + map->addiddb(&md->bl); return md; } @@ -356,7 +356,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target) if( !(sd = BL_CAST(BL_PC,s_bl)) ) return false; // Master is not PC - t_bl = iMap->id2bl(md->target_id); + t_bl = map->id2bl(md->target_id); if( !t_bl || (s_bl = battle->get_master(t_bl)) == NULL ) s_bl = t_bl; @@ -383,7 +383,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target) (sce->val2 == 3 && sce->val4 && sce->val4 != t_sd->status.guild_id)) ) break; - if( (pl_sd = iMap->id2sd(sce->val1)) == NULL || pl_sd->bl.m != md->bl.m ) + if( (pl_sd = map->id2sd(sce->val1)) == NULL || pl_sd->bl.m != md->bl.m ) break; if( !pl_sd->state.noks ) @@ -439,11 +439,11 @@ struct mob_data *mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int // Locate spot next to player. if (bl && (x < 0 || y < 0)) - iMap->search_freecell(bl, m, &x, &y, 1, 1, 0); + map->search_freecell(bl, m, &x, &y, 1, 1, 0); // if none found, pick random position on map - if (x <= 0 || y <= 0 || iMap->getcell(m,x,y,CELL_CHKNOREACH)) - iMap->search_freecell(NULL, m, &x, &y, -1, -1, 1); + if (x <= 0 || y <= 0 || map->getcell(m,x,y,CELL_CHKNOREACH)) + map->search_freecell(NULL, m, &x, &y, -1, -1, 1); data.x = x; data.y = y; @@ -535,7 +535,7 @@ int mob_once_spawn_area(struct map_session_data* sd, int16 m, int16 x0, int16 y0 x = rnd()%(x1-x0+1)+x0; y = rnd()%(y1-y0+1)+y0; j++; - } while (iMap->getcell(m,x,y,CELL_CHKNOPASS) && j < max); + } while (map->getcell(m,x,y,CELL_CHKNOPASS) && j < max); if (j == max) {// attempt to find an available cell failed @@ -561,7 +561,7 @@ int mob_once_spawn_area(struct map_session_data* sd, int16 m, int16 x0, int16 y0 *------------------------------------------*/ int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data) { //Needed because the guild_data may not be available at guardian spawn time. - struct block_list* bl = iMap->id2bl(id); + struct block_list* bl = map->id2bl(id); struct mob_data* md; struct guild* g; int guardup_lv; @@ -619,7 +619,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam memset(&data, 0, sizeof(struct spawn_data)); data.num = 1; - m=iMap->mapname2mapid(mapname); + m=map->mapname2mapid(mapname); if(m<0) { @@ -642,7 +642,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam return 0; } - if((x<=0 || y<=0) && !iMap->search_freecell(NULL, m, &x, &y, -1,-1, 1)) { + if((x<=0 || y<=0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1)) { ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, maplist[m].name); return 0; } @@ -665,7 +665,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam if( has_index && gc->guardian[guardian].id ) { //Check if guardian already exists, refuse to spawn if so. - struct mob_data *md2 = (TBL_MOB*)iMap->id2bl(gc->guardian[guardian].id); + struct mob_data *md2 = (TBL_MOB*)map->id2bl(gc->guardian[guardian].id); if (md2 && md2->bl.type == BL_MOB && md2->guardian_data && md2->guardian_data->number == guardian @@ -716,8 +716,7 @@ int mob_spawn_bg(const char* mapname, short x, short y, const char* mobname, int struct spawn_data data; int16 m; - if( (m = iMap->mapname2mapid(mapname)) < 0 ) - { + if( (m = map->mapname2mapid(mapname)) < 0 ) { ShowWarning("mob_spawn_bg: Map [%s] not found.\n", mapname); return 0; } @@ -732,7 +731,7 @@ int mob_spawn_bg(const char* mapname, short x, short y, const char* mobname, int } data.class_ = class_; - if( (x <= 0 || y <= 0) && !iMap->search_freecell(NULL, m, &x, &y, -1,-1, 1) ) { + if( (x <= 0 || y <= 0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1) ) { ShowWarning("mob_spawn_bg: Couldn't locate a spawn cell for guardian class %d (bg_id %d) at map %s\n",class_, bg_id, maplist[m].name); return 0; } @@ -810,9 +809,8 @@ int mob_linksearch(struct block_list *bl,va_list ap) /*========================================== * mob spawn with delay (timer function) *------------------------------------------*/ -int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) -{ - struct block_list* bl = iMap->id2bl(id); +int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) { + struct block_list* bl = map->id2bl(id); struct mob_data* md = BL_CAST(BL_MOB, bl); if( md ) @@ -904,18 +902,17 @@ int mob_spawn (struct mob_data *md) md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; - if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) - { //Monster can be spawned on an area. - if( !iMap->search_freecell(&md->bl, -1, &md->bl.x, &md->bl.y, md->spawn->xs, md->spawn->ys, battle_config.no_spawn_on_player?4:0) ) - { // retry again later + if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) { + //Monster can be spawned on an area. + if( !map->search_freecell(&md->bl, -1, &md->bl.x, &md->bl.y, md->spawn->xs, md->spawn->ys, battle_config.no_spawn_on_player?4:0) ) { + // retry again later if( md->spawn_timer != INVALID_TIMER ) timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); return 1; } - } - else if( battle_config.no_spawn_on_player > 99 && iMap->foreachinrange(mob->count_sub, &md->bl, AREA_SIZE, BL_PC) ) - { // retry again later (players on sight) + } else if( battle_config.no_spawn_on_player > 99 && map->foreachinrange(mob->count_sub, &md->bl, AREA_SIZE, BL_PC) ) { + // retry again later (players on sight) if( md->spawn_timer != INVALID_TIMER ) timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); @@ -965,7 +962,7 @@ int mob_spawn (struct mob_data *md) if ( md->tomb_nid ) mob->mvptomb_destroy(md); - iMap->addblock(&md->bl); + map->addblock(&md->bl); if( maplist[md->bl.m].users ) clif->spawn(&md->bl); skill->unit_move(&md->bl,tick,1); @@ -1188,11 +1185,10 @@ int mob_warpchase_sub(struct block_list *bl,va_list ap) { /*========================================== * Processing of slave monsters *------------------------------------------*/ -int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) -{ +int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) { struct block_list *bl; - bl=iMap->id2bl(md->master_id); + bl=map->id2bl(md->master_id); if (!bl || status->isdead(bl)) { status_kill(&md->bl); @@ -1223,12 +1219,12 @@ int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) return 0; // Approach master if within view range, chase back to Master's area also if standing on top of the master. - if((md->master_dist>MOB_SLAVEDISTANCE || md->master_dist == 0) && - unit->can_move(&md->bl)) - { + if( (md->master_dist>MOB_SLAVEDISTANCE || md->master_dist == 0) + && unit->can_move(&md->bl) + ) { short x = bl->x, y = bl->y; mob_stop_attack(md); - if(iMap->search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1) + if(map->search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1) && unit->walktoxy(&md->bl, x, y, 0)) return 1; } @@ -1247,9 +1243,9 @@ int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) if (ud) { struct block_list *tbl=NULL; if (ud->target && ud->state.attack_continue) - tbl=iMap->id2bl(ud->target); + tbl=map->id2bl(ud->target); else if (ud->skilltarget) { - tbl = iMap->id2bl(ud->skilltarget); + tbl = map->id2bl(ud->skilltarget); //Required check as skilltarget is not always an enemy. [Skotlex] if (tbl && battle->check_target(&md->bl, tbl, BCT_ENEMY) <= 0) tbl = NULL; @@ -1334,7 +1330,7 @@ int mob_randomwalk(struct mob_data *md,unsigned int tick) x+=md->bl.x; y+=md->bl.y; - if((iMap->getcell(md->bl.m,x,y,CELL_CHKPASS)) && unit->walktoxy(&md->bl,x,y,1)){ + if((map->getcell(md->bl.m,x,y,CELL_CHKPASS)) && unit->walktoxy(&md->bl,x,y,1)){ break; } } @@ -1372,12 +1368,12 @@ int mob_warpchase(struct mob_data *md, struct block_list *target) return 0; //No need to do a warp chase. if (md->ud.walktimer != INVALID_TIMER && - iMap->getcell(md->bl.m,md->ud.to_x,md->ud.to_y,CELL_CHKNPC)) + map->getcell(md->bl.m,md->ud.to_x,md->ud.to_y,CELL_CHKNPC)) return 1; //Already walking to a warp. //Search for warps within mob's viewing range. - iMap->foreachinrange (mob->warpchase_sub, &md->bl, - md->db->range2, BL_NPC, target, &warp, &distance); + map->foreachinrange(mob->warpchase_sub, &md->bl, + md->db->range2, BL_NPC, target, &warp, &distance); if (warp && unit->walktobl(&md->bl, &warp->bl, 1, 1)) return 1; @@ -1424,7 +1420,7 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) if (md->target_id) { //Check validity of current target. [Skotlex] - tbl = iMap->id2bl(md->target_id); + tbl = map->id2bl(md->target_id); if (!tbl || tbl->m != md->bl.m || (md->ud.attacktimer == INVALID_TIMER && !status->check_skilluse(&md->bl, tbl, 0, 0)) || (md->ud.walktimer != INVALID_TIMER && !(battle_config.mob_ai&0x1) && !check_distance_bl(&md->bl, tbl, md->min_chase)) @@ -1462,8 +1458,7 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) } } else - if( (abl = iMap->id2bl(md->attacked_id)) && (!tbl || mob->can_changetarget(md, abl, mode)) ) - { + if( (abl = map->id2bl(md->attacked_id)) && (!tbl || mob->can_changetarget(md, abl, mode)) ) { int dist; if( md->bl.m != abl->m || abl->prev == NULL || (dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE // Attacker longer than visual area @@ -1517,22 +1512,19 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) return true; // 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 if the mob is full and can't consume the items. - iMap->foreachinrange (mob->ai_sub_hard_lootsearch, &md->bl, view_range, BL_ITEM, md, &tbl); + 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 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); } - if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW) - { - iMap->foreachinrange (mob->ai_sub_hard_activesearch, &md->bl, view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl, mode); - } - else - if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) - { + if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW) { + map->foreachinrange (mob->ai_sub_hard_activesearch, &md->bl, view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl, mode); + } else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) { int search_size; search_size = view_rangestatus.rhw.range ? view_range:md->status.rhw.range; - iMap->foreachinrange (mob->ai_sub_hard_changechase, &md->bl, search_size, DEFAULT_ENEMY_TYPE(md), md, &tbl); + map->foreachinrange (mob->ai_sub_hard_changechase, &md->bl, search_size, DEFAULT_ENEMY_TYPE(md), md, &tbl); } if (!tbl) { //No targets available. @@ -1543,7 +1535,7 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) if( md->bg_id && mode&MD_CANATTACK ) { if( md->ud.walktimer != INVALID_TIMER ) return true;/* we are already moving */ - iMap->foreachinrange (mob->ai_sub_hard_bg_ally, &md->bl, view_range, BL_PC, md, &tbl, mode); + map->foreachinrange (mob->ai_sub_hard_bg_ally, &md->bl, view_range, BL_PC, md, &tbl, mode); if( tbl ) { if( distance_blxy(&md->bl, tbl->x, tbl->y) <= 3 || unit->walktobl(&md->bl, tbl, 1, 1) ) return true;/* we're moving or close enough don't unlock the target. */ @@ -1603,7 +1595,7 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) unit->set_walkdelay(&md->bl, tick, md->status.amotion, 1); } //Clear item. - iMap->clearflooritem (tbl); + map->clearflooritem (tbl); mob->unlocktarget (md,tick); return true; } @@ -1669,11 +1661,10 @@ int mob_ai_sub_hard_timer(struct block_list *bl,va_list ap) /*========================================== * Serious processing for mob in PC field of view (foreachclient) *------------------------------------------*/ -int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) -{ +int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) { unsigned int tick; tick=va_arg(ap,unsigned int); - iMap->foreachinrange(mob->ai_sub_hard_timer,&sd->bl, AREA_SIZE+ACTIVE_AI_RANGE, BL_MOB,tick); + map->foreachinrange(mob->ai_sub_hard_timer,&sd->bl, AREA_SIZE+ACTIVE_AI_RANGE, BL_MOB,tick); return 0; } @@ -1749,22 +1740,20 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args) /*========================================== * Negligent processing for mob outside PC field of view (interval timer function) *------------------------------------------*/ -int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) -{ - iMap->map_foreachmob(mob->ai_sub_lazy,tick); +int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) { + map->map_foreachmob(mob->ai_sub_lazy,tick); return 0; } /*========================================== * Serious processing for mob in PC field of view (interval timer function) *------------------------------------------*/ -int mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) -{ +int mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) { if (battle_config.mob_ai&0x20) - iMap->map_foreachmob(mob->ai_sub_lazy,tick); + map->map_foreachmob(mob->ai_sub_lazy,tick); else - iMap->map_foreachpc(mob->ai_sub_foreachclient,tick); + map->map_foreachpc(mob->ai_sub_foreachclient,tick); return 0; } @@ -1803,9 +1792,9 @@ int mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) list=(struct item_drop_list *)data; ditem = list->item; while (ditem) { - iMap->addflooritem(&ditem->item_data,ditem->item_data.amount, - list->m,list->x,list->y, - list->first_charid,list->second_charid,list->third_charid,0); + map->addflooritem(&ditem->item_data,ditem->item_data.amount, + list->m,list->x,list->y, + list->first_charid,list->second_charid,list->third_charid,0); ditem_prev = ditem; ditem = ditem->next; ers_free(item_drop_ers, ditem_prev); @@ -1827,9 +1816,9 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite //Logs items, dropped by mobs [Lupus] logs->pick_mob(md, loot?LOG_TYPE_LOOT:LOG_TYPE_PICKDROP_MONSTER, -ditem->item_data.amount, &ditem->item_data, NULL); - sd = iMap->charid2sd(dlist->first_charid); - if( sd == NULL ) sd = iMap->charid2sd(dlist->second_charid); - if( sd == NULL ) sd = iMap->charid2sd(dlist->third_charid); + sd = map->charid2sd(dlist->first_charid); + if( sd == NULL ) sd = map->charid2sd(dlist->second_charid); + if( sd == NULL ) sd = map->charid2sd(dlist->third_charid); if( sd && (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) @@ -1851,9 +1840,8 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite dlist->item = ditem; } -int mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) -{ - struct block_list* bl = iMap->id2bl(id); +int mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) { + struct block_list* bl = map->id2bl(id); struct mob_data* md = BL_CAST(BL_MOB, bl); if( md ) @@ -1890,16 +1878,15 @@ int mob_deleteslave_sub(struct block_list *bl,va_list ap) /*========================================== * *------------------------------------------*/ -int mob_deleteslave(struct mob_data *md) -{ +int mob_deleteslave(struct mob_data *md) { nullpo_ret(md); - iMap->foreachinmap(mob->deleteslave_sub, md->bl.m, BL_MOB,md->bl.id); + map->foreachinmap(mob->deleteslave_sub, md->bl.m, BL_MOB,md->bl.id); return 0; } // Mob respawning through KAIZEL or NPC_REBIRTH [Skotlex] int mob_respawn(int tid, unsigned int tick, int id, intptr_t data) { - struct block_list *bl = iMap->id2bl(id); + struct block_list *bl = map->id2bl(id); if(!bl) return 0; status->revive(bl, (uint8)data, 0); @@ -1961,9 +1948,8 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage) case BL_MOB: { struct mob_data* md2 = (TBL_MOB*)src; - if( md2->special_state.ai && md2->master_id ) - { - struct map_session_data* msd = iMap->id2sd(md2->master_id); + if( md2->special_state.ai && md2->master_id ) { + struct map_session_data* msd = map->id2sd(md2->master_id); if( msd ) char_id = msd->status.char_id; } @@ -2053,7 +2039,7 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) { int i; for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob. if( md->dmglog[i].id ) { - struct map_session_data *sd = iMap->charid2sd(md->dmglog[i].id); + struct map_session_data *sd = map->charid2sd(md->dmglog[i].id); if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range clif->monster_hp_bar(md,sd); } @@ -2103,7 +2089,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { mob->skill_use(md,tick,-1); } - iMap->freeblock_lock(); + map->freeblock_lock(); memset(pt,0,sizeof(pt)); @@ -2112,9 +2098,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { // filter out entries not eligible for exp distribution memset(tmpsd,0,sizeof(tmpsd)); - for(i = 0, count = 0, mvp_damage = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) - { - struct map_session_data* tsd = iMap->charid2sd(md->dmglog[i].id); + for(i = 0, count = 0, mvp_damage = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) { + struct map_session_data* tsd = map->charid2sd(md->dmglog[i].id); if(tsd == NULL) continue; // skip empty entries @@ -2516,7 +2501,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if((temp = pc->additem(mvp_sd,&item,1,LOG_TYPE_PICKDROP_PLAYER)) != 0) { clif->additem(mvp_sd,0,0,temp); - iMap->addflooritem(&item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd->status.char_id,(second_sd?second_sd->status.char_id:0),(third_sd?third_sd->status.char_id:0),1); + map->addflooritem(&item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd->status.char_id,(second_sd?second_sd->status.char_id:0),(third_sd?third_sd->status.char_id:0),1); } //Logs items, MVP prizes [Lupus] @@ -2557,7 +2542,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { } if( sd->status.party_id ) - iMap->foreachinrange(quest->update_objective_sub,&md->bl,AREA_SIZE,BL_PC,sd->status.party_id,md->class_); + map->foreachinrange(quest->update_objective_sub,&md->bl,AREA_SIZE,BL_PC,sd->status.party_id,md->class_); else if( sd->avail_quests ) quest->update_objective(sd, md->class_); @@ -2592,7 +2577,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( md->can_summon ) mob->deleteslave(md); - iMap->freeblock_unlock(); + map->freeblock_unlock(); if( !rebirth ) { @@ -2634,7 +2619,7 @@ void mob_revive(struct mob_data *md, unsigned int hp) memset(md->dmglog, 0, sizeof(md->dmglog)); // Reset the damage done on the rebirthed monster, otherwise will grant full exp + damage done. [Valaris] md->tdmg = 0; if (!md->bl.prev) - iMap->addblock(&md->bl); + map->addblock(&md->bl); clif->spawn(&md->bl); skill->unit_move(&md->bl,tick,1); mob->skill_use(md, tick, MSC_SPAWN); @@ -2785,8 +2770,7 @@ void mob_heal(struct mob_data *md,unsigned int heal) /*========================================== * Added by RoVeRT *------------------------------------------*/ -int mob_warpslave_sub(struct block_list *bl,va_list ap) -{ +int mob_warpslave_sub(struct block_list *bl,va_list ap) { struct mob_data *md=(struct mob_data *)bl; struct block_list *master; short x,y,range=0; @@ -2796,7 +2780,7 @@ int mob_warpslave_sub(struct block_list *bl,va_list ap) if(md->master_id!=master->id) return 0; - iMap->search_freecell(master, 0, &x, &y, range, range, 0); + map->search_freecell(master, 0, &x, &y, range, range, 0); unit->warp(&md->bl, master->m, x, y,CLR_RESPAWN); return 1; } @@ -2806,12 +2790,11 @@ int mob_warpslave_sub(struct block_list *bl,va_list ap) * Warps slaves. Range is the area around the master that they can * appear in randomly. *------------------------------------------*/ -int mob_warpslave(struct block_list *bl, int range) -{ +int mob_warpslave(struct block_list *bl, int range) { if (range < 1) range = 1; //Min range needed to avoid crashes and stuff. [Skotlex] - return iMap->foreachinmap(mob->warpslave_sub, bl->m, BL_MOB, bl, range); + return map->foreachinmap(mob->warpslave_sub, bl->m, BL_MOB, bl, range); } /*========================================== @@ -2832,9 +2815,8 @@ int mob_countslave_sub(struct block_list *bl,va_list ap) /*========================================== * Counts the number of slaves a mob has on the map. *------------------------------------------*/ -int mob_countslave(struct block_list *bl) -{ - return iMap->foreachinmap(mob->countslave_sub, bl->m, BL_MOB,bl->id); +int mob_countslave(struct block_list *bl) { + return map->foreachinmap(mob->countslave_sub, bl->m, BL_MOB,bl->id); } /*========================================== @@ -2881,7 +2863,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,uint16 skill_id) if (mob->db_checkid(data.class_) == 0) continue; - if (iMap->search_freecell(&md2->bl, 0, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 0)) { + if (map->search_freecell(&md2->bl, 0, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 0)) { data.x = x; data.y = y; } else { @@ -2980,8 +2962,7 @@ int mob_getfriendhprate_sub(struct block_list *bl,va_list ap) (*fr) = bl; return 1; } -struct block_list *mob_getfriendhprate(struct mob_data *md,int min_rate,int max_rate) -{ +struct block_list *mob_getfriendhprate(struct mob_data *md,int min_rate,int max_rate) { struct block_list *fr=NULL; int type = BL_MOB; @@ -2990,17 +2971,15 @@ struct block_list *mob_getfriendhprate(struct mob_data *md,int min_rate,int max_ if (md->special_state.ai) //Summoned creatures. [Skotlex] type = BL_PC; - iMap->foreachinrange(mob->getfriendhprate_sub, &md->bl, 8, type,md,min_rate,max_rate,&fr); + map->foreachinrange(mob->getfriendhprate_sub, &md->bl, 8, type,md,min_rate,max_rate,&fr); return fr; } /*========================================== * Check hp rate of its master *------------------------------------------*/ -struct block_list *mob_getmasterhpltmaxrate(struct mob_data *md,int rate) -{ - if( md && md->master_id > 0 ) - { - struct block_list *bl = iMap->id2bl(md->master_id); +struct block_list *mob_getmasterhpltmaxrate(struct mob_data *md,int rate) { + if( md && md->master_id > 0 ) { + struct block_list *bl = map->id2bl(md->master_id); if( bl && get_percentage(status_get_hp(bl), status_get_max_hp(bl)) < rate ) return bl; } @@ -3042,12 +3021,11 @@ int mob_getfriendstatus_sub(struct block_list *bl,va_list ap) return 0; } -struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2) -{ +struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2) { struct mob_data* fr = NULL; nullpo_ret(md); - iMap->foreachinrange(mob->getfriendstatus_sub, &md->bl, 8,BL_MOB, md,cond1,cond2,&fr); + map->foreachinrange(mob->getfriendstatus_sub, &md->bl, 8,BL_MOB, md,cond1,cond2,&fr); return fr; } @@ -3149,7 +3127,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) case MSC_MASTERHPLTMAXRATE: flag = ((fbl = mob->getmasterhpltmaxrate(md, ms[i].cond2)) != NULL); break; case MSC_MASTERATTACKED: - flag = (md->master_id > 0 && (fbl=iMap->id2bl(md->master_id)) && unit->counttargeted(fbl) > 0); break; + flag = (md->master_id > 0 && (fbl=map->id2bl(md->master_id)) && unit->counttargeted(fbl) > 0); break; case MSC_ALCHEMIST: flag = (md->state.alchemist); break; @@ -3172,12 +3150,12 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) case MST_AROUND6: case MST_AROUND7: case MST_AROUND8: - bl = iMap->id2bl(md->target_id); + bl = map->id2bl(md->target_id); break; case MST_MASTER: bl = &md->bl; if (md->master_id) - bl = iMap->id2bl(md->master_id); + bl = map->id2bl(md->master_id); if (bl) //Otherwise, fall through. break; case MST_FRIEND: @@ -3196,14 +3174,14 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) j = ms[i].target >= MST_AROUND1? (ms[i].target-MST_AROUND1) +1: (ms[i].target-MST_AROUND5) +1; - iMap->search_freecell(&md->bl, md->bl.m, &x, &y, j, j, 3); + map->search_freecell(&md->bl, md->bl.m, &x, &y, j, j, 3); } md->skill_idx = i; - iMap->freeblock_lock(); - if( !battle->check_range(&md->bl,bl,skill->get_range2(&md->bl, ms[i].skill_id,ms[i].skill_lv)) || - !unit->skilluse_pos2(&md->bl, x, y,ms[i].skill_id, ms[i].skill_lv,ms[i].casttime, ms[i].cancel) ) - { - iMap->freeblock_unlock(); + map->freeblock_lock(); + if( !battle->check_range(&md->bl,bl,skill->get_range2(&md->bl, ms[i].skill_id,ms[i].skill_lv)) + || !unit->skilluse_pos2(&md->bl, x, y,ms[i].skill_id, ms[i].skill_lv,ms[i].casttime, ms[i].cancel) + ) { + map->freeblock_unlock(); continue; } } else { @@ -3214,12 +3192,12 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) skill->get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv)); break; case MST_TARGET: - bl = iMap->id2bl(md->target_id); + bl = map->id2bl(md->target_id); break; case MST_MASTER: bl = &md->bl; if (md->master_id) - bl = iMap->id2bl(md->master_id); + bl = map->id2bl(md->master_id); if (bl) //Otherwise, fall through. break; case MST_FRIEND: @@ -3237,11 +3215,11 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) if (!bl) continue; md->skill_idx = i; - iMap->freeblock_lock(); - if( !battle->check_range(&md->bl,bl,skill->get_range2(&md->bl, ms[i].skill_id,ms[i].skill_lv)) || - !unit->skilluse_id2(&md->bl, bl->id,ms[i].skill_id, ms[i].skill_lv,ms[i].casttime, ms[i].cancel) ) - { - iMap->freeblock_unlock(); + map->freeblock_lock(); + if( !battle->check_range(&md->bl,bl,skill->get_range2(&md->bl, ms[i].skill_id,ms[i].skill_lv)) + || !unit->skilluse_id2(&md->bl, bl->id,ms[i].skill_id, ms[i].skill_lv,ms[i].casttime, ms[i].cancel) + ) { + map->freeblock_unlock(); continue; } } @@ -3261,7 +3239,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) md->skilldelay[j]=tick; } else md->skilldelay[i]=tick; - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } //No skill was used. @@ -3891,22 +3869,21 @@ void mob_readdb(void) { for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { if(fi > 0) { char filepath[256]; - sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + sprintf(filepath, "%s/%s", map->db_path, filename[fi]); if(!exists(filepath)) { continue; } } - sv->readdb(iMap->db_path, filename[fi], ',', 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, -1, mob->readdb_sub); + sv->readdb(map->db_path, filename[fi], ',', 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, -1, mob->readdb_sub); } } /*========================================== * mob_db table reading *------------------------------------------*/ -int mob_read_sqldb(void) -{ - const char* mob_db_name[] = { iMap->mob_db_db, iMap->mob_db2_db }; +int mob_read_sqldb(void) { + const char* mob_db_name[] = { map->mob_db_db, map->mob_db2_db }; int fi; for( fi = 0; fi < ARRAYLENGTH(mob_db_name); ++fi ) { @@ -4014,7 +3991,7 @@ int mob_read_randommonster(void) for( i = 0; i < ARRAYLENGTH(mobfile) && i < MAX_RANDOMMONSTER; i++ ) { unsigned int count = 0; mob->db_data[0]->summonper[i] = 1002; // Default fallback value, in case the database does not provide one - sprintf(line, "%s/%s", iMap->db_path, mobfile[i]); + sprintf(line, "%s/%s", map->db_path, mobfile[i]); fp=fopen(line,"r"); if(fp==NULL){ ShowError("can't read %s\n",line); @@ -4127,7 +4104,7 @@ void mob_readchatdb(void) { char line[1024], filepath[256]; int i, tmp=0; FILE *fp; - sprintf(filepath, "%s/%s", iMap->db_path, arc); + sprintf(filepath, "%s/%s", map->db_path, arc); fp=fopen(filepath, "r"); if(fp == NULL) { ShowWarning("mob_readchatdb: File not found \"%s\", skipping.\n", filepath); @@ -4448,13 +4425,13 @@ void mob_readskilldb(void) { for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { if(fi > 0) { char filepath[256]; - sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + sprintf(filepath, "%s/%s", map->db_path, filename[fi]); if(!exists(filepath)) { continue; } } - sv->readdb(iMap->db_path, filename[fi], ',', 19, 19, -1, mob->parse_row_mobskilldb); + sv->readdb(map->db_path, filename[fi], ',', 19, 19, -1, mob->parse_row_mobskilldb); } } @@ -4463,9 +4440,8 @@ void mob_readskilldb(void) { * not overly sure if this is all correct * seems to work though... */ -int mob_read_sqlskilldb(void) -{ - const char* mob_skill_db_name[] = { iMap->mob_skill_db_db, iMap->mob_skill_db2_db }; +int mob_read_sqlskilldb(void) { + const char* mob_skill_db_name[] = { map->mob_skill_db_db, map->mob_skill_db2_db }; int fi; if( battle_config.mob_skill_rate == 0 ) { @@ -4568,24 +4544,20 @@ bool mob_readdb_itemratio(char* str[], int columns, int current) * read all mob-related databases */ void mob_load(void) { - sv->readdb(iMap->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb + sv->readdb(map->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb mob->readchatdb(); - if (iMap->db_use_sql_mob_db) - { + if (map->db_use_sql_mob_db) { mob->read_sqldb(); } - if (iMap->db_use_sql_mob_skill_db) - { + if (map->db_use_sql_mob_skill_db) { mob->read_sqlskilldb(); - } - else - { + } else { mob->readdb(); mob->readskilldb(); } - sv->readdb(iMap->db_path, "mob_avail.txt", ',', 2, 12, -1, mob->readdb_mobavail); + sv->readdb(map->db_path, "mob_avail.txt", ',', 2, 12, -1, mob->readdb_mobavail); mob->read_randommonster(); - sv->readdb(iMap->db_path, DBPATH"mob_race2_db.txt", ',', 2, 20, -1, mob->readdb_race2); + sv->readdb(map->db_path, DBPATH"mob_race2_db.txt", ',', 2, 20, -1, mob->readdb_race2); } void mob_reload(void) { diff --git a/src/map/npc.c b/src/map/npc.c index 024f649d0..eff80efce 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -78,14 +78,14 @@ struct view_data* npc_get_viewdata(int class_) /// Returns a new npc id that isn't being used in id_db. /// Fatal error if nothing is available. int npc_get_new_npc_id(void) { - if( npc_id >= START_NPC_NUM && !iMap->blid_exists(npc_id) ) + if( npc_id >= START_NPC_NUM && !map->blid_exists(npc_id) ) return npc_id++;// available else {// find next id int base_id = npc_id; while( base_id != ++npc_id ) { if( npc_id < START_NPC_NUM ) npc_id = START_NPC_NUM; - if( !iMap->blid_exists(npc_id) ) + if( !map->blid_exists(npc_id) ) return npc_id++;// available } // full loop, nothing available @@ -104,12 +104,11 @@ int npc_isnear_sub(struct block_list* bl, va_list args) { } bool npc_isnear(struct block_list * bl) { - - if( battle_config.min_npc_vendchat_distance > 0 && - iMap->foreachinrange(npc->isnear_sub,bl, battle_config.min_npc_vendchat_distance, BL_NPC) ) - return true; - - return false; + if( battle_config.min_npc_vendchat_distance > 0 + && map->foreachinrange(npc->isnear_sub,bl, battle_config.min_npc_vendchat_distance, BL_NPC) ) + return true; + + return false; } int npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) @@ -197,8 +196,8 @@ int npc_enable(const char* name, int flag) } else clif->changeoption(&nd->bl); - if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) ) //check if player standing on a OnTouchArea - iMap->foreachinarea( npc->enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd ); + if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) ) //check if player standing on a OnTouchArea + map->foreachinarea( npc->enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd ); return 0; } @@ -220,7 +219,7 @@ struct npc_data* npc_name2id(const char* name) int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data* sd = NULL; unsigned int timeout = NPC_SECURE_TIMEOUT_NEXT; - if( (sd = iMap->id2sd(id)) == NULL || !sd->npc_id ) { + if( (sd = map->id2sd(id)) == NULL || !sd->npc_id ) { if( sd ) sd->npc_idle_timer = INVALID_TIMER; return 0;//Not logged in anymore OR no longer attached to a npc } @@ -347,7 +346,7 @@ void npc_event_doall_sub(void *key, void *data, va_list ap) if(rid) { // a player may only have 1 script running at the same time char buf[EVENT_NAME_LENGTH]; snprintf(buf, ARRAYLENGTH(buf), "%s::%s", ev->nd->exname, name); - npc->event_sub(iMap->id2sd(rid), ev, buf); + npc->event_sub(map->id2sd(rid), ev, buf); } else { script->run(ev->nd->u.scr.script, ev->pos, rid, ev->nd->bl.id); @@ -494,23 +493,20 @@ struct timer_event_data { /*========================================== * triger 'OnTimerXXXX' events *------------------------------------------*/ -int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) -{ +int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) { int old_rid, old_timer; unsigned int old_tick; - struct npc_data* nd=(struct npc_data *)iMap->id2bl(id); + struct npc_data* nd=(struct npc_data *)map->id2bl(id); struct npc_timerevent_list *te; struct timer_event_data *ted = (struct timer_event_data*)data; struct map_session_data *sd=NULL; - if( nd == NULL ) - { + if( nd == NULL ) { ShowError("npc_timerevent: NPC not found??\n"); return 0; } - if( ted->rid && !(sd = iMap->id2sd(ted->rid)) ) - { + if( ted->rid && !(sd = map->id2sd(ted->rid)) ) { ShowError("npc_timerevent: Attached player not found.\n"); ers_free(npc->timer_event_ers, ted); return 0; @@ -522,9 +518,9 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) old_timer = nd->u.scr.timer; // Set the values of the timer - nd->u.scr.rid = sd?sd->bl.id:0; //attached rid - nd->u.scr.timertick = tick; //current time tick - nd->u.scr.timer = ted->time; //total time from beginning to now + nd->u.scr.rid = sd?sd->bl.id:0; //attached rid + nd->u.scr.timertick = tick; //current time tick + nd->u.scr.timer = ted->time; //total time from beginning to now // Locate the event te = nd->u.scr.timer_event + ted->next; @@ -566,8 +562,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) /*========================================== * Start/Resume NPC timer *------------------------------------------*/ -int npc_timerevent_start(struct npc_data* nd, int rid) -{ +int npc_timerevent_start(struct npc_data* nd, int rid) { int j; unsigned int tick = timer->gettick(); struct map_session_data *sd = NULL; //Player to whom script is attached. @@ -577,8 +572,8 @@ int npc_timerevent_start(struct npc_data* nd, int rid) // Check if there is an OnTimer Event ARR_FIND( 0, nd->u.scr.timeramount, j, nd->u.scr.timer_event[j].timer > nd->u.scr.timer ); - if( nd->u.scr.rid > 0 && !(sd = iMap->id2sd(nd->u.scr.rid)) ) - { // Failed to attach timer to this player. + if( nd->u.scr.rid > 0 && !(sd = map->id2sd(nd->u.scr.rid)) ) { + // Failed to attach timer to this player. ShowError("npc_timerevent_start: Attached player not found!\n"); return 1; } @@ -627,8 +622,7 @@ int npc_timerevent_stop(struct npc_data* nd) nullpo_ret(nd); - if( nd->u.scr.rid && !(sd = iMap->id2sd(nd->u.scr.rid)) ) - { + if( nd->u.scr.rid && !(sd = map->id2sd(nd->u.scr.rid)) ) { ShowError("npc_timerevent_stop: Attached player not found!\n"); return 1; } @@ -673,7 +667,7 @@ void npc_timerevent_quit(struct map_session_data* sd) } // Delete timer - nd = (struct npc_data *)iMap->id2bl(td->id); + nd = (struct npc_data *)map->id2bl(td->id); ted = (struct timer_event_data*)td->data; timer->delete(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; @@ -820,14 +814,13 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch) /*========================================== * Sub chk then execute area event type *------------------------------------------*/ -int npc_touch_areanpc_sub(struct block_list *bl, va_list ap) -{ +int npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { struct map_session_data *sd; int pc_id; char *name; nullpo_ret(bl); - nullpo_ret((sd = iMap->id2sd(bl->id))); + nullpo_ret((sd = map->id2sd(bl->id))); pc_id = va_arg(ap,int); name = va_arg(ap,char*); @@ -848,9 +841,8 @@ int npc_touch_areanpc_sub(struct block_list *bl, va_list ap) * Chk if sd is still touching his assigned npc. * If not, it unsets it and searches for another player in range. *------------------------------------------*/ -int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap) -{ - struct npc_data *nd = iMap->id2nd(sd->touching_id); +int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap) { + struct npc_data *nd = map->id2nd(sd->touching_id); short xs, ys; if( !nd || nd->touching_id != sd->bl.id ) @@ -868,7 +860,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap) nd->touching_id = sd->touching_id = 0; snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script->config.ontouch_name); - iMap->forcountinarea(npc->touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name); + map->forcountinarea(npc->touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name); } return 0; } @@ -993,7 +985,7 @@ int npc_touch_areanpc2(struct mob_data *md) // In the npc touch area switch( maplist[m].npc[i]->subtype ) { case WARP: - xs = iMap->mapindex2mapid(maplist[m].npc[i]->u.warp.mapindex); + xs = map->mapindex2mapid(maplist[m].npc[i]->u.warp.mapindex); if( m < 0 ) break; // Cannot Warp between map servers if( unit->warp(&md->bl, xs, maplist[m].npc[i]->u.warp.x, maplist[m].npc[i]->u.warp.y, CLR_OUTSIGHT) == 0 ) @@ -1008,7 +1000,7 @@ int npc_touch_areanpc2(struct mob_data *md) md->areanpc_id = maplist[m].npc[i]->bl.id; id = md->bl.id; // Stores Unique ID script->run(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id); - if( iMap->id2md(id) == NULL ) return 1; // Not Warped, but killed + if( map->id2md(id) == NULL ) return 1; // Not Warped, but killed break; } @@ -1037,8 +1029,8 @@ int npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { //First check for npc_cells on the range given i = 0; for (ys = y0; ys <= y1 && !i; ys++) { - for(xs = x0; xs <= x1 && !i; xs++){ - if (iMap->getcell(m,xs,ys,CELL_CHKNPC)) + for(xs = x0; xs <= x1 && !i; xs++) { + if (map->getcell(m,xs,ys,CELL_CHKNPC)) i = 1; } } @@ -1191,8 +1183,8 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) nullpo_retr(1, sd); if( id != sd->npc_id ){ - TBL_NPC* nd_sd=(TBL_NPC*)iMap->id2bl(sd->npc_id); - TBL_NPC* nd=(TBL_NPC*)iMap->id2bl(id); + TBL_NPC* nd_sd=(TBL_NPC*)map->id2bl(sd->npc_id); + TBL_NPC* nd=(TBL_NPC*)map->id2bl(id); ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id, nd?(char*)nd->name:"'Unknown NPC'", (int)id); @@ -1200,7 +1192,7 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) } if(id != npc->fake_nd->bl.id) { // Not item script - if ((npc->checknear(sd,iMap->id2bl(id))) == NULL){ + if ((npc->checknear(sd,map->id2bl(id))) == NULL){ ShowWarning("npc_scriptcont: failed npc->checknear test.\n"); return 1; } @@ -1232,13 +1224,12 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) /*========================================== * Chk if valid call then open buy or selling list *------------------------------------------*/ -int npc_buysellsel(struct map_session_data* sd, int id, int type) -{ +int npc_buysellsel(struct map_session_data* sd, int id, int type) { struct npc_data *nd; nullpo_retr(1, sd); - if ((nd = npc->checknear(sd,iMap->id2bl(id))) == NULL) + if ((nd = npc->checknear(sd,map->id2bl(id))) == NULL) return 1; if (nd->subtype!=SHOP) { @@ -1268,83 +1259,77 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) /*========================================== * Cash Shop Buy List *------------------------------------------*/ -int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short* item_list) -{ - int i, j, nameid, amount, new_, w, vt; - struct npc_data *nd = (struct npc_data *)iMap->id2bl(sd->npc_shopid); - - if( !nd || nd->subtype != CASHSHOP ) - return 1; - - if( sd->state.trading ) - return 4; - - new_ = 0; - w = 0; - vt = 0; // Global Value - - // Validating Process ---------------------------------------------------- - for( i = 0; i < count; i++ ) - { - nameid = item_list[i*2+1]; - amount = item_list[i*2+0]; - - if( !itemdb->exists(nameid) || amount <= 0 ) - return 5; - - ARR_FIND(0,nd->u.shop.count,j,nd->u.shop.shop_item[j].nameid == nameid); - if( j == nd->u.shop.count || nd->u.shop.shop_item[j].value <= 0 ) - return 5; - - if( !itemdb->isstackable(nameid) && amount > 1 ) - { - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); - amount = item_list[i*2+0] = 1; - } - - switch( pc->checkadditem(sd,nameid,amount) ) - { - case ADDITEM_NEW: - new_++; - break; - case ADDITEM_OVERAMOUNT: - return 3; - } - - vt += nd->u.shop.shop_item[j].value * amount; - w += itemdb_weight(nameid) * amount; - } - - if( w + sd->weight > sd->max_weight ) - return 3; - if( pc->inventoryblank(sd) < new_ ) - return 3; - if( points > vt ) points = vt; - - // Payment Process ---------------------------------------------------- - if( sd->kafraPoints < points || sd->cashPoints < (vt - points) ) - return 6; - pc->paycash(sd,vt,points); - - // Delivery Process ---------------------------------------------------- - for( i = 0; i < count; i++ ) - { - struct item item_tmp; - - nameid = item_list[i*2+1]; - amount = item_list[i*2+0]; - - memset(&item_tmp,0,sizeof(item_tmp)); - - if( !pet->create_egg(sd,nameid) ) - { - item_tmp.nameid = nameid; - item_tmp.identify = 1; - pc->additem(sd,&item_tmp,amount,LOG_TYPE_NPC); - } - } - - return 0; +int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short* item_list) { + int i, j, nameid, amount, new_, w, vt; + struct npc_data *nd = (struct npc_data *)map->id2bl(sd->npc_shopid); + + if( !nd || nd->subtype != CASHSHOP ) + return 1; + + if( sd->state.trading ) + return 4; + + new_ = 0; + w = 0; + vt = 0; // Global Value + + // Validating Process ---------------------------------------------------- + for( i = 0; i < count; i++ ) { + nameid = item_list[i*2+1]; + amount = item_list[i*2+0]; + + if( !itemdb->exists(nameid) || amount <= 0 ) + return 5; + + ARR_FIND(0,nd->u.shop.count,j,nd->u.shop.shop_item[j].nameid == nameid); + if( j == nd->u.shop.count || nd->u.shop.shop_item[j].value <= 0 ) + return 5; + + if( !itemdb->isstackable(nameid) && amount > 1 ) { + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); + amount = item_list[i*2+0] = 1; + } + + switch( pc->checkadditem(sd,nameid,amount) ) { + case ADDITEM_NEW: + new_++; + break; + case ADDITEM_OVERAMOUNT: + return 3; + } + + vt += nd->u.shop.shop_item[j].value * amount; + w += itemdb_weight(nameid) * amount; + } + + if( w + sd->weight > sd->max_weight ) + return 3; + if( pc->inventoryblank(sd) < new_ ) + return 3; + if( points > vt ) points = vt; + + // Payment Process ---------------------------------------------------- + if( sd->kafraPoints < points || sd->cashPoints < (vt - points) ) + return 6; + pc->paycash(sd,vt,points); + + // Delivery Process ---------------------------------------------------- + for( i = 0; i < count; i++ ) { + struct item item_tmp; + + nameid = item_list[i*2+1]; + amount = item_list[i*2+0]; + + memset(&item_tmp,0,sizeof(item_tmp)); + + if( !pet->create_egg(sd,nameid) ) { + item_tmp.nameid = nameid; + item_tmp.identify = 1; + pc->additem(sd,&item_tmp,amount,LOG_TYPE_NPC); + } + } + + return 0; } //npc_buylist for script-controlled shops. @@ -1375,9 +1360,8 @@ int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* item_lis /*========================================== * Cash Shop Buy *------------------------------------------*/ -int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) -{ - struct npc_data *nd = (struct npc_data *)iMap->id2bl(sd->npc_shopid); +int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { + struct npc_data *nd = (struct npc_data *)map->id2bl(sd->npc_shopid); struct item_data *item; int i, price, w; @@ -1458,8 +1442,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po /// /// @param item_list 'n' pairs /// @return result code for clif->parse_NpcBuyListSend -int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) -{ +int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) { struct npc_data* nd; double z; int i,j,w,skill_t,new_, idx = skill->get_index(MC_DISCOUNT); @@ -1467,7 +1450,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(3, sd); nullpo_retr(3, item_list); - nd = npc->checknear(sd,iMap->id2bl(sd->npc_shopid)); + nd = npc->checknear(sd,map->id2bl(sd->npc_shopid)); if( nd == NULL ) return 3; if( nd->subtype != SHOP ) @@ -1631,8 +1614,7 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li /// /// @param item_list 'n' pairs /// @return result code for clif->parse_NpcSellListSend -int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) -{ +int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) { double z; int i,skill_t, idx = skill->get_index(MC_OVERCHARGE); struct npc_data *nd; @@ -1640,7 +1622,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(1, sd); nullpo_retr(1, item_list); - if( ( nd = npc->checknear(sd, iMap->id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP ) { + if( ( nd = npc->checknear(sd, map->id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP ) { return 1; } @@ -1721,10 +1703,10 @@ int npc_remove_map(struct npc_data* nd) { if(nd->bl.prev == NULL || nd->bl.m < 0) return 1; //Not assigned to a map. - m = nd->bl.m; + m = nd->bl.m; clif->clearunit_area(&nd->bl,CLR_RESPAWN); npc->unsetcells(nd); - iMap->delblock(&nd->bl); + map->delblock(&nd->bl); //Remove npc from maplist[].npc list. [Skotlex] ARR_FIND( 0, maplist[m].npc_num, i, maplist[m].npc[i] == nd ); if( i == maplist[m].npc_num ) return 2; //failed to find it? @@ -1776,9 +1758,8 @@ int npc_unload_dup_sub(struct npc_data* nd, va_list args) } //Removes all npcs that are duplicates of the passed one. [Skotlex] -void npc_unload_duplicates(struct npc_data* nd) -{ - iMap->map_foreachnpc(npc->unload_dup_sub,nd->bl.id); +void npc_unload_duplicates(struct npc_data* nd) { + map->map_foreachnpc(npc->unload_dup_sub,nd->bl.id); } //Removes an npc from map and db. @@ -1787,7 +1768,7 @@ int npc_unload(struct npc_data* nd, bool single) { nullpo_ret(nd); npc->remove_map(nd); - iMap->deliddb(&nd->bl); + map->deliddb(&nd->bl); if( single ) strdb_remove(npc->name_db, nd->exname); @@ -2039,7 +2020,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short CREATE(nd, struct npc_data, 1); nd->bl.id = npc->get_new_npc_id(); - iMap->addnpc(from_mapid, nd); + map->addnpc(from_mapid, nd); nd->bl.prev = nd->bl.next = NULL; nd->bl.m = from_mapid; nd->bl.x = from_x; @@ -2070,7 +2051,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short nd->bl.type = BL_NPC; nd->subtype = WARP; npc->setcells(nd); - iMap->addblock(&nd->bl); + map->addblock(&nd->bl); status->set_viewdata(&nd->bl, nd->class_); nd->ud = &npc->base_ud; if( maplist[nd->bl.m].users ) @@ -2097,7 +2078,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s return strchr(start,'\n');// skip and continue } - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); i = mapindex_name2id(to_mapname); if( i == 0 ) { @@ -2113,7 +2094,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s CREATE(nd, struct npc_data, 1); nd->bl.id = npc->get_new_npc_id(); - iMap->addnpc(m, nd); + map->addnpc(m, nd); nd->bl.prev = nd->bl.next = NULL; nd->bl.m = m; nd->bl.x = x; @@ -2135,7 +2116,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s nd->bl.type = BL_NPC; nd->subtype = WARP; npc->setcells(nd); - iMap->addblock(&nd->bl); + map->addblock(&nd->bl); status->set_viewdata(&nd->bl, nd->class_); nd->ud = &npc->base_ud; if( maplist[nd->bl.m].users ) @@ -2168,7 +2149,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s return strchr(start,'\n');// skip and continue } - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); } if( m != -1 && ( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) ) { @@ -2246,15 +2227,15 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s nd->bl.type = BL_NPC; nd->subtype = type; if( m >= 0 ) {// normal shop npc - iMap->addnpc(m,nd); - iMap->addblock(&nd->bl); + map->addnpc(m,nd); + map->addblock(&nd->bl); status->set_viewdata(&nd->bl, nd->class_); nd->ud = &npc->base_ud; nd->dir = dir; if( maplist[nd->bl.m].users ) clif->spawn(&nd->bl); } else {// 'floating' shop? - iMap->addiddb(&nd->bl); + map->addiddb(&nd->bl); } strdb_put(npc->name_db, nd->exname, nd); @@ -2370,15 +2351,12 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* x = 0; y = 0; m = -1; - } - else - {// npc in a map - if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 ) - { + } else {// npc in a map + if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 ) { ShowError("npc_parse_script: Invalid placement format for a script in file '%s', line '%d'. Skipping the rest of file...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4); return NULL;// unknown format, don't continue } - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); } script_start = strstr(start,",{"); @@ -2434,19 +2412,19 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* nd->subtype = SCRIPT; if( m >= 0 ) { - iMap->addnpc(m, nd); + map->addnpc(m, nd); nd->ud = &npc->base_ud; nd->dir = dir; npc->setcells(nd); - iMap->addblock(&nd->bl); + map->addblock(&nd->bl); if( class_ >= 0 ) { status->set_viewdata(&nd->bl, nd->class_); if( maplist[nd->bl.m].users ) clif->spawn(&nd->bl); } } else { - // we skip iMap->addnpc, but still add it to the list of ID's - iMap->addiddb(&nd->bl); + // we skip map->addnpc, but still add it to the list of ID's + map->addiddb(&nd->bl); } strdb_put(npc->name_db, nd->exname, nd); @@ -2528,7 +2506,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch ShowError("npc_parse_duplicate: Invalid placement format for duplicate in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4); return end;// next line, try to continue } - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); } if( m != -1 && ( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) ) { @@ -2590,19 +2568,19 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch //Add the npc to its location if( m >= 0 ) { - iMap->addnpc(m, nd); + map->addnpc(m, nd); nd->ud = &npc->base_ud; nd->dir = dir; npc->setcells(nd); - iMap->addblock(&nd->bl); + map->addblock(&nd->bl); if( class_ >= 0 ) { status->set_viewdata(&nd->bl, nd->class_); if( maplist[nd->bl.m].users ) clif->spawn(&nd->bl); } } else { - // we skip iMap->addnpc, but still add it to the list of ID's - iMap->addiddb(&nd->bl); + // we skip map->addnpc, but still add it to the list of ID's + map->addiddb(&nd->bl); } strdb_put(npc->name_db, nd->exname, nd); @@ -2638,7 +2616,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { if( snd->subtype == WARP ) { // Adjust destination, if instanced struct npc_data *wnd = NULL; // New NPC - int dm = iMap->mapindex2mapid(snd->u.warp.mapindex), im; + int dm = map->mapindex2mapid(snd->u.warp.mapindex), im; if( dm < 0 ) return 1; if( ( im = instance->mapid2imapid(dm, maplist[m].instance_id) ) == -1 ) { @@ -2648,7 +2626,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { CREATE(wnd, struct npc_data, 1); wnd->bl.id = npc->get_new_npc_id(); - iMap->addnpc(m, wnd); + map->addnpc(m, wnd); wnd->bl.prev = wnd->bl.next = NULL; wnd->bl.m = m; wnd->bl.x = snd->bl.x; @@ -2665,7 +2643,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { wnd->bl.type = BL_NPC; wnd->subtype = WARP; npc->setcells(wnd); - iMap->addblock(&wnd->bl); + map->addblock(&wnd->bl); status->set_viewdata(&wnd->bl, wnd->class_); wnd->ud = &npc->base_ud; if( maplist[wnd->bl.m].users ) @@ -2713,7 +2691,7 @@ void npc_setcells(struct npc_data* nd) { for (i = y-ys; i <= y+ys; i++) { for (j = x-xs; j <= x+xs; j++) { - if (iMap->getcell(m, j, i, CELL_CHKNOPASS)) + if (map->getcell(m, j, i, CELL_CHKNOPASS)) continue; maplist[m].setcell(m, j, i, CELL_NPC, true); } @@ -2745,10 +2723,10 @@ void npc_unsetcells(struct npc_data* nd) { //Locate max range on which we can locate npc cells //FIXME: does this really do what it's supposed to do? [ultramage] - for(x0 = x-xs; x0 > 0 && iMap->getcell(m, x0, y, CELL_CHKNPC); x0--); - for(x1 = x+xs; x1 < maplist[m].xs-1 && iMap->getcell(m, x1, y, CELL_CHKNPC); x1++); - for(y0 = y-ys; y0 > 0 && iMap->getcell(m, x, y0, CELL_CHKNPC); y0--); - for(y1 = y+ys; y1 < maplist[m].ys-1 && iMap->getcell(m, x, y1, CELL_CHKNPC); y1++); + for(x0 = x-xs; x0 > 0 && map->getcell(m, x0, y, CELL_CHKNPC); x0--); + for(x1 = x+xs; x1 < maplist[m].xs-1 && map->getcell(m, x1, y, CELL_CHKNPC); x1++); + for(y0 = y-ys; y0 > 0 && map->getcell(m, x, y0, CELL_CHKNPC); y0--); + for(y1 = y+ys; y1 < maplist[m].ys-1 && map->getcell(m, x, y1, CELL_CHKNPC); y1++); //Erase this npc's cells for (i = y-ys; i <= y+ys; i++) @@ -2756,7 +2734,7 @@ void npc_unsetcells(struct npc_data* nd) { maplist[m].setcell(m, j, i, CELL_NPC, false); //Re-deploy NPC cells for other nearby npcs. - iMap->foreachinarea( npc->unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id ); + map->foreachinarea( npc->unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id ); } void npc_movenpc(struct npc_data* nd, int16 x, int16 y) @@ -2767,9 +2745,9 @@ void npc_movenpc(struct npc_data* nd, int16 x, int16 y) x = cap_value(x, 0, maplist[m].xs-1); y = cap_value(y, 0, maplist[m].ys-1); - iMap->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); - iMap->moveblock(&nd->bl, x, y, timer->gettick()); - iMap->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); + map->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); + map->moveblock(&nd->bl, x, y, timer->gettick()); + map->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); } /// Changes the display name of the npc. @@ -2948,7 +2926,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st ShowError("npc_parse_mob: Unknown map '%s' in file '%s', line '%d'.\n", mapname, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// skip and continue } - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); if( m < 0 )//Not loaded on this map-server instance. return strchr(start,'\n');// skip and continue mobspawn.m = (unsigned short)m; @@ -3059,7 +3037,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st memcpy(data, &mobspawn, sizeof(struct spawn_data)); // spawn / cache the new mobs - if( battle_config.dynamic_mobs && iMap->addmobtolist(data->m, data) >= 0 ) { + if( battle_config.dynamic_mobs && map->addmobtolist(data->m, data) >= 0 ) { data->state.dynamic = true; npc_cache_mob += data->num; @@ -3095,9 +3073,8 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char ShowError("npc_parse_mapflag: Invalid mapflag definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4); return strchr(start,'\n');// skip and continue } - m = iMap->mapname2mapid(mapname); - if( m < 0 ) - { + m = map->mapname2mapid(mapname); + if( m < 0 ) { ShowWarning("npc_parse_mapflag: Unknown map in file '%s', line '%d' : %s\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", mapname, filepath, strline(buffer,start-buffer), w1, w2, w3, w4); return strchr(start,'\n');// skip and continue } @@ -3164,7 +3141,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer)); } if( state && (zone = strdb_get(zone_db, MAP_ZONE_PVP_NAME)) && maplist[m].zone != zone ) { - iMap->zone_change(m,zone,start,buffer,filepath); + map->zone_change(m,zone,start,buffer,filepath); } else if ( !state ) { maplist[m].zone = &map_zone_pk; } @@ -3214,7 +3191,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer)); } if( state && (zone = strdb_get(zone_db, MAP_ZONE_GVG_NAME)) && maplist[m].zone != zone ) { - iMap->zone_change(m,zone,start,buffer,filepath); + map->zone_change(m,zone,start,buffer,filepath); } } else if (!strcmpi(w3,"gvg_noparty")) @@ -3249,7 +3226,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char } if( state && (zone = strdb_get(zone_db, MAP_ZONE_BG_NAME)) && maplist[m].zone != zone ) { - iMap->zone_change(m,zone,start,buffer,filepath); + map->zone_change(m,zone,start,buffer,filepath); } } else if (!strcmpi(w3,"noexppenalty")) @@ -3444,7 +3421,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char if( !(zone = strdb_get(zone_db, w4)) ) { ShowWarning("npc_parse_mapflag: Invalid zone '%s'! removing flag from %s (file '%s', line '%d').\n", w4, maplist[m].name, filepath, strline(buffer,start-buffer)); } else if( maplist[m].zone != zone ) { - iMap->zone_change(m,zone,start,buffer,filepath); + map->zone_change(m,zone,start,buffer,filepath); } } else if ( !strcmpi(w3,"nomapchannelautojoin") ) { maplist[m].flag.chsysnolocalaj = state; @@ -3570,9 +3547,9 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) p = strchr(p,'\n');// next line continue; } - m = iMap->mapname2mapid(mapname); - if( m < 0 ) - {// "mapname" is not assigned to this server, we must skip the script info... + m = map->mapname2mapid(mapname); + if( m < 0 ) { + // "mapname" is not assigned to this server, we must skip the script info... if( strcasecmp(w2,"script") == 0 && count > 3 ) { if((p = npc->skip_script(p,buffer,filepath)) == NULL) @@ -3765,7 +3742,7 @@ int npc_reload(void) { mapit->free(iter); if(battle_config.dynamic_mobs) {// dynamic check by [random] - for (m = 0; m < iMap->map_num; m++) { + for (m = 0; m < map->map_num; m++) { for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) { if (maplist[m].moblist[i] != NULL) { aFree(maplist[m].moblist[i]); @@ -3773,7 +3750,7 @@ int npc_reload(void) { } if( maplist[m].mob_delete_timer != INVALID_TIMER ) { // Mobs were removed anyway,so delete the timer [Inkfish] - timer->delete(maplist[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer); maplist[m].mob_delete_timer = INVALID_TIMER; } } @@ -3789,7 +3766,7 @@ int npc_reload(void) { npc_mob = npc_cache_mob = npc_delay_mob = 0; // reset mapflags - iMap->flags_init(); + map->flags_init(); //TODO: the following code is copy-pasted from do_init_npc(); clean it up // Reloading npcs now @@ -3812,7 +3789,7 @@ int npc_reload(void) { instance->destroy(i); } - iMap->zone_init(); + map->zone_init(); npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ @@ -3876,24 +3853,23 @@ int do_final_npc(void) { return 0; } -void npc_debug_warps_sub(struct npc_data* nd) -{ +void npc_debug_warps_sub(struct npc_data* nd) { int16 m; if (nd->bl.type != BL_NPC || nd->subtype != WARP || nd->bl.m < 0) return; - m = iMap->mapindex2mapid(nd->u.warp.mapindex); + m = map->mapindex2mapid(nd->u.warp.mapindex); if (m < 0) return; //Warps to another map, nothing to do about it. if (nd->u.warp.x == 0 && nd->u.warp.y == 0) return; // random warp - if (iMap->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNPC)) { + if (map->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNPC)) { ShowWarning("Warp %s at %s(%d,%d) warps directly on top of an area npc at %s(%d,%d)\n", nd->name, maplist[nd->bl.m].name, nd->bl.x, nd->bl.y, maplist[m].name, nd->u.warp.x, nd->u.warp.y ); } - if (iMap->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNOPASS)) { + if (map->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNOPASS)) { ShowWarning("Warp %s at %s(%d,%d) warps to a non-walkable tile at %s(%d,%d)\n", nd->name, maplist[nd->bl.m].name, nd->bl.x, nd->bl.y, @@ -3904,7 +3880,7 @@ void npc_debug_warps_sub(struct npc_data* nd) static void npc_debug_warps(void) { int16 m, i; - for (m = 0; m < iMap->map_num; m++) + for (m = 0; m < map->map_num; m++) for (i = 0; i < maplist[m].npc_num; i++) npc->debug_warps_sub(maplist[m].npc[i]); } @@ -3963,7 +3939,7 @@ int do_init_npc(void) itemdb->name_constants(); - iMap->zone_init(); + map->zone_init(); npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ @@ -3993,7 +3969,7 @@ int do_init_npc(void) strdb_put(npc->name_db, npc->fake_nd->exname, npc->fake_nd); npc->fake_nd->u.scr.timerid = INVALID_TIMER; - iMap->addiddb(&npc->fake_nd->bl); + map->addiddb(&npc->fake_nd->bl); // End of initialization return 0; diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 848347888..1372fff21 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -379,7 +379,7 @@ BUILDIN(defpattern) { int setid = script_getnum(st,2); const char* pattern = script_getstr(st,3); const char* label = script_getstr(st,4); - struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid); npc_chat->def_pattern(nd, setid, pattern, label); @@ -388,7 +388,7 @@ BUILDIN(defpattern) { BUILDIN(activatepset) { int setid = script_getnum(st,2); - struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid); npc_chat->activate_pcreset(nd, setid); @@ -397,7 +397,7 @@ BUILDIN(activatepset) { BUILDIN(deactivatepset) { int setid = script_getnum(st,2); - struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid); npc_chat->deactivate_pcreset(nd, setid); @@ -406,7 +406,7 @@ BUILDIN(deactivatepset) { BUILDIN(deletepset) { int setid = script_getnum(st,2); - struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid); npc_chat->delete_pcreset(nd, setid); diff --git a/src/map/party.c b/src/map/party.c index 2682cf03b..a4eb38629 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -84,9 +84,8 @@ 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* sd = iMap->id2sd(account_id); +static 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)) return NULL; @@ -179,13 +178,12 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2) } -void party_created(int account_id,int char_id,int fail,int party_id,char *name) -{ +void party_created(int account_id,int char_id,int fail,int party_id,char *name) { struct map_session_data *sd; - sd=iMap->id2sd(account_id); + sd=map->id2sd(account_id); - if (!sd || sd->status.char_id != char_id || !sd->party_creating ) - { //Character logged off before creation ack? + if (!sd || sd->status.char_id != char_id || !sd->party_creating ) { + //Character logged off before creation ack? if (!fail) //break up party since player could not be added to it. intif->party_leave(party_id,account_id,char_id); return; @@ -209,13 +207,12 @@ int party_request_info(int party_id, int char_id) } /// Invoked (from char-server) when the party info is not found. -int party_recv_noinfo(int party_id, int char_id) -{ +int party_recv_noinfo(int party_id, int char_id) { party->broken(party_id); - if( char_id != 0 )// requester - { + if( char_id != 0 ) { + // requester struct map_session_data* sd; - sd = iMap->charid2sd(char_id); + sd = map->charid2sd(char_id); if( sd && sd->status.party_id == party_id ) sd->status.party_id = 0; } @@ -329,9 +326,9 @@ int party_recv_info(struct party* sp, int char_id) } } } - if( char_id != 0 )// requester - { - sd = iMap->charid2sd(char_id); + if( char_id != 0 ) { + // requester + sd = map->charid2sd(char_id); if( sd && sd->status.party_id == sp->party_id && party->getmemberid(p,sd) == -1 ) sd->status.party_id = 0;// was not in the party } @@ -400,8 +397,7 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd) return 1; } -void party_reply_invite(struct map_session_data *sd,int party_id,int flag) -{ +void party_reply_invite(struct map_session_data *sd,int party_id,int flag) { struct map_session_data* tsd; struct party_member member; @@ -411,7 +407,7 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag) sd->party_invite_account = 0; return; } - tsd = iMap->id2sd(sd->party_invite_account); + tsd = map->id2sd(sd->party_invite_account); if( flag == 1 && !sd->party_creating && !sd->party_joining ) {// accepted and allowed @@ -458,9 +454,8 @@ void party_member_joined(struct map_session_data *sd) /// Invoked (from char-server) when a new member is added to the party. /// flag: 0-success, 1-failure -int party_member_added(int party_id,int account_id,int char_id, int flag) -{ - struct map_session_data *sd = iMap->id2sd(account_id),*sd2; +int party_member_added(int party_id,int account_id,int char_id, int flag) { + struct map_session_data *sd = map->id2sd(account_id),*sd2; struct party_data *p = party->search(party_id); int i, j; @@ -470,7 +465,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) return 0; } - sd2 = iMap->id2sd(sd->party_invite_account); + sd2 = map->id2sd(sd->party_invite_account); sd->party_joining = false; sd->party_invite = 0; @@ -565,7 +560,7 @@ int party_leave(struct map_session_data *sd) /// Invoked (from char-server) when a party member leaves the party. int party_member_withdraw(int party_id, int account_id, int char_id) { - struct map_session_data* sd = iMap->id2sd(account_id); + struct map_session_data* sd = map->id2sd(account_id); struct party_data* p = party->search(party_id); if( p ) { @@ -634,10 +629,9 @@ int party_changeoption(struct map_session_data *sd,int exp,int item) return 0; } -int party_optionchanged(int party_id,int account_id,int exp,int item,int flag) -{ +int party_optionchanged(int party_id,int account_id,int exp,int item,int flag) { struct party_data *p; - struct map_session_data *sd=iMap->id2sd(account_id); + struct map_session_data *sd=map->id2sd(account_id); if( (p=party->search(party_id))==NULL) return 0; @@ -1099,17 +1093,16 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess list[blockcount++]=&psd->bl; } - iMap->freeblock_lock(); + map->freeblock_lock(); - for(i=0;ifreeblock_unlock(); + map->freeblock_unlock(); return total; } diff --git a/src/map/pc.c b/src/map/pc.c index 9dbb5175a..e88bdb2f1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -156,11 +156,10 @@ bool pc_should_log_commands(struct map_session_data *sd) return pc_group_should_log_commands(sd->group); } -static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; - if( (sd=(struct map_session_data *)iMap->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) + if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) return 1; if(sd->invincible_timer != tid){ @@ -195,12 +194,11 @@ void pc_delinvincibletimer(struct map_session_data* sd) } } -static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; int i; - if( (sd=(struct map_session_data *)iMap->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) + if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) return 1; if( sd->spiritball <= 0 ) @@ -356,9 +354,8 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) { i++; // Get total HP of all Royal Guards in party. - for( j = 0; j < i; j++ ) - { - bsd = iMap->id2sd(b_sd[j]); + for( j = 0; j < i; j++ ) { + bsd = map->id2sd(b_sd[j]); if( bsd != NULL ) hp += status_get_hp(&bsd->bl); } @@ -367,9 +364,8 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) { hp = hp / i; // If a Royal Guard have full HP, give more HP to others that haven't full HP. - for( j = 0; j < i; j++ ) - { - bsd = iMap->id2sd(b_sd[j]); + for( j = 0; j < i; j++ ) { + bsd = map->id2sd(b_sd[j]); if( bsd != NULL && (tmp_hp = hp - status_get_max_hp(&bsd->bl)) > 0 ) { extra_hp += tmp_hp; @@ -380,9 +376,8 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) { if( extra_hp > 0 && tmp_qty > 0 ) hp += extra_hp / tmp_qty; - for( j = 0; j < i; j++ ) - { - bsd = iMap->id2sd(b_sd[j]); + for( j = 0; j < i; j++ ) { + bsd = map->id2sd(b_sd[j]); if( bsd != NULL ) { status->set_hp(&bsd->bl,hp,0); // Set hp if( (sc = status->get_sc(&bsd->bl)) != NULL && sc->data[SC_BANDING] ) { @@ -463,9 +458,8 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) { /*========================================== Rental System *------------------------------------------*/ -static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd = iMap->id2sd(id); +static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd = map->id2sd(id); if( sd == NULL ) return 0; if( tid != sd->rental_timer ) @@ -1153,7 +1147,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim if (expiration_time != 0) { // don't display if it's unlimited or unknow value char tmpstr[1024]; strftime(tmpstr, sizeof(tmpstr) - 1, msg_txt(501), localtime(&expiration_time)); // "Your account time limit is: %d-%m-%Y %H:%M:%S." - clif->wis_message(sd->fd, iMap->wisp_server_name, tmpstr, strlen(tmpstr)+1); + clif->wis_message(sd->fd, map->wisp_server_name, tmpstr, strlen(tmpstr)+1); } /** @@ -1244,7 +1238,7 @@ int pc_reg_received(struct map_session_data *sd) for(i=0;ifeel_map[i].index = j; - sd->feel_map[i].m = iMap->mapindex2mapid(j); + sd->feel_map[i].m = map->mapindex2mapid(j); } else { sd->feel_map[i].index = 0; sd->feel_map[i].m = -1; @@ -1294,8 +1288,8 @@ int pc_reg_received(struct map_session_data *sd) if( sd->status.ele_id > 0 ) intif->elemental_request(sd->status.ele_id, sd->status.char_id); - iMap->addiddb(&sd->bl); - iMap->delnickdb(sd->status.char_id, sd->status.name); + map->addiddb(&sd->bl); + map->delnickdb(sd->status.char_id, sd->status.name); if (!chrif->auth_finished(sd)) ShowError("pc_reg_received: Failed to properly remove player %d:%d from logging db!\n", sd->status.account_id, sd->status.char_id); @@ -1757,7 +1751,7 @@ int pc_disguise(struct map_session_data *sd, int class_) { if (sd->chatID) { struct chat_data* cd; nullpo_retr(1, sd); - cd = (struct chat_data*)iMap->id2bl(sd->chatID); + cd = (struct chat_data*)map->id2bl(sd->chatID); if( cd != NULL || (struct block_list*)sd == cd->owner ) clif->dispchat(cd,0); } @@ -2016,9 +2010,8 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus) return 0; } -int pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd = iMap->id2sd(id); +int pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd = map->id2sd(id); struct s_autobonus *autobonus = (struct s_autobonus *)data; nullpo_ret(sd); @@ -4055,7 +4048,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) return 0; } - if (!iMap->addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 2)) + if (!map->addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 2)) return 0; pc->delitem(sd, n, amount, 1, 0, LOG_TYPE_PICKDROP_PLAYER); @@ -4085,9 +4078,8 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) if (sd->status.party_id) p = party->search(sd->status.party_id); - if(fitem->first_get_charid > 0 && fitem->first_get_charid != sd->status.char_id) - { - first_sd = iMap->charid2sd(fitem->first_get_charid); + if(fitem->first_get_charid > 0 && fitem->first_get_charid != sd->status.char_id) { + first_sd = map->charid2sd(fitem->first_get_charid); if(DIFF_TICK(tick,fitem->first_get_tick) < 0) { if (!(p && p->party.item&1 && first_sd && first_sd->status.party_id == sd->status.party_id @@ -4095,9 +4087,8 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) return 0; } else - if(fitem->second_get_charid > 0 && fitem->second_get_charid != sd->status.char_id) - { - second_sd = iMap->charid2sd(fitem->second_get_charid); + if(fitem->second_get_charid > 0 && fitem->second_get_charid != sd->status.char_id) { + second_sd = map->charid2sd(fitem->second_get_charid); if(DIFF_TICK(tick, fitem->second_get_tick) < 0) { if(!(p && p->party.item&1 && ((first_sd && first_sd->status.party_id == sd->status.party_id) || @@ -4106,9 +4097,8 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) return 0; } else - if(fitem->third_get_charid > 0 && fitem->third_get_charid != sd->status.char_id) - { - third_sd = iMap->charid2sd(fitem->third_get_charid); + if(fitem->third_get_charid > 0 && fitem->third_get_charid != sd->status.char_id) { + third_sd = map->charid2sd(fitem->third_get_charid); if(DIFF_TICK(tick,fitem->third_get_tick) < 0) { if(!(p && p->party.item&1 && ((first_sd && first_sd->status.party_id == sd->status.party_id) || @@ -4130,7 +4120,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) //Display pickup animation. pc_stop_attack(sd); clif->takeitem(&sd->bl,&fitem->bl); - iMap->clearflooritem(&fitem->bl); + map->clearflooritem(&fitem->bl); return 1; } @@ -4783,7 +4773,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y nullpo_ret(sd); - if( !mapindex || !mapindex_id2name(mapindex) || ( m = iMap->mapindex2mapid(mapindex) ) == -1 ) { + if( !mapindex || !mapindex_id2name(mapindex) || ( m = map->mapindex2mapid(mapindex) ) == -1 ) { ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex); return 1; } @@ -4858,7 +4848,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y } if( maplist[m].cell == (struct mapcell *)0xdeadbeaf ) - iMap->cellfromcache(&maplist[m]); + map->cellfromcache(&maplist[m]); if (sd->sc.count) { // Cancel some map related stuff. if (sd->sc.data[SC_JAILED]) return 1; //You may not get out! @@ -4905,7 +4895,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y uint32 ip; uint16 port; //if can't find any map-servers, just abort setting position. - if(!sd->mapindex || iMap->mapname2ipport(mapindex,&ip,&port)) + if(!sd->mapindex || map->mapname2ipport(mapindex,&ip,&port)) return 2; if (sd->npc_id) @@ -4935,10 +4925,10 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y do { x=rnd()%(maplist[m].xs-2)+1; y=rnd()%(maplist[m].ys-2)+1; - } while(iMap->getcell(m,x,y,CELL_CHKNOPASS)); + } while(map->getcell(m,x,y,CELL_CHKNOPASS)); } - if (sd->state.vending && iMap->getcell(m,x,y,CELL_CHKNOVENDING)) { + if (sd->state.vending && map->getcell(m,x,y,CELL_CHKNOVENDING)) { clif->message (sd->fd, msg_txt(204)); // "You can't open a shop on this cell." vending->close(sd); } @@ -5006,7 +4996,7 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type) { do { x=rnd()%(maplist[m].xs-2)+1; y=rnd()%(maplist[m].ys-2)+1; - } while( iMap->getcell(m,x,y,CELL_CHKNOPASS) && (i++) < 1000 ); + } while( map->getcell(m,x,y,CELL_CHKNOPASS) && (i++) < 1000 ); if (i < 1000) return pc->setpos(sd,map_id2index(sd->bl.m),x,y,type); @@ -5683,7 +5673,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; struct block_list *tbl; - sd = iMap->id2sd(id); + sd = map->id2sd(id); nullpo_ret(sd); if (sd->followtimer != tid) { @@ -5693,7 +5683,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) { } sd->followtimer = INVALID_TIMER; - tbl = iMap->id2bl(sd->followtarget); + tbl = map->id2bl(sd->followtarget); if (tbl == NULL || pc_isdead(sd) || status->isdead(tbl)) { pc->stop_following(sd); @@ -5733,9 +5723,8 @@ int pc_stop_following (struct map_session_data *sd) return 0; } -int pc_follow(struct map_session_data *sd,int target_id) -{ - struct block_list *bl = iMap->id2bl(target_id); +int pc_follow(struct map_session_data *sd,int target_id) { + struct block_list *bl = map->id2bl(target_id); if (bl == NULL /*|| bl->type != BL_PC*/) return 1; if (sd->followtimer != INVALID_TIMER) @@ -6638,9 +6627,8 @@ void pc_respawn(struct map_session_data* sd, clr_type clrtype) clif->resurrection(&sd->bl, 1); //If warping fails, send a normal stand up packet. } -static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd = iMap->id2sd(id); +static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd = map->id2sd(id); if( sd != NULL ) { sd->pvp_point=0; @@ -6690,7 +6678,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { for(k = 0; k < 5; k++) if (sd->devotion[k]){ - struct map_session_data *devsd = iMap->id2sd(sd->devotion[k]); + struct map_session_data *devsd = map->id2sd(sd->devotion[k]); if (devsd) status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER); sd->devotion[k] = 0; @@ -6866,7 +6854,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { item_tmp.card[1]=0; item_tmp.card[2]=GetWord(sd->status.char_id,0); // CharId item_tmp.card[3]=GetWord(sd->status.char_id,1); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } // activate Steel body if a super novice dies at 99+% exp [celest] @@ -7608,7 +7596,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) if (sd->state.vending) vending->close(sd); - iMap->foreachinmap(jobchange_killclone, sd->bl.m, BL_MOB, sd->bl.id); + map->foreachinmap(jobchange_killclone, sd->bl.m, BL_MOB, sd->bl.id); //Remove peco/cart/falcon i = sd->sc.option; @@ -8289,9 +8277,8 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v /*========================================== * Exec eventtimer for player sd (retrieved from map_session (id)) *------------------------------------------*/ -static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd=iMap->id2sd(id); +static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd=map->id2sd(id); char *p = (char *)data; int i; if(sd==NULL) @@ -9034,7 +9021,7 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap) return 0; } /*========================================== - * Calculate new rank beetween all present players (iMap->foreachinarea) + * Calculate new rank beetween all present players (map->foreachinarea) * and display result *------------------------------------------*/ int pc_calc_pvprank(struct map_session_data *sd) { @@ -9043,7 +9030,7 @@ int pc_calc_pvprank(struct map_session_data *sd) { m=&maplist[sd->bl.m]; old=sd->pvp_rank; sd->pvp_rank=1; - iMap->foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd); + map->foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd); if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users_pvp) clif->pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=m->users_pvp,0); return sd->pvp_rank; @@ -9051,11 +9038,10 @@ int pc_calc_pvprank(struct map_session_data *sd) { /*========================================== * Calculate next sd ranking calculation from config *------------------------------------------*/ -int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; - sd=iMap->id2sd(id); + sd=map->id2sd(id); if(sd==NULL) return 0; sd->pvp_timer = INVALID_TIMER; @@ -9119,8 +9105,8 @@ int pc_divorce(struct map_session_data *sd) if( !sd->status.partner_id ) return -1; // Char is not married - if( (p_sd = iMap->charid2sd(sd->status.partner_id)) == NULL ) - { // Lets char server do the divorce + if( (p_sd = map->charid2sd(sd->status.partner_id)) == NULL ) { + // Lets char server do the divorce if( chrif->divorce(sd->status.char_id, sd->status.partner_id) ) return -1; // No char server connected @@ -9147,11 +9133,10 @@ int pc_divorce(struct map_session_data *sd) /*========================================== * Get sd partner charid. (Married partner) *------------------------------------------*/ -struct map_session_data *pc_get_partner(struct map_session_data *sd) -{ +struct map_session_data *pc_get_partner(struct map_session_data *sd) { if (sd && pc->ismarried(sd)) // charid2sd returns NULL if not found - return iMap->charid2sd(sd->status.partner_id); + return map->charid2sd(sd->status.partner_id); return NULL; } @@ -9159,11 +9144,10 @@ struct map_session_data *pc_get_partner(struct map_session_data *sd) /*========================================== * Get sd father charid. (Need to be baby) *------------------------------------------*/ -struct map_session_data *pc_get_father (struct map_session_data *sd) -{ +struct map_session_data *pc_get_father(struct map_session_data *sd) { if (sd && sd->class_&JOBL_BABY && sd->status.father > 0) // charid2sd returns NULL if not found - return iMap->charid2sd(sd->status.father); + return map->charid2sd(sd->status.father); return NULL; } @@ -9171,11 +9155,10 @@ struct map_session_data *pc_get_father (struct map_session_data *sd) /*========================================== * Get sd mother charid. (Need to be baby) *------------------------------------------*/ -struct map_session_data *pc_get_mother (struct map_session_data *sd) -{ +struct map_session_data *pc_get_mother(struct map_session_data *sd) { if (sd && sd->class_&JOBL_BABY && sd->status.mother > 0) // charid2sd returns NULL if not found - return iMap->charid2sd(sd->status.mother); + return map->charid2sd(sd->status.mother); return NULL; } @@ -9183,11 +9166,10 @@ struct map_session_data *pc_get_mother (struct map_session_data *sd) /*========================================== * Get sd children charid. (Need to be married) *------------------------------------------*/ -struct map_session_data *pc_get_child (struct map_session_data *sd) -{ +struct map_session_data *pc_get_child(struct map_session_data *sd) { if (sd && pc->ismarried(sd) && sd->status.child > 0) // charid2sd returns NULL if not found - return iMap->charid2sd(sd->status.child); + return map->charid2sd(sd->status.child); return NULL; } @@ -9303,18 +9285,18 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data) } mapit->free(iter); - interval = iMap->autosave_interval/(iMap->usercount()+1); - if(interval < iMap->minsave_interval) - interval = iMap->minsave_interval; + interval = map->autosave_interval/(map->usercount()+1); + if(interval < map->minsave_interval) + interval = map->minsave_interval; timer->add(timer->gettick()+interval,pc_autosave,0,0); return 0; } static int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap) { - if (sd->state.night != iMap->night_flag && maplist[sd->bl.m].flag.nightenabled) { //Night/day state does not match. - clif->status_change(&sd->bl, SI_SKE, iMap->night_flag, 0, 0, 0, 0); //New night effect by dynamix [Skotlex] - sd->state.night = iMap->night_flag; + if (sd->state.night != map->night_flag && maplist[sd->bl.m].flag.nightenabled) { //Night/day state does not match. + clif->status_change(&sd->bl, SI_SKE, map->night_flag, 0, 0, 0, 0); //New night effect by dynamix [Skotlex] + sd->state.night = map->night_flag; return 1; } return 0; @@ -9323,18 +9305,17 @@ static int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap) { * timer to do the day [Yor] * data: 0 = called by timer, 1 = gmcommand/script *------------------------------------------------*/ -int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) { char tmp_soutput[1024]; - if (data == 0 && battle_config.day_duration <= 0) // if we want a day + if (data == 0 && battle_config.day_duration <= 0) // if we want a day return 0; - if (!iMap->night_flag) + if (!map->night_flag) return 0; //Already day. - iMap->night_flag = 0; // 0=day, 1=night [Yor] - iMap->map_foreachpc(pc_daynight_timer_sub); + map->night_flag = 0; // 0=day, 1=night [Yor] + map->map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived! intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, BC_DEFAULT); return 0; @@ -9344,18 +9325,17 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) * timer to do the night [Yor] * data: 0 = called by timer, 1 = gmcommand/script *------------------------------------------------*/ -int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) { char tmp_soutput[1024]; - if (data == 0 && battle_config.night_duration <= 0) // if we want a night + if (data == 0 && battle_config.night_duration <= 0) // if we want a night return 0; - if (iMap->night_flag) + if (map->night_flag) return 0; //Already nigth. - iMap->night_flag = 1; // 0=day, 1=night [Yor] - iMap->map_foreachpc(pc_daynight_timer_sub); + map->night_flag = 1; // 0=day, 1=night [Yor] + map->map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen... intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, BC_DEFAULT); return 0; @@ -9417,12 +9397,11 @@ bool pc_can_use_command(struct map_session_data *sd, const char *command) { return atcommand->can_use(sd,command); } -static int pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +static int pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; int i, type; - if( (sd=(struct map_session_data *)iMap->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) + if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL || sd->bl.type!=BL_PC ) return 1; ARR_FIND(1, 5, type, sd->charm[type] > 0); @@ -9907,11 +9886,11 @@ int pc_readdb(void) { FILE *fp; char line[24000],*p; - //reset + //reset memset(exp_table,0,sizeof(exp_table)); memset(max_level,0,sizeof(max_level)); - sprintf(line, "%s/"DBPATH"exp.txt", iMap->db_path); + sprintf(line, "%s/"DBPATH"exp.txt", map->db_path); fp=fopen(line, "r"); if(fp==NULL){ @@ -9989,13 +9968,13 @@ int pc_readdb(void) { if (!max_level[j][1]) ShowWarning("Class %s (%d) does not has a job exp table.\n", pc->job_name(i), i); } - ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,iMap->db_path,"exp.txt"); + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,map->db_path,"exp.txt"); count = 0; // Reset and read skilltree memset(skill_tree,0,sizeof(skill_tree)); pc_read_skill_tree(); #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) - sv->readdb(iMap->db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty); + sv->readdb(map->db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty); for( k=1; k < 3; k++ ){ // fill in the blanks for( j = 0; j < RC_MAX; j++ ){ int tmp = 0; @@ -10017,7 +9996,7 @@ int pc_readdb(void) { for(k=0;kdb_path); + sprintf(line, "%s/"DBPATH"attr_fix.txt", map->db_path); fp=fopen(line,"r"); if(fp==NULL){ @@ -10061,13 +10040,13 @@ int pc_readdb(void) { } } fclose(fp); - ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,iMap->db_path,"attr_fix.txt"); + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,map->db_path,"attr_fix.txt"); count = 0; - // reset then read statspoint + // reset then read statspoint memset(statp,0,sizeof(statp)); i=1; - sprintf(line, "%s/"DBPATH"statpoint.txt", iMap->db_path); + sprintf(line, "%s/"DBPATH"statpoint.txt", map->db_path); fp=fopen(line,"r"); if(fp == NULL){ ShowWarning("Can't read '"CL_WHITE"%s"CL_RESET"'... Generating DB.\n",line); @@ -10088,7 +10067,7 @@ int pc_readdb(void) { } fclose(fp); - ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,iMap->db_path,"statpoint.txt"); + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,map->db_path,"statpoint.txt"); } // generate the remaining parts of the db if necessary k = battle_config.use_statpoint_table; //save setting @@ -10164,10 +10143,10 @@ int do_init_pc(void) { timer->add_func_list(pc->endautobonus, "pc->endautobonus"); timer->add_func_list(pc_charm_timer, "pc_charm_timer"); - timer->add(timer->gettick() + iMap->autosave_interval, pc_autosave, 0, 0); + timer->add(timer->gettick() + map->autosave_interval, pc_autosave, 0, 0); // 0=day, 1=night [Yor] - iMap->night_flag = battle_config.night_at_start ? 1 : 0; + map->night_flag = battle_config.night_at_start ? 1 : 0; if (battle_config.day_duration > 0 && battle_config.night_duration > 0) { int day_duration = battle_config.day_duration; @@ -10176,8 +10155,8 @@ int do_init_pc(void) { timer->add_func_list(pc->map_day_timer, "pc->map_day_timer"); timer->add_func_list(pc->map_night_timer, "pc->map_night_timer"); - pc->day_timer_tid = timer->add_interval(timer->gettick() + (iMap->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration); - pc->night_timer_tid = timer->add_interval(timer->gettick() + day_duration + (iMap->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration); + pc->day_timer_tid = timer->add_interval(timer->gettick() + (map->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration); + pc->night_timer_tid = timer->add_interval(timer->gettick() + day_duration + (map->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration); } do_init_pc_groups(); diff --git a/src/map/pet.c b/src/map/pet.c index dd0ed1bb9..811ac9f09 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -109,7 +109,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) { int inf; struct block_list *bl; - bl=iMap->id2bl(target_id); + bl=map->id2bl(target_id); if( bl == NULL || pd->bl.m != bl->m || bl->prev == NULL || status->isdead(bl) || !check_distance_bl(&pd->bl, bl, pd->db->range3)) return 0; @@ -186,13 +186,12 @@ int pet_sc_check(struct map_session_data *sd, int type) return 0; } -int pet_hungry(int tid, unsigned int tick, int id, intptr_t data) -{ +int pet_hungry(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; struct pet_data *pd; int interval; - sd=iMap->id2sd(id); + sd=map->id2sd(id); if(!sd) return 1; @@ -300,7 +299,7 @@ int pet_return_egg(struct map_session_data *sd, struct pet_data *pd) tmp_item.card[3] = pd->pet.rename_flag; if((flag = pc->additem(sd,&tmp_item,1,LOG_TYPE_OTHER))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } pd->pet.incuvate = 1; unit->free(&pd->bl,CLR_OUTSIGHT); @@ -360,7 +359,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) pd->bl.x = pd->ud.to_x; pd->bl.y = pd->ud.to_y; - iMap->addiddb(&pd->bl); + map->addiddb(&pd->bl); status_calc_pet(pd,1); pd->last_thinktime = timer->gettick(); @@ -401,11 +400,11 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) } intif->save_petdata(sd->status.account_id,petinfo); - if (iMap->save_settings&8) + if (map->save_settings&8) chrif->save(sd,0); //is it REALLY Needed to save the char for hatching a pet? [Skotlex] if(sd->bl.prev != NULL) { - iMap->addblock(&sd->pd->bl); + map->addblock(&sd->pd->bl); clif->spawn(&sd->pd->bl); clif->send_petdata(sd,sd->pd, 0,0); clif->send_petdata(sd,sd->pd, 5,battle_config.pet_hair_style); @@ -417,11 +416,10 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) return 0; } -int pet_recv_petdata(int account_id,struct s_pet *p,int flag) -{ +int pet_recv_petdata(int account_id,struct s_pet *p,int flag) { struct map_session_data *sd; - sd = iMap->id2sd(account_id); + sd = map->id2sd(account_id); if(sd == NULL) return 1; if(flag == 1) { @@ -446,7 +444,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag) } else { pet->data_init(sd,p); if(sd->pd && sd->bl.prev != NULL) { - iMap->addblock(&sd->pd->bl); + map->addblock(&sd->pd->bl); clif->spawn(&sd->pd->bl); clif->send_petdata(sd,sd->pd,0,0); clif->send_petdata(sd,sd->pd,5,battle_config.pet_hair_style); @@ -483,16 +481,15 @@ int pet_catch_process1(struct map_session_data *sd,int target_class) return 0; } -int pet_catch_process2(struct map_session_data* sd, int target_id) -{ +int pet_catch_process2(struct map_session_data* sd, int target_id) { struct mob_data* md; int i = 0, pet_catch_rate = 0; nullpo_retr(1, sd); - md = (struct mob_data*)iMap->id2bl(target_id); - if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL) - { // Invalid inputs/state, abort capture. + md = (struct mob_data*)map->id2bl(target_id); + if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL) { + // Invalid inputs/state, abort capture. clif->pet_roulette(sd,0); sd->catch_target_class = -1; sd->itemid = sd->itemindex = -1; @@ -535,8 +532,8 @@ int pet_catch_process2(struct map_session_data* sd, int target_id) return 0; } -int pet_get_egg(int account_id,int pet_id,int flag) -{ //This function is invoked when a new pet has been created, and at no other time! +///This function is invoked when a new pet has been created, and at no other time! +int pet_get_egg(int account_id,int pet_id,int flag) { struct map_session_data *sd; struct item tmp_item; int i=0,ret=0; @@ -544,7 +541,7 @@ int pet_get_egg(int account_id,int pet_id,int flag) if(flag) return 0; - sd = iMap->id2sd(account_id); + sd = map->id2sd(account_id); if(sd == NULL) return 0; @@ -565,7 +562,7 @@ int pet_get_egg(int account_id,int pet_id,int flag) tmp_item.card[3] = 0; //New pets are not named. if((ret = pc->additem(sd,&tmp_item,1,LOG_TYPE_PICKDROP_PLAYER))) { clif->additem(sd,0,0,ret); - iMap->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } return 1; @@ -699,7 +696,7 @@ int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { tmp_item.identify = 1; if((flag = pc->additem(sd,&tmp_item,1,LOG_TYPE_OTHER))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } if( battle_config.pet_equip_required ) { // Skotlex: halt support timers if needed @@ -788,7 +785,7 @@ int pet_randomwalk(struct pet_data *pd,unsigned int tick) int r=rnd(); x=pd->bl.x+r%(d*2+1)-d; y=pd->bl.y+r/(d*2+1)%(d*2+1)-d; - if(iMap->getcell(pd->bl.m,x,y,CELL_CHKPASS) && unit->walktoxy(&pd->bl,x,y,0)){ + if(map->getcell(pd->bl.m,x,y,CELL_CHKPASS) && unit->walktoxy(&pd->bl,x,y,0)) { pd->move_fail_count=0; break; } @@ -863,7 +860,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned i } if (pd->target_id) { - target= iMap->id2bl(pd->target_id); + target= map->id2bl(pd->target_id); if (!target || pd->bl.m != target->m || status->isdead(target) || !check_distance_bl(&pd->bl, target, pd->db->range3) ) { @@ -874,7 +871,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned i if(!target && pd->loot && pd->msd && pc->has_permission(pd->msd, PC_PERM_TRADE) && pd->loot->count < pd->loot->max && DIFF_TICK(tick,pd->ud.canact_tick)>0) { //Use half the pet's range of sight. - iMap->foreachinrange(pet->ai_sub_hard_lootsearch,&pd->bl, + map->foreachinrange(pet->ai_sub_hard_lootsearch,&pd->bl, pd->db->range2/2, BL_ITEM,pd,&target); } @@ -918,7 +915,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned i if(pd->loot->count < pd->loot->max){ memcpy(&pd->loot->item[pd->loot->count++],&fitem->item_data,sizeof(pd->loot->item[0])); pd->loot->weight += itemdb_weight(fitem->item_data.nameid)*fitem->item_data.amount; - iMap->clearflooritem(target); + map->clearflooritem(target); } //Target is unlocked regardless of whether it was picked or not. pet->unlocktarget(pd); @@ -936,9 +933,8 @@ int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) return 0; } -int pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) -{ - iMap->map_foreachpc(pet->ai_sub_foreachclient,tick); +int pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) { + map->map_foreachpc(pet->ai_sub_foreachclient,tick); return 0; } @@ -970,14 +966,13 @@ int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap) return 0; } -int pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) -{ +int pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) { struct item_drop_list *list; struct item_drop *ditem, *ditem_prev; list=(struct item_drop_list *)data; ditem = list->item; while (ditem) { - iMap->addflooritem(&ditem->item_data,ditem->item_data.amount, + map->addflooritem(&ditem->item_data,ditem->item_data.amount, list->m,list->x,list->y, list->first_charid,list->second_charid,list->third_charid,0); ditem_prev = ditem; @@ -1039,9 +1034,8 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd) /*========================================== * pet bonus giving skills [Valaris] / Rewritten by [Skotlex] *------------------------------------------*/ -int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd=iMap->id2sd(id); +int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; int bonus; int duration = 0; @@ -1081,9 +1075,8 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) /*========================================== * pet recovery skills [Valaris] / Rewritten by [Skotlex] *------------------------------------------*/ -int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) -{ - struct map_session_data *sd=iMap->id2sd(id); +int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) { + struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; if(sd==NULL || sd->pd == NULL || sd->pd->recovery == NULL) @@ -1110,7 +1103,7 @@ int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) } int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { - struct map_session_data *sd=iMap->id2sd(id); + struct map_session_data *sd=map->id2sd(id); struct status_data *st; struct pet_data *pd; unsigned int rate = 100; @@ -1147,7 +1140,7 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { * pet support skills [Skotlex] *------------------------------------------*/ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) { - struct map_session_data *sd=iMap->id2sd(id); + struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; struct status_data *st; short rate = 100; @@ -1218,23 +1211,20 @@ int read_petdb() memset(pet->db,0,sizeof(pet->db)); j = 0; // entry counter - for( i = 0; i < ARRAYLENGTH(filename); i++ ) - { + for( i = 0; i < ARRAYLENGTH(filename); i++ ) { char line[1024]; int lines, entries; - sprintf(line, "%s/%s", iMap->db_path, filename[i]); + sprintf(line, "%s/%s", map->db_path, filename[i]); fp=fopen(line,"r"); - if( fp == NULL ) - { + if( fp == NULL ) { if( i == 0 ) ShowError("can't read %s\n",line); continue; } lines = entries = 0; - while( fgets(line, sizeof(line), fp) && j < MAX_PET_DB ) - { + while( fgets(line, sizeof(line), fp) && j < MAX_PET_DB ) { char *str[22], *p; lines++; diff --git a/src/map/quest.c b/src/map/quest.c index 40030560a..f40b60c3d 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -103,7 +103,7 @@ int quest_add(TBL_PC * sd, int quest_id) clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]); clif->quest_update_objective(sd, &sd->quest_log[i], sd->quest_index[i]); - if( iMap->save_settings&64 ) + if( map->save_settings&64 ) chrif->save(sd,0); return 0; @@ -152,7 +152,7 @@ int quest_change(TBL_PC * sd, int qid1, int qid2) clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]); clif->quest_update_objective(sd, &sd->quest_log[i], sd->quest_index[i]); - if( iMap->save_settings&64 ) + if( map->save_settings&64 ) chrif->save(sd,0); return 0; @@ -183,7 +183,7 @@ int quest_delete(TBL_PC * sd, int quest_id) clif->quest_delete(sd, quest_id); - if( iMap->save_settings&64 ) + if( map->save_settings&64 ) chrif->save(sd,0); return 0; @@ -253,7 +253,7 @@ int quest_update_status(TBL_PC * sd, int quest_id, quest_state qs) { clif->quest_delete(sd, quest_id); - if( iMap->save_settings&64 ) + if( map->save_settings&64 ) chrif->save(sd,0); return 0; @@ -297,16 +297,15 @@ int quest_read_db(void) { int i,j,k = 0; char *str[20],*p,*np; - sprintf(line, "%s/quest_db.txt", iMap->db_path); + sprintf(line, "%s/quest_db.txt", map->db_path); if( (fp=fopen(line,"r"))==NULL ){ ShowError("can't read %s\n", line); return -1; } while(fgets(line, sizeof(line), fp)) { - if (k == MAX_QUEST_DB) { - ShowError("quest_read_db: Too many entries specified in %s/quest_db.txt!\n", iMap->db_path); + ShowError("quest_read_db: Too many entries specified in %s/quest_db.txt!\n", map->db_path); break; } diff --git a/src/map/script.c b/src/map/script.c index b940d03e4..992f9da94 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -312,14 +312,13 @@ static void script_dump_stack(struct script_state* st) #endif /// Reports on the console the src of a script error. -static void script_reportsrc(struct script_state *st) -{ +static void script_reportsrc(struct script_state *st) { struct block_list* bl; if( st->oid == 0 ) return; //Can't report source. - bl = iMap->id2bl(st->oid); + bl = map->id2bl(st->oid); if( bl == NULL ) return; @@ -1993,13 +1992,12 @@ void script_set_constant_force(const char *name, int value, bool isparameter) { * Reading constant databases * const.txt *------------------------------------------*/ -static void read_constdb(void) -{ +static void read_constdb(void) { FILE *fp; char line[1024],name[1024],val[1024]; int type; - sprintf(line, "%s/const.txt", iMap->db_path); + sprintf(line, "%s/const.txt", map->db_path); fp=fopen(line, "r"); if(fp==NULL){ ShowError("can't read %s\n", line); @@ -2290,7 +2288,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o /// If there is no player attached, the script is terminated. TBL_PC *script_rid2sd(struct script_state *st) { TBL_PC *sd; - if( !( sd = iMap->id2sd(st->rid) ) ){ + if( !( sd = map->id2sd(st->rid) ) ){ ShowError("script_rid2sd: fatal error ! player not attached!\n"); script_reportfunc(st); script_reportsrc(st); @@ -3341,7 +3339,7 @@ void script_stop_instances(struct script_code *code) { int run_script_timer(int tid, unsigned int tick, int id, intptr_t data) { struct script_state *st = idb_get(script->st_db,(int)data); if( st ) { - TBL_PC *sd = iMap->id2sd(st->rid); + TBL_PC *sd = map->id2sd(st->rid); if((sd && sd->status.char_id != id) || (st->rid && !sd)) { //Character mismatch. Cancel execution. st->rid = 0; @@ -3359,11 +3357,10 @@ int run_script_timer(int tid, unsigned int tick, int id, intptr_t data) { /// /// @param st Script state to detach. /// @param dequeue_event Whether to schedule any queued events, when there was no previous script. -static void script_detach_state(struct script_state* st, bool dequeue_event) -{ +static void script_detach_state(struct script_state* st, bool dequeue_event) { struct map_session_data* sd; - if(st->rid && (sd = iMap->id2sd(st->rid))!=NULL) { + if(st->rid && (sd = map->id2sd(st->rid))!=NULL) { sd->st = st->bk_st; sd->npc_id = st->bk_npcid; sd->state.dialog = 0; @@ -3401,7 +3398,7 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) void script_attach_state(struct script_state* st) { struct map_session_data* sd; - if(st->rid && (sd = iMap->id2sd(st->rid))!=NULL) + if(st->rid && (sd = map->id2sd(st->rid))!=NULL) { if(st!=sd->st) { @@ -3438,7 +3435,7 @@ void run_script_main(struct script_state *st) { script->attach_state(st); - nd = iMap->id2nd(st->oid); + nd = map->id2nd(st->oid); if( nd && nd->bl.m >= 0 ) st->instance_id = maplist[nd->bl.m].instance_id; else @@ -3542,7 +3539,7 @@ void run_script_main(struct script_state *st) { //Restore previous script script_detach_state(st, false); //Delay execution - sd = iMap->id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish] + sd = map->id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish] st->sleep.charid = sd?sd->status.char_id:0; st->sleep.timer = timer->add(timer->gettick()+st->sleep.tick, script->run_timer, st->sleep.charid, (intptr_t)st->id); @@ -3561,7 +3558,7 @@ void run_script_main(struct script_state *st) { } } else { //Dispose of script. - if ((sd = iMap->id2sd(st->rid))!=NULL) { //Restore previous stack and save char. + if ((sd = map->id2sd(st->rid))!=NULL) { //Restore previous stack and save char. if(sd->state.using_fake_npc){ clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd); sd->state.using_fake_npc = 0; @@ -4102,7 +4099,7 @@ BUILDIN(menu) * menus beyond this length crash the client (see bugreport:6402) **/ if( StrBuf->Length(&buf) >= 2047 ) { - struct npc_data * nd = iMap->id2nd(st->oid); + struct npc_data * nd = map->id2nd(st->oid); char* menu; CREATE(menu, char, 2048); safestrncpy(menu, StrBuf->Value(&buf), 2047); @@ -4207,7 +4204,7 @@ BUILDIN(select) * menus beyond this length crash the client (see bugreport:6402) **/ if( StrBuf->Length(&buf) >= 2047 ) { - struct npc_data * nd = iMap->id2nd(st->oid); + struct npc_data * nd = map->id2nd(st->oid); char* menu; CREATE(menu, char, 2048); safestrncpy(menu, StrBuf->Value(&buf), 2047); @@ -4286,7 +4283,7 @@ BUILDIN(prompt) * menus beyond this length crash the client (see bugreport:6402) **/ if( StrBuf->Length(&buf) >= 2047 ) { - struct npc_data * nd = iMap->id2nd(st->oid); + struct npc_data * nd = map->id2nd(st->oid); char* menu; CREATE(menu, char, 2048); safestrncpy(menu, StrBuf->Value(&buf), 2047); @@ -4611,7 +4608,7 @@ static int buildin_areawarp_sub(struct block_list *bl,va_list ap) tx = rnd()%(x3-x2+1)+x2; ty = rnd()%(y3-y2+1)+y2; j++; - } while( iMap->getcell(index,tx,ty,CELL_CHKNOPASS) && j < max ); + } while( map->getcell(index,tx,ty,CELL_CHKNOPASS) && j < max ); pc->setpos((TBL_PC *)bl,index,tx,ty,CLR_OUTSIGHT); } @@ -4646,7 +4643,7 @@ BUILDIN(areawarp) } } - if( (m = iMap->mapname2mapid(mapname)) < 0 ) + if( (m = map->mapname2mapid(mapname)) < 0 ) return true; if( strcmp(str,"Random") == 0 ) @@ -4654,7 +4651,7 @@ BUILDIN(areawarp) else if( !(index=mapindex_name2id(str)) ) return true; - iMap->foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3); + map->foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3); return true; } @@ -4669,8 +4666,7 @@ static int buildin_areapercentheal_sub(struct block_list *bl,va_list ap) pc->percentheal((TBL_PC *)bl,hp,sp); return 0; } -BUILDIN(areapercentheal) -{ +BUILDIN(areapercentheal) { int hp,sp,m; const char *mapname; int x0,y0,x1,y1; @@ -4683,10 +4679,10 @@ BUILDIN(areapercentheal) hp=script_getnum(st,7); sp=script_getnum(st,8); - if( (m=iMap->mapname2mapid(mapname))< 0) + if( (m=map->mapname2mapid(mapname))< 0) return true; - iMap->foreachinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp); + map->foreachinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp); return true; } @@ -4696,8 +4692,7 @@ BUILDIN(areapercentheal) * another player npc-session. * Using: warpchar "mapname",x,y,Char_ID; *------------------------------------------*/ -BUILDIN(warpchar) -{ +BUILDIN(warpchar) { int x,y,a; const char *str; TBL_PC *sd; @@ -4707,7 +4702,7 @@ BUILDIN(warpchar) y=script_getnum(st,4); a=script_getnum(st,5); - sd = iMap->charid2sd(a); + sd = map->charid2sd(a); if( sd == NULL ) return true; @@ -5931,7 +5926,7 @@ BUILDIN(getitem) it.identify=itemdb->isidentified2(item_data); if( script_hasdata(st,4) ) - sd=iMap->id2sd(script_getnum(st,4)); // + sd=map->id2sd(script_getnum(st,4)); // else sd=script_rid2sd(st); // Attached player @@ -5944,16 +5939,13 @@ BUILDIN(getitem) else get_count = amount; - for (i = 0; i < amount; i += get_count) - { + for (i = 0; i < amount; i += get_count) { // if not pet egg - if (!pet->create_egg(sd, nameid)) - { - if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) - { + if (!pet->create_egg(sd, nameid)) { + if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) - iMap->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -5974,7 +5966,7 @@ BUILDIN(getitem2) struct script_data *data; if( script_hasdata(st,11) ) - sd=iMap->id2sd(script_getnum(st,11)); // + sd=map->id2sd(script_getnum(st,11)); // else sd=script_rid2sd(st); // Attached player @@ -6042,16 +6034,13 @@ BUILDIN(getitem2) else get_count = amount; - for (i = 0; i < amount; i += get_count) - { + for (i = 0; i < amount; i += get_count) { // if not pet egg - if (!pet->create_egg(sd, nameid)) - { - if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) - { + if (!pet->create_egg(sd, nameid)) { + if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&item_tmp) ) - iMap->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -6161,10 +6150,10 @@ BUILDIN(getnameditem) data=script_getdata(st,3); script->get_val(st,data); - if( data_isstring(data) ) //Char Name - tsd=iMap->nick2sd(script->conv_str(st,data)); - else //Char Id was given - tsd=iMap->charid2sd(script->conv_num(st,data)); + if( data_isstring(data) ) //Char Name + tsd=map->nick2sd(script->conv_str(st,data)); + else //Char Id was given + tsd=map->charid2sd(script->conv_num(st,data)); if( tsd == NULL ) { //Failed @@ -6251,14 +6240,13 @@ BUILDIN(makeitem) x =script_getnum(st,5); y =script_getnum(st,6); - if(strcmp(mapname,"this")==0) - { + if(strcmp(mapname,"this")==0) { TBL_PC *sd; sd = script_rid2sd(st); if (!sd) return true; //Failed... m=sd->bl.m; } else - m=iMap->mapname2mapid(mapname); + m=map->mapname2mapid(mapname); if( m == -1 ) { ShowError("makeitem: creating map on unexistent map '%s'!\n", mapname); @@ -6273,7 +6261,7 @@ BUILDIN(makeitem) else item_tmp.identify=itemdb->isidentified2(item_data); - iMap->addflooritem(&item_tmp,amount,m,x,y,0,0,0,0); + map->addflooritem(&item_tmp,amount,m,x,y,0,0,0,0); return true; } @@ -6434,7 +6422,7 @@ BUILDIN(delitem) if( script_hasdata(st,4) ) { int account_id = script_getnum(st,4); - sd = iMap->id2sd(account_id); // + sd = map->id2sd(account_id); // if( sd == NULL ) { ShowError("script:delitem: player not found (AID=%d).\n", account_id); @@ -6494,18 +6482,15 @@ BUILDIN(delitem) /// /// delitem2 ,,,,,,,,{,} /// delitem2 "",,,,,,,,{,} -BUILDIN(delitem2) -{ +BUILDIN(delitem2) { TBL_PC *sd; struct item it; struct script_data *data; - if( script_hasdata(st,11) ) - { + if( script_hasdata(st,11) ) { int account_id = script_getnum(st,11); - sd = iMap->id2sd(account_id); // - if( sd == NULL ) - { + sd = map->id2sd(account_id); // + if( sd == NULL ) { ShowError("script:delitem2: player not found (AID=%d).\n", account_id); st->state = END; return false; @@ -6591,14 +6576,13 @@ BUILDIN(disableitemuse) * return the basic stats of sd * chk pc->readparam for available type *------------------------------------------*/ -BUILDIN(readparam) -{ +BUILDIN(readparam) { int type; TBL_PC *sd; type=script_getnum(st,2); if( script_hasdata(st,3) ) - sd=iMap->nick2sd(script_getstr(st,3)); + sd=map->nick2sd(script_getstr(st,3)); else sd=script_rid2sd(st); @@ -6621,14 +6605,13 @@ BUILDIN(readparam) * 3 : account_id * 4 : bg_id *------------------------------------------*/ -BUILDIN(getcharid) -{ +BUILDIN(getcharid) { int num; TBL_PC *sd; num = script_getnum(st,2); if( script_hasdata(st,3) ) - sd=iMap->nick2sd(script_getstr(st,3)); + sd=map->nick2sd(script_getstr(st,3)); else sd=script_rid2sd(st); @@ -6904,13 +6887,12 @@ BUILDIN(strcharinfo) * 3 : ::str * 4 : map name *------------------------------------------*/ -BUILDIN(strnpcinfo) -{ +BUILDIN(strnpcinfo) { TBL_NPC* nd; int num; char *buf,*name=NULL; - nd = iMap->id2nd(st->oid); + nd = map->id2nd(st->oid); if (!nd) { script_pushconststr(st, ""); return true; @@ -8405,15 +8387,14 @@ BUILDIN(guildgetexp) /*========================================== * Changes the guild master of a guild [Skotlex] *------------------------------------------*/ -BUILDIN(guildchangegm) -{ +BUILDIN(guildchangegm) { TBL_PC *sd; int guild_id; const char *name; guild_id = script_getnum(st,2); name = script_getstr(st,3); - sd=iMap->nick2sd(name); + sd=map->nick2sd(name); if (!sd) script_pushint(st,0); @@ -8479,13 +8460,12 @@ BUILDIN(monster) return false; } - sd = iMap->id2sd(st->rid); + sd = map->id2sd(st->rid); if (sd && strcmp(mapn, "this") == 0) m = sd->bl.m; else { - - if ( ( m = iMap->mapname2mapid(mapn) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapn) ) == -1 ) { ShowWarning("buildin_monster: Attempted to spawn monster class %d on non-existing map '%s'\n",class_, mapn); return false; } @@ -8579,12 +8559,12 @@ BUILDIN(areamonster) } } - sd = iMap->id2sd(st->rid); + sd = map->id2sd(st->rid); if (sd && strcmp(mapn, "this") == 0) m = sd->bl.m; else { - if ( ( m = iMap->mapname2mapid(mapn) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapn) ) == -1 ) { ShowWarning("buildin_areamonster: Attempted to spawn monster class %d on non-existing map '%s'\n",class_, mapn); return false; } @@ -8637,8 +8617,7 @@ static int buildin_killmonster_sub(struct block_list *bl,va_list ap) } return 0; } -BUILDIN(killmonster) -{ +BUILDIN(killmonster) { const char *mapname,*event; int16 m,allflag=0; mapname=script_getstr(st,2); @@ -8648,7 +8627,7 @@ BUILDIN(killmonster) else check_event(st, event); - if( (m=iMap->mapname2mapid(mapname))<0 ) + if( (m=map->mapname2mapid(mapname))<0 ) return true; if( maplist[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) @@ -8656,14 +8635,14 @@ BUILDIN(killmonster) if( script_hasdata(st,4) ) { if ( script_getnum(st,4) == 1 ) { - iMap->foreachinmap(buildin_killmonster_sub, m, BL_MOB, event ,allflag); + map->foreachinmap(buildin_killmonster_sub, m, BL_MOB, event ,allflag); return true; } } - iMap->freeblock_lock(); - iMap->foreachinmap(buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag); - iMap->freeblock_unlock(); + map->freeblock_lock(); + map->foreachinmap(buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag); + map->freeblock_unlock(); return true; } @@ -8683,13 +8662,12 @@ static int buildin_killmonsterall_sub(struct block_list *bl,va_list ap) status_kill(bl); return 0; } -BUILDIN(killmonsterall) -{ +BUILDIN(killmonsterall) { const char *mapname; int16 m; mapname=script_getstr(st,2); - if( (m = iMap->mapname2mapid(mapname))<0 ) + if( (m = map->mapname2mapid(mapname))<0 ) return true; if( maplist[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) @@ -8697,12 +8675,12 @@ BUILDIN(killmonsterall) if( script_hasdata(st,3) ) { if ( script_getnum(st,3) == 1 ) { - iMap->foreachinmap(buildin_killmonsterall_sub,m,BL_MOB); + map->foreachinmap(buildin_killmonsterall_sub,m,BL_MOB); return true; } } - iMap->foreachinmap(buildin_killmonsterall_sub_strip,m,BL_MOB); + map->foreachinmap(buildin_killmonsterall_sub_strip,m,BL_MOB); return true; } @@ -8736,13 +8714,13 @@ BUILDIN(clone) { check_event(st, event); - m = iMap->mapname2mapid(mapname); + m = map->mapname2mapid(mapname); if (m < 0) return true; - sd = iMap->charid2sd(char_id); + sd = map->charid2sd(char_id); if (master_id) { - msd = iMap->charid2sd(master_id); + msd = map->charid2sd(master_id); if (msd) master_id = msd->bl.id; else @@ -8778,7 +8756,7 @@ BUILDIN(donpcevent) const char* event = script_getstr(st,2); check_event(st, event); if( !npc->event_do(event) ) { - struct npc_data * nd = iMap->id2nd(st->oid); + struct npc_data * nd = map->id2nd(st->oid); ShowDebug("NPCEvent '%s' not found! (source: %s)\n",event,nd?nd->name:"Unknown"); script_pushint(st, 0); } else @@ -8869,19 +8847,16 @@ BUILDIN(initnpctimer) script->get_val(st,data); if( data_isstring(data) ) //NPC name nd = npc->name2id(script->conv_str(st, data)); - else if( data_isint(data) ) //Flag - { - nd = (struct npc_data *)iMap->id2bl(st->oid); + else if( data_isint(data) ) { + //Flag + nd = (struct npc_data *)map->id2bl(st->oid); flag = script->conv_num(st,data); - } - else - { + } else { ShowError("initnpctimer: invalid argument type #1 (needs be int or string)).\n"); return false; } - } - else - nd = (struct npc_data *)iMap->id2bl(st->oid); + } else + nd = (struct npc_data *)map->id2bl(st->oid); if( !nd ) return true; @@ -8917,19 +8892,16 @@ BUILDIN(startnpctimer) script->get_val(st,data); if( data_isstring(data) ) //NPC name nd = npc->name2id(script->conv_str(st, data)); - else if( data_isint(data) ) //Flag - { - nd = (struct npc_data *)iMap->id2bl(st->oid); + else if( data_isint(data) ) { + //Flag + nd = (struct npc_data *)map->id2bl(st->oid); flag = script->conv_num(st,data); - } - else - { + } else { ShowError("initnpctimer: invalid argument type #1 (needs be int or string)).\n"); return false; } - } - else - nd=(struct npc_data *)iMap->id2bl(st->oid); + } else + nd=(struct npc_data *)map->id2bl(st->oid); if( !nd ) return true; @@ -8946,8 +8918,7 @@ BUILDIN(startnpctimer) } /*========================================== *------------------------------------------*/ -BUILDIN(stopnpctimer) -{ +BUILDIN(stopnpctimer) { struct npc_data *nd; int flag = 0; @@ -8963,19 +8934,16 @@ BUILDIN(stopnpctimer) script->get_val(st,data); if( data_isstring(data) ) //NPC name nd = npc->name2id(script->conv_str(st, data)); - else if( data_isint(data) ) //Flag - { - nd = (struct npc_data *)iMap->id2bl(st->oid); + else if( data_isint(data) ) { + //Flag + nd = (struct npc_data *)map->id2bl(st->oid); flag = script->conv_num(st,data); - } - else - { + } else { ShowError("initnpctimer: invalid argument type #1 (needs be int or string)).\n"); return false; } - } - else - nd=(struct npc_data *)iMap->id2bl(st->oid); + } else + nd=(struct npc_data *)map->id2bl(st->oid); if( !nd ) return true; @@ -8987,8 +8955,7 @@ BUILDIN(stopnpctimer) } /*========================================== *------------------------------------------*/ -BUILDIN(getnpctimer) -{ +BUILDIN(getnpctimer) { struct npc_data *nd; TBL_PC *sd; int type = script_getnum(st,2); @@ -8997,7 +8964,7 @@ BUILDIN(getnpctimer) if( script_hasdata(st,3) ) nd = npc->name2id(script_getstr(st,3)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); if( !nd || nd->bl.type != BL_NPC ) { @@ -9006,15 +8973,12 @@ BUILDIN(getnpctimer) return false; } - switch( type ) - { + switch( type ) { case 0: val = npc->gettimerevent_tick(nd); break; case 1: - if( nd->u.scr.rid ) - { - sd = iMap->id2sd(nd->u.scr.rid); - if( !sd ) - { + if( nd->u.scr.rid ) { + sd = map->id2sd(nd->u.scr.rid); + if( !sd ) { ShowError("buildin_getnpctimer: Attached player not found!\n"); break; } @@ -9040,10 +9004,9 @@ BUILDIN(setnpctimer) if( script_hasdata(st,3) ) nd = npc->name2id(script_getstr(st,3)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( !nd || nd->bl.type != BL_NPC ) - { + if( !nd || nd->bl.type != BL_NPC ) { script_pushint(st,1); ShowError("setnpctimer: Invalid NPC.\n"); return false; @@ -9057,10 +9020,9 @@ BUILDIN(setnpctimer) /*========================================== * attaches the player rid to the timer [Celest] *------------------------------------------*/ -BUILDIN(attachnpctimer) -{ +BUILDIN(attachnpctimer) { TBL_PC *sd; - struct npc_data *nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data *nd = (struct npc_data *)map->id2bl(st->oid); if( !nd || nd->bl.type != BL_NPC ) { @@ -9070,7 +9032,7 @@ BUILDIN(attachnpctimer) } if( script_hasdata(st,2) ) - sd = iMap->nick2sd(script_getstr(st,2)); + sd = map->nick2sd(script_getstr(st,2)); else sd = script_rid2sd(st); @@ -9089,14 +9051,13 @@ BUILDIN(attachnpctimer) /*========================================== * detaches a player rid from the timer [Celest] *------------------------------------------*/ -BUILDIN(detachnpctimer) -{ +BUILDIN(detachnpctimer) { struct npc_data *nd; if( script_hasdata(st,2) ) nd = npc->name2id(script_getstr(st,2)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); if( !nd || nd->bl.type != BL_NPC ) { @@ -9115,9 +9076,8 @@ BUILDIN(detachnpctimer) * it checks if there is a player attached to the current script. [Skotlex] * If no, returns 0, if yes, returns the account_id of the attached player. *------------------------------------------*/ -BUILDIN(playerattached) -{ - if(st->rid == 0 || iMap->id2sd(st->rid) == NULL) +BUILDIN(playerattached) { + if(st->rid == 0 || map->id2sd(st->rid) == NULL) script_pushint(st,0); else script_pushint(st,st->rid); @@ -9138,7 +9098,7 @@ BUILDIN(announce) { if( flag&(BC_TARGET_MASK|BC_SOURCE_MASK) ) { // Broadcast source or broadcast region defined send_target target; - struct block_list *bl = (flag&BC_NPC) ? iMap->id2bl(st->oid) : (struct block_list *)script_rid2sd(st); // If bc_npc flag is set, use NPC as broadcast source + struct block_list *bl = (flag&BC_NPC) ? map->id2bl(st->oid) : (struct block_list *)script_rid2sd(st); // If bc_npc flag is set, use NPC as broadcast source if (bl == NULL) return true; @@ -9189,7 +9149,7 @@ BUILDIN(itemeffect) { struct item_data *item_data; nullpo_retr( 1, ( sd = script_rid2sd( st ) ) ); - nullpo_retr( 1, ( nd = (TBL_NPC *)iMap->id2bl( sd->npc_id ) ) ); + nullpo_retr( 1, ( nd = (TBL_NPC *)map->id2bl( sd->npc_id ) ) ); data = script_getdata( st, 2 ); script->get_val( st, data ); @@ -9218,8 +9178,7 @@ BUILDIN(itemeffect) { return true; } -BUILDIN(mapannounce) -{ +BUILDIN(mapannounce) { const char *mapname = script_getstr(st,2); const char *mes = script_getstr(st,3); int flag = script_getnum(st,4); @@ -9230,17 +9189,16 @@ BUILDIN(mapannounce) int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY int16 m; - if ((m = iMap->mapname2mapid(mapname)) < 0) + if ((m = map->mapname2mapid(mapname)) < 0) return true; - iMap->foreachinmap(buildin_announce_sub, m, BL_PC, - mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); + map->foreachinmap(buildin_announce_sub, m, BL_PC, + mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); return true; } /*========================================== *------------------------------------------*/ -BUILDIN(areaannounce) -{ +BUILDIN(areaannounce) { const char *mapname = script_getstr(st,2); int x0 = script_getnum(st,3); int y0 = script_getnum(st,4); @@ -9255,11 +9213,11 @@ BUILDIN(areaannounce) int fontY = script_hasdata(st,13) ? script_getnum(st,13) : 0; // default fontY int16 m; - if ((m = iMap->mapname2mapid(mapname)) < 0) + if ((m = map->mapname2mapid(mapname)) < 0) return true; - iMap->foreachinarea(buildin_announce_sub, m, x0, y0, x1, y1, BL_PC, - mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); + map->foreachinarea(buildin_announce_sub, m, x0, y0, x1, y1, BL_PC, + mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); return true; } @@ -9276,7 +9234,7 @@ BUILDIN(getusers) { case 0: if(flag&0x8) { // npc - bl = iMap->id2bl(st->oid); + bl = map->id2bl(st->oid); } else if((sd = script_rid2sd(st))!=NULL) { // pc bl = &sd->bl; @@ -9287,7 +9245,7 @@ BUILDIN(getusers) { } break; case 1: - val = iMap->getusers(); + val = map->getusers(); break; default: ShowWarning("buildin_getusers: Unknown type %d.\n", flag); @@ -9339,7 +9297,7 @@ BUILDIN(getmapguildusers) struct guild *g = NULL; str=script_getstr(st,2); gid=script_getnum(st,3); - if ((m = iMap->mapname2mapid(str)) < 0) { // map id on this server (m == -1 if not in actual map-server) + if ((m = map->mapname2mapid(str)) < 0) { // map id on this server (m == -1 if not in actual map-server) script_pushint(st,-1); return true; } @@ -9362,7 +9320,7 @@ BUILDIN(getmapusers) { const char *str; int16 m; str=script_getstr(st,2); - if( (m=iMap->mapname2mapid(str))< 0){ + if( (m=map->mapname2mapid(str))< 0){ script_pushint(st,-1); return true; } @@ -9386,12 +9344,12 @@ BUILDIN(getareausers) y0=script_getnum(st,4); x1=script_getnum(st,5); y1=script_getnum(st,6); - if( (m=iMap->mapname2mapid(str))< 0){ + if( (m=map->mapname2mapid(str))< 0){ script_pushint(st,-1); return true; } - iMap->foreachinarea(buildin_getareausers_sub, - m,x0,y0,x1,y1,BL_PC,&users); + map->foreachinarea(buildin_getareausers_sub, + m,x0,y0,x1,y1,BL_PC,&users); script_pushint(st,users); return true; } @@ -9433,12 +9391,12 @@ BUILDIN(getareadropitem) }else item=script->conv_num(st,data); - if( (m=iMap->mapname2mapid(str))< 0){ + if( (m=map->mapname2mapid(str))< 0){ script_pushint(st,-1); return true; } - iMap->foreachinarea(buildin_getareadropitem_sub, - m,x0,y0,x1,y1,BL_ITEM,item,&amount); + map->foreachinarea(buildin_getareadropitem_sub, + m,x0,y0,x1,y1,BL_ITEM,item,&amount); script_pushint(st,amount); return true; } @@ -9494,9 +9452,9 @@ BUILDIN(sc_start) { tick = script_getnum(st,3); val1 = script_getnum(st,4); if( script_hasdata(st,5) ) - bl = iMap->id2bl(script_getnum(st,5)); + bl = map->id2bl(script_getnum(st,5)); else - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) { // When there isn't a duration specified, try to get it from the skill_db @@ -9505,7 +9463,7 @@ BUILDIN(sc_start) { if( script->potion_flag == 1 && script->potion_target ) { //skill.c set the flags before running the script, this must be a potion-pitched effect. - bl = iMap->id2bl(script->potion_target); + bl = map->id2bl(script->potion_target); tick /= 2;// Thrown potions only last half. val4 = 1;// Mark that this was a thrown sc_effect } @@ -9532,9 +9490,9 @@ BUILDIN(sc_start2) { val1 = script_getnum(st,4); rate = script_getnum(st,5); if( script_hasdata(st,6) ) - bl = iMap->id2bl(script_getnum(st,6)); + bl = map->id2bl(script_getnum(st,6)); else - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) { // When there isn't a duration specified, try to get it from the skill_db @@ -9543,7 +9501,7 @@ BUILDIN(sc_start2) { if( script->potion_flag == 1 && script->potion_target ) { //skill.c set the flags before running the script, this must be a potion-pitched effect. - bl = iMap->id2bl(script->potion_target); + bl = map->id2bl(script->potion_target); tick /= 2;// Thrown potions only last half. val4 = 1;// Mark that this was a thrown sc_effect } @@ -9573,9 +9531,9 @@ BUILDIN(sc_start4) { val3 = script_getnum(st,6); val4 = script_getnum(st,7); if( script_hasdata(st,8) ) - bl = iMap->id2bl(script_getnum(st,8)); + bl = map->id2bl(script_getnum(st,8)); else - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) { // When there isn't a duration specified, try to get it from the skill_db @@ -9584,7 +9542,7 @@ BUILDIN(sc_start4) { if( script->potion_flag == 1 && script->potion_target ) { //skill.c set the flags before running the script, this must be a potion-pitched effect. - bl = iMap->id2bl(script->potion_target); + bl = map->id2bl(script->potion_target); tick /= 2;// Thrown potions only last half. } @@ -9603,12 +9561,12 @@ BUILDIN(sc_end) { type = script_getnum(st, 2); if (script_hasdata(st, 3)) - bl = iMap->id2bl(script_getnum(st, 3)); + bl = map->id2bl(script_getnum(st, 3)); else - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); if (script->potion_flag == 1 && script->potion_target) //##TODO how does this work [FlavioJS] - bl = iMap->id2bl(script->potion_target); + bl = map->id2bl(script->potion_target); if (!bl) return true; @@ -9650,9 +9608,9 @@ BUILDIN(getscrate) { type=script_getnum(st,2); rate=script_getnum(st,3); if( script_hasdata(st,4) ) //get for the bl assigned - bl = iMap->id2bl(script_getnum(st,4)); + bl = map->id2bl(script_getnum(st,4)); else - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); if (bl) rate = status->get_sc_def(bl, (sc_type)type, 10000, 10000, 0); @@ -9942,7 +9900,7 @@ BUILDIN(changebase) { int vclass; if( script_hasdata(st,3) ) - sd=iMap->id2sd(script_getnum(st,3)); + sd=map->id2sd(script_getnum(st,3)); else sd=script_rid2sd(st); @@ -9991,9 +9949,8 @@ BUILDIN(changesex) /*========================================== * Works like 'announce' but outputs in the common chat window *------------------------------------------*/ -BUILDIN(globalmes) -{ - struct block_list *bl = iMap->id2bl(st->oid); +BUILDIN(globalmes) { + struct block_list *bl = map->id2bl(st->oid); struct npc_data *nd = (struct npc_data *)bl; const char *name=NULL,*mes; @@ -10018,8 +9975,7 @@ BUILDIN(globalmes) /// Creates a waiting room (chat room) for this npc. /// /// waitingroom "",<limit>{,"<event>"{,<trigger>{,<zeny>{,<minlvl>{,<maxlvl>}}}}}; -BUILDIN(waitingroom) -{ +BUILDIN(waitingroom) { struct npc_data* nd; int pub = 1; const char* title = script_getstr(st, 2); @@ -10030,7 +9986,7 @@ BUILDIN(waitingroom) int minLvl = script_hasdata(st,7) ? script_getnum(st,7) : 1; int maxLvl = script_hasdata(st,8) ? script_getnum(st,8) : MAX_LEVEL; - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); if( nd != NULL ) chat->createnpcchat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl); @@ -10041,13 +9997,12 @@ BUILDIN(waitingroom) /// /// delwaitingroom "<npc_name>"; /// delwaitingroom; -BUILDIN(delwaitingroom) -{ +BUILDIN(delwaitingroom) { struct npc_data* nd; if( script_hasdata(st,2) ) nd = npc->name2id(script_getstr(st, 2)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); if( nd != NULL ) chat->deletenpcchat(nd); return true; @@ -10057,17 +10012,16 @@ BUILDIN(delwaitingroom) /// /// kickwaitingroomall "<npc_name>"; /// kickwaitingroomall; -BUILDIN(waitingroomkickall) -{ +BUILDIN(waitingroomkickall) { struct npc_data* nd; struct chat_data* cd; if( script_hasdata(st,2) ) nd = npc->name2id(script_getstr(st,2)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( nd != NULL && (cd=(struct chat_data *)iMap->id2bl(nd->chat_id)) != NULL ) + if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL ) chat->npckickall(cd); return true; } @@ -10076,17 +10030,16 @@ BUILDIN(waitingroomkickall) /// /// enablewaitingroomevent "<npc_name>"; /// enablewaitingroomevent; -BUILDIN(enablewaitingroomevent) -{ +BUILDIN(enablewaitingroomevent) { struct npc_data* nd; struct chat_data* cd; if( script_hasdata(st,2) ) nd = npc->name2id(script_getstr(st, 2)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( nd != NULL && (cd=(struct chat_data *)iMap->id2bl(nd->chat_id)) != NULL ) + if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL ) chat->enableevent(cd); return true; } @@ -10095,17 +10048,16 @@ BUILDIN(enablewaitingroomevent) /// /// disablewaitingroomevent "<npc_name>"; /// disablewaitingroomevent; -BUILDIN(disablewaitingroomevent) -{ +BUILDIN(disablewaitingroomevent) { struct npc_data *nd; struct chat_data *cd; if( script_hasdata(st,2) ) nd = npc->name2id(script_getstr(st, 2)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( nd != NULL && (cd=(struct chat_data *)iMap->id2bl(nd->chat_id)) != NULL ) + if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL ) chat->disableevent(cd); return true; } @@ -10124,8 +10076,7 @@ BUILDIN(disablewaitingroomevent) /// /// getwaitingroomstate(<type>,"<npc_name>") -> <info> /// getwaitingroomstate(<type>) -> <info> -BUILDIN(getwaitingroomstate) -{ +BUILDIN(getwaitingroomstate) { struct npc_data *nd; struct chat_data *cd; int type; @@ -10134,16 +10085,14 @@ BUILDIN(getwaitingroomstate) if( script_hasdata(st,3) ) nd = npc->name2id(script_getstr(st, 3)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( nd == NULL || (cd=(struct chat_data *)iMap->id2bl(nd->chat_id)) == NULL ) - { + if( nd == NULL || (cd=(struct chat_data *)map->id2bl(nd->chat_id)) == NULL ) { script_pushint(st, -1); return true; } - switch(type) - { + switch(type) { case 0: script_pushint(st, cd->users); break; case 1: script_pushint(st, cd->limit); break; case 2: script_pushint(st, cd->trigger&0x7f); break; @@ -10180,8 +10129,8 @@ BUILDIN(warpwaitingpc) { struct chat_data* cd; TBL_PC* sd; - nd = (struct npc_data *)iMap->id2bl(st->oid); - if( nd == NULL || (cd=(struct chat_data *)iMap->id2bl(nd->chat_id)) == NULL ) + nd = (struct npc_data *)map->id2bl(st->oid); + if( nd == NULL || (cd=(struct chat_data *)map->id2bl(nd->chat_id)) == NULL ) return true; map_name = script_getstr(st,2); @@ -10239,11 +10188,10 @@ void script_detach_rid(struct script_state* st) { /*========================================== * Attach sd char id to script and detach current one if any *------------------------------------------*/ -BUILDIN(attachrid) -{ +BUILDIN(attachrid) { int rid = script_getnum(st,2); - if (iMap->id2sd(rid) != NULL) { + if (map->id2sd(rid) != NULL) { script_detach_rid(st); st->rid = rid; @@ -10264,9 +10212,8 @@ BUILDIN(detachrid) /*========================================== * Chk if account connected, (and charid from account if specified) *------------------------------------------*/ -BUILDIN(isloggedin) -{ - TBL_PC* sd = iMap->id2sd(script_getnum(st,2)); +BUILDIN(isloggedin) { + TBL_PC* sd = map->id2sd(script_getnum(st,2)); if (script_hasdata(st,3) && sd && sd->status.char_id != script_getnum(st,3)) sd = NULL; @@ -10278,8 +10225,7 @@ BUILDIN(isloggedin) /*========================================== * *------------------------------------------*/ -BUILDIN(setmapflagnosave) -{ +BUILDIN(setmapflagnosave) { int16 m,x,y; unsigned short mapindex; const char *str,*str2; @@ -10288,7 +10234,7 @@ BUILDIN(setmapflagnosave) str2=script_getstr(st,3); x=script_getnum(st,4); y=script_getnum(st,5); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); mapindex = mapindex_name2id(str2); if(m >= 0 && mapindex) { @@ -10309,7 +10255,7 @@ BUILDIN(getmapflag) str=script_getstr(st,2); i=script_getnum(st,3); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m >= 0) { switch(i) { case MF_NOMEMO: script_pushint(st,maplist[m].flag.nomemo); break; @@ -10403,7 +10349,7 @@ BUILDIN(setmapflag) { val = script_getnum(st, 4); } - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m >= 0) { switch(i) { @@ -10416,7 +10362,7 @@ BUILDIN(setmapflag) { case MF_PVP: maplist[m].flag.pvp = 1; if( !battle_config.pk_mode ) { - iMap->foreachinmap(script_mapflag_pvp_sub,m,BL_PC); + map->foreachinmap(script_mapflag_pvp_sub,m,BL_PC); } break; case MF_PVP_NOPARTY: maplist[m].flag.pvp_noparty = 1; break; @@ -10491,7 +10437,7 @@ BUILDIN(removemapflag) { str=script_getstr(st,2); i=script_getnum(st,3); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m >= 0) { switch(i) { case MF_NOMEMO: maplist[m].flag.nomemo = 0; break; @@ -10544,7 +10490,7 @@ BUILDIN(removemapflag) { case MF_NOWARPTO: maplist[m].flag.nowarpto = 0; break; case MF_NIGHTMAREDROP: maplist[m].flag.pvp_nightmaredrop = 0; break; case MF_ZONE: - iMap->zone_change2(m, maplist[m].prev_zone); + map->zone_change2(m, maplist[m].prev_zone); break; case MF_NOCOMMAND: maplist[m].nocommand = 0; break; case MF_NODROP: maplist[m].flag.nodrop = 0; break; @@ -10577,11 +10523,11 @@ BUILDIN(pvpon) { struct block_list bl; str = script_getstr(st,2); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if( m < 0 || maplist[m].flag.pvp ) return true; // nothing to do - iMap->zone_change2(m, strdb_get(zone_db, MAP_ZONE_PVP_NAME)); + map->zone_change2(m, strdb_get(zone_db, MAP_ZONE_PVP_NAME)); maplist[m].flag.pvp = 1; clif->map_property_mapall(m, MAPPROPERTY_FREEPVPZONE); bl.type = BL_NUL; @@ -10627,11 +10573,11 @@ BUILDIN(pvpoff) { struct block_list bl; str=script_getstr(st,2); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m < 0 || !maplist[m].flag.pvp) return true; //fixed Lupus - iMap->zone_change2(m, maplist[m].prev_zone); + map->zone_change2(m, maplist[m].prev_zone); maplist[m].flag.pvp = 0; clif->map_property_mapall(m, MAPPROPERTY_NOTHING); bl.type = BL_NUL; @@ -10641,7 +10587,7 @@ BUILDIN(pvpoff) { if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris] return true; - iMap->foreachinmap(buildin_pvpoff_sub, m, BL_PC); + map->foreachinmap(buildin_pvpoff_sub, m, BL_PC); return true; } @@ -10650,10 +10596,10 @@ BUILDIN(gvgon) { const char *str; str=script_getstr(st,2); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m >= 0 && !maplist[m].flag.gvg) { struct block_list bl; - iMap->zone_change2(m, strdb_get(zone_db, MAP_ZONE_GVG_NAME)); + map->zone_change2(m, strdb_get(zone_db, MAP_ZONE_GVG_NAME)); maplist[m].flag.gvg = 1; clif->map_property_mapall(m, MAPPROPERTY_AGITZONE); bl.type = BL_NUL; @@ -10668,10 +10614,10 @@ BUILDIN(gvgoff) { const char *str; str=script_getstr(st,2); - m = iMap->mapname2mapid(str); + m = map->mapname2mapid(str); if(m >= 0 && maplist[m].flag.gvg) { struct block_list bl; - iMap->zone_change2(m, maplist[m].prev_zone); + map->zone_change2(m, maplist[m].prev_zone); maplist[m].flag.gvg = 0; clif->map_property_mapall(m, MAPPROPERTY_NOTHING); bl.type = BL_NUL; @@ -10686,8 +10632,7 @@ BUILDIN(gvgoff) { * emotion emotion#, <target: 0 - NPC, 1 - PC>, <NPC/PC name> *------------------------------------------*/ //Optional second parameter added by [Skotlex] -BUILDIN(emotion) -{ +BUILDIN(emotion) { int type; int player=0; @@ -10701,20 +10646,17 @@ BUILDIN(emotion) if (player) { TBL_PC *sd = NULL; if( script_hasdata(st,4) ) - sd = iMap->nick2sd(script_getstr(st,4)); + sd = map->nick2sd(script_getstr(st,4)); else sd = script_rid2sd(st); if (sd) clif->emotion(&sd->bl,type); + } else if( script_hasdata(st,4) ) { + TBL_NPC *nd = npc->name2id(script_getstr(st,4)); + if(nd) + clif->emotion(&nd->bl,type); } else - if( script_hasdata(st,4) ) - { - TBL_NPC *nd = npc->name2id(script_getstr(st,4)); - if(nd) - clif->emotion(&nd->bl,type); - } - else - clif->emotion(iMap->id2bl(st->oid),type); + clif->emotion(map->id2bl(st->oid),type); return true; } @@ -10745,52 +10687,47 @@ static int buildin_maprespawnguildid_sub_mob(struct block_list *bl,va_list ap) return 0; } -BUILDIN(maprespawnguildid) -{ +BUILDIN(maprespawnguildid) { const char *mapname=script_getstr(st,2); int g_id=script_getnum(st,3); int flag=script_getnum(st,4); - int16 m=iMap->mapname2mapid(mapname); + int16 m=map->mapname2mapid(mapname); if(m == -1) return true; //Catch ALL players (in case some are 'between maps' on execution time) - iMap->map_foreachpc(buildin_maprespawnguildid_sub_pc,m,g_id,flag); + map->map_foreachpc(buildin_maprespawnguildid_sub_pc,m,g_id,flag); if (flag&4) //Remove script mobs. - iMap->foreachinmap(buildin_maprespawnguildid_sub_mob,m,BL_MOB); + map->foreachinmap(buildin_maprespawnguildid_sub_mob,m,BL_MOB); return true; } -BUILDIN(agitstart) -{ - if(iMap->agit_flag==1) return true; // Agit already Start. - iMap->agit_flag=1; +BUILDIN(agitstart) { + if(map->agit_flag==1) return true; // Agit already Start. + map->agit_flag=1; guild->agit_start(); return true; } -BUILDIN(agitend) -{ - if(iMap->agit_flag==0) return true; // Agit already End. - iMap->agit_flag=0; +BUILDIN(agitend) { + if(map->agit_flag==0) return true; // Agit already End. + map->agit_flag=0; guild->agit_end(); return true; } -BUILDIN(agitstart2) -{ - if(iMap->agit2_flag==1) return true; // Agit2 already Start. - iMap->agit2_flag=1; +BUILDIN(agitstart2) { + if(map->agit2_flag==1) return true; // Agit2 already Start. + map->agit2_flag=1; guild->agit2_start(); return true; } -BUILDIN(agitend2) -{ - if(iMap->agit2_flag==0) return true; // Agit2 already End. - iMap->agit2_flag=0; +BUILDIN(agitend2) { + if(map->agit2_flag==0) return true; // Agit2 already End. + map->agit2_flag=0; guild->agit2_end(); return true; } @@ -10798,32 +10735,29 @@ BUILDIN(agitend2) /*========================================== * Returns whether woe is on or off. // choice script *------------------------------------------*/ -BUILDIN(agitcheck) -{ - script_pushint(st,iMap->agit_flag); +BUILDIN(agitcheck) { + script_pushint(st,map->agit_flag); return true; } /*========================================== * Returns whether woese is on or off. // choice script *------------------------------------------*/ -BUILDIN(agitcheck2) -{ - script_pushint(st,iMap->agit2_flag); +BUILDIN(agitcheck2) { + script_pushint(st,map->agit2_flag); return true; } /// Sets the guild_id of this npc. /// /// flagemblem <guild_id>; -BUILDIN(flagemblem) -{ +BUILDIN(flagemblem) { TBL_NPC* nd; int g_id = script_getnum(st,2); if(g_id < 0) return true; - nd = (TBL_NPC*)iMap->id2nd(st->oid); + nd = (TBL_NPC*)map->id2nd(st->oid); if( nd == NULL ) { ShowError("script:flagemblem: npc %d not found\n", st->oid); } else if( nd->subtype != SCRIPT ) { @@ -10994,7 +10928,7 @@ BUILDIN(successremovecards) { if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -11016,7 +10950,7 @@ BUILDIN(successremovecards) { pc->delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT); if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } clif->misceffect(&sd->bl,3); @@ -11061,7 +10995,7 @@ BUILDIN(failedremovecards) { if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -11090,7 +11024,7 @@ BUILDIN(failedremovecards) { if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } clif->misceffect(&sd->bl,2); @@ -11104,8 +11038,8 @@ BUILDIN(failedremovecards) { * type: 0=everyone, 1=guild, 2=party; [Reddozen] * improved by [Lance] * ================================================================*/ -BUILDIN(mapwarp) // Added by RoVeRT -{ +// Added by RoVeRT +BUILDIN(mapwarp) { int x,y,m,check_val=0,check_ID=0,i=0; struct guild *g = NULL; struct party_data *p = NULL; @@ -11121,7 +11055,7 @@ BUILDIN(mapwarp) // Added by RoVeRT check_ID=script_getnum(st,7); } - if((m=iMap->mapname2mapid(mapname))< 0) + if((m=map->mapname2mapid(mapname))< 0) return true; if(!(index=mapindex_name2id(str))) @@ -11150,7 +11084,7 @@ BUILDIN(mapwarp) // Added by RoVeRT } break; default: - iMap->foreachinmap(buildin_areawarp_sub,m,BL_PC,index,x,y,0,0); + map->foreachinmap(buildin_areawarp_sub,m,BL_PC,index,x,y,0,0); break; } @@ -11166,8 +11100,8 @@ static int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by Ro return 0; } -BUILDIN(mobcount) // Added by RoVeRT -{ +// Added by RoVeRT +BUILDIN(mobcount) { const char *mapname,*event; int16 m; mapname=script_getstr(st,2); @@ -11186,7 +11120,7 @@ BUILDIN(mobcount) // Added by RoVeRT script_pushint(st,-1); return true; } - } else if( (m = iMap->mapname2mapid(mapname)) < 0 ) { + } else if( (m = map->mapname2mapid(mapname)) < 0 ) { script_pushint(st,-1); return true; } @@ -11196,16 +11130,15 @@ BUILDIN(mobcount) // Added by RoVeRT return true; } - script_pushint(st,iMap->foreachinmap(buildin_mobcount_sub, m, BL_MOB, event)); + script_pushint(st,map->foreachinmap(buildin_mobcount_sub, m, BL_MOB, event)); return true; } -BUILDIN(marriage) -{ +BUILDIN(marriage) { const char *partner=script_getstr(st,2); TBL_PC *sd=script_rid2sd(st); - TBL_PC *p_sd=iMap->nick2sd(partner); + TBL_PC *p_sd=map->nick2sd(partner); if(sd==NULL || p_sd==NULL || pc->marriage(sd,p_sd) < 0){ script_pushint(st,0); @@ -11214,13 +11147,12 @@ BUILDIN(marriage) script_pushint(st,1); return true; } -BUILDIN(wedding_effect) -{ +BUILDIN(wedding_effect) { TBL_PC *sd=script_rid2sd(st); struct block_list *bl; if(sd==NULL) { - bl=iMap->id2bl(st->oid); + bl=map->id2bl(st->oid); } else bl=&sd->bl; clif->wedding_effect(bl); @@ -11237,12 +11169,11 @@ BUILDIN(divorce) return true; } -BUILDIN(ispartneron) -{ +BUILDIN(ispartneron) { TBL_PC *sd=script_rid2sd(st); if(sd==NULL || !pc->ismarried(sd) || - iMap->charid2sd(sd->status.partner_id) == NULL) { + map->charid2sd(sd->status.partner_id) == NULL) { script_pushint(st,0); return true; } @@ -11308,7 +11239,7 @@ BUILDIN(warppartner) TBL_PC *p_sd=NULL; if(sd==NULL || !pc->ismarried(sd) || - (p_sd=iMap->charid2sd(sd->status.partner_id)) == NULL) { + (p_sd=map->charid2sd(sd->status.partner_id)) == NULL) { script_pushint(st,0); return true; } @@ -11418,16 +11349,15 @@ BUILDIN(setwall) { shootable = script_getnum(st,7); name = script_getstr(st,8); - if( (m = iMap->mapname2mapid(mapname)) < 0 ) + if( (m = map->mapname2mapid(mapname)) < 0 ) return true; // Invalid Map - iMap->iwall_set(m, x, y, size, dir, shootable, name); + map->iwall_set(m, x, y, size, dir, shootable, name); return true; } -BUILDIN(delwall) -{ +BUILDIN(delwall) { const char *name = script_getstr(st,2); - iMap->iwall_remove(name); + map->iwall_remove(name); return true; } @@ -11439,8 +11369,7 @@ BUILDIN(delwall) /// 1 - maximum hp /// 2 - current hp /// -BUILDIN(guardianinfo) -{ +BUILDIN(guardianinfo) { const char* mapname = mapindex_getmapname(script_getstr(st,2),NULL); int id = script_getnum(st,3); int type = script_getnum(st,4); @@ -11448,27 +11377,23 @@ BUILDIN(guardianinfo) struct guild_castle* gc = guild->mapname2gc(mapname); struct mob_data* gd; - if( gc == NULL || id < 0 || id >= MAX_GUARDIANS ) - { + if( gc == NULL || id < 0 || id >= MAX_GUARDIANS ) { script_pushint(st,-1); return true; } if( type == 0 ) script_pushint(st, gc->guardian[id].visible); + else if( !gc->guardian[id].visible ) + script_pushint(st,-1); + else if( (gd = map->id2md(gc->guardian[id].id)) == NULL ) + script_pushint(st,-1); + else if( type == 1 ) + script_pushint(st,gd->status.max_hp); + else if( type == 2 ) + script_pushint(st,gd->status.hp); else - if( !gc->guardian[id].visible ) - script_pushint(st,-1); - else - if( (gd = iMap->id2md(gc->guardian[id].id)) == NULL ) - script_pushint(st,-1); - else - { - if ( type == 1 ) script_pushint(st,gd->status.max_hp); - else if( type == 2 ) script_pushint(st,gd->status.hp); - else - script_pushint(st,-1); - } + script_pushint(st,-1); return true; } @@ -11819,10 +11744,9 @@ BUILDIN(undisguise) * Transform a bl to another _class, * @type unused *------------------------------------------*/ -BUILDIN(classchange) -{ +BUILDIN(classchange) { int _class,type; - struct block_list *bl=iMap->id2bl(st->oid); + struct block_list *bl=map->id2bl(st->oid); if(bl==NULL) return true; @@ -11841,7 +11765,7 @@ BUILDIN(misceffect) type=script_getnum(st,2); if(st->oid && st->oid != npc->fake_nd->bl.id) { - struct block_list *bl = iMap->id2bl(st->oid); + struct block_list *bl = map->id2bl(st->oid); if (bl) clif->specialeffect(bl,type,AREA); } else{ @@ -11903,28 +11827,26 @@ BUILDIN(playBGMall) { int y1 = script_getnum(st,7); int m; - if ( ( m = iMap->mapname2mapid(mapname) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapname) ) == -1 ) { ShowWarning("playBGMall: Attempted to play song '%s' on non-existent map '%s'\n",name, mapname); return true; } - iMap->foreachinarea(playBGM_sub, m, x0, y0, x1, y1, BL_PC, name); - } - else if( script_hasdata(st,3) ) - {// entire map + map->foreachinarea(playBGM_sub, m, x0, y0, x1, y1, BL_PC, name); + } else if( script_hasdata(st,3) ) { + // entire map const char* mapname = script_getstr(st,3); int m; - if ( ( m = iMap->mapname2mapid(mapname) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapname) ) == -1 ) { ShowWarning("playBGMall: Attempted to play song '%s' on non-existent map '%s'\n",name, mapname); return true; } - iMap->foreachinmap(playBGM_sub, m, BL_PC, name); - } - else - {// entire server - iMap->map_foreachpc(&playBGM_foreachpc_sub, name); + map->foreachinmap(playBGM_sub, m, BL_PC, name); + } else { + // entire server + map->map_foreachpc(&playBGM_foreachpc_sub, name); } return true; @@ -11960,20 +11882,19 @@ int soundeffect_sub(struct block_list* bl,va_list ap) * Play a sound effect (.wav) on multiple clients * soundeffectall "<filepath>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>}; *------------------------------------------*/ -BUILDIN(soundeffectall) -{ +BUILDIN(soundeffectall) { struct block_list* bl; const char* name; int type; - bl = (st->rid) ? &(script_rid2sd(st)->bl) : iMap->id2bl(st->oid); + bl = (st->rid) ? &(script_rid2sd(st)->bl) : map->id2bl(st->oid); if (!bl) return true; name = script_getstr(st,2); type = script_getnum(st,3); - //FIXME: enumerating map squares (iMap->foreach) is slower than enumerating the list of online players (iMap->foreachpc?) [ultramage] + //FIXME: enumerating map squares (map->foreach) is slower than enumerating the list of online players (map->foreachpc?) [ultramage] if(!script_hasdata(st,4)) { // area around clif->soundeffectall(bl, name, type, AREA); @@ -11982,12 +11903,12 @@ BUILDIN(soundeffectall) const char *mapname = script_getstr(st,4); int m; - if ( ( m = iMap->mapname2mapid(mapname) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapname) ) == -1 ) { ShowWarning("soundeffectall: Attempted to play song '%s' (type %d) on non-existent map '%s'\n",name,type, mapname); return true; } - iMap->foreachinmap(soundeffect_sub, m, BL_PC, name, type); + map->foreachinmap(soundeffect_sub, m, BL_PC, name, type); } else if(script_hasdata(st,8)) { // specified part of map const char *mapname = script_getstr(st,4); int x0 = script_getnum(st,5); @@ -11996,12 +11917,12 @@ BUILDIN(soundeffectall) int y1 = script_getnum(st,8); int m; - if ( ( m = iMap->mapname2mapid(mapname) ) == -1 ) { + if ( ( m = map->mapname2mapid(mapname) ) == -1 ) { ShowWarning("soundeffectall: Attempted to play song '%s' (type %d) on non-existent map '%s'\n",name,type, mapname); return true; } - iMap->foreachinarea(soundeffect_sub, m, x0, y0, x1, y1, BL_PC, name, type); + map->foreachinarea(soundeffect_sub, m, x0, y0, x1, y1, BL_PC, name, type); } else { ShowError("buildin_soundeffectall: insufficient arguments for specific area broadcast.\n"); } @@ -12192,9 +12113,8 @@ BUILDIN(skilleffect) *------------------------------------------*/ /// npcskilleffect <skill id>,<level>,<x>,<y> /// npcskilleffect "<skill name>",<level>,<x>,<y> -BUILDIN(npcskilleffect) -{ - struct block_list *bl= iMap->id2bl(st->oid); +BUILDIN(npcskilleffect) { + struct block_list *bl= map->id2bl(st->oid); uint16 skill_id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) ); uint16 skill_lv=script_getnum(st,3); @@ -12210,9 +12130,8 @@ BUILDIN(npcskilleffect) /*========================================== * Special effects [Valaris] *------------------------------------------*/ -BUILDIN(specialeffect) -{ - struct block_list *bl=iMap->id2bl(st->oid); +BUILDIN(specialeffect) { + struct block_list *bl=map->id2bl(st->oid); int type = script_getnum(st,2); enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA; @@ -12239,14 +12158,13 @@ BUILDIN(specialeffect) return true; } -BUILDIN(specialeffect2) -{ +BUILDIN(specialeffect2) { TBL_PC *sd=script_rid2sd(st); int type = script_getnum(st,2); enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA; if( script_hasdata(st,4) ) - sd = iMap->nick2sd(script_getstr(st,4)); + sd = map->nick2sd(script_getstr(st,4)); if (sd) clif->specialeffect(&sd->bl, type, target); @@ -12282,8 +12200,7 @@ BUILDIN(nude) /*========================================== * gmcommand [MouseJstr] *------------------------------------------*/ -BUILDIN(atcommand) -{ +BUILDIN(atcommand) { TBL_PC *sd, *dummy_sd = NULL; int fd; const char* cmd; @@ -12298,9 +12215,8 @@ BUILDIN(atcommand) sd = dummy_sd = pc->get_dummy_sd(); fd = 0; - if (st->oid) - { - struct block_list* bl = iMap->id2bl(st->oid); + if (st->oid) { + struct block_list* bl = map->id2bl(st->oid); memcpy(&sd->bl, bl, sizeof(struct block_list)); if (bl->type == BL_NPC) safestrncpy(sd->status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH); @@ -12422,29 +12338,23 @@ BUILDIN(gethominfo) /// Retrieves information about character's mercenary /// getmercinfo <type>[,<char id>]; -BUILDIN(getmercinfo) -{ +BUILDIN(getmercinfo) { int type, char_id; struct map_session_data* sd; struct mercenary_data* md; type = script_getnum(st,2); - if( script_hasdata(st,3) ) - { + if( script_hasdata(st,3) ) { char_id = script_getnum(st,3); - if( ( sd = iMap->charid2sd(char_id) ) == NULL ) - { + if( ( sd = map->charid2sd(char_id) ) == NULL ) { ShowError("buildin_getmercinfo: No such character (char_id=%d).\n", char_id); script_pushnil(st); return false; } - } - else - { - if( ( sd = script_rid2sd(st) ) == NULL ) - { + } else { + if( ( sd = script_rid2sd(st) ) == NULL ) { script_pushnil(st); return true; } @@ -12549,15 +12459,14 @@ BUILDIN(movenpc) { /*========================================== * message [MouseJstr] *------------------------------------------*/ -BUILDIN(message) -{ +BUILDIN(message) { const char *msg,*player; TBL_PC *pl_sd = NULL; player = script_getstr(st,2); msg = script_getstr(st,3); - if((pl_sd=iMap->nick2sd((char *) player)) == NULL) + if((pl_sd=map->nick2sd((char *) player)) == NULL) return true; clif->message(pl_sd->fd, msg); @@ -12567,12 +12476,11 @@ BUILDIN(message) /*========================================== * npctalk (sends message to surrounding area) *------------------------------------------*/ -BUILDIN(npctalk) -{ +BUILDIN(npctalk) { const char* str; char name[NAME_LENGTH], message[256]; - struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid); str = script_getstr(st,2); if(nd) @@ -12592,7 +12500,7 @@ BUILDIN(npcspeed) { int speed; speed = script_getnum(st,2); - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); if( nd ) { unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit @@ -12604,7 +12512,7 @@ BUILDIN(npcspeed) { } // make an npc walk to a position [Valaris] BUILDIN(npcwalkto) { - struct npc_data *nd=(struct npc_data *)iMap->id2bl(st->oid); + struct npc_data *nd=(struct npc_data *)map->id2bl(st->oid); int x=0,y=0; x=script_getnum(st,2); @@ -12624,7 +12532,7 @@ BUILDIN(npcwalkto) { } // stop an npc's movement [Valaris] BUILDIN(npcstop) { - struct npc_data *nd = (struct npc_data *)iMap->id2bl(st->oid); + struct npc_data *nd = (struct npc_data *)map->id2bl(st->oid); if( nd ) { unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit @@ -12746,7 +12654,7 @@ BUILDIN(getmapxy) switch (type){ case 0: //Get Character Position if( script_hasdata(st,6) ) - sd=iMap->nick2sd(script_getstr(st,6)); + sd=map->nick2sd(script_getstr(st,6)); else sd=script_rid2sd(st); @@ -12761,11 +12669,11 @@ BUILDIN(getmapxy) if (nd) bl = &nd->bl; } else //In case the origin is not an npc? - bl=iMap->id2bl(st->oid); + bl=map->id2bl(st->oid); break; case 2: //Get Pet Position if(script_hasdata(st,6)) - sd=iMap->nick2sd(script_getstr(st,6)); + sd=map->nick2sd(script_getstr(st,6)); else sd=script_rid2sd(st); @@ -12776,7 +12684,7 @@ BUILDIN(getmapxy) break; //Not supported? case 4: //Get Homun Position if(script_hasdata(st,6)) - sd=iMap->nick2sd(script_getstr(st,6)); + sd=map->nick2sd(script_getstr(st,6)); else sd=script_rid2sd(st); @@ -12785,7 +12693,7 @@ BUILDIN(getmapxy) break; case 5: //Get Mercenary Position if(script_hasdata(st,6)) - sd=iMap->nick2sd(script_getstr(st,6)); + sd=map->nick2sd(script_getstr(st,6)); else sd=script_rid2sd(st); @@ -12794,7 +12702,7 @@ BUILDIN(getmapxy) break; case 6: //Get Elemental Position if(script_hasdata(st,6)) - sd=iMap->nick2sd(script_getstr(st,6)); + sd=map->nick2sd(script_getstr(st,6)); else sd=script_rid2sd(st); @@ -12909,15 +12817,13 @@ BUILDIN(summon) /*========================================== * Checks whether it is daytime/nighttime *------------------------------------------*/ -BUILDIN(isnight) -{ - script_pushint(st,(iMap->night_flag == 1)); +BUILDIN(isnight) { + script_pushint(st,(map->night_flag == 1)); return true; } -BUILDIN(isday) -{ - script_pushint(st,(iMap->night_flag == 0)); +BUILDIN(isday) { + script_pushint(st,(map->night_flag == 0)); return true; } @@ -13113,14 +13019,12 @@ BUILDIN(getrefine) { /*======================================================= * Day/Night controls *-------------------------------------------------------*/ -BUILDIN(night) -{ - if (iMap->night_flag != 1) pc->map_night_timer(pc->night_timer_tid, 0, 0, 1); +BUILDIN(night) { + if (map->night_flag != 1) pc->map_night_timer(pc->night_timer_tid, 0, 0, 1); return true; } -BUILDIN(day) -{ - if (iMap->night_flag != 0) pc->map_day_timer(pc->day_timer_tid, 0, 0, 1); +BUILDIN(day) { + if (map->night_flag != 0) pc->map_day_timer(pc->day_timer_tid, 0, 0, 1); return true; } @@ -14467,8 +14371,7 @@ BUILDIN(npcshopdelitem) } //Sets a script to attach to a shop npc. -BUILDIN(npcshopattach) -{ +BUILDIN(npcshopattach) { const char* npcname = script_getstr(st,2); struct npc_data* nd = npc->name2id(npcname); int flag = 1; @@ -14483,7 +14386,7 @@ BUILDIN(npcshopattach) } if (flag) - nd->master_nd = ((struct npc_data *)iMap->id2bl(st->oid)); + nd->master_nd = ((struct npc_data *)map->id2bl(st->oid)); else nd->master_nd = NULL; @@ -14617,7 +14520,7 @@ BUILDIN(checkvending) // check vending [Nab4] TBL_PC *sd = NULL; if(script_hasdata(st,2)) - sd = iMap->nick2sd(script_getstr(st,2)); + sd = map->nick2sd(script_getstr(st,2)); else sd = script_rid2sd(st); @@ -14630,12 +14533,12 @@ BUILDIN(checkvending) // check vending [Nab4] } -BUILDIN(checkchatting) // check chatting [Marka] -{ +// check chatting [Marka] +BUILDIN(checkchatting) { TBL_PC *sd = NULL; if(script_hasdata(st,2)) - sd = iMap->nick2sd(script_getstr(st,2)); + sd = map->nick2sd(script_getstr(st,2)); else sd = script_rid2sd(st); @@ -14647,12 +14550,11 @@ BUILDIN(checkchatting) // check chatting [Marka] return true; } -BUILDIN(checkidle) -{ +BUILDIN(checkidle) { TBL_PC *sd = NULL; if (script_hasdata(st, 2)) - sd = iMap->nick2sd(script_getstr(st, 2)); + sd = map->nick2sd(script_getstr(st, 2)); else sd = script_rid2sd(st); @@ -14775,12 +14677,10 @@ BUILDIN(axtoi) } // [zBuffer] List of player cont commands ---> -BUILDIN(rid2name) -{ +BUILDIN(rid2name) { struct block_list *bl = NULL; int rid = script_getnum(st,2); - if((bl = iMap->id2bl(rid))) - { + if((bl = map->id2bl(rid))) { switch(bl->type) { case BL_MOB: script_pushstrcopy(st,((TBL_MOB*)bl)->name); break; case BL_PC: script_pushstrcopy(st,((TBL_PC*)bl)->status.name); break; @@ -14800,8 +14700,7 @@ BUILDIN(rid2name) return true; } -BUILDIN(pcblockmove) -{ +BUILDIN(pcblockmove) { int id, flag; TBL_PC *sd = NULL; @@ -14809,7 +14708,7 @@ BUILDIN(pcblockmove) flag = script_getnum(st,3); if(id) - sd = iMap->id2sd(id); + sd = map->id2sd(id); else sd = script_rid2sd(st); @@ -14819,8 +14718,7 @@ BUILDIN(pcblockmove) return true; } -BUILDIN(pcfollow) -{ +BUILDIN(pcfollow) { int id, targetid; TBL_PC *sd = NULL; @@ -14829,7 +14727,7 @@ BUILDIN(pcfollow) targetid = script_getnum(st,3); if(id) - sd = iMap->id2sd(id); + sd = map->id2sd(id); else sd = script_rid2sd(st); @@ -14848,7 +14746,7 @@ BUILDIN(pcstopfollow) id = script_getnum(st,2); if(id) - sd = iMap->id2sd(id); + sd = map->id2sd(id); else sd = script_rid2sd(st); @@ -14869,7 +14767,7 @@ BUILDIN(pcstopfollow) BUILDIN(unitwalk) { struct block_list* bl; - bl = iMap->id2bl(script_getnum(st,2)); + bl = map->id2bl(script_getnum(st,2)); if( bl == NULL ) { script_pushint(st, 0); return true; @@ -14884,7 +14782,7 @@ BUILDIN(unitwalk) { script_pushint(st, unit->walktoxy(bl,x,y,0));// We'll use harder calculations. } else { int map_id = script_getnum(st,3); - script_pushint(st, unit->walktobl(bl,iMap->id2bl(map_id),65025,1)); + script_pushint(st, unit->walktobl(bl,map->id2bl(map_id),65025,1)); } return true; @@ -14895,7 +14793,7 @@ BUILDIN(unitwalk) { /// unitkill <unit_id>; BUILDIN(unitkill) { - struct block_list* bl = iMap->id2bl(script_getnum(st,2)); + struct block_list* bl = map->id2bl(script_getnum(st,2)); if( bl != NULL ) status_kill(bl); @@ -14920,14 +14818,14 @@ BUILDIN(unitwarp) { y = (short)script_getnum(st,5); if (!unit_id) //Warp the script's runner - bl = iMap->id2bl(st->rid); + bl = map->id2bl(st->rid); else - bl = iMap->id2bl(unit_id); + bl = map->id2bl(unit_id); if( strcmp(mapname,"this") == 0 ) mapid = bl?bl->m:-1; else - mapid = iMap->mapname2mapid(mapname); + mapid = map->mapname2mapid(mapname); if( mapid >= 0 && bl != NULL ) { unit->bl2ud2(bl); // ensure ((TBL_NPC*)bl)->ud is safe to edit @@ -14946,15 +14844,14 @@ BUILDIN(unitwarp) { /// /// unitattack(<unit_id>,"<target name>"{,<action type>}) -> <bool> /// unitattack(<unit_id>,<target_id>{,<action type>}) -> <bool> -BUILDIN(unitattack) -{ +BUILDIN(unitattack) { struct block_list* unit_bl; struct block_list* target_bl = NULL; struct script_data* data; int actiontype = 0; // get unit - unit_bl = iMap->id2bl(script_getnum(st,2)); + unit_bl = map->id2bl(script_getnum(st,2)); if( unit_bl == NULL ) { script_pushint(st, 0); return true; @@ -14962,13 +14859,12 @@ BUILDIN(unitattack) data = script_getdata(st, 3); script->get_val(st, data); - if( data_isstring(data) ) - { - TBL_PC* sd = iMap->nick2sd(script->conv_str(st, data)); + if( data_isstring(data) ) { + TBL_PC* sd = map->nick2sd(script->conv_str(st, data)); if( sd != NULL ) target_bl = &sd->bl; } else - target_bl = iMap->id2bl(script->conv_num(st, data)); + target_bl = map->id2bl(script->conv_num(st, data)); // request the attack if( target_bl == NULL ) { @@ -15010,9 +14906,8 @@ BUILDIN(unitstop) { unit_id = script_getnum(st,2); - bl = iMap->id2bl(unit_id); - if( bl != NULL ) - { + bl = map->id2bl(unit_id); + if( bl != NULL ) { unit->bl2ud2(bl); // ensure ((TBL_NPC*)bl)->ud is safe to edit unit->stop_attack(bl); unit->stop_walking(bl,4); @@ -15034,7 +14929,7 @@ BUILDIN(unittalk) { unit_id = script_getnum(st,2); message = script_getstr(st, 3); - bl = iMap->id2bl(unit_id); + bl = map->id2bl(unit_id); if( bl != NULL ) { struct StringBuf sbuf; StrBuf->Init(&sbuf); @@ -15053,15 +14948,14 @@ BUILDIN(unittalk) { /// unitemote <unit_id>,<emotion>; /// /// @see e_* in const.txt -BUILDIN(unitemote) -{ +BUILDIN(unitemote) { int unit_id; int emotion; struct block_list* bl; unit_id = script_getnum(st,2); emotion = script_getnum(st,3); - bl = iMap->id2bl(unit_id); + bl = map->id2bl(unit_id); if( bl != NULL ) clif->emotion(bl, emotion); @@ -15072,8 +14966,7 @@ BUILDIN(unitemote) /// /// unitskilluseid <unit_id>,<skill_id>,<skill_lv>{,<target_id>}; /// unitskilluseid <unit_id>,"<skill name>",<skill_lv>{,<target_id>}; -BUILDIN(unitskilluseid) -{ +BUILDIN(unitskilluseid) { int unit_id; uint16 skill_id; uint16 skill_lv; @@ -15085,7 +14978,7 @@ BUILDIN(unitskilluseid) skill_lv = script_getnum(st,4); target_id = ( script_hasdata(st,5) ? script_getnum(st,5) : unit_id ); - bl = iMap->id2bl(unit_id); + bl = map->id2bl(unit_id); if( bl != NULL ) { if( bl->type == BL_NPC ) { @@ -15105,8 +14998,7 @@ BUILDIN(unitskilluseid) /// /// unitskillusepos <unit_id>,<skill_id>,<skill_lv>,<target_x>,<target_y>; /// unitskillusepos <unit_id>,"<skill name>",<skill_lv>,<target_x>,<target_y>; -BUILDIN(unitskillusepos) -{ +BUILDIN(unitskillusepos) { int unit_id; uint16 skill_id; uint16 skill_lv; @@ -15120,7 +15012,7 @@ BUILDIN(unitskillusepos) skill_x = script_getnum(st,5); skill_y = script_getnum(st,6); - bl = iMap->id2bl(unit_id); + bl = map->id2bl(unit_id); if( bl != NULL ) { if( bl->type == BL_NPC ) { @@ -15170,26 +15062,23 @@ BUILDIN(sleep) /// Returns if a player is still attached /// /// sleep2(<mili secconds>) -> <bool> -BUILDIN(sleep2) -{ +BUILDIN(sleep2) { int ticks; ticks = script_getnum(st,2); - if( ticks <= 0 ) - {// do nothing - script_pushint(st, (iMap->id2sd(st->rid)!=NULL)); - } - else if( !st->sleep.tick ) - {// sleep for the target amount of time + if( ticks <= 0 ) { + // do nothing + script_pushint(st, (map->id2sd(st->rid)!=NULL)); + } else if( !st->sleep.tick ) { + // sleep for the target amount of time st->state = RERUNLINE; st->sleep.tick = ticks; - } - else - {// sleep time is over + } else { + // sleep time is over st->state = RUN; st->sleep.tick = 0; - script_pushint(st, (iMap->id2sd(st->rid)!=NULL)); + script_pushint(st, (map->id2sd(st->rid)!=NULL)); } return true; } @@ -15211,7 +15100,7 @@ BUILDIN(awake) { for( tst = dbi_first(iter); dbi_exists(iter); tst = dbi_next(iter) ) { if( tst->oid == nd->bl.id ) { - TBL_PC* sd = iMap->id2sd(tst->rid); + TBL_PC* sd = map->id2sd(tst->rid); if( tst->sleep.timer == INVALID_TIMER ) {// already awake ??? continue; @@ -15284,8 +15173,7 @@ BUILDIN(getvariableofnpc) /// warpportal <source x>,<source y>,"<target map>",<target x>,<target y>; /// /// @author blackhole89 -BUILDIN(warpportal) -{ +BUILDIN(warpportal) { int spx; int spy; unsigned short mapindex; @@ -15294,7 +15182,7 @@ BUILDIN(warpportal) struct skill_unit_group* group; struct block_list* bl; - bl = iMap->id2bl(st->oid); + bl = map->id2bl(st->oid); if( bl == NULL ) { ShowError("script:warpportal: npc is needed\n"); @@ -15351,9 +15239,8 @@ BUILDIN(openauction) /// checkcell("<map name>",<x>,<y>,<type>) -> <bool> /// /// @see cell_chk* constants in const.txt for the types -BUILDIN(checkcell) -{ - int16 m = iMap->mapname2mapid(script_getstr(st,2)); +BUILDIN(checkcell) { + int16 m = map->mapname2mapid(script_getstr(st,2)); int16 x = script_getnum(st,3); int16 y = script_getnum(st,4); cell_chk type = (cell_chk)script_getnum(st,5); @@ -15363,7 +15250,7 @@ BUILDIN(checkcell) return true; } - script_pushint(st, iMap->getcell(m, x, y, type)); + script_pushint(st, map->getcell(m, x, y, type)); return true; } @@ -15373,9 +15260,8 @@ BUILDIN(checkcell) /// setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>; /// /// @see cell_* constants in const.txt for the types -BUILDIN(setcell) -{ - int16 m = iMap->mapname2mapid(script_getstr(st,2)); +BUILDIN(setcell) { + int16 m = map->mapname2mapid(script_getstr(st,2)); int16 x1 = script_getnum(st,3); int16 y1 = script_getnum(st,4); int16 x2 = script_getnum(st,5); @@ -15637,10 +15523,9 @@ BUILDIN(checkquest) return true; } -BUILDIN(showevent) -{ +BUILDIN(showevent) { TBL_PC *sd = script_rid2sd(st); - struct npc_data *nd = iMap->id2nd(st->oid); + struct npc_data *nd = map->id2nd(st->oid); int state, color; if( sd == NULL || nd == NULL ) @@ -15658,8 +15543,7 @@ BUILDIN(showevent) /*========================================== * BattleGround System *------------------------------------------*/ -BUILDIN(waitingroom2bg) -{ +BUILDIN(waitingroom2bg) { struct npc_data *nd; struct chat_data *cd; const char *map_name, *ev = "", *dev = ""; @@ -15669,10 +15553,9 @@ BUILDIN(waitingroom2bg) if( script_hasdata(st,7) ) nd = npc->name2id(script_getstr(st,7)); else - nd = (struct npc_data *)iMap->id2bl(st->oid); + nd = (struct npc_data *)map->id2bl(st->oid); - if( nd == NULL || (cd = (struct chat_data *)iMap->id2bl(nd->chat_id)) == NULL ) - { + if( nd == NULL || (cd = (struct chat_data *)map->id2bl(nd->chat_id)) == NULL ) { script_pushint(st,0); return true; } @@ -15713,8 +15596,7 @@ BUILDIN(waitingroom2bg) return true; } -BUILDIN(waitingroom2bg_single) -{ +BUILDIN(waitingroom2bg_single) { const char* map_name; struct npc_data *nd; struct chat_data *cd; @@ -15730,7 +15612,7 @@ BUILDIN(waitingroom2bg_single) y = script_getnum(st,5); nd = npc->name2id(script_getstr(st,6)); - if( nd == NULL || (cd = (struct chat_data *)iMap->id2bl(nd->chat_id)) == NULL || cd->users <= 0 ) + if( nd == NULL || (cd = (struct chat_data *)map->id2bl(nd->chat_id)) == NULL || cd->users <= 0 ) return true; if( (sd = cd->usersd[0]) == NULL ) @@ -15793,14 +15675,13 @@ BUILDIN(bg_monster) return true; } -BUILDIN(bg_monster_set_team) -{ +BUILDIN(bg_monster_set_team) { struct mob_data *md; struct block_list *mbl; int id = script_getnum(st,2), bg_id = script_getnum(st,3); - if( (mbl = iMap->id2bl(id)) == NULL || mbl->type != BL_MOB ) + if( (mbl = map->id2bl(id)) == NULL || mbl->type != BL_MOB ) return true; md = (TBL_MOB *)mbl; md->bg_id = bg_id; @@ -15830,8 +15711,7 @@ BUILDIN(bg_destroy) return true; } -BUILDIN(bg_getareausers) -{ +BUILDIN(bg_getareausers) { const char *str; int16 m, x0, y0, x1, y1; int bg_id; @@ -15842,8 +15722,7 @@ BUILDIN(bg_getareausers) bg_id = script_getnum(st,2); str = script_getstr(st,3); - if( (bgd = bg->team_search(bg_id)) == NULL || (m = iMap->mapname2mapid(str)) < 0 ) - { + if( (bgd = bg->team_search(bg_id)) == NULL || (m = map->mapname2mapid(str)) < 0 ) { script_pushint(st,0); return true; } @@ -15871,7 +15750,7 @@ BUILDIN(bg_updatescore) { int16 m; str = script_getstr(st,2); - if( (m = iMap->mapname2mapid(str)) < 0 ) + if( (m = map->mapname2mapid(str)) < 0 ) return true; maplist[m].bgscore_lion = script_getnum(st,3); @@ -15998,7 +15877,7 @@ BUILDIN(instance_detachmap) { instance_id = st->instance_id; else return true; - if( (m = iMap->mapname2mapid(str)) < 0 || (m = instance->map2imap(m,instance_id)) < 0 ) { + if( (m = map->mapname2mapid(str)) < 0 || (m = instance->map2imap(m,instance_id)) < 0 ) { ShowError("buildin_instance_detachmap: Trying to detach invalid map %s\n", str); return true; } @@ -16083,8 +15962,8 @@ BUILDIN(instance_announce) { return true; for( i = 0; i < instances[instance_id].num_map; i++ ) - iMap->foreachinmap(buildin_announce_sub, instances[instance_id].map[i], BL_PC, - mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); + map->foreachinmap(buildin_announce_sub, instances[instance_id].map[i], BL_PC, + mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY); return true; } @@ -16121,7 +16000,7 @@ BUILDIN(has_instance) { str = script_getstr(st, 2); - if( (m = iMap->mapname2mapid(str)) < 0 ) { + if( (m = map->mapname2mapid(str)) < 0 ) { script_pushconststr(st, ""); return true; } @@ -16204,12 +16083,12 @@ BUILDIN(instance_warpall) { else return true; - if( (m = iMap->mapname2mapid(mapn)) < 0 || (maplist[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) ) + if( (m = map->mapname2mapid(mapn)) < 0 || (maplist[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) ) return true; mapindex = map_id2index(m); - iMap->foreachininstance(buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y); + map->foreachininstance(buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y); return true; } @@ -16252,7 +16131,7 @@ BUILDIN(instance_check_party) { for( i = 0; i < MAX_PARTY; i++ ) if( (pl_sd = p->data[i].sd) ) - if(iMap->id2bl(pl_sd->bl.id)){ + if(map->id2bl(pl_sd->bl.id)){ if(pl_sd->status.base_level < min){ script_pushint(st, 0); return true; @@ -16308,9 +16187,9 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap) // 0:self, 1:target, 2:master, default:random switch( target ) { - case 0: tbl = iMap->id2bl(md->bl.id); break; - case 1: tbl = iMap->id2bl(md->target_id); break; - case 2: tbl = iMap->id2bl(md->master_id); break; + case 0: tbl = map->id2bl(md->bl.id); break; + case 1: tbl = map->id2bl(md->target_id); break; + case 2: tbl = map->id2bl(md->master_id); break; default:tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md),skill->get_range2(&md->bl, skill_id, skill_lv)); break; } @@ -16332,13 +16211,12 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap) /*========================================== * areamobuseskill "Map Name",<x>,<y>,<range>,<Mob ID>,"Skill Name"/<Skill ID>,<Skill Lv>,<Cast Time>,<Cancelable>,<Emotion>,<Target Type>; *------------------------------------------*/ -BUILDIN(areamobuseskill) -{ +BUILDIN(areamobuseskill) { struct block_list center; int16 m; int range,mobid,skill_id,skill_lv,casttime,emotion,target,cancel; - if( (m = iMap->mapname2mapid(script_getstr(st,2))) < 0 ) { + if( (m = map->mapname2mapid(script_getstr(st,2))) < 0 ) { ShowError("areamobuseskill: invalid map name.\n"); return true; } @@ -16358,7 +16236,7 @@ BUILDIN(areamobuseskill) emotion = script_getnum(st,11); target = script_getnum(st,12); - iMap->foreachinrange(buildin_mobuseskill_sub, ¢er, range, BL_MOB, mobid, skill_id, skill_lv, casttime, cancel, emotion, target); + map->foreachinrange(buildin_mobuseskill_sub, ¢er, range, BL_MOB, mobid, skill_id, skill_lv, casttime, cancel, emotion, target); return true; } @@ -16621,20 +16499,17 @@ BUILDIN(getargcount) { /** * getcharip(<account ID>/<character ID>/<character name>) **/ -BUILDIN(getcharip) -{ +BUILDIN(getcharip) { struct map_session_data* sd = NULL; /* check if a character name is specified */ - if( script_hasdata(st, 2) ) - { + if( script_hasdata(st, 2) ) { if (script_isstring(st, 2)) - sd = iMap->nick2sd(script_getstr(st, 2)); - else if (script_isint(st, 2) || script_getnum(st, 2)) - { + sd = map->nick2sd(script_getstr(st, 2)); + else if (script_isint(st, 2) || script_getnum(st, 2)) { int id; id = script_getnum(st, 2); - sd = (iMap->id2sd(id) ? iMap->id2sd(id) : iMap->charid2sd(id)); + sd = (map->id2sd(id) ? map->id2sd(id) : map->charid2sd(id)); } } else @@ -16703,12 +16578,11 @@ BUILDIN(freeloop) { return true; } -BUILDIN(sit) -{ +BUILDIN(sit) { struct map_session_data *sd = NULL; if (script_hasdata(st, 2)) - sd = iMap->nick2sd(script_getstr(st, 2)); + sd = map->nick2sd(script_getstr(st, 2)); if (sd == NULL) sd = script_rid2sd(st); @@ -16722,12 +16596,11 @@ BUILDIN(sit) return true; } -BUILDIN(stand) -{ +BUILDIN(stand) { struct map_session_data *sd = NULL; if (script_hasdata(st, 2)) - sd = iMap->nick2sd(script_getstr(st, 2)); + sd = map->nick2sd(script_getstr(st, 2)); if (sd == NULL) sd = script_rid2sd(st); @@ -16741,12 +16614,11 @@ BUILDIN(stand) return true; } -BUILDIN(issit) -{ +BUILDIN(issit) { struct map_session_data *sd = NULL; if (script_hasdata(st, 2)) - sd = iMap->nick2sd(script_getstr(st, 2)); + sd = map->nick2sd(script_getstr(st, 2)); if (sd == NULL) sd = script_rid2sd(st); @@ -16853,27 +16725,23 @@ BUILDIN(unbindatcmd) { return true; } -BUILDIN(useatcmd) -{ +BUILDIN(useatcmd) { TBL_PC *sd, *dummy_sd = NULL; int fd; const char* cmd; cmd = script_getstr(st,2); - if( st->rid ) - { + if( st->rid ) { sd = script_rid2sd(st); fd = sd->fd; - } - else - { // Use a dummy character. + } else { + // Use a dummy character. sd = dummy_sd = pc->get_dummy_sd(); fd = 0; - if( st->oid ) - { - struct block_list* bl = iMap->id2bl(st->oid); + if( st->oid ) { + struct block_list* bl = map->id2bl(st->oid); memcpy(&sd->bl, bl, sizeof(struct block_list)); if( bl->type == BL_NPC ) safestrncpy(sd->status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH); @@ -16995,7 +16863,7 @@ BUILDIN(getrandgroupitem) { if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) - iMap->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -17008,33 +16876,32 @@ BUILDIN(getrandgroupitem) { /* cleanmap <map_name>; * cleanarea <map_name>, <x0>, <y0>, <x1>, <y1>; */ -static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) -{ +static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { nullpo_ret(bl); - iMap->clearflooritem(bl); + map->clearflooritem(bl); return 0; } BUILDIN(cleanmap) { - const char *mapname; - int16 m = -1; - int16 x0 = 0, y0 = 0, x1 = 0, y1 = 0; + const char *mapname; + int16 m = -1; + int16 x0 = 0, y0 = 0, x1 = 0, y1 = 0; - mapname = script_getstr(st, 2); - m = iMap->mapname2mapid(mapname); - if ( m == -1 ) - return false; + mapname = script_getstr(st, 2); + m = map->mapname2mapid(mapname); + if ( m == -1 ) + return false; if ((script_lastdata(st) - 2) < 4) { - iMap->foreachinmap(atcommand_cleanfloor_sub, m, BL_ITEM); + map->foreachinmap(atcommand_cleanfloor_sub, m, BL_ITEM); } else { x0 = script_getnum(st, 3); y0 = script_getnum(st, 4); x1 = script_getnum(st, 5); y1 = script_getnum(st, 6); if (x0 > 0 && y0 > 0 && x1 > 0 && y1 > 0) { - iMap->foreachinarea(atcommand_cleanfloor_sub, m, x0, y0, x1, y1, BL_ITEM); + map->foreachinarea(atcommand_cleanfloor_sub, m, x0, y0, x1, y1, BL_ITEM); } else { ShowError("cleanarea: invalid coordinate defined!\n"); return false; @@ -17046,8 +16913,7 @@ BUILDIN(cleanmap) { /* Cast a skill on the attached player. * npcskill <skill id>, <skill lvl>, <stat point>, <NPC level>; * npcskill "<skill name>", <skill lvl>, <stat point>, <NPC level>; */ -BUILDIN(npcskill) -{ +BUILDIN(npcskill) { uint16 skill_id; unsigned short skill_level; unsigned int stat_point; @@ -17055,12 +16921,12 @@ BUILDIN(npcskill) struct npc_data *nd; struct map_session_data *sd; - skill_id = script_isstring(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2); - skill_level = script_getnum(st, 3); - stat_point = script_getnum(st, 4); - npc_level = script_getnum(st, 5); - sd = script_rid2sd(st); - nd = (struct npc_data *)iMap->id2bl(sd->npc_id); + skill_id = script_isstring(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2); + skill_level = script_getnum(st, 3); + stat_point = script_getnum(st, 4); + npc_level = script_getnum(st, 5); + sd = script_rid2sd(st); + nd = (struct npc_data *)map->id2bl(sd->npc_id); if (stat_point > battle_config.max_third_parameter) { ShowError("npcskill: stat point exceeded maximum of %d.\n",battle_config.max_third_parameter ); @@ -17167,7 +17033,7 @@ bool script_hqueue_add(int idx, int var) { script->hq[idx].item[i] = var; script->hq[idx].items++; - if( var >= START_ACCOUNT_NUM && (sd = iMap->id2sd(var)) ) { + if( var >= START_ACCOUNT_NUM && (sd = map->id2sd(var)) ) { for(i = 0; i < sd->queues_count; i++) { if( sd->queues[i] == -1 ) { break; @@ -17213,7 +17079,7 @@ bool script_hqueue_remove(int idx, int var) { script->hq[idx].item[i] = -1; script->hq[idx].items--; - if( var >= START_ACCOUNT_NUM && (sd = iMap->id2sd(var)) ) { + if( var >= START_ACCOUNT_NUM && (sd = map->id2sd(var)) ) { for(i = 0; i < sd->queues_count; i++) { if( sd->queues[i] == idx ) { break; @@ -17291,7 +17157,7 @@ bool script_hqueue_del(int idx) { int i; for(i = 0; i < script->hq[idx].size; i++) { - if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = iMap->id2sd(script->hq[idx].item[i])) ) { + if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = map->id2sd(script->hq[idx].item[i])) ) { int j; for(j = 0; j < sd->queues_count; j++) { if( sd->queues[j] == script->hq[idx].item[i] ) { @@ -17330,7 +17196,7 @@ void script_hqueue_clear(int idx) { for(i = 0; i < script->hq[idx].size; i++) { if( script->hq[idx].item[i] > 0 ) { - if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = iMap->id2sd(script->hq[idx].item[i])) ) { + if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = map->id2sd(script->hq[idx].item[i])) ) { for(j = 0; j < sd->queues_count; j++) { if( sd->queues[j] == idx ) { break; @@ -17505,7 +17371,7 @@ BUILDIN(bg_join_team) { int team_id = script_getnum(st, 2); if( script_hasdata(st, 3) ) - sd = iMap->id2sd(script_getnum(st, 3)); + sd = map->id2sd(script_getnum(st, 3)); else sd = script->rid2sd(st); diff --git a/src/map/searchstore.c b/src/map/searchstore.c index c7f4f9fed..6fd6f6aad 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -274,7 +274,7 @@ void searchstore_click(struct map_session_data* sd, int account_id, int store_id return; } - if( ( pl_sd = iMap->id2sd(account_id) ) == NULL ) {// no longer online + if( ( pl_sd = map->id2sd(account_id) ) == NULL ) {// no longer online clif->search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); return; } diff --git a/src/map/skill.c b/src/map/skill.c index 8a5969345..8e83f8bd2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -569,7 +569,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) } break; case GD_EMERGENCYCALL: - if( !(battle_config.emergency_call&((iMap->agit_flag || iMap->agit2_flag)?2:1)) + if( !(battle_config.emergency_call&((map->agit_flag || map->agit2_flag)?2:1)) || !(battle_config.emergency_call&(maplist[m].flag.gvg || maplist[m].flag.gvg_castle?8:4)) || (battle_config.emergency_call&16 && maplist[m].flag.nowarpto && !maplist[m].flag.gvg_castle) ) { @@ -666,7 +666,7 @@ struct s_skill_unit_layout* skill_get_unit_layout (uint16 skill_id, uint16 skill if (pos != -1) // simple single-definition layout return &skill_unit_layout[pos]; - dir = (src->x == x && src->y == y) ? 6 : iMap->calc_dir(src,x,y); // 6 - default aegis direction + dir = (src->x == x && src->y == y) ? 6 : map->calc_dir(src,x,y); // 6 - default aegis direction if (skill_id == MG_FIREWALL) return &skill_unit_layout [firewall_unit_pos + dir]; @@ -1393,9 +1393,9 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; } - if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai) - { //Pass heritage to Master for status causing effects. [Skotlex] - sd = iMap->id2sd(md->master_id); + if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai) { + //Pass heritage to Master for status causing effects. [Skotlex] + sd = map->id2sd(md->master_id); src = sd?&sd->bl:src; } @@ -2094,7 +2094,7 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in } if (dir == -1) // <optimized>: do the computation here instead of outside - dir = iMap->calc_dir(target, src->x, src->y); // direction from src to target, reversed + dir = map->calc_dir(target, src->x, src->y); // direction from src to target, reversed if (dir >= 0 && dir < 8) { // take the reversed 'direction' and reverse it @@ -2521,7 +2521,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds break; } - iMap->freeblock_lock(); + map->freeblock_lock(); if(damage > 0 && dmg.flag&BF_SKILL && tsd && pc->checkskill(tsd,RG_PLAGIARISM) @@ -2655,7 +2655,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds dir = rand()%8; break; case WL_CRIMSONROCK: - dir = iMap->calc_dir(bl,skill_area_temp[4],skill_area_temp[5]); + dir = map->calc_dir(bl,skill_area_temp[4],skill_area_temp[5]); break; } @@ -2671,7 +2671,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds short dir_x, dir_y; dir_x = dirx[(dir+4)%8]; dir_y = diry[(dir+4)%8]; - if( iMap->getcell(bl->m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 ) + if( map->getcell(bl->m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 ) skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag ); } else skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag ); @@ -2681,7 +2681,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds short dir_x, dir_y; dir_x = dirx[(dir+4)%8]; dir_y = diry[(dir+4)%8]; - if( iMap->getcell(bl->m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 ) + if( map->getcell(bl->m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 ) skill->addtimerskill(src, tick + 300 * ((flag&2) ? 1 : 2), bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag|4); } break; @@ -2707,7 +2707,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if( sc && sc->data[SC_DEVOTION] && skill_id != PA_PRESSURE ) { struct status_change_entry *sce = sc->data[SC_DEVOTION]; - struct block_list *d_bl = iMap->id2bl(sce->val1); + struct block_list *d_bl = map->id2bl(sce->val1); if( d_bl && ( (d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) || @@ -2793,7 +2793,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds skill->addtimerskill(src, tick + dmg.amotion, bl->id, 0, 0, skill_id, skill_lv, BF_MAGIC, flag|2); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return (int)cap_value(damage,INT_MIN,INT_MAX); } @@ -2905,7 +2905,7 @@ int skill_check_unit_range (struct block_list *bl, int x, int y, uint16 skill_id } range += layout_type; - return iMap->foreachinarea(skill->check_unit_range_sub,bl->m,x-range,y-range,x+range,y+range,BL_SKILL,skill_id); + return map->foreachinarea(skill->check_unit_range_sub,bl->m,x-range,y-range,x+range,y+range,BL_SKILL,skill_id); } int skill_check_unit_range2_sub (struct block_list *bl, va_list ap) { @@ -2952,9 +2952,9 @@ int skill_check_unit_range2 (struct block_list *bl, int x, int y, uint16 skill_i else type = BL_PC; - return iMap->foreachinarea(skill->check_unit_range2_sub, bl->m, - x - range, y - range, x + range, y + range, - type, skill_id); + return map->foreachinarea(skill->check_unit_range2_sub, bl->m, + x - range, y - range, x + range, y + range, + type, skill_id); } /*========================================== @@ -3081,7 +3081,7 @@ int skill_area_sub_count (struct block_list *src, struct block_list *target, uin * *------------------------------------------*/ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { - struct block_list *src = iMap->id2bl(id),*target; + struct block_list *src = map->id2bl(id),*target; struct unit_data *ud = unit->bl2ud(src); struct skill_timerskill *skl; int range; @@ -3096,7 +3096,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { if(src->prev == NULL) break; // Source not on Map if(skl->target_id) { - target = iMap->id2bl(skl->target_id); + target = map->id2bl(skl->target_id); if( ( skl->skill_id == RG_INTIMIDATE || skl->skill_id == SC_FATALMENACE ) && (!target || target->prev == NULL || !check_distance_bl(src,target,AREA_SIZE)) ) target = src; //Required since it has to warp. if(target == NULL) @@ -3114,7 +3114,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { case RG_INTIMIDATE: if (unit->warp(src,-1,-1,-1,CLR_TELEPORT) == 0) { short x,y; - iMap->search_freecell(src, 0, &x, &y, 1, 1, 0); + map->search_freecell(src, 0, &x, &y, 1, 1, 0); if (target != src && !status->isdead(target)) unit->warp(target, -1, x, y, CLR_TELEPORT); } @@ -3122,16 +3122,16 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { case BA_FROSTJOKER: case DC_SCREAM: range= skill->get_splash(skl->skill_id, skl->skill_lv); - iMap->foreachinarea(skill->frostjoke_scream,skl->map,skl->x-range,skl->y-range, - skl->x+range,skl->y+range,BL_CHAR,src,skl->skill_id,skl->skill_lv,tick); + map->foreachinarea(skill->frostjoke_scream,skl->map,skl->x-range,skl->y-range, + skl->x+range,skl->y+range,BL_CHAR,src,skl->skill_id,skl->skill_lv,tick); break; case NPC_EARTHQUAKE: if( skl->type > 1 ) skill->addtimerskill(src,tick+250,src->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag); - skill_area_temp[0] = iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, BCT_ENEMY, skill->area_sub_count); + skill_area_temp[0] = map->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, BCT_ENEMY, skill->area_sub_count); skill_area_temp[1] = src->id; skill_area_temp[2] = 0; - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), splash_target(src), src, skl->skill_id, skl->skill_lv, tick, skl->flag, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), splash_target(src), src, skl->skill_id, skl->skill_lv, tick, skl->flag, skill->castend_damage_id); break; case WZ_WATERBALL: skill->toggle_magicpower(src, skl->skill_id); // only the first hit will be amplify @@ -3192,7 +3192,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { unit->warp(src, -1, skl->x, skl->y, 3); else { // Target's Part short x = skl->x, y = skl->y; - iMap->search_freecell(NULL, target->m, &x, &y, 2, 2, 1); + map->search_freecell(NULL, target->m, &x, &y, 2, 2, 1); unit->warp(target,-1,x,y,3); } break; @@ -3218,8 +3218,8 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { skill->attack(BF_WEAPON, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag|SD_LEVEL); break; case GN_SPORE_EXPLOSION: - iMap->foreachinrange(skill->area_sub, target, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR, - src, skl->skill_id, skl->skill_lv, 0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, target, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR, + src, skl->skill_id, skl->skill_lv, 0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id); break; case SR_FLASHCOMBO_ATK_STEP1: case SR_FLASHCOMBO_ATK_STEP2: @@ -3271,14 +3271,15 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { else if( path->search_long(NULL, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL) ) skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,skl->flag); break; - case GN_CRAZYWEED_ATK: { - int dummy = 1, i = skill->get_unit_range(skl->skill_id,skl->skill_lv); - iMap->foreachinarea(skill->cell_overlap, src->m, skl->x-i, skl->y-i, skl->x+i, skl->y+i, BL_SKILL, skl->skill_id, &dummy, src); - } + case GN_CRAZYWEED_ATK: + { + int dummy = 1, i = skill->get_unit_range(skl->skill_id,skl->skill_lv); + map->foreachinarea(skill->cell_overlap, src->m, skl->x-i, skl->y-i, skl->x+i, skl->y+i, BL_SKILL, skl->skill_id, &dummy, src); + } + // FIXME: there's no 'break' here. If it was intended, please consider adding a comment (issue #160) case WL_EARTHSTRAIN: skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,(skl->type<<16)|skl->flag); break; - } } } while (0); @@ -3343,7 +3344,7 @@ int skill_activate_reverbetion( struct block_list *bl, va_list ap) { if( bl->type != BL_SKILL ) return 0; if( su->alive && (sg = su->group) && sg->skill_id == WM_REVERBERATION ) { - iMap->foreachinrange(skill->trap_splash, bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, timer->gettick()); + map->foreachinrange(skill->trap_splash, bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, timer->gettick()); su->limit=DIFF_TICK(timer->gettick(),sg->tick); sg->unit_id = UNT_USED_TRAPS; } @@ -3401,7 +3402,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint tstatus = status->get_status_data(bl); - iMap->freeblock_lock(); + map->freeblock_lock(); switch(skill_id) { case MER_CRASH: @@ -3551,12 +3552,12 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint break; case MO_COMBOFINISH: - if (!(flag&1) && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_MONK) - { //Becomes a splash attack when Soul Linked. - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv),splash_target(src), - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, - skill->castend_damage_id); + if (!(flag&1) && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_MONK) { + //Becomes a splash attack when Soul Linked. + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv),splash_target(src), + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, + skill->castend_damage_id); } else skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); break; @@ -3564,15 +3565,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case TK_STORMKICK: // Taekwon kicks [Dralnu] clif->skill_nodamage(src,bl,skill_id,skill_lv,1); skill_area_temp[1] = 0; - iMap->foreachinrange(skill->attack_area, src, - skill->get_splash(skill_id, skill_lv), splash_target(src), - BF_WEAPON, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); + map->foreachinrange(skill->attack_area, src, + skill->get_splash(skill_id, skill_lv), splash_target(src), + BF_WEAPON, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); break; case KN_CHARGEATK: { bool path_exists = path->search_long(NULL, src->m, src->x, src->y, bl->x, bl->y,CELL_CHKWALL); unsigned int dist = distance_bl(src, bl); - uint8 dir = iMap->calc_dir(bl, src->x, src->y); + uint8 dir = map->calc_dir(bl, src->x, src->y); // teleport to target (if not on WoE grounds) if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 0, 1) ) @@ -3599,9 +3600,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint //It won't shoot through walls since on castend there has to be a direct //line of sight between caster and target. skill_area_temp[1] = bl->id; - iMap->foreachinpath (skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, - skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), splash_target(src), - skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY); + map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, + skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), splash_target(src), + skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY); break; case NPC_ACIDBREATH: @@ -3610,9 +3611,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case NPC_ICEBREATH: case NPC_THUNDERBREATH: skill_area_temp[1] = bl->id; - iMap->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, - skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), splash_target(src), - skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY); + map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, + skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), splash_target(src), + skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY); break; case MO_INVESTIGATE: @@ -3622,8 +3623,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case RG_BACKSTAP: { - uint8 dir = iMap->calc_dir(src, bl->x, bl->y), t_dir = unit->getdir(bl); - if ((!check_distance_bl(src, bl, 0) && !iMap->check_dir(dir, t_dir)) || bl->type == BL_SKILL) { + uint8 dir = map->calc_dir(src, bl->x, bl->y), t_dir = unit->getdir(bl); + if ((!check_distance_bl(src, bl, 0) && !map->check_dir(dir, t_dir)) || bl->type == BL_SKILL) { status_change_end(src, SC_HIDING, INVALID_TIMER); skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] @@ -3676,7 +3677,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint status->set_hp(src, 1, 0); #endif // RENEWAL } - dir = iMap->calc_dir(src,bl->x,bl->y); + dir = map->calc_dir(src,bl->x,bl->y); if( dir > 0 && dir < 4) x = -i; else if( dir > 4 ) x = i; else x = 0; @@ -3795,10 +3796,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint //SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets //special case: Venom Splasher uses a different range for searching than for splashing if( flag&SD_LEVEL || skill->get_nk(skill_id)&NK_SPLASHSPLIT ) - skill_area_temp[0] = iMap->foreachinrange(skill->area_sub, bl, (skill_id == AS_SPLASHER)?1:skill->get_splash(skill_id, skill_lv), BL_CHAR, src, skill_id, skill_lv, tick, BCT_ENEMY, skill->area_sub_count); + skill_area_temp[0] = map->foreachinrange(skill->area_sub, bl, (skill_id == AS_SPLASHER)?1:skill->get_splash(skill_id, skill_lv), BL_CHAR, src, skill_id, skill_lv, tick, BCT_ENEMY, skill->area_sub_count); // recursive invocation of skill->castend_damage_id() with flag|1 - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), ( skill_id == WM_REVERBERATION_MELEE || skill_id == WM_REVERBERATION_MAGIC )?BL_CHAR:splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), ( skill_id == WM_REVERBERATION_MELEE || skill_id == WM_REVERBERATION_MAGIC )?BL_CHAR:splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); } break; @@ -3826,13 +3827,13 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint for(i=0;i<c;i++){ if (!skill->blown(src,bl,1,(unit->getdir(src)+4)%8,0x1)) break; //Can't knockback - skill_area_temp[0] = iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->area_sub_count); + skill_area_temp[0] = map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->area_sub_count); if( skill_area_temp[0] > 1 ) break; // collision } clif->blown(bl); //Update target pos. if (i!=c) { //Splash skill_area_temp[1] = bl->id; - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); } //Weirdo dual-hit property, two attacks for 500% skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,0); @@ -3848,15 +3849,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill->blown(src,bl,skill_area_temp[2],-1,0); } else { int x=bl->x,y=bl->y,i,dir; - dir = iMap->calc_dir(bl,src->x,src->y); + dir = map->calc_dir(bl,src->x,src->y); skill_area_temp[1] = bl->id; skill_area_temp[2] = skill->get_blewcount(skill_id,skill_lv); // all the enemies between the caster and the target are hit, as well as the target if (skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,0)) skill->blown(src,bl,skill_area_temp[2],-1,0); for (i=0;i<4;i++) { - iMap->foreachincell(skill->area_sub,bl->m,x,y,BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachincell(skill->area_sub,bl->m,x,y,BL_CHAR,src,skill_id,skill_lv, + tick,flag|BCT_ENEMY|1,skill->castend_damage_id); x += dirx[dir]; y += diry[dir]; } @@ -3868,10 +3869,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint { skill_area_temp[1] = bl->id; //NOTE: This is used in skill->castend_nodamage_id to avoid affecting the target. if (skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag)) - iMap->foreachinrange(skill->area_sub,bl, - skill->get_splash(skill_id, skill_lv),BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub,bl, + skill->get_splash(skill_id, skill_lv),BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1, + skill->castend_nodamage_id); } break; case CH_PALMSTRIKE: // Palm Strike takes effect 1sec after casting. [Skotlex] @@ -3950,11 +3951,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint for( y = src->y - range; y <= src->y + range; ++y ) for( x = src->x - range; x <= src->x + range; ++x ) { - if( !iMap->find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL,1) ) { - if( src->type != BL_PC || iMap->getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement + if( !map->find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL,1) ) { + if( src->type != BL_PC || map->getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement count++; // natural water cell - else if( (su = iMap->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL - || (su = iMap->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) { + else if( (su = map->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL + || (su = map->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) { count++; // skill-induced water cell skill->delunit(su); // consume cell } @@ -4063,7 +4064,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground ) { //You don't move on GVG grounds. short x, y; - iMap->search_freecell(bl, 0, &x, &y, 1, 1, 0); + map->search_freecell(bl, 0, &x, &y, 1, 1, 0); if (unit->movepos(src, x, y, 0, 0)) clif->slide(src,src->x,src->y); } @@ -4071,7 +4072,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); break; case RK_PHANTOMTHRUST: - unit->setdir(src,iMap->calc_dir(src, bl->x, bl->y)); + unit->setdir(src,map->calc_dir(src, bl->x, bl->y)); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); skill->blown(src,bl,distance_bl(src,bl)-1,unit->getdir(src),0); @@ -4082,7 +4083,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case GC_DARKILLUSION: { short x, y; - short dir = iMap->calc_dir(src,bl->x,bl->y); + short dir = map->calc_dir(src,bl->x,bl->y); if( dir > 0 && dir < 4) x = 2; else if( dir > 4 ) x = -2; @@ -4258,7 +4259,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint if( sd && pc_isridingwug(sd) ){ short x[8]={0,-1,-1,-1,0,1,1,1}; short y[8]={1,1,0,-1,-1,-1,0,1}; - uint8 dir = iMap->calc_dir(bl, src->x, src->y); + uint8 dir = map->calc_dir(bl, src->x, src->y); if( unit->movepos(src, bl->x+x[dir], bl->y+y[dir], 1, 1) ) { @@ -4283,39 +4284,33 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); } - } - else - { + } else { struct skill_unit *su = BL_CAST(BL_SKILL,bl); struct skill_unit_group* sg; - if( su && (sg=su->group) && skill->get_inf2(sg->skill_id)&INF2_TRAP ) - { - if( !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) - { + if( su && (sg=su->group) && skill->get_inf2(sg->skill_id)&INF2_TRAP ) { + if( !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) { struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = sg->item_id?sg->item_id:ITEMID_TRAP; item_tmp.identify = 1; if( item_tmp.nameid ) - iMap->addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); + map->addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); } skill->delunit(su); } } break; case NC_INFRAREDSCAN: - if( flag&1 ) - { //TODO: Need a confirmation if the other type of hidden status is included to be scanned. [Jobbie] + if( flag&1 ) { + //TODO: Need a confirmation if the other type of hidden status is included to be scanned. [Jobbie] if( rnd()%100 < 50 ) sc_start(bl, SC_INFRAREDSCAN, 10000, skill_lv, skill->get_time(skill_id, skill_lv)); status_change_end(bl, SC_HIDING, INVALID_TIMER); status_change_end(bl, SC_CLOAKING, INVALID_TIMER); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); // Need confirm it. - } - else - { - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + } else { + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); clif->skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); if( sd ) pc->overheat(sd,1); } @@ -4327,14 +4322,13 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case SC_FATALMENACE: if( flag&1 ) skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); - else - { + else { short x, y; - iMap->search_freecell(src, 0, &x, &y, -1, -1, 0); + map->search_freecell(src, 0, &x, &y, -1, -1, 0); // Destination area skill_area_temp[4] = x; skill_area_temp[5] = y; - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); skill->addtimerskill(src,tick + 800,src->id,x,y,skill_id,skill_lv,0,flag); // To teleport Self clif->skill_damage(src,src,tick,status_get_amotion(src),0,-30000,1,skill_id,skill_lv,6); } @@ -4399,9 +4393,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint status_change_end(bl, SC_HIDING, INVALID_TIMER); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); } else{ - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); clif->skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - } + } break; case SO_POISON_BUSTER: @@ -4436,7 +4430,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint clif->skill_nodamage(src,battle->get_master(src),skill_id,skill_lv,1); clif->skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); if( rnd()%100 < 30 ) - iMap->foreachinrange(skill->area_sub,bl,i,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,bl,i,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); else skill->attack(skill->get_type(skill_id),src,src,bl,skill_id,skill_lv,tick,flag); } @@ -4459,7 +4453,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint clif->skill_nodamage(src,battle->get_master(src),skill_id,skill_lv,1); clif->skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); if( rnd()%100 < 30 ) - iMap->foreachinrange(skill->area_sub,bl,i,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,bl,i,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); else skill->attack(skill->get_type(skill_id),src,src,bl,skill_id,skill_lv,tick,flag); } @@ -4504,7 +4498,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint if(flag & 1) skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag); else { - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag | BCT_ENEMY | SD_SPLASH | 1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag | BCT_ENEMY | SD_SPLASH | 1, skill->castend_damage_id); } break; @@ -4532,10 +4526,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, SD_LEVEL|flag); } else { skill_area_temp[1] = bl->id; - iMap->foreachinrange(skill->area_sub, bl, - sd->bonus.splash_range, BL_CHAR, - src, skill_id, skill_lv, tick, flag | BCT_ENEMY | 1, - skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, + sd->bonus.splash_range, BL_CHAR, + src, skill_id, skill_lv, tick, flag | BCT_ENEMY | 1, + skill->castend_damage_id); flag|=1; //Set flag to 1 so ammo is not double-consumed. [Skotlex] } } @@ -4546,14 +4540,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint clif->skill_damage(src, bl, tick, status_get_amotion(src), tstatus->dmotion, 0, abs(skill->get_num(skill_id, skill_lv)), skill_id, skill_lv, skill->get_hit(skill_id)); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } if( sc && sc->data[SC_CURSEDCIRCLE_ATKER] ) //Should only remove after the skill has been casted. status_change_end(src,SC_CURSEDCIRCLE_ATKER,INVALID_TIMER); - iMap->freeblock_unlock(); + map->freeblock_unlock(); if( sd && !(flag&1) ) {// ensure that the skill last-cast tick is recorded @@ -4583,7 +4577,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) struct status_change *sc = NULL; int inf,inf2,flag = 0; - src = iMap->id2bl(id); + src = map->id2bl(id); if( src == NULL ) { ShowDebug("skill_castend_id: src == NULL (tid=%d, id=%d)\n", tid, id); @@ -4624,7 +4618,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) if (ud->skilltarget == id) target = src; else - target = iMap->id2bl(ud->skilltarget); + target = map->id2bl(ud->skilltarget); // Use a do so that you can break out of it when the skill fails. do { @@ -4644,7 +4638,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) inf2 = skill->get_splash(ud->skill_id, ud->skill_lv); ud->skillx = target->x + inf2; ud->skilly = target->y + inf2; - if (inf2 && !iMap->random_dir(target, &ud->skillx, &ud->skilly)) { + if (inf2 && !map->random_dir(target, &ud->skillx, &ud->skilly)) { ud->skillx = target->x; ud->skilly = target->y; } @@ -4658,8 +4652,8 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) } if(ud->skill_id == RG_BACKSTAP) { - uint8 dir = iMap->calc_dir(src,target->x,target->y),t_dir = unit->getdir(target); - if(check_distance_bl(src, target, 0) || iMap->check_dir(dir,t_dir)) { + uint8 dir = map->calc_dir(src,target->x,target->y),t_dir = unit->getdir(target); + if(check_distance_bl(src, target, 0) || map->check_dir(dir,t_dir)) { break; } } @@ -4815,7 +4809,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) ShowInfo("Type %d, ID %d skill castend id [id =%d, lv=%d, target ID %d]\n", src->type, src->id, ud->skill_id, ud->skill_lv, target->id); - iMap->freeblock_lock(); + map->freeblock_lock(); // SC_MAGICPOWER needs to switch states before any damage is actually dealt skill->toggle_magicpower(src, ud->skill_id); @@ -4848,7 +4842,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) else ud->skill_id = 0; //mobs can't clear this one as it is used for skill condition 'afterskill' ud->skill_lv = ud->skilltarget = 0; } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } while(0); @@ -4867,10 +4861,10 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) sc_start(src, SC_EXTREMITYFIST2, 100, ud->skill_lv, skill->get_time(ud->skill_id, ud->skill_lv)); #endif } - if (target && target->m == src->m) - { //Move character to target anyway. + if (target && target->m == src->m) { + //Move character to target anyway. int dir, x, y; - dir = iMap->calc_dir(src,target->x,target->y); + dir = map->calc_dir(src,target->x,target->y); if( dir > 0 && dir < 4) x = -2; else if( dir > 4 ) x = 2; else x = 0; @@ -5011,7 +5005,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( sd && !pc->checkskill(sd, RK_RUNEMASTERY) ){ if( status->change_start(&sd->bl, (sc_type)(rnd()%SC_CONFUSION), 1000, 1, 0, 0, 0, skill->get_time2(skill_id,skill_lv),8) ){ skill->consume_requirement(sd,skill_id,skill_lv,2); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } } @@ -5032,7 +5026,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui battle->attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0) return 1; //Skills that cause an status should be blocked if the target element blocks its element. - iMap->freeblock_lock(); + map->freeblock_lock(); switch(skill_id) { case HLIF_HEAL: //[orn] case AL_HEAL: @@ -5171,8 +5165,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if (flag&1) sc_start(bl,type, 23+skill_lv*4 +status->get_lv(src) -status->get_lv(bl), skill_lv,skill->get_time(skill_id,skill_lv)); else { - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } break; @@ -5227,7 +5221,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if (!target_id) break; if (skill->get_casttype(abra_skill_id) == CAST_GROUND) { - bl = iMap->id2bl(target_id); + bl = map->id2bl(target_id); if (!bl) bl = src; unit->skilluse_pos(src, bl->x, bl->y, abra_skill_id, abra_skill_lv); } else @@ -5331,7 +5325,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if(sd && dstsd){ //Check they are not another crusader [Skotlex] if ((dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } } @@ -5343,34 +5337,27 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui { struct status_change* sc = status->get_sc(src); - if( sd && dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER && dstsd->status.sex == sd->status.sex ) - {// Cannot cast on another bard/dancer-type class of the same gender as caster + if( sd && dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER && dstsd->status.sex == sd->status.sex ) { + // Cannot cast on another bard/dancer-type class of the same gender as caster clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } - if( sc && tsc ) - { - if( !sc->data[SC_MARIONETTE_MASTER] && !tsc->data[SC_MARIONETTE] ) - { + if( sc && tsc ) { + if( !sc->data[SC_MARIONETTE_MASTER] && !tsc->data[SC_MARIONETTE] ) { sc_start(src,SC_MARIONETTE_MASTER,100,bl->id,skill->get_time(skill_id,skill_lv)); sc_start(bl,SC_MARIONETTE,100,src->id,skill->get_time(skill_id,skill_lv)); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - } - else - if( sc->data[SC_MARIONETTE_MASTER ] && sc->data[SC_MARIONETTE_MASTER ]->val1 == bl->id && - tsc->data[SC_MARIONETTE] && tsc->data[SC_MARIONETTE]->val1 == src->id ) - { + } else if( sc->data[SC_MARIONETTE_MASTER ] && sc->data[SC_MARIONETTE_MASTER ]->val1 == bl->id + && tsc->data[SC_MARIONETTE] && tsc->data[SC_MARIONETTE]->val1 == src->id + ) { status_change_end(src, SC_MARIONETTE_MASTER, INVALID_TIMER); status_change_end(bl, SC_MARIONETTE, INVALID_TIMER); - } - else - { + } else { if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } } @@ -5453,8 +5440,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SM_MAGNUM: case MS_MAGNUM: skill_area_temp[1] = 0; - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_SKILL|BL_CHAR, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_SKILL|BL_CHAR, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, skill->castend_damage_id); clif->skill_nodamage (src,src,skill_id,skill_lv,1); // Initiate 10% of your damage becomes fire element. sc_start4(src,SC_SUB_WEAPONPROPERTY,100,3,20,0,0,skill->get_time2(skill_id, skill_lv)); @@ -5611,20 +5598,19 @@ 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))); status_change_end(bl, SC_NJ_NEN, INVALID_TIMER); break; - /* Was modified to only affect targetted char. [Skotlex] +#if 0 /* Was modified to only affect targetted char. [Skotlex] */ case HP_ASSUMPTIO: if (flag&1) sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); - else - { - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv), BL_PC, - src, skill_id, skill_lv, tick, flag|BCT_ALL|1, - skill->castend_nodamage_id); + else { + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv), BL_PC, + src, skill_id, skill_lv, tick, flag|BCT_ALL|1, + skill->castend_nodamage_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); } break; - */ +#endif // 0 case SM_ENDURE: clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); @@ -5692,29 +5678,27 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case AC_CONCENTRATION: { clif->skill_nodamage(src,bl,skill_id,skill_lv, - sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); - iMap->foreachinrange( status->change_timer_sub, src, - skill->get_splash(skill_id, skill_lv), BL_CHAR, - src,NULL,type,tick); + sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); + map->foreachinrange(status->change_timer_sub, src, + skill->get_splash(skill_id, skill_lv), BL_CHAR, + src,NULL,type,tick); } break; case SM_PROVOKE: case SM_SELFPROVOKE: case MER_PROVOKE: - if( (tstatus->mode&MD_BOSS) || battle->check_undead(tstatus->race,tstatus->def_ele) ) - { - iMap->freeblock_unlock(); + if( (tstatus->mode&MD_BOSS) || battle->check_undead(tstatus->race,tstatus->def_ele) ) { + map->freeblock_unlock(); return 1; } //TODO: How much does base level affects? Dummy value of 1% per level difference used. [Skotlex] clif->skill_nodamage(src,bl,skill_id == SM_SELFPROVOKE ? SM_PROVOKE : skill_id,skill_lv, (i = sc_start(bl,type, skill_id == SM_SELFPROVOKE ? 100:( 50 + 3*skill_lv + status->get_lv(src) - status->get_lv(bl)), skill_lv, skill->get_time(skill_id,skill_lv)))); - if( !i ) - { + if( !i ) { if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } unit->skillcastcancel(bl, 2); @@ -5756,7 +5740,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui { if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } @@ -5768,10 +5752,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( i == count ) { ARR_FIND(0, count, i, sd->devotion[i] == 0 ); - if( i == count ) - { // No free slots, skill Fail + if( i == count ) { + // No free slots, skill Fail clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } } @@ -5865,10 +5849,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case RG_RAID: skill_area_temp[1] = 0; clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv), splash_target(src), - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, - skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv), splash_target(src), + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, + skill->castend_damage_id); status_change_end(src, SC_HIDING, INVALID_TIMER); break; @@ -5883,8 +5867,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case KO_HAPPOKUNAI: skill_area_temp[1] = 0; clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - i = iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + i = map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); if( !i && ( skill_id == NC_AXETORNADO || skill_id == SR_SKYNETBLOW || skill_id == KO_HAPPOKUNAI ) ) clif->skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); break; @@ -5916,10 +5900,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui //Passive side of the attack. status_change_end(src, SC_SIGHT, INVALID_TIMER); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub,src, - skill->get_splash(skill_id, skill_lv),BL_CHAR|BL_SKILL, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, - skill->castend_damage_id); + map->foreachinrange(skill->area_sub,src, + skill->get_splash(skill_id, skill_lv),BL_CHAR|BL_SKILL, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, + skill->castend_damage_id); break; case NJ_HYOUSYOURAKU: @@ -5927,9 +5911,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case WZ_FROSTNOVA: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); skill_area_temp[1] = 0; - iMap->foreachinrange(skill->attack_area, src, - skill->get_splash(skill_id, skill_lv), splash_target(src), - BF_MAGIC, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); + map->foreachinrange(skill->attack_area, src, + skill->get_splash(skill_id, skill_lv), splash_target(src), + BF_MAGIC, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); break; case HVAN_EXPLOSION: //[orn] @@ -5939,12 +5923,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui i = ((!md || md->special_state.ai == 2) && !map_flag_vs(src->m))? BCT_ENEMY:BCT_ALL; clif->skill_nodamage(src, src, skill_id, -1, 1); - iMap->delblock(src); //Required to prevent chain-self-destructions hitting back. - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv), splash_target(src), - src, skill_id, skill_lv, tick, flag|i, - skill->castend_damage_id); - iMap->addblock(src); + map->delblock(src); //Required to prevent chain-self-destructions hitting back. + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv), splash_target(src), + src, skill_id, skill_lv, tick, flag|i, + skill->castend_damage_id); + map->addblock(src); status->damage(src, src, sstatus->max_hp,0,0,1); break; @@ -6004,7 +5988,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( tsce ) { clif->skill_nodamage(src,bl,skill_id,skill_lv,status_change_end(bl, type, INVALID_TIMER)); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); @@ -6041,24 +6025,22 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case TF_HIDING: case ST_CHASEWALK: case KO_YAMIKUMO: - if (tsce) - { + if (tsce) { clif->skill_nodamage(src,bl,skill_id,-1,status_change_end(bl, type, INVALID_TIMER)); //Hide skill-scream animation. - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } else if( tsc && tsc->option&OPTION_MADOGEAR ) { //Mado Gear cannot hide if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } clif->skill_nodamage(src,bl,skill_id,-1,sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); break; case TK_RUN: - if (tsce) - { + if (tsce) { clif->skill_nodamage(src,bl,skill_id,skill_lv,status_change_end(bl, type, INVALID_TIMER)); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(bl,type,100,skill_lv,unit->getdir(bl),0,0,0)); @@ -6076,7 +6058,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,i); else if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } case RA_CAMOUFLAGE: @@ -6176,9 +6158,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui else if(sd) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); // Level 6-10 doesn't consume a red gem if it fails [celest] - if (skill_lv > 5) - { // not to consume items - iMap->freeblock_unlock(); + if (skill_lv > 5) { + // not to consume items + map->freeblock_unlock(); return 0; } } @@ -6297,7 +6279,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if(sd) { clif->item_identify_list(sd); if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, dont consume anything, return */ - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } status_zap(src,0,skill_db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded @@ -6383,7 +6365,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui eflag = pc->additem(sd,&item_tmp,1,LOG_TYPE_PRODUCE); if(eflag) { clif->additem(sd,0,0,eflag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } break; @@ -6467,11 +6449,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } case AM_BERSERKPITCHER: - case AM_POTIONPITCHER: { + case AM_POTIONPITCHER: + { int i,sp = 0; int64 hp = 0; if( dstmd && dstmd->class_ == MOBID_EMPERIUM ) { - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } if( sd ) { @@ -6480,18 +6463,18 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui i = pc->search_inventory(sd,skill_db[skill_id].itemid[x]); if( i < 0 || skill_db[skill_id].itemid[x] <= 0 ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skill_id].amount[x]) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } if( skill_id == AM_BERSERKPITCHER ) { if( dstsd && dstsd->status.base_level < (unsigned int)sd->inventory_data[i]->elv ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } } @@ -6579,9 +6562,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui { unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP}; - if( sd && ( bl->type != BL_PC || ( dstsd && pc->checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 ) ) ){ + if( sd && ( bl->type != BL_PC || ( dstsd && pc->checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 ) ) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); // Don't consume item requirements + map->freeblock_unlock(); // Don't consume item requirements return 0; } @@ -6683,9 +6666,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; } //Affect all targets on splash area. - iMap->foreachinrange(skill->area_sub, bl, i, BL_CHAR, - src, skill_id, skill_lv, tick, flag|1, - skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, i, BL_CHAR, + src, skill_id, skill_lv, tick, flag|1, + skill->castend_damage_id); break; case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex] @@ -6709,7 +6692,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } clif->skill_nodamage(src,bl,TK_HIGHJUMP,skill_lv,1); - if(!iMap->count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB) && iMap->getcell(src->m,x,y,CELL_CHKREACH)) { + if(!map->count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB) && map->getcell(src->m,x,y,CELL_CHKREACH)) { clif->slide(src,x,y); unit->movepos(src, x, y, 1, 0); } @@ -6821,8 +6804,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case BS_GREED: if(sd){ clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->greed,bl, - skill->get_splash(skill_id, skill_lv),BL_ITEM,bl); + map->foreachinrange(skill->greed,bl, + skill->get_splash(skill_id, skill_lv),BL_ITEM,bl); } break; @@ -6930,7 +6913,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui // not really needed... but adding here anyway ^^ if (md && md->master_id > 0) { struct block_list *mbl, *tbl; - if ((mbl = iMap->id2bl(md->master_id)) == NULL || + if ((mbl = map->id2bl(md->master_id)) == NULL || (tbl = battle->get_targeted(mbl)) == NULL) break; md->state.provoke_flag = tbl->id; @@ -6941,7 +6924,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case NPC_RUN: { const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}}; - uint8 dir = (bl == src)?unit->getdir(src):iMap->calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. + uint8 dir = (bl == src)?unit->getdir(src):map->calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. unit->stop_attack(src); //Run skillv tiles overriding the can-move check. if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md) @@ -7031,7 +7014,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui // if neither was found if(!f_sd && !m_sd) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } status->change_start(bl,SC_STUN,10000,skill_lv,0,0,0,skill->get_time2(skill_id,skill_lv),8); @@ -7066,37 +7049,32 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( su && (sg = su->group) && (src->type == BL_MER || sg->src_id == src->id || map_flag_vs(bl->m)) && (skill->get_inf2(sg->skill_id)&INF2_TRAP) ) { clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); - if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) - { // prevent picking up expired traps - if( battle_config.skill_removetrap_type ) - { // get back all items used to deploy the trap - for( i = 0; i < 10; i++ ) - { - if( skill_db[su->group->skill_id].itemid[i] > 0 ) - { + if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) { + // prevent picking up expired traps + if( battle_config.skill_removetrap_type ) { + // get back all items used to deploy the trap + for( i = 0; i < 10; i++ ) { + if( skill_db[su->group->skill_id].itemid[i] > 0 ) { int flag; struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = skill_db[su->group->skill_id].itemid[i]; item_tmp.identify = 1; - if( item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,skill_db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) - { + if( item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,skill_db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,skill_db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,skill_db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } - } - else - { // get back 1 trap + } else { + // get back 1 trap struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = su->group->item_id?su->group->item_id:ITEMID_TRAP; item_tmp.identify = 1; - if( item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_OTHER)) ) - { + if( item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_OTHER)) ) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } } @@ -7142,16 +7120,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case AS_SPLASHER: - if(tstatus->mode&MD_BOSS - /** - * Renewal dropped the 3/4 hp requirement - **/ - #ifndef RENEWAL - || tstatus-> hp > tstatus->max_hp*3/4 - #endif - ) { + if( tstatus->mode&MD_BOSS +#ifndef RENEWAL + /** Renewal dropped the 3/4 hp requirement **/ + || tstatus-> hp > tstatus->max_hp*3/4 +#endif // RENEWAL + ) { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } clif->skill_nodamage(src,bl,skill_id,skill_lv, @@ -7164,23 +7140,23 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case PF_MINDBREAKER: { if(tstatus->mode&MD_BOSS || battle->check_undead(tstatus->race,tstatus->def_ele) ) { - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } - if (tsce) - { //HelloKitty2 (?) explained that this silently fails when target is + if (tsce) { + //HelloKitty2 (?) explained that this silently fails when target is //already inflicted. [Skotlex] - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } //Has a 55% + skill_lv*5% success chance. if (!clif->skill_nodamage(src,bl,skill_id,skill_lv, - sc_start(bl,type,55+5*skill_lv,skill_lv,skill->get_time(skill_id,skill_lv)))) - { + sc_start(bl,type,55+5*skill_lv,skill_lv,skill->get_time(skill_id,skill_lv))) + ) { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } @@ -7276,7 +7252,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } if( sd && !s ){ clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); // Don't consume item requirements + map->freeblock_unlock(); // Don't consume item requirements return 0; } clif->skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -7302,15 +7278,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui { int eff, count = -1; if( tsc && tsc->data[type] ){ - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } - if( rnd() % 100 > skill_lv * 8 || (dstmd && ((dstmd->guardian_data && dstmd->class_ == MOBID_EMPERIUM) || mob_is_battleground(dstmd))) ) - { + if( rnd() % 100 > skill_lv * 8 || (dstmd && ((dstmd->guardian_data && dstmd->class_ == MOBID_EMPERIUM) || mob_is_battleground(dstmd))) ) { if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } status_zap(src,0,skill_db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded [Inkfish] @@ -7467,10 +7442,10 @@ 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 (status->get_guild_id(src)) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, src, - skill->get_splash(skill_id, skill_lv), BL_PC, - src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, + skill->get_splash(skill_id, skill_lv), BL_PC, + src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, + skill->castend_nodamage_id); if (sd) guild->block_skill(sd,skill->get_time2(skill_id,skill_lv)); } @@ -7481,10 +7456,10 @@ 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 (status->get_guild_id(src)) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, src, - skill->get_splash(skill_id, skill_lv), BL_PC, - src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, + skill->get_splash(skill_id, skill_lv), BL_PC, + src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, + skill->castend_nodamage_id); if (sd) guild->block_skill(sd,skill->get_time2(skill_id,skill_lv)); } @@ -7495,10 +7470,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif->skill_nodamage(src,bl,AL_HEAL,status_percent_heal(bl,90,90),1); } else if (status->get_guild_id(src)) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, src, - skill->get_splash(skill_id, skill_lv), BL_PC, - src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, + skill->get_splash(skill_id, skill_lv), BL_PC, + src,skill_id,skill_lv,tick, flag|BCT_GUILD|1, + skill->castend_nodamage_id); if (sd) guild->block_skill(sd,skill->get_time2(skill_id,skill_lv)); } @@ -7519,7 +7494,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd)) { if (maplist[dstsd->bl.m].flag.nowarp && !map_flag_gvg2(dstsd->bl.m)) continue; - if(iMap->getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH)) + if(map->getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH)) dx[j] = dy[j] = 0; pc->setpos(dstsd, map_id2index(src->m), src->x+dx[j], src->y+dy[j], CLR_RESPAWN); } @@ -7601,8 +7576,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } //TODO: Shouldn't also players and the like switch targets? - iMap->foreachinrange(skill->chastle_mob_changetarget,src, - AREA_SIZE, BL_MOB, bl, src); + map->foreachinrange(skill->chastle_mob_changetarget,src, + AREA_SIZE, BL_MOB, bl, src); } } // Failed @@ -7621,7 +7596,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui else if(r<per[i][1]) //Master bl = battle->get_master(src); else //Enemy - bl = iMap->id2bl(battle->get_target(src)); + bl = map->id2bl(battle->get_target(src)); if (!bl) bl = src; i = skill->calc_heal(src, bl, skill_id, 1+rnd()%skill_lv, true); @@ -7685,13 +7660,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui default: sc_start2(bl,type,100,skill_lv,src->id,skill->get_time2(skill_id,skill_lv)); } - }else { + } else { skill_area_temp[2] = 0; //For SD_PREAMBLE clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv),BL_CHAR, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|SD_PREAMBLE|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv),BL_CHAR, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|SD_PREAMBLE|1, + skill->castend_nodamage_id); } break; case NPC_WIDESOULDRAIN: @@ -7700,10 +7675,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui else { skill_area_temp[2] = 0; //For SD_PREAMBLE clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, bl, - skill->get_splash(skill_id, skill_lv),BL_CHAR, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|SD_PREAMBLE|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, + skill->get_splash(skill_id, skill_lv),BL_CHAR, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|SD_PREAMBLE|1, + skill->castend_nodamage_id); } break; case ALL_PARTYFLEE: @@ -7738,14 +7713,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case RK_DRAGONHOWLING: if( flag&1) sc_start(bl,type,50 + 6 * skill_lv,skill_lv,skill->get_time(skill_id,skill_lv)); - else - { + else { skill_area_temp[2] = 0; clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub, src, - skill->get_splash(skill_id,skill_lv),BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_PREAMBLE|1, - skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, + skill->get_splash(skill_id,skill_lv),BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_PREAMBLE|1, + skill->castend_nodamage_id); } break; case RK_IGNITIONBREAK: @@ -7754,10 +7728,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui i = skill->get_splash(skill_id,skill_lv); if( skill_id == LG_EARTHDRIVE ) { int dummy = 1; - iMap->foreachinarea(skill->cell_overlap, src->m, src->x-i, src->y-i, src->x+i, src->y+i, BL_SKILL, LG_EARTHDRIVE, &dummy, src); + map->foreachinarea(skill->cell_overlap, src->m, src->x-i, src->y-i, src->x+i, src->y+i, BL_SKILL, LG_EARTHDRIVE, &dummy, src); } - iMap->foreachinrange(skill->area_sub, bl,i,BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl,i,BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); break; case RK_STONEHARDSKIN: if( sd ) { @@ -7871,7 +7845,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui { short count = 1; skill_area_temp[2] = 0; - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_PREAMBLE|SD_SPLASH|1,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_PREAMBLE|SD_SPLASH|1,skill->castend_damage_id); if( tsc && tsc->data[SC_ROLLINGCUTTER] ) { // Every time the skill is casted the status change is reseted adding a counter. count += (short)tsc->data[SC_ROLLINGCUTTER]->val1; @@ -7925,8 +7899,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case GC_PHANTOMMENACE: clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); break; case GC_HALLUCINATIONWALK: @@ -7995,9 +7969,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case AB_ORATIO: if( flag&1 ) sc_start(bl, type, 40 + 5 * skill_lv, skill_lv, skill->get_time(skill_id, skill_lv)); - else - { - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, + else { + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } @@ -8071,12 +8044,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } break; } - iMap->foreachinrange(skill->area_sub, bl, i, BL_CHAR, src, skill_id, skill_lv, tick, flag|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, bl, i, BL_CHAR, src, skill_id, skill_lv, tick, flag|1, skill->castend_damage_id); break; case AB_SILENTIUM: // Should the level of Lex Divina be equivalent to the level of Silentium or should the highest level learned be used? [LimitLine] - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, src, PR_LEXDIVINA, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); break; @@ -8086,9 +8059,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case WL_STASIS: if( flag&1 ) sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); - else - { - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id, skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,(map_flag_vs(src->m)?BCT_ALL:BCT_ENEMY|BCT_SELF)|flag|1,skill->castend_nodamage_id); + else { + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id, skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,(map_flag_vs(src->m)?BCT_ALL:BCT_ENEMY|BCT_SELF)|flag|1,skill->castend_nodamage_id); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } break; @@ -8115,12 +8087,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case WL_FROSTMISTY: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY,skill->castend_damage_id); break; case WL_JACKFROST: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->foreachinshootrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinshootrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); break; case WL_MARSHOFABYSS: @@ -8140,7 +8112,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui int rate = 45 + 5 * skill_lv; if( rnd()%100 < rate ){ clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); - iMap->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id); + map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id); }else if( sd ) // Failure on Rate clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } @@ -8211,7 +8183,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case RA_WUGDASH: if( tsce ) { clif->skill_nodamage(src,bl,skill_id,skill_lv,status_change_end(bl, type, INVALID_TIMER)); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } if( sd && pc_isridingwug(sd) ) { @@ -8223,7 +8195,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case RA_SENSITIVEKEEN: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); clif->skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_SKILL,src,skill_id,skill_lv,tick,flag|BCT_ENEMY,skill->castend_damage_id); break; /** * Mechanic @@ -8258,7 +8230,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case NC_MAGNETICFIELD: if( (i = sc_start2(bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv))) ) { - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),splash_target(src),src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_SPLASH|1,skill->castend_damage_id);; + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),splash_target(src),src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_SPLASH|1,skill->castend_damage_id);; clif->skill_damage(src,src,tick,status_get_amotion(src),0,-30000,1,skill_id,skill_lv,6); if (sd) pc->overheat(sd,1); } @@ -8286,7 +8258,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case NC_DISJOINT: { if( bl->type != BL_MOB ) break; - md = iMap->id2md(bl->id); + md = map->id2md(bl->id); if( md && md->class_ >= MOBID_SILVERSNIPER && md->class_ <= MOBID_MAGICDECOY_WIND ) status_kill(bl); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); @@ -8330,8 +8302,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } } else { clif->skill_nodamage(src, bl, skill_id, 0, 1); - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); } break; @@ -8369,7 +8341,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case LG_TRAMPLE: clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - iMap->foreachinrange(skill->destroy_trap,bl,skill->get_splash(skill_id,skill_lv),BL_SKILL,tick); + map->foreachinrange(skill->destroy_trap,bl,skill->get_splash(skill_id,skill_lv),BL_SKILL,tick); break; case LG_REFLECTDAMAGE: @@ -8390,40 +8362,39 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui int val, brate; switch( skill_lv ) { case 1: - { - struct item_data *shield_data = sd->inventory_data[sd->equip_index[EQI_HAND_L]]; - if( !shield_data || shield_data->type != IT_ARMOR ) { // No shield? - clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); + { + struct item_data *shield_data = sd->inventory_data[sd->equip_index[EQI_HAND_L]]; + if( !shield_data || shield_data->type != IT_ARMOR ) { // No shield? + clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); + break; + } + brate = shield_data->def * 10; + if( rate < 50 ) + opt = 1; + else if( rate < 75 ) + opt = 2; + else + opt = 3; + + switch( opt ) { + case 1: + sc_start(bl,SC_SHIELDSPELL_DEF,100,opt,-1); + clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); + if( rate < brate ) + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + status_change_end(bl,SC_SHIELDSPELL_DEF,INVALID_TIMER); + break; + case 2: + val = shield_data->def / 10; // % Reflected damage. + sc_start2(bl,SC_SHIELDSPELL_DEF,brate,opt,val,shield_data->def * 1000); + break; + case 3: + val = shield_data->def; // Attack increase. + sc_start2(bl,SC_SHIELDSPELL_DEF,brate,opt,val,shield_data->def * 3000); break; - } - brate = shield_data->def * 10; - if( rate < 50 ) - opt = 1; - else if( rate < 75 ) - opt = 2; - else - opt = 3; - - switch( opt ) { - case 1: - sc_start(bl,SC_SHIELDSPELL_DEF,100,opt,-1); - clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - if( rate < brate ) - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); - status_change_end(bl,SC_SHIELDSPELL_DEF,INVALID_TIMER); - break; - case 2: - val = shield_data->def / 10; // % Reflected damage. - sc_start2(bl,SC_SHIELDSPELL_DEF,brate,opt,val,shield_data->def * 1000); - break; - case 3: - val = shield_data->def; // Attack increase. - sc_start2(bl,SC_SHIELDSPELL_DEF,brate,opt,val,shield_data->def * 3000); - break; - } } + } break; - case 2: brate = sd->bonus.shieldmdef * 20; if( rate < 30 ) @@ -8437,14 +8408,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui sc_start(bl,SC_SHIELDSPELL_MDEF,100,opt,-1); clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); if( rate < brate ) - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|2,skill->castend_damage_id); + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|2,skill->castend_damage_id); status_change_end(bl,SC_SHIELDSPELL_MDEF,INVALID_TIMER); break; case 2: sc_start(bl,SC_SHIELDSPELL_MDEF,100,opt,-1); clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); if( rate < brate ) - iMap->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_nodamage_id); break; case 3: if( sc_start(bl,SC_SHIELDSPELL_MDEF,brate,opt,sd->bonus.shieldmdef * 30000) ) @@ -8498,7 +8469,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 { skill_area_temp[2] = 0; - iMap->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_PC,src,skill_id,skill_lv,tick,flag|SD_PREAMBLE|BCT_PARTY|BCT_SELF|1,skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_PC,src,skill_id,skill_lv,tick,flag|SD_PREAMBLE|BCT_PARTY|BCT_SELF|1,skill->castend_nodamage_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); } break; @@ -8526,7 +8497,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui skill_area_temp[2] = 0; if( !map_flag_vs(src->m) && !map_flag_gvg(src->m) ) flag |= BCT_GUILD; - iMap->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_PC,src,skill_id,skill_lv,tick,flag|SD_PREAMBLE|BCT_PARTY|BCT_SELF|1,skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_PC,src,skill_id,skill_lv,tick,flag|SD_PREAMBLE|BCT_PARTY|BCT_SELF|1,skill->castend_nodamage_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); } break; @@ -8548,13 +8519,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui mob->unlocktarget((TBL_MOB*)bl,timer->gettick()); unit->stop_attack(bl); clif->bladestop(src, bl->id, 1); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } } else { int count = 0; clif->skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - count = iMap->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-charactors + count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-charactors BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); if( sd ) pc->delspiritball(sd, count, 0); clif->skill_nodamage(src, src, skill_id, skill_lv, @@ -8584,7 +8555,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif->skill_nodamage(src, bl, skill_id, skill_lv, i ? 1:0); } else { clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|BCT_SELF|SD_SPLASH|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|BCT_SELF|SD_SPLASH|1, skill->castend_nodamage_id); } break; @@ -8690,7 +8661,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( flag&1 ) { sc_start2(bl,type,(skill_id==WM_VOICEOFSIREN)?20+10*skill_lv:100,skill_lv,(skill_id==WM_VOICEOFSIREN)?src->id:0,skill->get_time(skill_id,skill_lv)); } else { - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),(skill_id==WM_VOICEOFSIREN)?BL_CHAR|BL_SKILL:BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),(skill_id==WM_VOICEOFSIREN)?BL_CHAR|BL_SKILL:BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); } break; @@ -8720,12 +8691,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif->skill_fail(sd,skill_id,USESKILL_FAIL_NEED_HELPER,0); break; } - if( iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id,skill_lv), + if( map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id,skill_lv), BL_PC, src, skill_id, skill_lv, tick, BCT_ENEMY, skill->area_sub_count) > 7 ) flag |= 2; else flag |= 1; - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|BCT_SELF, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|BCT_SELF, skill->castend_nodamage_id); clif->skill_nodamage(src, bl, skill_id, skill_lv, sc_start(src,SC_STOP,100,skill_lv,skill->get_time2(skill_id,skill_lv))); if( flag&2 ) // Dealed here to prevent conflicts @@ -8760,7 +8731,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } else { // These affect to all targets arround the caster. uint16 lv = skill_lv; skill_area_temp[0] = (sd) ? skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1) : 50; // 50% chance in non BL_PC (clones). - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); } break; @@ -8799,7 +8770,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if (!target_id) break; if (skill->get_casttype(improv_skill_id) == CAST_GROUND) { - bl = iMap->id2bl(target_id); + bl = map->id2bl(target_id); if (!bl) bl = src; unit->skilluse_pos(src, bl->x, bl->y, improv_skill_id, improv_skill_lv); } else @@ -8830,10 +8801,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui mapindex = mapindex_name2id(MAP_MORA); } - if(!mapindex) - { //Given map not found? + if(!mapindex) { + //Given map not found? clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } pc->setpos(sd, mapindex, x, y, CLR_TELEPORT); @@ -8869,8 +8840,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui sc_start(bl,type,rate,skill_lv,skill->get_time(skill_id,skill_lv)); }else { clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ALL|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ALL|1, skill->castend_nodamage_id); } break; @@ -8998,8 +8969,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui sc_start(bl, type, 25 + 10 * skill_lv, skill_lv, skill->get_time(skill_id, skill_lv))) ) status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100); } else - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); break; case GN_SLINGITEM: @@ -9015,7 +8986,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( itemdb_is_GNbomb(ammo_id) ) { if(battle->check_target(src,bl,BCT_ENEMY) > 0) {// Only attack if the target is an enemy. if( ammo_id == 13263 ) - iMap->foreachincell(skill->area_sub,bl->m,bl->x,bl->y,BL_CHAR,src,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachincell(skill->area_sub,bl->m,bl->x,bl->y,BL_CHAR,src,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); else skill->attack(BF_WEAPON,src,src,bl,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag); } else //Otherwise, it fails, shows animation and removes items. @@ -9234,9 +9205,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif->skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); sc_start(src, SC_STOP, 100, skill_lv, skill->get_time(skill_id, skill_lv)); } - }else{ + } else { skill_area_temp[2] = 0; - iMap->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_nodamage_id); } break; @@ -9317,7 +9288,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui struct mob_data *md; int i, dummy = 0; - i = iMap->foreachinmap(skill->check_condition_mob_master_sub ,hd->bl.m, BL_MOB, hd->bl.id, summons[skill_lv-1], skill_id, &dummy); + i = map->foreachinmap(skill->check_condition_mob_master_sub ,hd->bl.m, BL_MOB, hd->bl.id, summons[skill_lv-1], skill_id, &dummy); if(i >= qty[skill_lv-1]) break; @@ -9339,7 +9310,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui default: ShowWarning("skill_castend_nodamage_id: Unknown skill used:%d\n",skill_id); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } @@ -9365,16 +9336,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui skill->consume_requirement(sd,skill_id,skill_lv,2); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } /*========================================== * *------------------------------------------*/ -int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) -{ - struct block_list* src = iMap->id2bl(id); +int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) { + struct block_list* src = map->id2bl(id); int maxcount; struct map_session_data *sd; struct unit_data *ud = unit->bl2ud(src); @@ -9501,7 +9471,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) // } unit->set_walkdelay(src, tick, battle_config.default_walk_delay+skill->get_walkdelay(ud->skill_id, ud->skill_lv), 1); status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER);// only normal attack and auto cast skills benefit from its bonuses - iMap->freeblock_lock(); + map->freeblock_lock(); skill->castend_pos2(src,ud->skillx,ud->skilly,ud->skill_id,ud->skill_lv,tick,0); if( sd && sd->skillitem != AL_WARP ) // Warp-Portal thru items will clear data in skill_castend_map. [Inkfish] @@ -9513,7 +9483,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) ud->skill_lv = ud->skillx = ud->skilly = 0; } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 1; } while(0); @@ -9718,38 +9688,38 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case PR_BENEDICTIO: skill_area_temp[1] = src->id; i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->area_sub, - src->m, x-i, y-i, x+i, y+i, BL_PC, - src, skill_id, skill_lv, tick, flag|BCT_ALL|1, - skill->castend_nodamage_id); - iMap->foreachinarea(skill->area_sub, - src->m, x-i, y-i, x+i, y+i, BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, - skill->castend_damage_id); + map->foreachinarea(skill->area_sub, + src->m, x-i, y-i, x+i, y+i, BL_PC, + src, skill_id, skill_lv, tick, flag|BCT_ALL|1, + skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub, + src->m, x-i, y-i, x+i, y+i, BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, + skill->castend_damage_id); break; case BS_HAMMERFALL: i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea (skill->area_sub, - src->m, x-i, y-i, x+i, y+i, BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|2, - skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub, + src->m, x-i, y-i, x+i, y+i, BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|2, + skill->castend_nodamage_id); break; case HT_DETECTING: i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea( status->change_timer_sub, - src->m, x-i, y-i, x+i,y+i,BL_CHAR, - src,NULL,SC_SIGHT,tick); + map->foreachinarea(status->change_timer_sub, + src->m, x-i, y-i, x+i,y+i,BL_CHAR, + src,NULL,SC_SIGHT,tick); if(battle_config.traps_setting&1) - iMap->foreachinarea( skill_reveal_trap, - src->m, x-i, y-i, x+i,y+i,BL_SKILL); + map->foreachinarea(skill_reveal_trap, + src->m, x-i, y-i, x+i,y+i,BL_SKILL); break; case SR_RIDEINLIGHTNING: i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->area_sub, src->m, x-i, y-i, x+i, y+i, BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); + map->foreachinarea(skill->area_sub, src->m, x-i, y-i, x+i, y+i, BL_CHAR, + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id); break; case SA_VOLCANO: @@ -9889,7 +9859,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui if( sc->data[SC_BASILICA] ) status_change_end(src, SC_BASILICA, INVALID_TIMER); // Cancel Basilica else { // Create Basilica. Start SC on caster. Unit timer start SC on others. - if( iMap->foreachinrange(skill_count_wos, src, 2, BL_MOB|BL_PC, src) ) { + if( map->foreachinrange(skill_count_wos, src, 2, BL_MOB|BL_PC, src) ) { if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL,0); return 1; @@ -9910,7 +9880,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui break; case RG_CLEANER: // [Valaris] i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->graffitiremover,src->m,x-i,y-i,x+i,y+i,BL_SKILL); + map->foreachinarea(skill->graffitiremover,src->m,x-i,y-i,x+i,y+i,BL_SKILL); break; case SO_WARMER: @@ -10020,10 +9990,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui if(script->potion_hp > 0 || script->potion_sp > 0) { i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->area_sub, - src->m,x-i,y-i,x+i,y+i,BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1, - skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub, + src->m,x-i,y-i,x+i,y+i,BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1, + skill->castend_nodamage_id); } } else { int i = skill_lv%11 - 1; @@ -10042,10 +10012,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui if(script->potion_hp > 0 || script->potion_sp > 0) { i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->area_sub, - src->m,x-i,y-i,x+i,y+i,BL_CHAR, - src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1, - skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub, + src->m,x-i,y-i,x+i,y+i,BL_CHAR, + src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1, + skill->castend_nodamage_id); } } break; @@ -10055,7 +10025,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int dummy = 1; clif->skill_poseffect(src,skill_id,skill_lv,x,y,tick); i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->cell_overlap, src->m, x-i, y-i, x+i, y+i, BL_SKILL, HW_GANBANTEIN, &dummy, src); + map->foreachinarea(skill->cell_overlap, src->m, x-i, y-i, x+i, y+i, BL_SKILL, HW_GANBANTEIN, &dummy, src); } else { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 1; @@ -10071,8 +10041,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui // Plant Cultivation [Celest] case CR_CULTIVATION: if (sd) { - if( iMap->count_oncell(src->m,x,y,BL_CHAR) > 0 ) - { + if( map->count_oncell(src->m,x,y,BL_CHAR) > 0 ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 1; } @@ -10138,14 +10107,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case RK_DRAGONBREATH: case RK_DRAGONBREATH_WATER: i = skill->get_splash(skill_id,skill_lv); - iMap->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), - src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), + src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); break; case SO_ARRULLO: i = skill->get_splash(skill_id,skill_lv); - iMap->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), + src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); break; /** * Guilotine Cross @@ -10166,13 +10135,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case AB_EPICLESIS: if( (sg = skill->unitsetting(src, skill_id, skill_lv, x, y, 0)) ) { i = sg->unit->range; - iMap->foreachinarea(skill->area_sub, src->m, x - i, y - i, x + i, y + i, BL_CHAR, src, ALL_RESURRECTION, 1, tick, flag|BCT_NOENEMY|1,skill->castend_nodamage_id); + map->foreachinarea(skill->area_sub, src->m, x - i, y - i, x + i, y + i, BL_CHAR, src, ALL_RESURRECTION, 1, tick, flag|BCT_NOENEMY|1,skill->castend_nodamage_id); } break; case WL_EARTHSTRAIN: { - int i, wave = skill_lv + 4, dir = iMap->calc_dir(src,x,y); + int i, wave = skill_lv + 4, dir = map->calc_dir(src,x,y); int sx = x = src->x, sy = y = src->y; // Store first caster's location to avoid glitch on unit setting for( i = 1; i <= wave; i++ ) @@ -10192,7 +10161,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui **/ case RA_DETONATOR: i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea(skill->detonator, src->m, x-i, y-i, x+i, y+i, BL_SKILL, src); + map->foreachinarea(skill->detonator, src->m, x-i, y-i, x+i, y+i, BL_SKILL, src); clif->skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); break; /** @@ -10246,10 +10215,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int width;//according to data from irowiki it actually is a square for( width = 0; width < 7; width++ ) for( i = 0; i < 7; i++ ) - iMap->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id); + map->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id); for( width = 0; width < 7; width++ ) for( i = 0; i < 7; i++ ) - iMap->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id); + map->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id); } break; @@ -10266,7 +10235,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case LG_RAYOFGENESIS: if( status->charge(src,status_get_max_hp(src)*3*skill_lv / 100,0) ) { i = skill->get_splash(skill_id,skill_lv); - iMap->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), + map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src), src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); } else if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL,0); @@ -10274,13 +10243,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case WM_DOMINION_IMPULSE: i = skill->get_splash(skill_id, skill_lv); - iMap->foreachinarea( skill->activate_reverberation, + map->foreachinarea( skill->activate_reverberation, src->m, x-i, y-i, x+i,y+i,BL_SKILL); break; case WM_GREAT_ECHO: flag|=1; // Should counsume 1 item per skill usage. - iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->castend_damage_id); break; case GN_CRAZYWEED: { int area = skill->get_splash(GN_CRAZYWEED_ATK, skill_lv); @@ -10312,10 +10281,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui clif->changetraplook(&ud->skillunit[i]->unit->bl, UNT_FIRE_EXPANSION_TEAR_GAS); break; case 5: - iMap->foreachinarea(skill->area_sub, src->m, - ud->skillunit[i]->unit->bl.x - 3, ud->skillunit[i]->unit->bl.y - 3, - ud->skillunit[i]->unit->bl.x + 3, ud->skillunit[i]->unit->bl.y + 3, BL_CHAR, - src, CR_ACIDDEMONSTRATION, sd ? pc->checkskill(sd, CR_ACIDDEMONSTRATION) : skill_lv, tick, flag|BCT_ENEMY|1|SD_LEVEL, skill->castend_damage_id); + map->foreachinarea(skill->area_sub, src->m, + ud->skillunit[i]->unit->bl.x - 3, ud->skillunit[i]->unit->bl.y - 3, + ud->skillunit[i]->unit->bl.x + 3, ud->skillunit[i]->unit->bl.y + 3, BL_CHAR, + src, CR_ACIDDEMONSTRATION, sd ? pc->checkskill(sd, CR_ACIDDEMONSTRATION) : skill_lv, tick, flag|BCT_ENEMY|1|SD_LEVEL, skill->castend_damage_id); skill->delunit(ud->skillunit[i]->unit); break; default: @@ -10403,7 +10372,7 @@ int skill_dance_overlap(struct skill_unit* su, int flag) { su->val2 &= ~UF_ENSEMBLE; } - return iMap->foreachincell(skill->dance_overlap_sub, su->bl.m,su->bl.x,su->bl.y,BL_SKILL, su,flag); + return map->foreachincell(skill->dance_overlap_sub, su->bl.m,su->bl.x,su->bl.y,BL_SKILL, su,flag); } /*========================================== @@ -10466,7 +10435,7 @@ int skill_icewall_block(struct block_list *bl,va_list ap) { nullpo_ret(bl); nullpo_ret(md); - if( !md->target_id || ( target = iMap->id2bl(md->target_id) ) == NULL ) + if( !md->target_id || ( target = map->id2bl(md->target_id) ) == NULL ) return 0; if( path->search_long(NULL,bl->m,bl->x,bl->y,target->x,target->y,CELL_CHKICEWALL) ) @@ -10543,7 +10512,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ { //Warp Portal morphing to active mode, extract relevant data from src. [Skotlex] if( src->type != BL_SKILL ) return NULL; group = ((TBL_SKILL*)src)->group; - src = iMap->id2bl(group->src_id); + src = map->id2bl(group->src_id); if( !src ) return NULL; val2 = group->val2; //Copy the (x,y) position you warp to val3 = group->val3; //as well as the mapindex to warp to. @@ -10559,7 +10528,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ break; case WZ_FIREPILLAR: - if( iMap->getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + if( map->getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) return NULL; if((flag&1)!=0) limit=1000; @@ -10798,8 +10767,8 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ case WM_REVERBERATION: interval = limit; val2 = 1; - case WM_POEMOFNETHERWORLD: // Can't be placed on top of Land Protector. - if( iMap->getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + case WM_POEMOFNETHERWORLD: // Can't be placed on top of Land Protector. + if( map->getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) return NULL; break; case SO_CLOUD_KILL: @@ -10874,7 +10843,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ int val2 = 0; int alive = 1; - if( !group->state.song_dance && !iMap->getcell(src->m,ux,uy,CELL_CHKREACH) ) + if( !group->state.song_dance && !map->getcell(src->m,ux,uy,CELL_CHKREACH) ) continue; // don't place skill units on walls (except for songs/dances/encores) if( battle_config.skill_wall_check && skill->get_unit_flag(skill_id)&UF_PATHCHECK && !path->search_long(NULL,src->m,ux,uy,x,y,CELL_CHKWALL) ) continue; // no path between cell and center of casting. @@ -10886,7 +10855,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ break; case WZ_ICEWALL: val1 = (skill_lv <= 1) ? 500 : 200 + 200*skill_lv; - val2 = iMap->getcell(src->m, ux, uy, CELL_GETTYPE); + val2 = map->getcell(src->m, ux, uy, CELL_GETTYPE); break; case HT_LANDMINE: case MA_LANDMINE: @@ -10938,11 +10907,11 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ if (skill->get_unit_flag(skill_id) & UF_RANGEDSINGLEUNIT && i == (layout->count / 2)) val2 |= UF_RANGEDSINGLEUNIT; // center. - if( sd && iMap->getcell(src->m, ux, uy, CELL_CHKMAELSTROM) ) //Does not recover SP from monster skills - iMap->foreachincell(skill->maelstrom_suction,src->m,ux,uy,BL_SKILL,skill_id,skill_lv); + if( sd && map->getcell(src->m, ux, uy, CELL_CHKMAELSTROM) ) //Does not recover SP from monster skills + map->foreachincell(skill->maelstrom_suction,src->m,ux,uy,BL_SKILL,skill_id,skill_lv); if( range <= 0 ) - iMap->foreachincell(skill->cell_overlap,src->m,ux,uy,BL_SKILL,skill_id, &alive, src); + map->foreachincell(skill->cell_overlap,src->m,ux,uy,BL_SKILL,skill_id, &alive, src); if( !alive ) continue; @@ -10958,10 +10927,11 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ // execute on all targets standing on this cell if (range==0 && active_flag) - iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),1); + map->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),1); } - if (!group->alive_count) { //No cells? Something that was blocked completely by Land Protector? + if (!group->alive_count) { + //No cells? Something that was blocked completely by Land Protector? skill->del_unitgroup(group,ALC_MARK); return NULL; } @@ -10969,7 +10939,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ //success, unit created. switch( skill_id ) { case WZ_ICEWALL: - iMap->foreachinrange(skill->icewall_block, src, AREA_SIZE, BL_MOB); + map->foreachinrange(skill->icewall_block, src, AREA_SIZE, BL_MOB); break; case NJ_TATAMIGAESHI: //Store number of tiles. group->val1 = group->alive_count; @@ -10997,11 +10967,11 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned return 0; nullpo_ret(sg=src->group); - nullpo_ret(ss=iMap->id2bl(sg->src_id)); + nullpo_ret(ss=map->id2bl(sg->src_id)); - if( skill->get_type(sg->skill_id) == BF_MAGIC && iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) && sg->skill_id != SA_LANDPROTECTOR ) + if( skill->get_type(sg->skill_id) == BF_MAGIC && map->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) && sg->skill_id != SA_LANDPROTECTOR ) return 0; //AoE skills are ineffective. [Skotlex] - if( iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKMAELSTROM) ) + if( map->getcell(bl->m, bl->x, bl->y, CELL_CHKMAELSTROM) ) return 0; sc = status->get_sc(bl); @@ -11023,7 +10993,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned const struct TimerData* td = sc->data[type]?timer->get(sc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); - iMap->moveblock(bl, src->bl.x, src->bl.y, tick); + map->moveblock(bl, src->bl.x, src->bl.y, tick); clif->fixpos(bl); sg->val2 = bl->id; } @@ -11065,7 +11035,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned if( --count <= 0 ) skill->del_unitgroup(sg,ALC_MARK); - if ( iMap->mapindex2mapid(sg->val3) == sd->bl.m && x == sd->bl.x && y == sd->bl.y ) + if ( map->mapindex2mapid(sg->val3) == sd->bl.m && x == sd->bl.x && y == sd->bl.y ) working = 1;/* we break it because officials break it, lovely stuff. */ sg->val1 = (count<<16)|working; @@ -11073,7 +11043,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned pc->setpos(sd,m,x,y,CLR_TELEPORT); } } else if(bl->type == BL_MOB && battle_config.mob_warp&2) { - int16 m = iMap->mapindex2mapid(sg->val3); + int16 m = map->mapindex2mapid(sg->val3); if (m < 0) break; //Map not available on this map-server. unit->warp(bl,m,sg->val2>>16,sg->val2&0xffff,CLR_TELEPORT); } @@ -11211,7 +11181,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns return 0; nullpo_ret(sg=src->group); - nullpo_ret(ss=iMap->id2bl(sg->src_id)); + nullpo_ret(ss=map->id2bl(sg->src_id)); tsd = BL_CAST(BL_PC, bl); tsc = status->get_sc(bl); @@ -11243,7 +11213,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns ts->tick = tick+sg->interval; if ((skill_id==CR_GRANDCROSS || skill_id==NPC_GRANDDARKNESS) && !battle_config.gx_allhit) - ts->tick += sg->interval*(iMap->count_oncell(bl->m,bl->x,bl->y,BL_CHAR)-1); + ts->tick += sg->interval*(map->count_oncell(bl->m,bl->x,bl->y,BL_CHAR)-1); } switch (sg->unit_id) { @@ -11419,12 +11389,12 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns if( status_get_mode(bl)&MD_BOSS ) break; if( status->change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,skill->get_time2(sg->skill_id, sg->skill_lv), 8) ) { - iMap->moveblock(bl, src->bl.x, src->bl.y, tick); + map->moveblock(bl, src->bl.x, src->bl.y, tick); clif->fixpos(bl); } - iMap->foreachinrange(skill->trap_splash, &src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl, tick); + map->foreachinrange(skill->trap_splash, &src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl, tick); sg->unit_id = UNT_USED_TRAPS; //Changed ID so it does not invoke a for each in area again. } break; @@ -11455,9 +11425,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_FIREPILLAR_ACTIVE: case UNT_CLAYMORETRAP: if( sg->unit_id == UNT_FIRINGTRAP || sg->unit_id == UNT_ICEBOUNDTRAP || sg->unit_id == UNT_CLAYMORETRAP ) - iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick); + map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick); else - iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); + map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); if (sg->unit_id != UNT_FIREPILLAR_ACTIVE) clif->changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS); sg->limit=DIFF_TICK(tick,sg->tick)+1500 + @@ -11644,9 +11614,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_GROUNDDRIFT_POISON: case UNT_GROUNDDRIFT_WATER: case UNT_GROUNDDRIFT_FIRE: - iMap->foreachinrange(skill->trap_splash,&src->bl, - skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, - &src->bl,tick); + map->foreachinrange(skill->trap_splash,&src->bl, + skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, + &src->bl,tick); sg->unit_id = UNT_USED_TRAPS; //clif->changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE); sg->limit=DIFF_TICK(tick,sg->tick)+1500; @@ -11701,7 +11671,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_REVERBERATION: clif->changetraplook(&src->bl,UNT_USED_TRAPS); - iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); + map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); sg->limit = DIFF_TICK(tick,sg->tick)+1000; sg->unit_id = UNT_USED_TRAPS; break; @@ -11727,7 +11697,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns const struct TimerData* td = tsc->data[type]?timer->get(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); - ///iMap->moveblock(bl, src->bl.x, src->bl.y, tick); // in official server it doesn't behave like this. [malufett] + ///map->moveblock(bl, src->bl.x, src->bl.y, tick); // in official server it doesn't behave like this. [malufett] clif->fixpos(bl); sg->val2 = bl->id; } else @@ -11937,16 +11907,16 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in status_change_end(bl, type, INVALID_TIMER); break; - case UNT_SPIDERWEB: { - struct block_list *target = iMap->id2bl(sg->val2); - if (target && target==bl) - { - if (sce && sce->val3 == sg->group_id) - status_change_end(bl, type, INVALID_TIMER); - sg->limit = DIFF_TICK(tick,sg->tick)+1000; - } - break; + case UNT_SPIDERWEB: + { + struct block_list *target = map->id2bl(sg->val2); + if (target && target==bl) { + if (sce && sce->val3 == sg->group_id) + status_change_end(bl, type, INVALID_TIMER); + sg->limit = DIFF_TICK(tick,sg->tick)+1000; } + } + break; } return sg->skill_id; } @@ -12168,7 +12138,7 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap) { switch(skill_id) { case PR_BENEDICTIO: { - uint8 dir = iMap->calc_dir(&sd->bl,tsd->bl.x,tsd->bl.y); + uint8 dir = map->calc_dir(&sd->bl,tsd->bl.x,tsd->bl.y); dir = (unit->getdir(&sd->bl) + dir)%8; //This adjusts dir to account for the direction the sd is facing. if ((tsd->class_&MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == 2 || dir == 6) //Must be standing to the left/right of Priest. && sd->status.sp >= 10) @@ -12233,26 +12203,26 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16 switch (skill_id) { case PR_BENEDICTIO: for (i = 0; i < c; i++) { - if ((tsd = iMap->id2sd(p_sd[i])) != NULL) + if ((tsd = map->id2sd(p_sd[i])) != NULL) status->charge(&tsd->bl, 0, 10); } return c; case AB_ADORAMUS: - if( c > 0 && (tsd = iMap->id2sd(p_sd[0])) != NULL ) { + if( c > 0 && (tsd = map->id2sd(p_sd[0])) != NULL ) { i = 2 * (*skill_lv); status->charge(&tsd->bl, 0, i); } break; case WM_GREAT_ECHO: for( i = 0; i < c; i++ ) { - if( (tsd = iMap->id2sd(p_sd[i])) != NULL ) + if( (tsd = map->id2sd(p_sd[i])) != NULL ) status_zap(&tsd->bl,0,skill->get_sp(skill_id,*skill_lv)/c); } break; default: //Warning: Assuming Ensemble skills here (for speed) if( is_chorus ) break;//Chorus skills are not to be parsed as ensambles - if (c > 0 && sd->sc.data[SC_DANCING] && (tsd = iMap->id2sd(p_sd[0])) != NULL) { + if (c > 0 && sd->sc.data[SC_DANCING] && (tsd = map->id2sd(p_sd[0])) != NULL) { sd->sc.data[SC_DANCING]->val4 = tsd->bl.id; sc_start4(&tsd->bl,SC_DANCING,100,skill_id,sd->sc.data[SC_DANCING]->val2,*skill_lv,sd->bl.id,skill->get_time(skill_id,*skill_lv)+1000); clif->skill_nodamage(&tsd->bl, &sd->bl, skill_id, *skill_lv, 1); @@ -12269,7 +12239,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16 if( is_chorus ) i = party_foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv); else - i = iMap->foreachinrange(skill->check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id); + i = map->foreachinrange(skill->check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id); if ( skill_id != PR_BENEDICTIO && skill_id != AB_ADORAMUS && skill_id != WL_COMET ) //Apply the average lv to encore skills. *skill_lv = (i+(*skill_lv))/(c+1); //I know c should be one, but this shows how it could be used for the average of n partners. @@ -12656,7 +12626,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id for (i=0;i<size*size;i++) { x = sd->bl.x+(i%size-range); y = sd->bl.y+(i/size-range); - if (iMap->getcell(sd->bl.m,x,y,CELL_CHKWALL)) { + if (map->getcell(sd->bl.m,x,y,CELL_CHKWALL)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -12947,13 +12917,13 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case SR_CURSEDCIRCLE: if (map_flag_gvg2(sd->bl.m)) { - if (iMap->foreachinrange(mob->count_sub, &sd->bl, skill->get_splash(skill_id, skill_lv), BL_MOB, - MOBID_EMPERIUM, MOBID_GUARIDAN_STONE1, MOBID_GUARIDAN_STONE2)) { - char output[128]; - sprintf(output, "You're too close to a stone or emperium to do this skill"); - clif->colormes(sd->fd, COLOR_RED, output); - return 0; - } + if (map->foreachinrange(mob->count_sub, &sd->bl, skill->get_splash(skill_id, skill_lv), BL_MOB, + MOBID_EMPERIUM, MOBID_GUARIDAN_STONE1, MOBID_GUARIDAN_STONE2)) { + char output[128]; + sprintf(output, "You're too close to a stone or emperium to do this skill"); + clif->colormes(sd->fd, COLOR_RED, output); + return 0; + } } if( sd->spiritball > 0 ) sd->spiritball_old = require.spiritball = sd->spiritball; @@ -13110,7 +13080,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case ST_WATER: if (sc && (sc->data[SC_DELUGE] || sc->data[SC_NJ_SUITON])) break; - if (iMap->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER)) + if (map->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER)) break; clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; @@ -13291,10 +13261,11 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, int maxcount = (skill_id==AM_CANNIBALIZE)? 6-skill_lv : skill->get_maxcount(skill_id,skill_lv); int mob_class = (skill_id==AM_CANNIBALIZE)? summons[skill_lv-1] :1142; if(battle_config.land_skill_limit && maxcount>0 && (battle_config.land_skill_limit&BL_PC)) { - i = iMap->foreachinmap(skill->check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill_id, &c); - if(c >= maxcount || - (skill_id==AM_CANNIBALIZE && c != i && battle_config.summon_flora&2)) - { //Fails when: exceed max limit. There are other plant types already out. + i = map->foreachinmap(skill->check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill_id, &c); + if( c >= maxcount + || (skill_id==AM_CANNIBALIZE && c != i && battle_config.summon_flora&2) + ) { + //Fails when: exceed max limit. There are other plant types already out. clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -13312,9 +13283,9 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, if( battle_config.land_skill_limit && maxcount > 0 && ( battle_config.land_skill_limit&BL_PC ) ) { if( skill_id == NC_MAGICDECOY ) { for( j = mob_class; j <= 2046; j++ ) - iMap->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, j, skill_id, &c); + map->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, j, skill_id, &c); } else - iMap->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill_id, &c); + map->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill_id, &c); if( c >= maxcount ) { clif->skill_fail(sd , skill_id, USESKILL_FAIL_LEVEL, 0); return 0; @@ -13324,7 +13295,7 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, break; case KO_ZANZOU: { int c = 0; - i = iMap->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, 2308, skill_id, &c); + i = map->foreachinmap(skill->check_condition_mob_master_sub, sd->bl.m, BL_MOB, sd->bl.id, 2308, skill_id, &c); if( c >= skill->get_maxcount(skill_id,skill_lv) || c != i) { clif->skill_fail(sd , skill_id, USESKILL_FAIL_LEVEL, 0); return 0; @@ -14208,7 +14179,7 @@ void skill_brandishspear_dir (struct square* tc, uint8 dir, int are) { void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { int c,n=4; - uint8 dir = iMap->calc_dir(src,bl->x,bl->y); + uint8 dir = map->calc_dir(src,bl->x,bl->y); struct square tc; int x=bl->x,y=bl->y; skill->brandishspear_first(&tc,dir,x,y); @@ -14217,10 +14188,10 @@ void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 s if(skill_lv > 9){ for(c=1;c<4;c++){ - iMap->foreachincell(skill->area_sub, - bl->m,tc.val1[c],tc.val2[c],BL_CHAR, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|n, - skill->castend_damage_id); + map->foreachincell(skill->area_sub, + bl->m,tc.val1[c],tc.val2[c],BL_CHAR, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|n, + skill->castend_damage_id); } } if(skill_lv > 6){ @@ -14233,11 +14204,11 @@ void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 s if(skill_lv > 3){ for(c=0;c<5;c++){ - iMap->foreachincell(skill->area_sub, - bl->m,tc.val1[c],tc.val2[c],BL_CHAR, - src,skill_id,skill_lv,tick, flag|BCT_ENEMY|n, - skill->castend_damage_id); - if(skill_lv > 6 && n==3 && c==4){ + map->foreachincell(skill->area_sub, + bl->m,tc.val1[c],tc.val2[c],BL_CHAR, + src,skill_id,skill_lv,tick, flag|BCT_ENEMY|n, + skill->castend_damage_id); + if(skill_lv > 6 && n==3 && c==4) { skill_brandishspear_dir(&tc,dir,-1); n--;c=-1; } @@ -14245,7 +14216,7 @@ void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 s } for(c=0;c<10;c++){ if(c==0||c==5) skill->brandishspear_dir(&tc,dir,-1); - iMap->foreachincell(skill->area_sub, + map->foreachincell(skill->area_sub, bl->m,tc.val1[c%5],tc.val2[c%5],BL_CHAR, src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, skill->castend_damage_id); @@ -14263,7 +14234,7 @@ void skill_repairweapon (struct map_session_data *sd, int idx) { nullpo_retv(sd); - if ( !( target_sd = iMap->id2sd(sd->menuskill_val) ) ) //Failed.... + if ( !( target_sd = map->id2sd(sd->menuskill_val) ) ) //Failed.... return; if( idx == 0xFFFF ) // No item selected ('Cancel' clicked) @@ -14531,11 +14502,11 @@ int skill_sit (struct map_session_data *sd, int type) if (!flag) return 0; if(type) { - if (iMap->foreachinrange(skill->sit_count,&sd->bl, range, BL_PC, flag) > 1) - iMap->foreachinrange(skill->sit_in,&sd->bl, range, BL_PC, flag); + if (map->foreachinrange(skill->sit_count,&sd->bl, range, BL_PC, flag) > 1) + map->foreachinrange(skill->sit_in,&sd->bl, range, BL_PC, flag); } else { - if (iMap->foreachinrange(skill->sit_count,&sd->bl, range, BL_PC, flag) < 2) - iMap->foreachinrange(skill->sit_out,&sd->bl, range, BL_PC, flag); + if (map->foreachinrange(skill->sit_count,&sd->bl, range, BL_PC, flag) < 2) + map->foreachinrange(skill->sit_out,&sd->bl, range, BL_PC, flag); } return 0; } @@ -14751,11 +14722,11 @@ int skill_detonator(struct block_list *bl, va_list ap) { case UNT_CLAYMORETRAP: case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: - iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag|BL_SKILL|~BCT_SELF,bl,su->group->tick); + map->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag|BL_SKILL|~BCT_SELF,bl,su->group->tick); break; default: - iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag,bl,su->group->tick); - } + map->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag,bl,su->group->tick); + } clif->changetraplook(bl, UNT_USED_TRAPS); su->group->limit = DIFF_TICK(timer->gettick(),su->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : (unit_id == UNT_FIRINGTRAP ? 0 : 1500)) ); @@ -14908,7 +14879,7 @@ int skill_trap_splash (struct block_list *bl, va_list ap) { return 0; nullpo_ret(sg = su->group); - nullpo_ret(ss = iMap->id2bl(sg->src_id)); + nullpo_ret(ss = map->id2bl(sg->src_id)); if(battle->check_target(src,bl,sg->target_flag) <= 0) return 0; @@ -15008,7 +14979,7 @@ int skill_maelstrom_suction(struct block_list *bl, va_list ap) { if( su->group->skill_id == SC_MAELSTROM ) { struct block_list *src; - if( (src = iMap->id2bl(su->group->src_id)) ) { + if( (src = map->id2bl(su->group->src_id)) ) { int sp = su->group->skill_lv * skill_lv; if( src->type == BL_PC ) sp += ((TBL_PC*)src)->status.job_level / 5; @@ -15045,10 +15016,11 @@ bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce bool wall = true; if( (bl->type == BL_PC && battle_config.pc_cloak_check_type&1) - || (bl->type != BL_PC && battle_config.monster_cloak_check_type&1) ) - { //Check for walls. + || (bl->type != BL_PC && battle_config.monster_cloak_check_type&1) + ) { + //Check for walls. int i; - ARR_FIND( 0, 8, i, iMap->getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS) != 0 ); + ARR_FIND( 0, 8, i, map->getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS) != 0 ); if( i == 8 ) wall = false; } @@ -15079,7 +15051,7 @@ bool skill_check_camouflage(struct block_list *bl, struct status_change_entry *s if( bl->type == BL_PC ) { //Check for walls. int i; - ARR_FIND( 0, 8, i, iMap->getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS) != 0 ); + ARR_FIND( 0, 8, i, map->getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS) != 0 ); if( i == 8 ) wall = false; } @@ -15108,13 +15080,13 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int nullpo_retr(NULL, group->unit); // crash-protection against poor coding nullpo_retr(NULL, su=&group->unit[idx]); - if( iMap->getcell(iMap->id2bl(group->src_id)->m, x, y, CELL_CHKMAELSTROM) ) + if( map->getcell(map->id2bl(group->src_id)->m, x, y, CELL_CHKMAELSTROM) ) return su; if(!su->alive) group->alive_count++; - su->bl.id=iMap->get_new_object_id(); + su->bl.id=map->get_new_object_id(); su->bl.type=BL_SKILL; su->bl.m=group->map; su->bl.x=x; @@ -15125,13 +15097,13 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int su->val2=val2; idb_put(skillunit_db, su->bl.id, su); - iMap->addiddb(&su->bl); - iMap->addblock(&su->bl); + map->addiddb(&su->bl); + map->addblock(&su->bl); // perform oninit actions switch (group->skill_id) { case WZ_ICEWALL: - iMap->setgatcell(su->bl.m,su->bl.x,su->bl.y,5); + map->setgatcell(su->bl.m,su->bl.x,su->bl.y,5); clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,5,AREA); skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true); maplist[su->bl.m].icewall_num++; @@ -15174,18 +15146,19 @@ int skill_delunit (struct skill_unit* su) { // invoke onout event if( !su->range ) - iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),4); + map->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),4); // perform ondelete actions switch (group->skill_id) { - case HT_ANKLESNARE: { - struct block_list* target = iMap->id2bl(group->val2); - if( target ) - status_change_end(target, SC_ANKLESNARE, INVALID_TIMER); - } + case HT_ANKLESNARE: + { + struct block_list* target = map->id2bl(group->val2); + if( target ) + status_change_end(target, SC_ANKLESNARE, INVALID_TIMER); + } break; case WZ_ICEWALL: - iMap->setgatcell(su->bl.m,su->bl.x,su->bl.y,su->val2); + map->setgatcell(su->bl.m,su->bl.x,su->bl.y,su->val2); clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false); maplist[su->bl.m].icewall_num--; @@ -15197,7 +15170,7 @@ int skill_delunit (struct skill_unit* su) { skill->unitsetmapcell(su,HP_BASILICA,group->skill_lv,CELL_BASILICA,false); break; case RA_ELECTRICSHOCKER: { - struct block_list* target = iMap->id2bl(group->val2); + struct block_list* target = map->id2bl(group->val2); if( target ) status_change_end(target, SC_ELECTRICSHOCKER, INVALID_TIMER); } @@ -15207,7 +15180,7 @@ int skill_delunit (struct skill_unit* su) { break; case SC_MANHOLE: // Note : Removing the unit don't remove the status (official info) if( group->val2 ) { // Someone Traped - struct status_change *tsc = status->get_sc( iMap->id2bl(group->val2)); + struct status_change *tsc = status->get_sc(map->id2bl(group->val2)); if( tsc && tsc->data[SC__MANHOLE] ) tsc->data[SC__MANHOLE]->val4 = 0; // Remove the Unit ID } @@ -15217,8 +15190,8 @@ int skill_delunit (struct skill_unit* su) { clif->skill_delunit(su); su->group=NULL; - iMap->delblock(&su->bl); // don't free yet - iMap->deliddb(&su->bl); + map->delblock(&su->bl); // don't free yet + map->deliddb(&su->bl); idb_remove(skillunit_db, su->bl.id); if(--group->alive_count==0) skill->del_unitgroup(group,ALC_MARK); @@ -15320,19 +15293,17 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count, /*========================================== * *------------------------------------------*/ -int skill_delunitgroup(struct skill_unit_group *group, const char* file, int line, const char* func) -{ +int skill_delunitgroup(struct skill_unit_group *group, const char* file, int line, const char* func) { struct block_list* src; struct unit_data *ud; int i,j; - if( group == NULL ) - { + if( group == NULL ) { ShowDebug("skill_delunitgroup: group is NULL (source=%s:%d, %s)! Please report this! (#3504)\n", file, line, func); return 0; } - src=iMap->id2bl(group->src_id); + src=map->id2bl(group->src_id); ud = unit->bl2ud(src); if(!src || !ud) { ShowError("skill_delunitgroup: Group's source not found! (src_id: %d skill_id: %d)\n", group->src_id, group->skill_id); @@ -15433,7 +15404,7 @@ int skill_delunitgroup(struct skill_unit_group *group, const char* file, int lin } idb_remove(group_db, group->group_id); - iMap->freeblock(&group->unit->bl); // schedules deallocation of whole array (HACK) + map->freeblock(&group->unit->bl); // schedules deallocation of whole array (HACK) group->unit=NULL; group->group_id=0; group->unit_count=0; @@ -15519,7 +15490,7 @@ int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) { nullpo_ret(group); - if( !(skill->get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP)) && iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) ) + if( !(skill->get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP)) && map->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] if( battle->check_target(&su->bl,bl,group->target_flag) <= 0 ) @@ -15591,13 +15562,13 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { { struct block_list* src; - if( su->val1 > 0 && (src = iMap->id2bl(group->src_id)) != NULL && src->type == BL_PC ) { + if( su->val1 > 0 && (src = map->id2bl(group->src_id)) != NULL && src->type == BL_PC ) { // revert unit back into a trap struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = group->item_id?group->item_id:ITEMID_TRAP; item_tmp.identify = 1; - iMap->addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); + map->addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); } skill->delunit(su); } @@ -15611,20 +15582,20 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { group->limit = skill->get_time(group->skill_id,group->skill_lv); su->limit = skill->get_time(group->skill_id,group->skill_lv); // apply effect to all units standing on it - iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),1); + map->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,timer->gettick(),1); break; case UNT_CALLFAMILY: { struct map_session_data *sd = NULL; if(group->val1) { - sd = iMap->charid2sd(group->val1); + sd = map->charid2sd(group->val1); group->val1 = 0; if (sd && !maplist[sd->bl.m].flag.nowarp) pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT); } if(group->val2) { - sd = iMap->charid2sd(group->val2); + sd = map->charid2sd(group->val2); group->val2 = 0; if (sd && !maplist[sd->bl.m].flag.nowarp) pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT); @@ -15639,23 +15610,23 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { break; } clif->changetraplook(bl,UNT_USED_TRAPS); - iMap->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick); + map->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick); group->limit = DIFF_TICK(tick,group->tick)+1000; su->limit = DIFF_TICK(tick,group->tick)+1000; group->unit_id = UNT_USED_TRAPS; break; case UNT_FEINTBOMB: { - struct block_list *src = iMap->id2bl(group->src_id); + struct block_list *src = map->id2bl(group->src_id); if( src ) - iMap->foreachinrange(skill->area_sub, &group->unit->bl, su->range, splash_target(src), src, SC_FEINTBOMB, group->skill_lv, tick, BCT_ENEMY|SD_ANIMATION|1, skill->castend_damage_id); + map->foreachinrange(skill->area_sub, &group->unit->bl, su->range, splash_target(src), src, SC_FEINTBOMB, group->skill_lv, tick, BCT_ENEMY|SD_ANIMATION|1, skill->castend_damage_id); skill->delunit(su); break; } case UNT_BANDING: { - struct block_list *src = iMap->id2bl(group->src_id); + struct block_list *src = map->id2bl(group->src_id); struct status_change *sc; if( !src || (sc = status->get_sc(src)) == NULL || !sc->data[SC_BANDING] ) { skill->delunit(su); @@ -15701,7 +15672,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { case UNT_REVERBERATION: if( su->val1 <= 0 ) { clif->changetraplook(bl,UNT_USED_TRAPS); - iMap->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick); + map->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick); group->limit = DIFF_TICK(tick,group->tick)+1000; su->limit = DIFF_TICK(tick,group->tick)+1000; group->unit_id = UNT_USED_TRAPS; @@ -15724,9 +15695,9 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { if( su->range >= 0 && group->interval != -1 ) { if( battle_config.skill_wall_check ) - iMap->foreachinshootrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); + map->foreachinshootrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); else - iMap->foreachinrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); + map->foreachinrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); if(su->range == -1) //Unit disabled, but it should not be deleted yet. group->unit_id = UNT_USED_TRAPS; @@ -15748,11 +15719,11 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { * Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds. *------------------------------------------*/ int skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) { - iMap->freeblock_lock(); + map->freeblock_lock(); skillunit_db->foreach(skillunit_db, skill->unit_timer_sub, tick); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } @@ -15868,7 +15839,7 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag) { memset(skill_unit_temp, 0, sizeof(skill_unit_temp)); } - iMap->foreachincell(skill->unit_move_sub,bl->m,bl->x,bl->y,BL_SKILL,bl,tick,flag); + map->foreachincell(skill->unit_move_sub,bl->m,bl->x,bl->y,BL_SKILL,bl,tick,flag); if( flag&2 && flag&1 ) { //Onplace, check any skill units you have left. int i; @@ -15934,13 +15905,13 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d if (!(m_flag[i]&0x2)) { if (group->state.song_dance&0x1) //Cancel dissonance effect. skill->dance_overlap(su1, 0); - iMap->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,4); + map->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,4); } //Move Cell using "smart" criteria (avoid useless moving around) switch(m_flag[i]) { case 0: //Cell moves independently, safely move it. - iMap->moveblock(&su1->bl, su1->bl.x+dx, su1->bl.y+dy, tick); + map->moveblock(&su1->bl, su1->bl.x+dx, su1->bl.y+dy, tick); break; case 1: //Cell moves unto another cell, look for a replacement cell that won't collide @@ -15950,7 +15921,7 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d continue; //Move to where this cell would had moved. su2 = &group->unit[j]; - iMap->moveblock(&su1->bl, su2->bl.x+dx, su2->bl.y+dy, tick); + map->moveblock(&su1->bl, su2->bl.x+dx, su2->bl.y+dy, tick); j++; //Skip this cell as we have used it. break; } @@ -15963,7 +15934,7 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d if (group->state.song_dance&0x1) //Check for dissonance effect. skill->dance_overlap(su1, 1); clif->skill_setunit(su1); - iMap->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,1); + map->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,1); } } aFree(m_flag); @@ -16529,7 +16500,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, tmp_item.amount = qty * skill_changematerial_db[i].qty[j]; if((flag = pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_PRODUCE))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } k++; } @@ -16543,7 +16514,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, } else if (tmp_item.amount) { //Success if((flag = pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_PRODUCE))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } if( skill_id == GN_MIX_COOKING || skill_id == GN_MAKEBOMB || skill_id == GN_S_PHARMACY ) clif->msg_skill(sd,skill_id,0x627); @@ -16595,7 +16566,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, tmp_item.identify = 1; if( pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_PRODUCE) ) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } clif->msg_skill(sd,skill_id,0x628); } @@ -16652,7 +16623,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid) continue; if((flag = pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_PRODUCE))) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -16880,7 +16851,7 @@ int skill_elementalanalysis(struct map_session_data* sd, int n, uint16 skill_lv, if( tmp_item.amount ) { if( (flag = pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_CONSUME)) ) { clif->additem(sd,0,0,flag); - iMap->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -16951,7 +16922,7 @@ int skill_destroy_trap( struct block_list *bl, va_list ap ) { case UNT_CLAYMORETRAP: case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: - iMap->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &su->bl,tick); + map->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &su->bl,tick); break; case UNT_LANDMINE: case UNT_BLASTMINE: @@ -16960,7 +16931,7 @@ int skill_destroy_trap( struct block_list *bl, va_list ap ) { case UNT_FLASHER: case UNT_FREEZINGTRAP: case UNT_CLUSTERBOMB: - iMap->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &su->bl,tick); + map->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &su->bl,tick); break; } // Traps aren't recovered. @@ -16972,7 +16943,7 @@ int skill_destroy_trap( struct block_list *bl, va_list ap ) { * *------------------------------------------*/ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) { - struct map_session_data *sd = iMap->id2sd(id); + struct map_session_data *sd = map->id2sd(id); struct skill_cd * cd = NULL; if (data <= 0 || data >= MAX_SKILL) @@ -17081,7 +17052,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick, } int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) { //[orn] - struct homun_data *hd = (TBL_HOM*) iMap->id2bl(id); + struct homun_data *hd = (TBL_HOM*)map->id2bl(id); if (data <= 0 || data >= MAX_SKILL) return 0; if (hd) hd->blockskill[data] = 0; @@ -17106,7 +17077,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { / } int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {//[orn] - struct mercenary_data *md = (TBL_MER*)iMap->id2bl(id); + struct mercenary_data *md = (TBL_MER*)map->id2bl(id); if( data <= 0 || data >= MAX_SKILL ) return 0; if( md ) md->blockskill[data] = 0; @@ -18024,27 +17995,27 @@ void skill_readdb(void) { safestrncpy(skill_db[0].name, "UNKNOWN_SKILL", sizeof(skill_db[0].name)); safestrncpy(skill_db[0].desc, "Unknown Skill", sizeof(skill_db[0].desc)); - sv->readdb(iMap->db_path, DBPATH"skill_db.txt" , ',', 17, 17, MAX_SKILL_DB, skill->parse_row_skilldb); - sv->readdb(iMap->db_path, DBPATH"skill_require_db.txt" , ',', 32, 32, MAX_SKILL_DB, skill->parse_row_requiredb); + sv->readdb(map->db_path, DBPATH"skill_db.txt", ',', 17, 17, MAX_SKILL_DB, skill->parse_row_skilldb); + sv->readdb(map->db_path, DBPATH"skill_require_db.txt", ',', 32, 32, MAX_SKILL_DB, skill->parse_row_requiredb); #ifdef RENEWAL_CAST - sv->readdb(iMap->db_path, "re/skill_cast_db.txt" , ',', 8, 8, MAX_SKILL_DB, skill->parse_row_castdb); + sv->readdb(map->db_path, "re/skill_cast_db.txt", ',', 8, 8, MAX_SKILL_DB, skill->parse_row_castdb); #else - sv->readdb(iMap->db_path, "pre-re/skill_cast_db.txt" , ',', 7, 7, MAX_SKILL_DB, skill->parse_row_castdb); + sv->readdb(map->db_path, "pre-re/skill_cast_db.txt", ',', 7, 7, MAX_SKILL_DB, skill->parse_row_castdb); #endif - sv->readdb(iMap->db_path, DBPATH"skill_castnodex_db.txt", ',', 2, 3, MAX_SKILL_DB, skill->parse_row_castnodexdb); - sv->readdb(iMap->db_path, DBPATH"skill_unit_db.txt" , ',', 8, 8, MAX_SKILL_DB, skill->parse_row_unitdb); + sv->readdb(map->db_path, DBPATH"skill_castnodex_db.txt", ',', 2, 3, MAX_SKILL_DB, skill->parse_row_castnodexdb); + sv->readdb(map->db_path, DBPATH"skill_unit_db.txt", ',', 8, 8, MAX_SKILL_DB, skill->parse_row_unitdb); skill->init_unit_layout(); - sv->readdb(iMap->db_path, "produce_db.txt" , ',', 4, 4+2*MAX_PRODUCE_RESOURCE, MAX_SKILL_PRODUCE_DB, skill->parse_row_producedb); - sv->readdb(iMap->db_path, "create_arrow_db.txt" , ',', 1+2, 1+2*MAX_ARROW_RESOURCE, MAX_SKILL_ARROW_DB, skill->parse_row_createarrowdb); - sv->readdb(iMap->db_path, "abra_db.txt" , ',', 4, 4, MAX_SKILL_ABRA_DB, skill->parse_row_abradb); + sv->readdb(map->db_path, "produce_db.txt", ',', 4, 4+2*MAX_PRODUCE_RESOURCE, MAX_SKILL_PRODUCE_DB, skill->parse_row_producedb); + sv->readdb(map->db_path, "create_arrow_db.txt", ',', 1+2, 1+2*MAX_ARROW_RESOURCE, MAX_SKILL_ARROW_DB, skill->parse_row_createarrowdb); + sv->readdb(map->db_path, "abra_db.txt", ',', 4, 4, MAX_SKILL_ABRA_DB, skill->parse_row_abradb); //Warlock - sv->readdb(iMap->db_path, "spellbook_db.txt" , ',', 3, 3, MAX_SKILL_SPELLBOOK_DB, skill->parse_row_spellbookdb); + sv->readdb(map->db_path, "spellbook_db.txt", ',', 3, 3, MAX_SKILL_SPELLBOOK_DB, skill->parse_row_spellbookdb); //Guillotine Cross - sv->readdb(iMap->db_path, "magicmushroom_db.txt" , ',', 1, 1, MAX_SKILL_MAGICMUSHROOM_DB, skill->parse_row_magicmushroomdb); - sv->readdb(iMap->db_path, "skill_reproduce_db.txt", ',', 1, 1, MAX_SKILL_DB, skill->parse_row_reproducedb); - sv->readdb(iMap->db_path, "skill_improvise_db.txt" , ',', 2, 2, MAX_SKILL_IMPROVISE_DB, skill->parse_row_improvisedb); - sv->readdb(iMap->db_path, "skill_changematerial_db.txt" , ',', 4, 4+2*5, MAX_SKILL_PRODUCE_DB, skill->parse_row_changematerialdb); + sv->readdb(map->db_path, "magicmushroom_db.txt", ',', 1, 1, MAX_SKILL_MAGICMUSHROOM_DB, skill->parse_row_magicmushroomdb); + sv->readdb(map->db_path, "skill_reproduce_db.txt", ',', 1, 1, MAX_SKILL_DB, skill->parse_row_reproducedb); + sv->readdb(map->db_path, "skill_improvise_db.txt", ',', 2, 2, MAX_SKILL_IMPROVISE_DB, skill->parse_row_improvisedb); + sv->readdb(map->db_path, "skill_changematerial_db.txt", ',', 4, 4+2*5, MAX_SKILL_PRODUCE_DB, skill->parse_row_changematerialdb); } void skill_reload (void) { diff --git a/src/map/status.c b/src/map/status.c index 501448cc7..9ad1c2205 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1592,7 +1592,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin break; case AL_TELEPORT: //Should fail when used on top of Land Protector [Skotlex] - if (src && iMap->getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR) + if (src && map->getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR) && !(st->mode&MD_BOSS) && (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_id)) return 0; @@ -1623,7 +1623,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if (sc->data[SC_DC_WINKCHARM] && target && !flag) { //Prevents skill usage if( unit->bl2ud(src) && (unit->bl2ud(src))->walktimer == INVALID_TIMER ) - unit->walktobl(src, iMap->id2bl(sc->data[SC_DC_WINKCHARM]->val2), 3, 1); + unit->walktobl(src, map->id2bl(sc->data[SC_DC_WINKCHARM]->val2), 3, 1); clif->emotion(src, E_LV); return 0; } @@ -2064,7 +2064,7 @@ int status_calc_mob_(struct mob_data* md, bool first) { memcpy(mstatus, &md->db->status, sizeof(struct status_data)); if (flag&(8|16)) - mbl = iMap->id2bl(md->master_id); + mbl = map->id2bl(md->master_id); if (flag&8 && mbl) { struct status_data *mstatus = status->get_base_status(mbl); @@ -5860,7 +5860,7 @@ int status_get_party_id(struct block_list *bl) { struct mob_data *md=(TBL_MOB*)bl; if( md->master_id > 0 ) { struct map_session_data *msd; - if (md->special_state.ai && (msd = iMap->id2sd(md->master_id)) != NULL) + if (md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL) return msd->status.party_id; return -md->master_id; } @@ -5898,7 +5898,7 @@ int status_get_guild_id(struct block_list *bl) { struct mob_data *md = (struct mob_data *)bl; if (md->guardian_data) //Guardian's guild [Skotlex] return md->guardian_data->guild_id; - if (md->special_state.ai && (msd = iMap->id2sd(md->master_id)) != NULL) + if (md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL) return msd->status.guild_id; //Alchemist's mobs [Skotlex] } break; @@ -5938,7 +5938,7 @@ int status_get_emblem_id(struct block_list *bl) { struct mob_data *md = (struct mob_data *)bl; if (md->guardian_data) //Guardian's guild [Skotlex] return md->guardian_data->emblem_id; - if (md->special_state.ai && (msd = iMap->id2sd(md->master_id)) != NULL) + if (md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL) return msd->guild_emblem_id; //Alchemist's mobs [Skotlex] } break; @@ -7291,7 +7291,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if( sd ) { int i; for( i = 0; i < 5; i++ ) { - if( sd->devotion[i] && (tsd = iMap->id2sd(sd->devotion[i])) ) + if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) ) status->change_start(&tsd->bl, type, 10000, val1, val2, val3, val4, tick, 1); } } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) ) @@ -7379,7 +7379,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if( sd ) { int i; for( i = 0; i < 5; i++ ) { - if( sd->devotion[i] && (tsd = iMap->id2sd(sd->devotion[i])) ) + if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) ) status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1); } } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) ) @@ -7518,7 +7518,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if (st->hp - diff < st->max_hp>>2) diff = st->hp - (st->max_hp>>2); if( val2 && bl->type == BL_MOB ) { - struct block_list* src = iMap->id2bl(val2); + struct block_list* src = map->id2bl(val2); if( src ) mob->log_damage((TBL_MOB*)bl,src,diff); } @@ -7556,11 +7556,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick_time = val2 * 1000; // [GodLesZ] tick time break; case SC_CASH_BOSS_ALARM: - if( sd != NULL ) - { - struct mob_data *boss_md = iMap->getmob_boss(bl->m); // Search for Boss on this Map - if( boss_md == NULL || boss_md->bl.prev == NULL ) - { // No MVP on this map - MVP is dead + if( sd != NULL ) { + struct mob_data *boss_md = map->getmob_boss(bl->m); // Search for Boss on this Map + if( boss_md == NULL || boss_md->bl.prev == NULL ) { + // No MVP on this map - MVP is dead clif->bossmapinfo(sd->fd, boss_md, 1); return 0; // No need to start SC } @@ -7635,7 +7634,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if( bl->type&(BL_PC|BL_MER) ) { if( sd ) { for( i = 0; i < 5; i++ ) { - if( sd->devotion[i] && (tsd = iMap->id2sd(sd->devotion[i])) ) + if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) ) status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1); } } @@ -7656,7 +7655,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val int i; for (i = 0; i < 5; i++) { //See if there are devoted characters, and pass the status to them. [Skotlex] - if (sd->devotion[i] && (tsd = iMap->id2sd(sd->devotion[i]))) + if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i]))) status->change_start(&tsd->bl,type,10000,val1,5+val1*5,val3,val4,tick,1); } } @@ -7727,7 +7726,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val { int stat,max_stat; // fetch caster information - struct block_list *pbl = iMap->id2bl(val1); + struct block_list *pbl = map->id2bl(val1); struct status_change *psc = pbl ? status->get_sc(pbl) : NULL; struct status_change_entry *psce = psc ? psc->data[SC_MARIONETTE_MASTER] : NULL; // fetch target's stats @@ -7776,7 +7775,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val struct block_list *d_bl; struct status_change *d_sc; - if( (d_bl = iMap->id2bl(val1)) && (d_sc = status->get_sc(d_bl)) && d_sc->count ) { + if( (d_bl = map->id2bl(val1)) && (d_sc = status->get_sc(d_bl)) && d_sc->count ) { // Inherits Status From Source const enum sc_type types[] = { SC_AUTOGUARD, SC_DEFENDER, SC_REFLECTSHIELD, SC_ENDURE }; enum sc_type type2; @@ -7793,7 +7792,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_COMA: //Coma. Sends a char to 1HP. If val2, do not zap sp if( val3 && bl->type == BL_MOB ) { - struct block_list* src = iMap->id2bl(val3); + struct block_list* src = map->id2bl(val3); if( src ) mob->log_damage((TBL_MOB*)bl,src,st->hp - 1); } @@ -7802,7 +7801,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val break; case SC_RG_CCONFINE_S: { - struct block_list *src = val2 ? iMap->id2bl(val2) : NULL; + struct block_list *src = val2 ? map->id2bl(val2) : NULL; struct status_change *sc2 = src ? status->get_sc(src) : NULL; struct status_change_entry *sce2 = sc2 ? sc2->data[SC_RG_CCONFINE_M] : NULL; if (src && sc2) { @@ -8257,7 +8256,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick = -1; break; case SC__SHADOWFORM: { - struct map_session_data * s_sd = iMap->id2sd(val2); + struct map_session_data * s_sd = map->id2sd(val2); if( s_sd ) s_sd->shadowform_id = bl->id; val4 = tick / 1000; @@ -8335,14 +8334,14 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick_time = 1000; // [GodLesZ] tick time break; case SC_BLOOD_SUCKER: - { - struct block_list *src = iMap->id2bl(val2); - val3 = 1; - if(src) - val3 = 200 + 100 * val1 + status_get_int(src); - val4 = tick / 1000; - tick_time = 1000; // [GodLesZ] tick time - } + { + struct block_list *src = map->id2bl(val2); + val3 = 1; + if(src) + val3 = 200 + 100 * val1 + status_get_int(src); + val4 = tick / 1000; + tick_time = 1000; // [GodLesZ] tick time + } break; case SC_VACUUM_EXTREME: tick -= (st->str / 20) * 1000; @@ -8499,22 +8498,22 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick_time = 5000; // [GodLesZ] tick time break; case SC_GENTLETOUCH_CHANGE: - {// take note there is no def increase as skill desc says. [malufett] - struct block_list * src; - val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] % - if( (src = iMap->id2bl(val2)) ){ - val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level] - val2 = ( status_get_dex(src)/4 + status_get_str(src)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5] - } + {// take note there is no def increase as skill desc says. [malufett] + struct block_list * src; + val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] % + if( (src = map->id2bl(val2)) ){ + val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level] + val2 = ( status_get_dex(src)/4 + status_get_str(src)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5] } + } break; case SC_GENTLETOUCH_REVITALIZE: - {// take note there is no vit,aspd,speed increase as skill desc says. [malufett] - struct block_list * src; - val3 = val1 * 30 + 150; // Natural HP recovery increase: [(Skill Level x 30) + 50] % - if( (src = iMap->id2bl(val2)) ) // the stat def is not shown in the status window and it is process differently - val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster VIT / 4) x Skill Level] - } + {// take note there is no vit,aspd,speed increase as skill desc says. [malufett] + struct block_list * src; + val3 = val1 * 30 + 150; // Natural HP recovery increase: [(Skill Level x 30) + 50] % + if( (src = map->id2bl(val2)) ) // the stat def is not shown in the status window and it is process differently + val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster VIT / 4) x Skill Level] + } break; case SC_PYROTECHNIC_OPTION: val_flag |= 1|2|4; @@ -9088,7 +9087,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val } break; case SC_CASH_BOSS_ALARM: - clif->bossmapinfo(sd->fd, iMap->id2boss(sce->val1), 0); // First Message + clif->bossmapinfo(sd->fd, map->id2boss(sce->val1), 0); // First Message break; case SC_MER_HP: status_percent_heal(bl, 100, 0); // Recover Full HP @@ -9327,17 +9326,15 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_AUTOGUARD: { struct map_session_data *tsd; - if( bl->type == BL_PC ) - { // Clear Status from others + if( bl->type == BL_PC ) { + // Clear Status from others int i; - for( i = 0; i < 5; i++ ) - { - if( sd->devotion[i] && (tsd = iMap->id2sd(sd->devotion[i])) && tsd->sc.data[type] ) + for( i = 0; i < 5; i++ ) { + if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) && tsd->sc.data[type] ) status_change_end(&tsd->bl, type, INVALID_TIMER); } - } - else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag ) - { // Clear Status from Master + } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag ) { + // Clear Status from Master tsd = ((TBL_MER*)bl)->master; if( tsd && tsd->sc.data[type] ) status_change_end(&tsd->bl, type, INVALID_TIMER); @@ -9346,9 +9343,8 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_DEVOTION: { - struct block_list *d_bl = iMap->id2bl(sce->val1); - if( d_bl ) - { + struct block_list *d_bl = map->id2bl(sce->val1); + if( d_bl ) { if( d_bl->type == BL_PC ) ((TBL_PC*)d_bl)->devotion[sce->val2] = 0; else if( d_bl->type == BL_MER ) @@ -9366,7 +9362,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_BLADESTOP: if(sce->val4) { int tid = sce->val4; - struct block_list *tbl = iMap->id2bl(tid); + struct block_list *tbl = map->id2bl(tid); struct status_change *tsc = status->get_sc(tbl); sce->val4 = 0; if(tbl && tsc && tsc->data[SC_BLADESTOP]) { @@ -9399,7 +9395,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const sd->delunit_prevline = line; } - if(sce->val4 && sce->val4 != BCT_SELF && (dsd=iMap->id2sd(sce->val4))) + if(sce->val4 && sce->val4 != BCT_SELF && (dsd=map->id2sd(sce->val4))) {// end status on partner as well dsc = dsd->sc.data[SC_DANCING]; if(dsc) { @@ -9446,14 +9442,14 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_SPLASHER: { - struct block_list *src=iMap->id2bl(sce->val3); + struct block_list *src=map->id2bl(sce->val3); if(src && tid != INVALID_TIMER) skill->castend_damage_id(src, bl, sce->val2, sce->val1, timer->gettick(), SD_LEVEL ); } break; case SC_RG_CCONFINE_S: { - struct block_list *src = sce->val2 ? iMap->id2bl(sce->val2) : NULL; + struct block_list *src = sce->val2 ? map->id2bl(sce->val2) : NULL; struct status_change *sc2 = src ? status->get_sc(src) : NULL; if (src && sc2 && sc2->data[SC_RG_CCONFINE_M]) { //If status was already ended, do nothing. @@ -9468,7 +9464,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const int range = 1 +skill->get_range2(bl, status->sc2skill(type), sce->val1) +skill->get_range2(bl, TF_BACKSLIDING, 1); //Since most people use this to escape the hold.... - iMap->foreachinarea(status->change_timer_sub, + map->foreachinarea(status->change_timer_sub, bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,bl,sce,type,timer->gettick()); } break; @@ -9499,7 +9495,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if (sce->val1) { // check for partner and end their marionette status as well enum sc_type type2 = (type == SC_MARIONETTE_MASTER) ? SC_MARIONETTE : SC_MARIONETTE_MASTER; - struct block_list *pbl = iMap->id2bl(sce->val1); + struct block_list *pbl = map->id2bl(sce->val1); struct status_change* sc2 = pbl ? status->get_sc(pbl) : NULL; if (sc2 && sc2->data[type2]) @@ -9575,14 +9571,14 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; // Note: vending/buying is closed by unit_remove_map, no // need to do it here. - iMap->quit(sd); - // Because iMap->quit calls status_change_end with tid -1 + map->quit(sd); + // Because map->quit calls status_change_end with tid -1 // from here it's not neccesary to continue return 1; break; case SC_STOP: if( sce->val2 ) { - struct block_list* tbl = iMap->id2bl(sce->val2); + struct block_list* tbl = map->id2bl(sce->val2); sce->val2 = 0; if( tbl && (sc = status->get_sc(tbl)) && sc->data[SC_STOP] && sc->data[SC_STOP]->val2 == bl->id ) status_change_end(tbl, SC_STOP, INVALID_TIMER); @@ -9602,7 +9598,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_WHITEIMPRISON: { - struct block_list* src = iMap->id2bl(sce->val2); + struct block_list* src = map->id2bl(sce->val2); if( tid == -1 || !src) break; // Terminated by Damage status_fix_damage(src,bl,400*sce->val1,clif->damage(bl,bl,timer->gettick(),0,0,400*sce->val1,0,0,0)); @@ -9621,13 +9617,14 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_ADORAMUS: status_change_end(bl, SC_BLIND, INVALID_TIMER); break; - case SC__SHADOWFORM: { - struct map_session_data *s_sd = iMap->id2sd(sce->val2); - if( !s_sd ) - break; - s_sd->shadowform_id = 0; - } - break; + case SC__SHADOWFORM: + { + struct map_session_data *s_sd = map->id2sd(sce->val2); + if( !s_sd ) + break; + s_sd->shadowform_id = 0; + } + break; case SC_SITDOWN_FORCE: if( sd && pc_issit(sd) ) { pc->setstand(sd); @@ -9653,7 +9650,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_CURSEDCIRCLE_ATKER: if( sce->val2 ) // used the default area size cause there is a chance the caster could knock back and can't clear the target. - iMap->foreachinrange(status->change_timer_sub, bl, battle_config.area_size,BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, timer->gettick()); + map->foreachinrange(status->change_timer_sub, bl, battle_config.area_size,BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, timer->gettick()); break; case SC_RAISINGDRAGON: if( sd && sce->val2 && !pc_isdead(sd) ) { @@ -9669,7 +9666,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_CURSEDCIRCLE_TARGET: { - struct block_list *src = iMap->id2bl(sce->val2); + struct block_list *src = map->id2bl(sce->val2); struct status_change *sc = status->get_sc(src); if( sc && sc->data[SC_CURSEDCIRCLE_ATKER] && --(sc->data[SC_CURSEDCIRCLE_ATKER]->val2) == 0 ){ status_change_end(src, SC_CURSEDCIRCLE_ATKER, INVALID_TIMER); @@ -9679,7 +9676,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_BLOOD_SUCKER: if( sce->val2 ){ - struct block_list *src = iMap->id2bl(sce->val2); + struct block_list *src = map->id2bl(sce->val2); if(src) { struct status_change *sc = status->get_sc(src); sc->bs_counter--; @@ -9910,7 +9907,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if(opt_flag&4) //Out of hiding, invoke on place. skill->unit_move(bl,timer->gettick(),1); - if(opt_flag&2 && sd && iMap->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) + if(opt_flag&2 && sd && map->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) npc->touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event. ers_free(sc_data_ers, sce); @@ -9924,7 +9921,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { struct status_data *st; int hp; - if(!( (bl=iMap->id2bl(id)) + if(!( (bl=map->id2bl(id)) && (sc=status->get_sc(bl)) && (sce=sc->data[SC_KAAHI]) )) @@ -9963,7 +9960,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { struct status_change *sc; struct status_change_entry *sce; - bl = iMap->id2bl(id); + bl = map->id2bl(id); if(!bl) { ShowDebug("status_change_timer: Null pointer id: %d data: %d\n", id, data); return 0; @@ -10036,9 +10033,9 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_RUWACH: case SC_WZ_SIGHTBLASTER: if(type == SC_WZ_SIGHTBLASTER) - iMap->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR|BL_SKILL, bl, sce, type, tick); + map->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR|BL_SKILL, bl, sce, type, tick); else - iMap->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR, bl, sce, type, tick); + map->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR, bl, sce, type, tick); if( --(sce->val2)>0 ){ sce->val4 += 250; // use for Shadow Form 2 seconds checking. @@ -10080,16 +10077,16 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { if (--(sce->val3) > 0) { if (!sc->data[SC_SLOWPOISON]) { if( sce->val2 && bl->type == BL_MOB ) { - struct block_list* src = iMap->id2bl(sce->val2); + struct block_list* src = map->id2bl(sce->val2); if( src ) mob->log_damage((TBL_MOB*)bl,src,sce->val4); } - iMap->freeblock_lock(); + map->freeblock_lock(); status_zap(bl, sce->val4, 0); if (sc->data[type]) { // Check if the status still last ( can be dead since then ). sc_timer_next(1000 + tick, status->change_timer, bl->id, data ); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); } return 0; } @@ -10116,20 +10113,20 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_BLOODING: if (--(sce->val4) >= 0) { int hp = rnd()%600 + 200; - struct block_list* src = iMap->id2bl(sce->val2); + struct block_list* src = map->id2bl(sce->val2); if( src && bl && bl->type == BL_MOB ) { mob->log_damage((TBL_MOB*)bl,src,sd||hp<st->hp?hp:st->hp-1); } - iMap->freeblock_lock(); + map->freeblock_lock(); status_fix_damage(src, bl, sd||hp<st->hp?hp:st->hp-1, 1); if( sc->data[type] ) { if( st->hp == 1 ) { - iMap->freeblock_unlock(); + map->freeblock_unlock(); break; } sc_timer_next(10000 + tick, status->change_timer, bl->id, data); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -10149,7 +10146,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_CASH_BOSS_ALARM: if( sd && --(sce->val4) >= 0 ) { - struct mob_data *boss_md = iMap->id2boss(sce->val1); + struct mob_data *boss_md = map->id2boss(sce->val1); if( boss_md && sd->bl.m == boss_md->bl.m ) { clif->bossmapinfo(sd->fd, boss_md, 1); // Update X - Y on minimap if (boss_md->bl.prev != NULL) { @@ -10252,7 +10249,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_MARIONETTE_MASTER: case SC_MARIONETTE: { - struct block_list *pbl = iMap->id2bl(sce->val1); + struct block_list *pbl = map->id2bl(sce->val1); if( pbl && check_distance_bl(bl, pbl, 7) ) { sc_timer_next(1000 + tick, status->change_timer, bl->id, data); return 0; @@ -10295,13 +10292,13 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_PYREXIA: if( --(sce->val4) > 0 ) { - iMap->freeblock_lock(); + map->freeblock_lock(); clif->damage(bl,bl,tick,status_get_amotion(bl),status_get_dmotion(bl)+500,100,0,0,0); status_fix_damage(NULL,bl,100,0); if( sc->data[type] ) { sc_timer_next(3000+tick,status->change_timer,bl->id,data); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -10311,12 +10308,12 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { int damage = st->max_hp/100; // {Target VIT x (New Poison Research Skill Level - 3)} + (Target HP/100) damage += st->vit * (sce->val1 - 3); unit->skillcastcancel(bl,2); - iMap->freeblock_lock(); + map->freeblock_lock(); status->damage(bl, bl, damage, 0, clif->damage(bl,bl,tick,status_get_amotion(bl),status_get_dmotion(bl)+500,damage,1,0,0), 1); if( sc->data[type] ) { sc_timer_next(1000 + tick, status->change_timer, bl->id, data ); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -10329,10 +10326,10 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { damage = st->hp - 1; // Cannot Kill if( damage > 0 ) { // 3% Damage each 4 seconds - iMap->freeblock_lock(); + map->freeblock_lock(); status_zap(bl,damage,0); flag = !sc->data[type]; // Killed? Should not - iMap->freeblock_unlock(); + map->freeblock_unlock(); } if( !flag ) { // Random Skill Cast @@ -10369,13 +10366,13 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_TOXIN: if( --(sce->val4) > 0 ) { //Damage is every 10 seconds including 3%sp drain. - iMap->freeblock_lock(); + map->freeblock_lock(); clif->damage(bl,bl,tick,status_get_amotion(bl),1,1,0,0,0); status->damage(NULL, bl, 1, st->max_sp * 3 / 100, 0, 0); //cancel dmg only if cancelable if( sc->data[type] ) { sc_timer_next(10000 + tick, status->change_timer, bl->id, data ); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -10416,17 +10413,17 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { case SC_BURNING: if( --(sce->val4) > 0 ) { - struct block_list *src = iMap->id2bl(sce->val3); + struct block_list *src = map->id2bl(sce->val3); int damage = 1000 + 3 * status_get_max_hp(bl) / 100; // Deals fixed (1000 + 3%*MaxHP) - iMap->freeblock_lock(); + map->freeblock_lock(); clif->damage(bl,bl,tick,0,0,damage,1,9,0); //damage is like endure effect with no walk delay status->damage(src, bl, damage, 0, 0, 1); if( sc->data[type]){ // Target still lives. [LimitLine] sc_timer_next(3000 + tick, status->change_timer, bl->id, data); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -10519,18 +10516,18 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { break; case SC_BLOOD_SUCKER: if( --(sce->val4) > 0 ) { - struct block_list *src = iMap->id2bl(sce->val2); + struct block_list *src = map->id2bl(sce->val2); int damage; if( !src || (src && (status->isdead(src) || src->m != bl->m || distance_bl(src, bl) >= 12)) ) break; - iMap->freeblock_lock(); + map->freeblock_lock(); damage = sce->val3; status->damage(src, bl, damage, 0, clif->damage(bl,bl,tick,st->amotion,st->dmotion+200,damage,1,0,0), 1); unit->skillcastcancel(bl,1); if ( sc->data[type] ) { sc_timer_next(1000 + tick, status->change_timer, bl->id, data); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); status->heal(src, damage*(5 + 5 * sce->val1)/100, 0, 0); // 5 + 5% per level return 0; } @@ -10627,12 +10624,12 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { { int damage = st->max_hp / 100; // Suggestion 1% each second if( damage >= st->hp ) damage = st->hp - 1; // Do not kill, just keep you with 1 hp minimum - iMap->freeblock_lock(); + map->freeblock_lock(); status_fix_damage(NULL,bl,damage,clif->damage(bl,bl,tick,0,0,damage,0,0,0)); if( sc->data[type] ) { sc_timer_next(1000 + tick, status->change_timer, bl->id, data); } - iMap->freeblock_unlock(); + map->freeblock_unlock(); } break; @@ -10644,7 +10641,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { if( !status->charge(bl,0,14 + (3 * sce->val1)) ) break; // No more SP status should end, and in the next second will end for the other affected players } else { - struct block_list *src = iMap->id2bl(sce->val2); + struct block_list *src = map->id2bl(sce->val2); struct status_change *ssc; if( !src || (ssc = status->get_sc(src)) == NULL || !ssc->data[SC_MAGNETICFIELD] ) break; // Source no more under Magnetic Field @@ -11294,10 +11291,9 @@ static int status_natural_heal(struct block_list* bl, va_list args) { } //Natural heal main timer. -static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick); - iMap->map_foreachregen(status_natural_heal); + map->map_foreachregen(status_natural_heal); natural_heal_prev_tick = tick; return 0; } @@ -11482,14 +11478,14 @@ int status_readdb(void) #ifdef RENEWAL_ASPD - sv->readdb(iMap->db_path, "re/job_db1.txt", ',', 6+MAX_WEAPON_TYPE, 6+MAX_WEAPON_TYPE, -1, &status_readdb_job1); + sv->readdb(map->db_path, "re/job_db1.txt", ',', 6+MAX_WEAPON_TYPE, 6+MAX_WEAPON_TYPE, -1, &status_readdb_job1); #else - sv->readdb(iMap->db_path, "pre-re/job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, &status_readdb_job1); + sv->readdb(map->db_path, "pre-re/job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, &status_readdb_job1); #endif - sv->readdb(iMap->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2); - sv->readdb(iMap->db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix); - sv->readdb(iMap->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(refine_info), &status_readdb_refine); - sv->readdb(iMap->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, &status_readdb_scconfig); + sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2); + sv->readdb(map->db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix); + sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(refine_info), &status_readdb_refine); + sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, &status_readdb_scconfig); return 0; } diff --git a/src/map/storage.c b/src/map/storage.c index 2fe7607c3..041c2cd72 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -321,13 +321,12 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount) /*========================================== * Modified By Valaris to save upon closing [massdriller] *------------------------------------------*/ -void storage_storageclose(struct map_session_data* sd) -{ +void storage_storageclose(struct map_session_data* sd) { nullpo_retv(sd); clif->storageclose(sd); - if( iMap->save_settings&4 ) + if( map->save_settings&4 ) chrif->save(sd,0); //Invokes the storage saving as well. sd->state.storage_flag = 0; @@ -336,11 +335,10 @@ void storage_storageclose(struct map_session_data* sd) /*========================================== * When quitting the game. *------------------------------------------*/ -void storage_storage_quit(struct map_session_data* sd, int flag) -{ +void storage_storage_quit(struct map_session_data* sd, int flag) { nullpo_retv(sd); - if (iMap->save_settings&4) + if (map->save_settings&4) chrif->save(sd, flag); //Invokes the storage saving as well. sd->state.storage_flag = 0; @@ -684,17 +682,15 @@ int storage_guild_storagesaved(int guild_id) } //Close storage for sd and save it -int storage_guild_storageclose(struct map_session_data* sd) -{ +int storage_guild_storageclose(struct map_session_data* sd) { struct guild_storage *stor; nullpo_ret(sd); nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id)); clif->storageclose(sd); - if (stor->storage_status) - { - if (iMap->save_settings&4) + if (stor->storage_status) { + if (map->save_settings&4) chrif->save(sd, 0); //This one also saves the storage. [Skotlex] else gstorage->save(sd->status.account_id, sd->status.guild_id,0); @@ -705,25 +701,24 @@ int storage_guild_storageclose(struct map_session_data* sd) return 0; } -int storage_guild_storage_quit(struct map_session_data* sd, int flag) -{ +int storage_guild_storage_quit(struct map_session_data* sd, int flag) { struct guild_storage *stor; nullpo_ret(sd); nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id)); - if(flag) - { //Only during a guild break flag is 1 (don't save storage) + if(flag) { + //Only during a guild break flag is 1 (don't save storage) sd->state.storage_flag = 0; stor->storage_status = 0; clif->storageclose(sd); - if (iMap->save_settings&4) + if (map->save_settings&4) chrif->save(sd,0); return 0; } if(stor->storage_status) { - if (iMap->save_settings&4) + if (map->save_settings&4) chrif->save(sd,0); else gstorage->save(sd->status.account_id,sd->status.guild_id,1); diff --git a/src/map/trade.c b/src/map/trade.c index f8df2a6c3..e137f7105 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -57,7 +57,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta } if ( sd->trade_partner != 0 ) { // If a character tries to trade to another one then cancel the previous one - struct map_session_data *previous_sd = iMap->id2sd(sd->trade_partner); + struct map_session_data *previous_sd = map->id2sd(sd->trade_partner); if( previous_sd ){ previous_sd->trade_partner = 0; clif->tradecancelled(previous_sd); @@ -101,15 +101,14 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta * Weird enough, the client should only send 3/4 * and the server is the one that can reply 0~2 *------------------------------------------*/ -void trade_tradeack(struct map_session_data *sd, int type) -{ +void trade_tradeack(struct map_session_data *sd, int type) { struct map_session_data *tsd; nullpo_retv(sd); if (sd->state.trading || !sd->trade_partner) return; //Already trading or no partner set. - if ((tsd = iMap->id2sd(sd->trade_partner)) == NULL) { + if ((tsd = map->id2sd(sd->trade_partner)) == NULL) { clif->tradestart(sd, 1); // character does not exist sd->trade_partner=0; return; @@ -200,12 +199,12 @@ int impossible_trade_check(struct map_session_data *sd) if (!sd->deal.item[i].amount) continue; index = sd->deal.item[i].index; - if (inventory[index].amount < sd->deal.item[i].amount) - { // if more than the player have -> hack + if (inventory[index].amount < sd->deal.item[i].amount) { + // if more than the player have -> hack sprintf(message_to_gm, msg_txt(538), sd->status.name, sd->status.account_id); // Hack on trade: character '%s' (account: %d) try to trade more items that he has. - intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); sprintf(message_to_gm, msg_txt(539), inventory[index].amount, inventory[index].nameid, sd->deal.item[i].amount); // This player has %d of a kind of item (id: %d), and try to trade %d of them. - intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); // if we block people if (battle_config.ban_hack_trade < 0) { chrif->char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block @@ -222,7 +221,7 @@ int impossible_trade_check(struct map_session_data *sd) // message about the ban strcpy(message_to_gm, msg_txt(508)); // This player hasn't been banned (Ban option is disabled). - intif->wis_message_to_gm(iMap->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); + intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm); return 1; } inventory[index].amount -= sd->deal.item[i].amount; // remove item from inventory @@ -320,8 +319,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) /*========================================== * Adds an item/qty to the trade window *------------------------------------------*/ -void trade_tradeadditem(struct map_session_data *sd, short index, short amount) -{ +void trade_tradeadditem(struct map_session_data *sd, short index, short amount) { struct map_session_data *target_sd; struct item *item; int trade_i, trade_weight; @@ -331,7 +329,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) if( !sd->state.trading || sd->state.deal_locked > 0 ) return; //Can't add stuff. - if( (target_sd = iMap->id2sd(sd->trade_partner)) == NULL ) + if( (target_sd = map->id2sd(sd->trade_partner)) == NULL ) { trade->cancel(sd); return; @@ -415,8 +413,7 @@ void trade_tradeaddzeny(struct map_session_data* sd, int amount) if( !sd->state.trading || sd->state.deal_locked > 0 ) return; //Can't add stuff. - if( (target_sd = iMap->id2sd(sd->trade_partner)) == NULL ) - { + if( (target_sd = map->id2sd(sd->trade_partner)) == NULL ) { trade->cancel(sd); return; } @@ -434,14 +431,13 @@ void trade_tradeaddzeny(struct map_session_data* sd, int amount) /*========================================== * 'Ok' button on the trade window is pressed. *------------------------------------------*/ -void trade_tradeok(struct map_session_data *sd) -{ +void trade_tradeok(struct map_session_data *sd) { struct map_session_data *target_sd; if(sd->state.deal_locked || !sd->state.trading) return; - if ((target_sd = iMap->id2sd(sd->trade_partner)) == NULL) { + if ((target_sd = map->id2sd(sd->trade_partner)) == NULL) { trade->cancel(sd); return; } @@ -454,12 +450,11 @@ void trade_tradeok(struct map_session_data *sd) /*========================================== * 'Cancel' is pressed. (or trade was force-cancelled by the code) *------------------------------------------*/ -void trade_tradecancel(struct map_session_data *sd) -{ +void trade_tradecancel(struct map_session_data *sd) { struct map_session_data *target_sd; int trade_i; - target_sd = iMap->id2sd(sd->trade_partner); + target_sd = map->id2sd(sd->trade_partner); if(!sd->state.trading) { // Not trade acepted @@ -513,8 +508,7 @@ void trade_tradecancel(struct map_session_data *sd) /*========================================== * lock sd and tsd trade data, execute the trade, clear, then save players *------------------------------------------*/ -void trade_tradecommit(struct map_session_data *sd) -{ +void trade_tradecommit(struct map_session_data *sd) { struct map_session_data *tsd; int trade_i; int flag; @@ -522,7 +516,7 @@ void trade_tradecommit(struct map_session_data *sd) if (!sd->state.trading || !sd->state.deal_locked) //Locked should be 1 (pressed ok) before you can press trade. return; - if ((tsd = iMap->id2sd(sd->trade_partner)) == NULL) { + if ((tsd = map->id2sd(sd->trade_partner)) == NULL) { trade_tradecancel(sd); return; } @@ -603,7 +597,7 @@ void trade_tradecommit(struct map_session_data *sd) clif->tradecompleted(tsd, 0); // save both player to avoid crash: they always have no advantage/disadvantage between the 2 players - if (iMap->save_settings&1) + if (map->save_settings&1) { chrif->save(sd,0); chrif->save(tsd,0); diff --git a/src/map/unit.c b/src/map/unit.c index e4ea365df..44bb1970c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -137,8 +137,7 @@ int unit_walktoxy_sub(struct block_list *bl) return 1; } -int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) { int i; int x,y,dx,dy; uint8 dir; @@ -148,7 +147,7 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) struct unit_data *ud; struct mercenary_data *mrd; - bl = iMap->id2bl(id); + bl = map->id2bl(id); if(bl == NULL) return 0; sd = BL_CAST(BL_PC, bl); @@ -179,29 +178,29 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) dx = dirx[(int)dir]; dy = diry[(int)dir]; - if(iMap->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS)) + if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS)) return unit->walktoxy_sub(bl); //Refresh view for all those we lose sight - iMap->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); x += dx; y += dy; - iMap->moveblock(bl, x, y, tick); + map->moveblock(bl, x, y, tick); ud->walk_count++; //walked cell counter, to be used for walk-triggered skills. [Skotlex] status_change_end(bl, SC_ROLLINGCUTTER, INVALID_TIMER); //If you move, you lose your counters. [malufett] if (bl->x != x || bl->y != y || ud->walktimer != INVALID_TIMER) - return 0; //iMap->moveblock has altered the object beyond what we expected (moved/warped it) + return 0; //map->moveblock has altered the object beyond what we expected (moved/warped it) ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets - iMap->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); ud->walktimer = INVALID_TIMER; if(sd) { if( sd->touching_id ) npc->touchnext_areanpc(sd,false); - if(iMap->getcell(bl->m,x,y,CELL_CHKNPC)) { + if(map->getcell(bl->m,x,y,CELL_CHKNPC)) { npc->touch_areanpc(sd,bl->m,x,y); if (bl->prev == NULL) //Script could have warped char, abort remaining of the function. return 0; @@ -227,7 +226,7 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) sd->md->masterteleport_timer = 0; } } else if (md) { - if( iMap->getcell(bl->m,x,y,CELL_CHKNPC) ) { + if( map->getcell(bl->m,x,y,CELL_CHKNPC) ) { if( npc->touch_areanpc2(md) ) return 0; // Warped } else md->areanpc_id = 0; @@ -290,10 +289,9 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) //Keep trying to run. if ( !(unit->run(bl) || unit->wugdash(bl,sd)) ) ud->state.running = 0; - } - else if (ud->target_to) { + } else if (ud->target_to) { //Update target trajectory. - struct block_list *tbl = iMap->id2bl(ud->target_to); + struct block_list *tbl = map->id2bl(ud->target_to); if (!tbl || !status->check_visibility(bl, tbl)) { //Cancel chase. ud->to_x = bl->x; @@ -303,8 +301,8 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) ud->target_to = 0; return 0; } - if (tbl->m == bl->m && check_distance_bl(bl, tbl, ud->chaserange)) - { //Reached destination. + if (tbl->m == bl->m && check_distance_bl(bl, tbl, ud->chaserange)) { + //Reached destination. if (ud->state.attack_continue) { //Aegis uses one before every attack, we should //only need this one for syncing purposes. [Skotlex] @@ -316,17 +314,16 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) unit->walktobl(bl, tbl, ud->chaserange, ud->state.walk_easy|(ud->state.attack_continue?2:0)); return 0; } - } - else { //Stopped walking. Update to_x and to_y to current location [Skotlex] + } else { + //Stopped walking. Update to_x and to_y to current location [Skotlex] ud->to_x = bl->x; ud->to_y = bl->y; } return 0; } -int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) -{ - struct block_list *bl = iMap->id2bl(id); +int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) { + struct block_list *bl = map->id2bl(id); if (!bl || bl->prev == NULL) return 0; @@ -363,8 +360,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) return 0; if (flag&4 && DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0 && - DIFF_TICK(ud->canmove_tick, timer->gettick()) < 2000) - { // Delay walking command. [Skotlex] + DIFF_TICK(ud->canmove_tick, timer->gettick()) < 2000) { + // Delay walking command. [Skotlex] timer->add(ud->canmove_tick+1, unit->delay_walktoxy_timer, bl->id, (x<<16)|(y&0xFFFF)); return 1; } @@ -379,7 +376,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) sc = status->get_sc(bl); if (sc && sc->data[SC_CONFUSION]) //Randomize the target position - iMap->random_dir(bl, &ud->to_x, &ud->to_y); + map->random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { // When you come to the center of the grid because the change of destination while you're walking right now @@ -405,17 +402,14 @@ static inline void set_mobstate(struct block_list* bl, int flag) md->state.skillstate = md->state.aggressive ? MSS_FOLLOW : MSS_RUSH; } -int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) -{ - struct block_list *bl = iMap->id2bl(id); +int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) { + struct block_list *bl = map->id2bl(id); struct unit_data *ud = bl?unit->bl2ud(bl):NULL; - if (ud && ud->walktimer == INVALID_TIMER && ud->target == data) - { + if (ud && ud->walktimer == INVALID_TIMER && ud->target == data) { if (DIFF_TICK(ud->canmove_tick, tick) > 0) //Keep waiting? timer->add(ud->canmove_tick+1, unit->walktobl_sub, id, data); - else if (unit->can_move(bl)) - { + else if (unit->can_move(bl)) { if (unit->walktoxy_sub(bl)) set_mobstate(bl, ud->state.attack_continue); } @@ -454,7 +448,7 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int sc = status->get_sc(bl); if (sc && sc->data[SC_CONFUSION]) //Randomize the target position - iMap->random_dir(bl, &ud->to_x, &ud->to_y); + map->random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { ud->state.change_walk_target = 1; @@ -504,13 +498,12 @@ int unit_run(struct block_list *bl) { // determine destination cell to_x = bl->x; to_y = bl->y; - for(i=0;i<AREA_SIZE;i++) - { - if(!iMap->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS)) + for(i=0;i<AREA_SIZE;i++) { + if(!map->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS)) break; //if sprinting and there's a PC/Mob/NPC, block the path [Kevin] - if(sc->data[SC_RUN] && iMap->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC)) + if(sc->data[SC_RUN] && map->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC)) break; to_x += dir_x; @@ -576,12 +569,11 @@ int unit_wugdash(struct block_list *bl, struct map_session_data *sd) { to_x = bl->x; to_y = bl->y; - for(i=0;i<AREA_SIZE;i++) - { - if(!iMap->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS)) + for(i=0;i<AREA_SIZE;i++) { + if(!map->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS)) break; - if(sc->data[SC_WUGDASH] && iMap->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC)) + if(sc->data[SC_WUGDASH] && map->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC)) break; to_x += dir_x; @@ -620,17 +612,15 @@ int unit_wugdash(struct block_list *bl, struct map_session_data *sd) { } //Makes bl attempt to run dist cells away from target. Uses hard-paths. -int unit_escape(struct block_list *bl, struct block_list *target, short dist) -{ - uint8 dir = iMap->calc_dir(target, bl->x, bl->y); - while( dist > 0 && iMap->getcell(bl->m, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], CELL_CHKNOREACH) ) +int unit_escape(struct block_list *bl, struct block_list *target, short dist) { + uint8 dir = map->calc_dir(target, bl->x, bl->y); + while( dist > 0 && map->getcell(bl->m, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], CELL_CHKNOREACH) ) dist--; return ( dist > 0 && unit->walktoxy(bl, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], 0) ); } //Instant warp function. -int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) -{ +int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) { short dx,dy; uint8 dir; struct unit_data *ud = NULL; @@ -645,30 +635,30 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool unit->stop_walking(bl,1); unit->stop_attack(bl); - if( checkpath && (iMap->getcell(bl->m,dst_x,dst_y,CELL_CHKNOPASS) || !path->search(NULL,bl->m,bl->x,bl->y,dst_x,dst_y,easy,CELL_CHKNOREACH)) ) + if( checkpath && (map->getcell(bl->m,dst_x,dst_y,CELL_CHKNOPASS) || !path->search(NULL,bl->m,bl->x,bl->y,dst_x,dst_y,easy,CELL_CHKNOREACH)) ) return 0; // unreachable ud->to_x = dst_x; ud->to_y = dst_y; - dir = iMap->calc_dir(bl, dst_x, dst_y); + dir = map->calc_dir(bl, dst_x, dst_y); ud->dir = dir; dx = dst_x - bl->x; dy = dst_y - bl->y; - iMap->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); - iMap->moveblock(bl, dst_x, dst_y, timer->gettick()); + map->moveblock(bl, dst_x, dst_y, timer->gettick()); ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets - iMap->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); ud->walktimer = INVALID_TIMER; if(sd) { if( sd->touching_id ) npc->touchnext_areanpc(sd,false); - if(iMap->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) { + if(map->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) { npc->touch_areanpc(sd,bl->m,bl->x,bl->y); if (bl->prev == NULL) //Script could have warped char, abort remaining of the function. return 0; @@ -749,15 +739,15 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) dy = ny-bl->y; if(dx || dy) { - iMap->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl); + map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl); if(su) { skill->unit_move_unit_group(su->group, bl->m, dx, dy); } else { - iMap->moveblock(bl, nx, ny, timer->gettick()); + map->moveblock(bl, nx, ny, timer->gettick()); } - iMap->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl); + map->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl); if(!(flag&1)) { clif->blown(bl); @@ -767,7 +757,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) if(sd->touching_id) { npc->touchnext_areanpc(sd, false); } - if(iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKNPC)) { + if(map->getcell(bl->m, bl->x, bl->y, CELL_CHKNPC)) { npc->touch_areanpc(sd, bl->m, bl->x, bl->y); } else { sd->areanpc_id = 0; @@ -815,16 +805,16 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) if (x<0 || y<0) { //Random map position. - if (!iMap->search_freecell(NULL, m, &x, &y, -1, -1, 1)) { + if (!map->search_freecell(NULL, m, &x, &y, -1, -1, 1)) { ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, maplist[m].name, x, y); return 2; } - } else if (iMap->getcell(m,x,y,CELL_CHKNOREACH)) { + } else if (map->getcell(m,x,y,CELL_CHKNOREACH)) { //Invalid target cell ShowWarning("unit_warp: Specified non-walkable target cell: %d (%s) at [%d,%d]\n", m, maplist[m].name, x,y); - if (!iMap->search_freecell(NULL, m, &x, &y, 4, 4, 1)) { + if (!map->search_freecell(NULL, m, &x, &y, 4, 4, 1)) { //Can't find a nearby cell ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, maplist[m].name, x, y); return 2; @@ -845,7 +835,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) bl->y=ud->to_y=y; bl->m=m; - iMap->addblock(bl); + map->addblock(bl); clif->spawn(bl); skill->unit_move(bl,timer->gettick(),1); @@ -1014,7 +1004,7 @@ int unit_can_move(struct block_list *bl) { int unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) { struct unit_data *ud = (struct unit_data *)data; - TBL_PC * sd = iMap->id2sd(id); + TBL_PC * sd = map->id2sd(id); if(sd && pc_isridingwug(sd)) clif->skill_nodamage(ud->bl,ud->bl,RA_WUGDASH,ud->skill_lv, @@ -1124,8 +1114,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui switch(skill_id) { //Check for skills that auto-select target case MO_CHAINCOMBO: - if (sc && sc->data[SC_BLADESTOP]){ - if ((target=iMap->id2bl(sc->data[SC_BLADESTOP]->val4)) == NULL) + if (sc && sc->data[SC_BLADESTOP]) { + if ((target=map->id2bl(sc->data[SC_BLADESTOP]->val4)) == NULL) return 0; } break; @@ -1133,7 +1123,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui case WE_FEMALE: if (!sd->status.partner_id) return 0; - target = (struct block_list*)iMap->charid2sd(sd->status.partner_id); + target = (struct block_list*)map->charid2sd(sd->status.partner_id); if (!target) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; @@ -1156,7 +1146,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } if( !target ) // choose default target - target = iMap->id2bl(target_id); + target = map->id2bl(target_id); if( !target || src->m != target->m || !src->prev || !target->prev ) return 0; @@ -1334,7 +1324,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui case NC_DISJOINT: if( target->type == BL_PC ){ struct mob_data *md; - if( (md = iMap->id2md(target->id)) && md->master_id != src->id ) + if( (md = map->id2md(target->id)) && md->master_id != src->id ) casttime <<= 1; } break; @@ -1474,11 +1464,11 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui * "WHY IS IT HEREE": pneuma cannot be cancelled past this point, the client displays the animation even, * if we cancel it from nodamage_id, so it has to be here for it to not display the animation. **/ - if( skill_id == AL_PNEUMA && iMap->getcell(src->m, skill_x, skill_y, CELL_CHKLANDPROTECTOR) ) { + if( skill_id == AL_PNEUMA && map->getcell(src->m, skill_x, skill_y, CELL_CHKLANDPROTECTOR) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } - if( (skill_id >= SC_MANHOLE && skill_id <= SC_FEINTBOMB) && iMap->getcell(src->m, skill_x, skill_y, CELL_CHKMAELSTROM) ) { + if( (skill_id >= SC_MANHOLE && skill_id <= SC_FEINTBOMB) && map->getcell(src->m, skill_x, skill_y, CELL_CHKMAELSTROM) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -1487,8 +1477,8 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui if (!status->check_skilluse(src, NULL, skill_id, 0)) return 0; - if( iMap->getcell(src->m, skill_x, skill_y, CELL_CHKWALL) ) - {// can't cast ground targeted spells on wall cells + if( map->getcell(src->m, skill_x, skill_y, CELL_CHKWALL) ) { + // can't cast ground targeted spells on wall cells if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -1579,9 +1569,9 @@ int unit_set_target(struct unit_data* ud, int target_id) nullpo_ret(ud); if( ud->target != target_id ) { - if( ud->target && (target = iMap->id2bl(ud->target)) && (ux = unit->bl2ud(target)) && ux->target_count > 0 ) + if( ud->target && (target = map->id2bl(ud->target)) && (ux = unit->bl2ud(target)) && ux->target_count > 0 ) ux->target_count --; - if( target_id && (target = iMap->id2bl(target_id)) && (ux = unit->bl2ud(target)) ) + if( target_id && (target = map->id2bl(target_id)) && (ux = unit->bl2ud(target)) ) ux->target_count ++; } @@ -1623,14 +1613,13 @@ int unit_unattackable(struct block_list *bl) * Attack request * If type is an ongoing attack *------------------------------------------*/ -int unit_attack(struct block_list *src,int target_id,int continuous) -{ +int unit_attack(struct block_list *src,int target_id,int continuous) { struct block_list *target; struct unit_data *ud; nullpo_ret(ud = unit->bl2ud(src)); - target = iMap->id2bl(target_id); + target = map->id2bl(target_id); if( target==NULL || status->isdead(target) ) { unit->unattackable(src); return 1; @@ -1733,9 +1722,9 @@ bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range, dx=(dx>0)?1:((dx<0)?-1:0); dy=(dy>0)?1:((dy<0)?-1:0); - if (iMap->getcell(tbl->m,tbl->x-dx,tbl->y-dy,CELL_CHKNOPASS)) - { //Look for a suitable cell to place in. - for(i=0;i<9 && iMap->getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS);i++); + if (map->getcell(tbl->m,tbl->x-dx,tbl->y-dy,CELL_CHKNOPASS)) { + //Look for a suitable cell to place in. + for(i=0;i<9 && map->getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS);i++); if (i==9) return false; //No valid cells. dx = dirx[i]; dy = diry[i]; @@ -1826,7 +1815,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) sd = BL_CAST(BL_PC, src); md = BL_CAST(BL_MOB, src); ud->attacktimer = INVALID_TIMER; - target=iMap->id2bl(ud->target); + target=map->id2bl(ud->target); if( src == NULL || src->prev == NULL || target==NULL || target->prev == NULL ) return 0; @@ -1877,7 +1866,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) return 1; } if( !battle->check_range(src,target,range) ) { - //Within range, but no direct line of attack + //Within range, but no direct line of attack if( ud->state.attack_continue ) { if(ud->chaserange > 2) ud->chaserange-=2; unit->walktobl(src,target,ud->chaserange,ud->state.walk_easy|2); @@ -1888,10 +1877,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) //Non-players use the sync packet on the walk timer. [Skotlex] if (tid == INVALID_TIMER && sd) clif->fixpos(src); - if( DIFF_TICK(ud->attackabletime,tick) <= 0 ) - { + if( DIFF_TICK(ud->attackabletime,tick) <= 0 ) { if (battle_config.attack_direction_change && (src->type&battle_config.attack_direction_change)) { - ud->dir = iMap->calc_dir(src, target->x,target->y ); + ud->dir = map->calc_dir(src, target->x,target->y ); } if(ud->walktimer != INVALID_TIMER) unit->stop_walking(src,1); @@ -1901,18 +1889,18 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) if (sstatus->mode&MD_ASSIST && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME) { // Link monsters nearby [Skotlex] md->last_linktime = tick; - iMap->foreachinrange(mob->linksearch, src, md->db->range2, BL_MOB, md->class_, target, tick); + map->foreachinrange(mob->linksearch, src, md->db->range2, BL_MOB, md->class_, target, tick); } } if(src->type == BL_PET && pet->attackskill((TBL_PET*)src, target->id)) return 1; - iMap->freeblock_lock(); + map->freeblock_lock(); ud->attacktarget_lv = battle->weapon_attack(src,target,tick,0); if(sd && sd->status.pet_id > 0 && sd->pd && battle_config.pet_attack_support) pet->target_check(sd,target,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); /** * Applied when you're unable to attack (e.g. out of ammo) * We should stop here otherwise timer keeps on and this happens endlessly @@ -1935,10 +1923,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) return 1; } -int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) -{ +int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) { struct block_list *bl; - bl = iMap->id2bl(id); + bl = map->id2bl(id); if(bl && unit->attack_timer_sub(bl, tid, tick) == 0) unit->unattackable(bl); return 0; @@ -2079,7 +2066,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i if(bl->prev == NULL) return 0; //Already removed? - iMap->freeblock_lock(); + map->freeblock_lock(); unit->set_target(ud, 0); @@ -2108,8 +2095,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); status_change_end(bl, SC_HIDING, INVALID_TIMER); // Ensure the bl is a PC; if so, we'll handle the removal of cloaking and cloaking exceed later - if ( bl->type != BL_PC ) - { + if ( bl->type != BL_PC ) { status_change_end(bl, SC_CLOAKING, INVALID_TIMER); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); } @@ -2135,10 +2121,10 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i case BL_PC: { struct map_session_data *sd = (struct map_session_data*)bl; - if(sd->shadowform_id){ - struct block_list *d_bl = iMap->id2bl(sd->shadowform_id); - if( d_bl ) - status_change_end(d_bl,SC__SHADOWFORM,INVALID_TIMER); + if(sd->shadowform_id) { + struct block_list *d_bl = map->id2bl(sd->shadowform_id); + if( d_bl ) + status_change_end(d_bl,SC__SHADOWFORM,INVALID_TIMER); } //Leave/reject all invitations. if(sd->chatID) @@ -2204,8 +2190,8 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i sd->state.active, sd->state.connect_new, sd->state.rewarp, sd->state.changemap, sd->state.debug_remove_map, maplist[bl->m].name, maplist[bl->m].users, sd->debug_file, sd->debug_line, sd->debug_func, file, line, func); - } else if (--maplist[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex] - iMap->removemobs(bl->m); + } else if (--maplist[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex] + map->removemobs(bl->m); if( !(sd->sc.option&OPTION_INVISIBLE) ) { // decrement the number of active pvp players on the map --maplist[bl->m].users_pvp; @@ -2234,12 +2220,12 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i } case BL_PET: { struct pet_data *pd = (struct pet_data*)bl; - if( pd->pet.intimate <= 0 && !(pd->msd && !pd->msd->state.active) ) - { //If logging out, this is deleted on unit->free + if( pd->pet.intimate <= 0 && !(pd->msd && !pd->msd->state.active) ) { + //If logging out, this is deleted on unit->free clif->clearunit_area(bl,clrtype); - iMap->delblock(bl); + map->delblock(bl); unit->free(bl,CLR_OUTSIGHT); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } @@ -2248,13 +2234,13 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i case BL_HOM: { struct homun_data *hd = (struct homun_data *)bl; ud->canact_tick = ud->canmove_tick; //It appears HOM do reset the can-act tick. - if( !hd->homunculus.intimacy && !(hd->master && !hd->master->state.active) ) - { //If logging out, this is deleted on unit->free + if( !hd->homunculus.intimacy && !(hd->master && !hd->master->state.active) ) { + //If logging out, this is deleted on unit->free clif->emotion(bl, E_SOB); clif->clearunit_area(bl,clrtype); - iMap->delblock(bl); + map->delblock(bl); unit->free(bl,CLR_OUTSIGHT); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -2262,12 +2248,11 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i case BL_MER: { struct mercenary_data *md = (struct mercenary_data *)bl; ud->canact_tick = ud->canmove_tick; - if( mercenary->get_lifetime(md) <= 0 && !(md->master && !md->master->state.active) ) - { + if( mercenary->get_lifetime(md) <= 0 && !(md->master && !md->master->state.active) ) { clif->clearunit_area(bl,clrtype); - iMap->delblock(bl); + map->delblock(bl); unit->free(bl,CLR_OUTSIGHT); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -2275,12 +2260,11 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i case BL_ELEM: { struct elemental_data *ed = (struct elemental_data *)bl; ud->canact_tick = ud->canmove_tick; - if( elemental->get_lifetime(ed) <= 0 && !(ed->master && !ed->master->state.active) ) - { + if( elemental->get_lifetime(ed) <= 0 && !(ed->master && !ed->master->state.active) ) { clif->clearunit_area(bl,clrtype); - iMap->delblock(bl); + map->delblock(bl); unit->free(bl,0); - iMap->freeblock_unlock(); + map->freeblock_unlock(); return 0; } break; @@ -2292,8 +2276,8 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i **/ if( bl->type != BL_MOB || !status->isdead(bl) ) clif->clearunit_area(bl,clrtype); - iMap->delblock(bl); - iMap->freeblock_unlock(); + map->delblock(bl); + map->freeblock_unlock(); return 1; } @@ -2326,12 +2310,11 @@ void unit_free_pc(struct map_session_data *sd) * Function to free all related resources to the bl * if unit is on map, it is removed using the clrtype specified *------------------------------------------*/ -int unit_free(struct block_list *bl, clr_type clrtype) -{ +int unit_free(struct block_list *bl, clr_type clrtype) { struct unit_data *ud = unit->bl2ud( bl ); nullpo_ret(ud); - iMap->freeblock_lock(); + map->freeblock_lock(); if( bl->prev ) //Players are supposed to logout with a "warp" effect. unit->remove_map(bl, clrtype, ALC_MARK); @@ -2357,7 +2340,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) duel->reject(sd->duel_invite, sd); // Notify friends that this char logged out. [Skotlex] - iMap->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0); + map->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0); party->send_logout(sd); guild->send_memberinfoshort(sd,0); pc->cleareventtimer(sd); @@ -2585,10 +2568,10 @@ int unit_free(struct block_list *bl, clr_type clrtype) skill->clear_unitgroup(bl); status->change_clear(bl,1); - iMap->deliddb(bl); + map->deliddb(bl); if( bl->type != BL_PC ) //Players are handled by map_quit - iMap->freeblock(bl); - iMap->freeblock_unlock(); + map->freeblock(bl); + map->freeblock_unlock(); return 0; } diff --git a/src/map/vending.c b/src/map/vending.c index 32e084a87..7d6d02cfb 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -48,7 +48,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) { struct map_session_data* vsd; nullpo_retv(sd); - if( (vsd = iMap->id2sd(id)) == NULL ) + if( (vsd = map->id2sd(id)) == NULL ) return; if( !vsd->state.vending ) return; // not vending @@ -71,7 +71,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, int i, j, cursor, w, new_ = 0, blank, vend_list[MAX_VENDING]; double z; struct s_vending vend[MAX_VENDING]; // against duplicate packets - struct map_session_data* vsd = iMap->id2sd(aid); + struct map_session_data* vsd = map->id2sd(aid); nullpo_retv(sd); if( vsd == NULL || !vsd->state.vending || vsd->bl.id == sd->bl.id ) @@ -199,7 +199,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, vsd->vend_num = cursor; //Always save BOTH: buyer and customer - if( iMap->save_settings&2 ) { + if( map->save_settings&2 ) { chrif->save(sd,0); chrif->save(vsd,0); } @@ -211,7 +211,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, if( i == vsd->vend_num ) { //Close Vending (this was automatically done by the client, we have to do it manually for autovenders) [Skotlex] vending->close(vsd); - iMap->quit(vsd); //They have no reason to stay around anymore, do they? + map->quit(vsd); //They have no reason to stay around anymore, do they? } } } diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index ebd2a9ee5..d769a601e 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -49,17 +49,17 @@ int db2sql(char** str, const char* source, int line, int scriptopt) { struct item_data *it = NULL; unsigned char offset = 0; #ifdef RENEWAL - if( iMap->db_use_sql_item_db ) offset = 1; -#endif + if( map->db_use_sql_item_db ) offset = 1; +#endif // RENEWAL if( (it = itemdb->exists(parse_dbrow(str,source,line,scriptopt))) ) { /* renewal has the 'matk' and 'equip_level' is now 'equip_level_min', and there is a new 'equip_level_max' field */ #ifdef RENEWAL - if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`matk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level_min`,`equip_level_max`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",iMap->item_db_re_db, - it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11+offset],NULL,0),atoi(str[12+offset]),atoi(str[13+offset]),atoi(str[14+offset]),it->wlv,it->elv,it->elvmax,atoi(str[17+offset]),it->look) ) -#else - if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",iMap->item_db_db, - it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11],NULL,0),atoi(str[12]),atoi(str[13]),atoi(str[14]),it->wlv,it->elv,atoi(str[17]),it->look) ) -#endif + if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`matk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level_min`,`equip_level_max`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",map->item_db_re_db, + it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11+offset],NULL,0),atoi(str[12+offset]),atoi(str[13+offset]),atoi(str[14+offset]),it->wlv,it->elv,it->elvmax,atoi(str[17+offset]),it->look) ) +#else // not RENEWAL + if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",map->item_db_db, + it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11],NULL,0),atoi(str[12]),atoi(str[13]),atoi(str[14]),it->wlv,it->elv,atoi(str[17]),it->look) ) +#endif // RENEWAL SqlStmt_ShowDebug(stmt); else { if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, it->name, strlen(it->name)) ) @@ -68,9 +68,9 @@ int db2sql(char** str, const char* source, int line, int scriptopt) { if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, it->jname, strlen(it->jname)) ) SqlStmt_ShowDebug(stmt); else { - #ifdef RENEWAL - if( iMap->db_use_sql_item_db ) offset += 1; - #endif +#ifdef RENEWAL + if( map->db_use_sql_item_db ) offset += 1; +#endif // RENEWAL if( it->script ) trimbraces(str[19+offset]); if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, it->script?str[19+offset]:"", it->script?strlen(str[19+offset]):0) ) SqlStmt_ShowDebug(stmt); @@ -98,7 +98,7 @@ int db2sql(char** str, const char* source, int line, int scriptopt) { CPCMD(db2sql) { - if( iMap->db_use_sql_item_db ) { + if( map->db_use_sql_item_db ) { ShowInfo("db2sql: this should not be used with 'db_use_sql_item_db' enabled, skipping...\n"); return; } @@ -114,10 +114,10 @@ CPCMD(db2sql) { itemdb->parse_dbrow = db2sql; /* empty table */ #ifdef RENEWAL - if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", iMap->item_db_re_db ) ) -#else - if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", iMap->item_db_db) ) -#endif + if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", map->item_db_re_db ) ) +#else // not RENEWAL + if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", map->item_db_db) ) +#endif // RENEWAL Sql_ShowDebug(mysql_handle); else { itemdb->reload(); @@ -131,7 +131,7 @@ CPCMD(db2sql) { HPExport void plugin_init (void) { SQL = GET_SYMBOL("SQL"); itemdb = GET_SYMBOL("itemdb"); - iMap = GET_SYMBOL("iMap"); + map = GET_SYMBOL("map"); strlib = GET_SYMBOL("strlib"); HPMi->addCPCommand("server:tools:db2sql",CPCMD_A(db2sql)); -- cgit v1.2.3-70-g09d2 From f63b6a94ea8e3a8ad877ad401c6aff1eb4e1d45d Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Sat, 28 Sep 2013 12:25:07 -0300 Subject: HPM: Storage.c Completed Moved missing declarations of interest into the interface, init/final from storage into gstorage Signed-off-by: shennetsind <ind@henn.et> --- src/map/map.c | 4 ++-- src/map/storage.c | 47 +++++++++++++++++++++++------------------------ src/map/storage.h | 10 ++++++++-- 3 files changed, 33 insertions(+), 28 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/map.c b/src/map/map.c index 8641f7011..5d58fd30e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -4905,7 +4905,7 @@ void do_final(void) script->final(); itemdb->final(); instance->final(); - storage->final(); + gstorage->final(); guild->final(); party->do_final_party(); pc->do_final_pc(); @@ -5389,7 +5389,7 @@ int do_init(int argc, char *argv[]) status->init(); party->do_init_party(); guild->init(); - storage->init(); + gstorage->init(); pet->init(); homun->init(); mercenary->init(); 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,12 +716,15 @@ 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; /* */ @@ -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; -- cgit v1.2.3-70-g09d2 From 24556fbd5969a6cc2806a46b853e6252b5d7cd06 Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Fri, 4 Oct 2013 16:31:38 -0300 Subject: Fixed Storage AddItem Bug Fixed a ancient bug where trying to add a item to a full storage would render the item un-draggable (server was failing to respond properly). Thanks to Sanasol for bringing it up. Signed-off-by: shennetsind <ind@henn.et> --- src/map/storage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/storage.c b/src/map/storage.c index 91515dfe1..cc1100d28 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -196,8 +196,7 @@ int storage_delitem(struct map_session_data* sd, int n, int amount) * 0 : fail * 1 : success *------------------------------------------*/ -int storage_storageadd(struct map_session_data* sd, int index, int amount) -{ +int storage_storageadd(struct map_session_data* sd, int index, int amount) { nullpo_ret(sd); if( sd->status.storage.storage_amount > MAX_STORAGE ) @@ -214,6 +213,8 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount) if( storage->additem(sd,&sd->status.inventory[index],amount) == 0 ) pc->delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE); + else + clif->dropitem(sd, index,0); return 1; } -- cgit v1.2.3-70-g09d2 From c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151 Mon Sep 17 00:00:00 2001 From: sevenzz23 <sevenzz23@yahoo.com> Date: Thu, 31 Oct 2013 12:07:06 +0700 Subject: No error after compilation, but when logging in at map server it will crash. Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com> --- conf/messages.conf | 41 +++++- doc/atcommands.txt | 16 +++ doc/permissions.txt | 3 +- doc/script_commands.txt | 46 +++++++ sql-files/main.sql | 4 + sql-files/upgrades/2013-10-31--07-49.sql | 4 + src/char/char.c | 94 +++++++------ src/char/int_mail.c | 2 + src/char/int_storage.c | 167 +++++++++++++++++++--- src/char/inter.c | 4 +- src/common/mmo.h | 6 +- src/config/core.h | 4 + src/map/atcommand.c | 78 ++++++++--- src/map/buyingstore.c | 4 +- src/map/clif.c | 26 ++-- src/map/guild.c | 52 +++++++ src/map/guild.h | 4 + src/map/intif.c | 63 +++++++-- src/map/intif.h | 4 + src/map/mail.c | 5 +- src/map/packets_struct.h | 1 + src/map/party.c | 9 +- src/map/pc.c | 59 ++++++-- src/map/pc.h | 7 +- src/map/pc_groups.c | 1 + src/map/pc_groups.h | 3 +- src/map/script.c | 229 ++++++++++++++++++++++++++++++- src/map/storage.c | 17 ++- src/map/trade.c | 6 + src/map/vending.c | 3 +- 30 files changed, 825 insertions(+), 137 deletions(-) create mode 100644 sql-files/upgrades/2013-10-31--07-49.sql (limited to 'src/map/storage.c') diff --git a/conf/messages.conf b/conf/messages.conf index 7b7a99301..d2e57bb0e 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -316,6 +316,13 @@ 290: The player is no longer killable. 291: Weather effects will dispell on warp/refresh 292: Killer state reset. +//Item Bound System +293: This bounded item cannot be traded to that character. +294: This bounded item cannot be stored there. +295: Please enter an item name or ID (usage: @item <item name/ID> <quantity> <bound_type>). +296: Please enter all parameters (usage: @item2 <item name/ID> <quantity> +297: <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>). +298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party 4:Character // Guild Castles Number // -------------------- //299: ?? Castles @@ -455,6 +462,13 @@ // Messages of others (not for GM commands) // ---------------------------------------- +// Account-Bound Items +497: You cannot distribute this item - it is an account bounded item! + +// @itembound / @itembound2 +498: Cannot create bounded pet eggs or pet armors. +499: Cannot create bounded stackable items. + //500: FREE 501: Your account time limit is: %d-%m-%Y %H:%M:%S. 502: Day Mode is activated @@ -711,11 +725,13 @@ 981: Please enter color and message (usage: @kamic <color> <message>). 982: Invalid color. -// @item -983: Please enter an item name or ID (usage: @item <item name/ID> <quantity>). -// @item2 -984: Please enter all parameters (usage: @item2 <item name/ID> <quantity> +// @item / @itembound +983: Please enter an item name or ID (usage: @%s <item name/ID> <quantity>). + + +// @item2 / @itembound2 +984: Please enter all parameters (usage: @%s <item name/ID> <quantity>). 985: <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>). // @baselevelup @@ -1360,7 +1376,8 @@ 1361: Already using this font. // @new_mount -1362: NOTICE: If you crash with mount your LUA is outdated. +//1362: NOTICE: If you crash with mount your LUA is outdated. +1362: .. 1363: You have mounted. 1364: You have released your mount. @@ -1534,5 +1551,19 @@ //CashShop mapflag 1489: Cash Shop is disabled in this map + +// @autoloottype +1490: You're already autolooting this item type. +1491: Your autoloottype list has all item types. You can remove some items with @autoloottype -<type name or ID>. +1492: Autolooting item type: '%s' {%d} +1493: You're currently not autolooting this item type. +1494: Removed item type: '%s' {%d} from your autoloottype list. +1495: To add an item type to the list, use "@aloottype +<type name or ID>". To remove an item type, use "@aloottype -<type name or ID>". +1496: Type List: healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10 +1497: "@aloottype reset" will clear your autoloottype list. +1498: Your autoloottype list is empty. +1499: Item types on your autoloottype list: +1500: Your autoloottype list has been reset. + //Custom translations import: conf/import/msg_conf.txt diff --git a/doc/atcommands.txt b/doc/atcommands.txt index 42b085cd6..a7377b563 100644 --- a/doc/atcommands.txt +++ b/doc/atcommands.txt @@ -625,6 +625,22 @@ Creates an item with the given parameters (the 'cards' can be any item). identify_flag: 0 = unidentified, 1 = identified attribute: 0 = not broken, 1 = broken +--------------------------------------- + +@itembound <item name/ID> <amount> <bound_type> + +Creates the specified item and bounds it to the account. +bound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character + +--------------------------------------- + +@itembound2 <item name/ID> <quantity> <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type> + +Creates an item with the given parameters (the 'cards' can be any item) and bounds it to the account. +identify_flag: 0 = unidentified, 1 = identified +attribute: 0 = not broken, 1 = broken +bound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character + --------------------------------------- @produce <equip name/ID> <element> <# of Very's> diff --git a/doc/permissions.txt b/doc/permissions.txt index 9760f716c..c2aeba081 100644 --- a/doc/permissions.txt +++ b/doc/permissions.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Hercules Dev Team //===== Current Version: ===================================== -//= 20130528 +//= 20131031 //===== Description: ========================================= //= Player group permissions, configured in /conf/groups.conf. //============================================================ @@ -31,4 +31,5 @@ show_bossmobs : Ability to see boss mobs with @showmobs. disable_pvm : Ability to disable Player vs. Monster. disable_pvp : Ability to disable Player vs. Player. disable_commands_when_dead : Ability to disable @command usage when dead. +can_trade_bounded : Ability to trade or otherwise distribute bounded items (drop, storage, vending etc...). hchsys_admin : Hercules Chat System Admin (Ability to modify channel settings regardless of ownership and join password-protected channels without requiring a password.) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index bd0b032f1..23bacec5f 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -2781,6 +2781,7 @@ recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires. @inventorylist_count - the number of items in these lists. +@inventorylist_bound - whether it is an account bounded item or not. This could be handy to save/restore a character's inventory, since no other command returns such a complete set of data, and could also be the @@ -4448,6 +4449,51 @@ command, creating a pet which is the same, but simultaneously exists in two eggs, and may hatch from either, although, I'm not sure what kind of a mess will this really cause. +--------------------------------------- +*getitembound <item id>,<amount>,<bound type>{,<account ID>}; +*getitembound "<item name>",<amount>,<bound type>{,<account ID>}; + +This command behaves identically to 'getitem', but the items created will be +bound to the target character as specified by the bound type. All items created +in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in +some cases cannot be traded or stored. + +Valid bound types are: + 1 - Account Bound + 2 - Guild Bound + 3 - Party Bound + 4 - Character Bound + +--------------------------------------- + +*getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; +*getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; + +This command behaves identically to 'getitem2', but the items created will be +bound to the target character as specified by the bound type. All items created +in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in +some cases cannot be traded or stored. + +For a list of bound types see 'getitembound'. + +--------------------------------------- + +*countbound({<bound type>}) + +This function will return the number of bounded items in the character's +inventory, and sets an array @bound_items[] containing all item IDs of the +counted items. If a bound type is specified, only those items will be counted. + +For a list of bound types see 'getitembound'. + +Example: + mes "You currently have "+countbound()+" bounded items."; + next; + mes "The list of bounded items include:"; + for(set .@i,0; .@i<getarraysize(@bound_items); set .@i,.@i+1) + mes getitemname(@bound_items[.@i]); + close; + --------------------------------------- *getnameditem <item id>,<character name|character ID>; diff --git a/sql-files/main.sql b/sql-files/main.sql index 2c91d58b1..3f425d411 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -43,6 +43,7 @@ CREATE TABLE IF NOT EXISTS `cart_inventory` ( `card2` smallint(11) NOT NULL default '0', `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', + `bound` tinyint(1) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `char_id` (`char_id`) @@ -342,6 +343,7 @@ CREATE TABLE IF NOT EXISTS `guild_storage` ( `card2` smallint(11) NOT NULL default '0', `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', + `bound` tinyint(1) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `guild_id` (`guild_id`) @@ -406,6 +408,7 @@ CREATE TABLE IF NOT EXISTS `inventory` ( `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', `favorite` tinyint(3) unsigned NOT NULL default '0', + `bound` tinyint(1) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `char_id` (`char_id`) @@ -691,6 +694,7 @@ CREATE TABLE IF NOT EXISTS `storage` ( `card2` smallint(11) NOT NULL default '0', `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', + `bound` tinyint(1) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `account_id` (`account_id`) diff --git a/sql-files/upgrades/2013-10-31--07-49.sql b/sql-files/upgrades/2013-10-31--07-49.sql new file mode 100644 index 000000000..40e0421c8 --- /dev/null +++ b/sql-files/upgrades/2013-10-31--07-49.sql @@ -0,0 +1,4 @@ +ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite`; +ALTER TABLE `cart_inventory` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +ALTER TABLE `storage` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`; \ No newline at end of file diff --git a/src/char/char.c b/src/char/char.c index 4a04c521d..61a1e24e0 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -724,8 +724,8 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit // it significantly reduces cpu load on the database server. StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`"); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`"); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `%s`='%d'", tablename, selectoption, id); @@ -747,8 +747,9 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); - for( j = 0; j < MAX_SLOTS; ++j ) - SQL->StmtBindColumn(stmt, 8+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 8, SQLDT_UINT, &item.bound, 0, NULL, NULL); + for( j = 0; j < MAX_SLOTS; ++j ) + SQL->StmtBindColumn(stmt, 9+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); // bit array indicating which inventory items have already been matched flag = (bool*) aCalloc(max, sizeof(bool)); @@ -775,17 +776,18 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit items[i].identify == item.identify && items[i].refine == item.refine && items[i].attribute == item.attribute && - items[i].expire_time == item.expire_time ) + items[i].expire_time == item.expire_time && + items[i].bound == item.bound ) ; //Do nothing. else { // update all fields. StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u'", - tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time); - for( j = 0; j < MAX_SLOTS; ++j ) - StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); - StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); + StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'", + tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound); + for( j = 0; j < MAX_SLOTS; ++j )for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); + StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); if( SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) ) { @@ -810,8 +812,8 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit SQL->StmtFree(stmt); StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "INSERT INTO `%s`(`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `unique_id`", tablename, selectoption); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, "INSERT INTO `%s`(`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", tablename, selectoption); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->AppendStr(&buf, ") VALUES "); @@ -828,9 +830,9 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit else found = true; - StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%"PRIu64"'", - id, items[i].nameid, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].unique_id); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", + id, items[i].nameid, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound, items[i].unique_id); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", '%d'", items[i].card[j]); StrBuf->AppendStr(&buf, ")"); @@ -868,8 +870,8 @@ int inventory_to_sql(const struct item items[], int max, int id) { // it significantly reduces cpu load on the database server. StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`"); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `bound`"); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`='%d'", inventory_db, id); @@ -892,8 +894,9 @@ int inventory_to_sql(const struct item items[], int max, int id) { SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &item.favorite, 0, NULL, NULL); - for( j = 0; j < MAX_SLOTS; ++j ) - SQL->StmtBindColumn(stmt, 9+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 9, SQLDT_CHAR, &item.bound, 0, NULL, NULL); + for( j = 0; j < MAX_SLOTS; ++j ) + SQL->StmtBindColumn(stmt, 10+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); // bit array indicating which inventory items have already been matched flag = (bool*) aCalloc(max, sizeof(bool)); @@ -919,15 +922,16 @@ int inventory_to_sql(const struct item items[], int max, int id) { items[i].refine == item.refine && items[i].attribute == item.attribute && items[i].expire_time == item.expire_time && - items[i].favorite == item.favorite ) + items[i].favorite == item.favorite && + items[i].bound == item.bound ) ; //Do nothing. else { // update all fields. StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `favorite`='%d'", - inventory_db, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].favorite); - for( j = 0; j < MAX_SLOTS; ++j ) - StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); + StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `favorite`='%d', `bound`='%d'", + inventory_db, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].favorite, items[i].bound); + for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); if( SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) ) { @@ -950,8 +954,8 @@ int inventory_to_sql(const struct item items[], int max, int id) { SQL->StmtFree(stmt); StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "INSERT INTO `%s` (`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `unique_id`", inventory_db); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, "INSERT INTO `%s` (`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `bound`, `unique_id`", inventory_db); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->AppendStr(&buf, ") VALUES "); @@ -967,9 +971,9 @@ int inventory_to_sql(const struct item items[], int max, int id) { else found = true; - StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", - id, items[i].nameid, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].favorite, items[i].unique_id); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%d', '%d', '%"PRIu64"'", + id, items[i].nameid, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].favorite, items[i].bound, items[i].unique_id); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", '%d'", items[i].card[j]); StrBuf->AppendStr(&buf, ")"); @@ -1229,10 +1233,10 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything strcat(t_msg, " memo"); //read inventory - //`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `expire_time`, `favorite`, `unique_id`) - StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `unique_id`"); - for( i = 0; i < MAX_SLOTS; ++i ) + //`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `expire_time`, `favorite`, `bound`, `unique_id`) + StrBuf->Init(&buf); + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `bound`, `unique_id`"); + for( i = 0; i < MAX_SLOTS; ++i ) StrBuf->Printf(&buf, ", `card%d`", i); StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", inventory_db, MAX_INVENTORY); @@ -1248,10 +1252,11 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.favorite, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) - SqlStmt_ShowDebug(stmt); + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_CHAR, &tmp_item.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) + SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) - if( SQL_ERROR == SQL->StmtBindColumn(stmt, 10+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) + if( SQL_ERROR == SQL->StmtBindColumn(stmt, 11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_INVENTORY && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) @@ -1260,10 +1265,10 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything strcat(t_msg, " inventory"); //read cart - //`cart_inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, expire_time`, `unique_id`) - StrBuf->Clear(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + //`cart_inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, expire_time`, `bound`, `unique_id`) + StrBuf->Clear(&buf); + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`"); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", cart_db, MAX_CART); @@ -1278,10 +1283,11 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) - SqlStmt_ShowDebug(stmt); + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) + SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) - if( SQL_ERROR == SQL->StmtBindColumn(stmt, 9+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) + if( SQL_ERROR == SQL->StmtBindColumn(stmt, 10+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_CART && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) @@ -2947,7 +2953,7 @@ int parse_frommap(int fd) break; } //Check account only if this ain't final save. Final-save goes through because of the char-map reconnect - if (RFIFOB(fd,12) || ( + if (RFIFOB(fd,12) || RFIFOB(fd,13) || ( (character = (struct online_char_data*)idb_get(online_char_db, aid)) != NULL && character->char_id == cid)) { diff --git a/src/char/int_mail.c b/src/char/int_mail.c index e4b88b5bf..b69824d4b 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -64,6 +64,7 @@ static int mail_fromsql(int char_id, struct mail_data* md) SQL->GetData(sql_handle,14, &data, NULL); item->identify = atoi(data); SQL->GetData(sql_handle,15, &data, NULL); item->unique_id = strtoull(data, NULL, 10); item->expire_time = 0; + item->bound = 0; for (j = 0; j < MAX_SLOTS; j++) { @@ -184,6 +185,7 @@ static bool mail_loadmessage(int mail_id, struct mail_message* msg) SQL->GetData(sql_handle,14, &data, NULL); msg->item.identify = atoi(data); SQL->GetData(sql_handle,15, &data, NULL); msg->item.unique_id = strtoull(data, NULL, 10); msg->item.expire_time = 0; + msg->item.bound = 0; for( j = 0; j < MAX_SLOTS; j++ ) { diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 429b80105..6443aa743 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -39,8 +39,8 @@ int storage_fromsql(int account_id, struct storage_data* p) // storage {`account_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`} StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`expire_time`,`unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`expire_time`,`bound`,`unique_id`"); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ",`card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `account_id`='%d' ORDER BY `nameid`", storage_db, account_id); @@ -60,10 +60,11 @@ int storage_fromsql(int account_id, struct storage_data* p) SQL->GetData(sql_handle, 5, &data, NULL); item->refine = atoi(data); SQL->GetData(sql_handle, 6, &data, NULL); item->attribute = atoi(data); SQL->GetData(sql_handle, 7, &data, NULL); item->expire_time = (unsigned int)atoi(data); - SQL->GetData(sql_handle, 8, &data, NULL); item->unique_id = strtoull(data, NULL, 10); - for( j = 0; j < MAX_SLOTS; ++j ) + SQL->GetData(sql_handle, 8, &data, NULL); item->bound = atoi(data); + SQL->GetData(sql_handle, 9, &data, NULL); item->unique_id = strtoull(data, NULL, 10); + for( j = 0; j < MAX_SLOTS; ++j ) { - SQL->GetData(sql_handle, 9+j, &data, NULL); item->card[j] = atoi(data); + SQL->GetData(sql_handle, 10+j, &data, NULL); item->card[j] = atoi(data); } } p->storage_amount = i; @@ -96,8 +97,8 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p) // storage {`guild_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`} StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`bound`,`unique_id`"); + for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ",`card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `guild_id`='%d' ORDER BY `nameid`", guild_storage_db, guild_id); @@ -116,11 +117,13 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p) SQL->GetData(sql_handle, 4, &data, NULL); item->identify = atoi(data); SQL->GetData(sql_handle, 5, &data, NULL); item->refine = atoi(data); SQL->GetData(sql_handle, 6, &data, NULL); item->attribute = atoi(data); - SQL->GetData(sql_handle, 7, &data, NULL); item->unique_id = strtoull(data, NULL, 10); - item->expire_time = 0; + SQL->GetData(sql_handle, 7, &data, NULL); item->bound = atoi(data); + SQL->GetData(sql_handle, 8, &data, NULL); item->unique_id = strtoull(data, NULL, 10); + item->expire_time = 0; + item->bound = 0; for( j = 0; j < MAX_SLOTS; ++j ) { - SQL->GetData(sql_handle, 8+j, &data, NULL); item->card[j] = atoi(data); + SQL->GetData(sql_handle, 9+j, &data, NULL); item->card[j] = atoi(data); } } p->storage_amount = i; @@ -159,19 +162,20 @@ int inter_guild_storage_delete(int guild_id) //--------------------------------------------------------- // packet from map server -int mapif_load_guild_storage(int fd,int account_id,int guild_id) +int mapif_load_guild_storage(int fd,int account_id,int guild_id, char flag) { if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `guild_id` FROM `%s` WHERE `guild_id`='%d'", guild_db, guild_id) ) Sql_ShowDebug(sql_handle); else if( SQL->NumRows(sql_handle) > 0 ) {// guild exists - WFIFOHEAD(fd, sizeof(struct guild_storage)+12); + WFIFOHEAD(fd, sizeof(struct guild_storage)+13); WFIFOW(fd,0) = 0x3818; - WFIFOW(fd,2) = sizeof(struct guild_storage)+12; + WFIFOW(fd,2) = sizeof(struct guild_storage)+13; WFIFOL(fd,4) = account_id; WFIFOL(fd,8) = guild_id; - guild_storage_fromsql(guild_id, (struct guild_storage*)WFIFOP(fd,12)); - WFIFOSET(fd, WFIFOW(fd,2)); + WFIFOB(fd,12) = flag; //1 open storage, 0 don't open + guild_storage_fromsql(guild_id, (struct guild_storage*)WFIFOP(fd,13)); + WFIFOSET(fd, WFIFOW(fd,2)); return 0; } // guild does not exist @@ -201,7 +205,7 @@ int mapif_save_guild_storage_ack(int fd,int account_id,int guild_id,int fail) int mapif_parse_LoadGuildStorage(int fd) { RFIFOHEAD(fd); - mapif_load_guild_storage(fd,RFIFOL(fd,2),RFIFOL(fd,6)); + mapif_load_guild_storage(fd,RFIFOL(fd,2),RFIFOL(fd,6),1); return 0; } @@ -235,6 +239,134 @@ int mapif_parse_SaveGuildStorage(int fd) return 0; } +#ifdef BOUND_ITEMS +int mapif_itembound_ack(int fd, int aid, int guild_id) +{ + WFIFOHEAD(fd,8); + WFIFOW(fd,0) = 0x3856; + WFIFOL(fd,2) = aid; + WFIFOW(fd,6) = guild_id; + WFIFOSET(fd,8); + return 0; +} + +//------------------------------------------------ +//Guild bound items pull for offline characters [Akinari] +//Revised by [Mhalicot] +//------------------------------------------------ +int mapif_parse_itembound_retrieve(int fd) +{ + StringBuf buf; + SqlStmt* stmt; + struct item item; + int j, i=0, s; + bool found=false; + struct item items[MAX_INVENTORY]; + int char_id = RFIFOL(fd,2); + int aid = RFIFOL(fd,6); + int guild_id = RFIFOW(fd,10); + + StrBuf->Init(&buf); + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`"); + for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, ", `card%d`", j); + StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`='%d'",inventory_db,char_id); + + stmt = SQL->StmtMalloc(sql_handle); + if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + || SQL_ERROR == SQL->StmtExecute(stmt) ) + { + Sql_ShowDebug(sql_handle); + SQL->StmtFree(stmt); + StrBuf->Destroy(&buf); + return 1; + } + + SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &item.equip, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 8, SQLDT_UINT, &item.bound, 0, NULL, NULL); + for( j = 0; j < MAX_SLOTS; ++j ) + SQL->StmtBindColumn(stmt, 9+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + + while( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) { + if(item.bound == 2) { + memcpy(&items[i],&item,sizeof(struct item)); + i++; + } + } + SQL->FreeResult(sql_handle); + + if(!i) { //No items found - No need to continue + StrBuf->Destroy(&buf); + SQL->StmtFree(stmt); + return 0; + } + + //First we delete the character's items + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE",inventory_db); + for(j=0; j<i; j++) { + if( found ) + StrBuf->AppendStr(&buf, " OR"); + else + found = true; + StrBuf->Printf(&buf, " `id`=%d",items[j].id); + } + + if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + || SQL_ERROR == SQL->StmtExecute(stmt) ) + { + Sql_ShowDebug(sql_handle); + SQL->StmtFree(stmt); + StrBuf->Destroy(&buf); + return 1; + } + + //Now let's update the guild storage with those deleted items + found = false; + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "INSERT INTO `%s` (`guild_id`, `nameid`, `amount`, `identify`, `refine`, `attribute`, `expire_time`, `bound`", guild_storage_db); + for( j = 0; j < MAX_SLOTS; ++j ) + StrBuf->Printf(&buf, ", `card%d`", j); + StrBuf->AppendStr(&buf, ") VALUES "); + + for( j = 0; j < i; ++j ) { + if( found ) + StrBuf->AppendStr(&buf, ","); + else + found = true; + + StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'", + guild_id, items[j].nameid, items[j].amount, items[j].identify, items[j].refine, items[j].attribute, items[j].expire_time, items[j].bound); + for( s = 0; s < MAX_SLOTS; ++s ) + StrBuf->Printf(&buf, ", '%d'", items[j].card[s]); + StrBuf->AppendStr(&buf, ")"); + } + + if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + || SQL_ERROR == SQL->StmtExecute(stmt) ) + { + Sql_ShowDebug(sql_handle); + SQL->StmtFree(stmt); + StrBuf->Destroy(&buf); + return 1; + } + + StrBuf->Destroy(&buf); + SQL->StmtFree(stmt); + + //Finally reload storage and tell map we're done + mapif_load_guild_storage(fd,aid,guild_id,0); + mapif_itembound_ack(fd,aid,guild_id); + return 0; +} +#endif int inter_storage_parse_frommap(int fd) { @@ -242,6 +374,9 @@ int inter_storage_parse_frommap(int fd) switch(RFIFOW(fd,0)){ case 0x3018: mapif_parse_LoadGuildStorage(fd); break; case 0x3019: mapif_parse_SaveGuildStorage(fd); break; +#ifdef BOUND_ITEMS + case 0x3056: mapif_parse_itembound_retrieve(fd); break; +#endif default: return 0; } diff --git a/src/char/inter.c b/src/char/inter.c index 040246c31..54672faee 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -52,8 +52,8 @@ int inter_recv_packet_length[] = { -1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- -1, 9, 0, 0, 0, 0, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- - -1,-1,10,10, 0,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus] - 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] + -1,-1,10,10, 0,-1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus] [Mhalicot] + 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator] diff --git a/src/common/mmo.h b/src/common/mmo.h index 5f75f35da..d5bf45adf 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -48,11 +48,11 @@ // 20120307 - 2012-03-07aRagexeRE+ - 0x970 #ifndef PACKETVER - #define PACKETVER 20120418 + #define PACKETVER 20130807 #endif // Comment the following line if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE). -#define PACKETVER_RE +//#define PACKETVER_RE // Client support for experimental RagexeRE UI present in 2012-04-10 and 2012-04-18 #ifdef PACKETVER_RE @@ -222,7 +222,7 @@ struct item { char attribute; short card[MAX_SLOTS]; unsigned int expire_time; - char favorite; + char favorite, bound; uint64 unique_id; }; diff --git a/src/config/core.h b/src/config/core.h index b5ad1b794..481c35af8 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -61,6 +61,10 @@ /// By enabling it, the system will create an unique id for each new non stackable item created //#define NSI_UNIQUE_ID +/// Comment to disable Guild/Party Bound item system +/// By default, we recover/remove Guild/Party Bound items automatically +#define BOUND_ITEMS + /// Uncomment to enable real-time server stats (in and out data and ram usage). [Ai4rei] //#define SHOW_SERVER_STATS diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 146159c63..2900fde03 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1081,22 +1081,29 @@ ACMD(heal) /*========================================== * @item command (usage: @item <name/id_of_item> <quantity>) (modified by [Yor] for pet_egg) + * @itembound command (usage: @itembound <name/id_of_item> <quantity> <bound type>) (revised by [Mhalicot]) *------------------------------------------*/ ACMD(item) { char item_name[100]; - int number = 0, item_id, flag = 0; + int number = 0, item_id, flag = 0, bound = 0; struct item item_tmp; struct item_data *item_data; int get_count, i; memset(item_name, '\0', sizeof(item_name)); - - if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && - sscanf(message, "%99s %d", item_name, &number) < 1 - )) { - clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>). + + if (!strcmpi(command+1,"itembound") && (!message || !*message || ( + sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 && + sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2 + ))) { + clif->message(fd, msg_txt(295)); // Please enter an item name or ID (usage: @itembound <item name/ID> <quantity> <bound_type>). + return -1; + } else if (!message || !*message || ( + sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && + sscanf(message, "%99s %d", item_name, &number) < 1 )) + { + clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>). return false; } @@ -1110,11 +1117,24 @@ ACMD(item) return false; } + if( bound < 0 || bound > 4 ) { + clif->message(fd, msg_txt(298)); // Invalid bound type + return false; + } + item_id = item_data->nameid; get_count = number; //Check if it's stackable. - if (!itemdb->isstackable2(item_data)) - get_count = 1; + if (!itemdb->isstackable2(item_data)) { + if( bound && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) { + clif->message(fd, msg_txt(498)); // Cannot create bounded pet eggs or pet armors. + return false; + } + get_count = 1; + } else if( bound ) { + clif->message(fd, msg_txt(499)); // Cannot create bounded stackable items. + return false; + } for (i = 0; i < number; i += get_count) { // if not pet egg @@ -1122,6 +1142,7 @@ ACMD(item) memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; + item_tmp.bound = bound; if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); @@ -1134,21 +1155,27 @@ ACMD(item) } /*========================================== - * + * @item2 and @itembound2 command (revised by [Mhalicot]) *------------------------------------------*/ ACMD(item2) { struct item item_tmp; struct item_data *item_data; char item_name[100]; - int item_id, number = 0; + int item_id, number = 0, bound = 0; int identify = 0, refine = 0, attr = 0; int c1 = 0, c2 = 0, c3 = 0, c4 = 0; memset(item_name, '\0', sizeof(item_name)); - if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 && + if (!strcmpi(command+1,"itembound2") && (!message || !*message || ( + sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 && + sscanf(message, "%99s %d %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 ))) { + clif->message(fd, msg_txt(296)); // Please enter all parameters (usage: @itembound2 <item name/ID> <quantity> + clif->message(fd, msg_txt(297)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>). + return false; + } else if ( !message || !*message || ( + sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 && sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 )) { clif->message(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity> @@ -1158,7 +1185,12 @@ ACMD(item2) if (number <= 0) number = 1; - + + if( bound < 0 || bound > 4 ) { + clif->message(fd, msg_txt(298)); // Invalid bound type + return -1; + } + item_id = 0; if ((item_data = itemdb->search_name(item_name)) != NULL || (item_data = itemdb->exists(atoi(item_name))) != NULL) @@ -1169,9 +1201,14 @@ ACMD(item2) int loop, get_count, i; loop = 1; get_count = number; - if (item_data->type == IT_WEAPON || item_data->type == IT_ARMOR || - item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) { - loop = number; + if( !strcmpi(command+1,"itembound2") ) + bound = 1; + if( !itemdb->isstackable2(item_data) ) { + if( bound && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) { + clif->message(fd, msg_txt(498)); // Cannot create bounded pet eggs or pet armors. + return false; + } + loop = number; get_count = 1; if (item_data->type == IT_PETEGG) { identify = 1; @@ -1182,6 +1219,10 @@ ACMD(item2) if (refine > MAX_REFINE) refine = MAX_REFINE; } else { + if( bound ) { + clif->message(fd, msg_txt(499)); // Cannot create bounded stackable items. + return false; + } identify = 1; refine = attr = 0; } @@ -1195,6 +1236,7 @@ ACMD(item2) item_tmp.card[1] = c2; item_tmp.card[2] = c3; item_tmp.card[3] = c4; + item_tmp.bound = bound; if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } @@ -9230,6 +9272,8 @@ void atcommand_basecommands(void) { ACMD_DEF(heal), ACMD_DEF(item), ACMD_DEF(item2), + ACMD_DEF2("itembound", item), + ACMD_DEF2("itembound2", item2), ACMD_DEF(itemreset), ACMD_DEF(clearstorage), ACMD_DEF(cleargstorage), diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 2a9e6a88e..44ece49c6 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -290,8 +290,8 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) - {// non-tradable item + if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bounded_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) + {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; } diff --git a/src/map/clif.c b/src/map/clif.c index c1e7cb1c9..99f7c87d7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1802,10 +1802,13 @@ void clif_selllist(struct map_session_data *sd) if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) ) continue; - if( sd->status.inventory[i].expire_time ) - continue; // Cannot Sell Rental Items + if( sd->status.inventory[i].expire_time || (sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) ) + continue; // Cannot Sell Rental Items or Account Bounded Items + + if( sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) + continue; // Don't allow sale of bound items - val=sd->inventory_data[i]->value_sell; + val=sd->inventory_data[i]->value_sell; if( val < 0 ) continue; WFIFOW(fd,4+c*10)=i+2; @@ -2229,7 +2232,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.HireExpireDate = sd->status.inventory[n].expire_time; #endif #if PACKETVER >= 20071002 - p.bindOnEquipType = 0; // unused + p.bindOnEquipType = sd->status.inventory[n].bound ? 2 : 0; #endif } p.result = (unsigned char)fail; @@ -2341,7 +2344,7 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct #endif #if PACKETVER >= 20080102 - p->bindOnEquipType = 0; + p->bindOnEquipType = i->bound ? 2 : 0; #endif #if PACKETVER >= 20100629 @@ -2378,6 +2381,7 @@ void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, stru #if PACKETVER >= 20080102 p->HireExpireDate = i->expire_time; + p->bindOnEquipType = i->bound ? 2 : 0; #endif #if PACKETVER >= 20120925 @@ -15061,8 +15065,9 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || - !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) ) { // Quest Item or something else - clif->auction_setitem(sd->fd, idx, true); + !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || + (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { // Quest Item or something else + clif->auction_setitem(sd->fd, idx, true); return; } @@ -15139,9 +15144,10 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) } // Auction checks... - if( sd->status.zeny < (auction.hours * battle_config.auction_feeperhour) ) { - clif->auction_message(fd, 5); // You do not have enough zeny to pay the Auction Fee. - return; + if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(293)); + clif->auction_message(fd, 2); // The auction has been canceled + return; } if( auction.buynow > battle_config.auction_maximumprice ) diff --git a/src/map/guild.c b/src/map/guild.c index 0ae45bede..517a49cc4 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -865,6 +865,11 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c online_member_sd = guild->getavailablesd(g); if(online_member_sd == NULL) return 0; // noone online to inform + +#ifdef BOUND_ITEMS + //Guild bound item check + guild->retrieveitembound(char_id,account_id,guild_id); +#endif if(!flag) clif->guild_leave(online_member_sd, name, mes); @@ -899,6 +904,41 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c return 0; } +#ifdef BOUND_ITEMS +void guild_retrieveitembound(int char_id,int aid,int guild_id) +{ + TBL_PC *sd = map->id2sd(aid); + if(sd){ //Character is online + int idxlist[MAX_INVENTORY]; + int j,i; + j = pc->bound_chk(sd,2,idxlist); + if(j) { + struct guild_storage *gstor = gstorage->id2storage(guild_id); + for(i=0;i<j;i++) { //Loop the matching items, guild_storage_additem takes care of opening storage + if(gstor) + gstorage->additem(sd,gstor,&sd->status.inventory[idxlist[i]],sd->status.inventory[idxlist[i]].amount); + pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,4,LOG_TYPE_GSTORAGE); + } + gstorage->close(sd); //Close and save the storage + } + } + else { //Character is offline, ask char server to do the job + struct guild_storage *gstor = gstorage->id2storage2(guild_id); + if(gstor && gstor->storage_status == 1) { //Someone is in guild storage, close them + struct s_mapiterator* iter = mapit_getallusers(); + for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) { + if(sd->status.guild_id == guild_id && sd->state.storage_flag == 2) { + gstorage->close(sd); + break; + } + } + mapit->free(iter); + } + intif->itembound_req(char_id,aid,guild_id); + } +} +#endif + int guild_send_memberinfoshort(struct map_session_data *sd,int online) { // cleaned up [LuzZza] struct guild *g; @@ -1813,6 +1853,11 @@ int guild_break(struct map_session_data *sd,char *name) { struct guild *g; struct unit_data *ud; int i; + +#ifdef BOUND_ITEMS + int j; + int idxlist[MAX_INVENTORY]; +#endif nullpo_ret(sd); @@ -1855,6 +1900,13 @@ int guild_break(struct map_session_data *sd,char *name) { skill->del_unitgroup(groups[i],ALC_MARK); } } + +#ifdef BOUND_ITEMS + //Guild bound item check - Removes the bound flag + j = pc->bound_chk(sd,2,idxlist); + for(i=0;i<j;i++) + sd->status.inventory[idxlist[i]].bound = 0; +#endif intif->guild_break(g->guild_id); return 1; diff --git a/src/map/guild.h b/src/map/guild.h index 348a6c7e4..57148867a 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -147,6 +147,10 @@ struct guild_interface { void (*flags_clear) (void); /* guild aura */ void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); + /* item bound [Mhalicot]*/ +#ifdef BOUND_ITEMS + void (*retrieveitembound) (int char_id,int aid,int guild_id); +#endif /* */ int (*payexp_timer) (int tid, int64 tick, int id, intptr_t data); TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id); diff --git a/src/map/intif.c b/src/map/intif.c index f31ab0f5a..b8b16a356 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -982,15 +982,19 @@ void intif_parse_LoadGuildStorage(int fd) { struct guild_storage *gstor; struct map_session_data *sd; - int guild_id; + int guild_id, flag; guild_id = RFIFOL(fd,8); + flag = RFIFOL(fd,12); if(guild_id <= 0) return; sd=map->id2sd( RFIFOL(fd,4) ); - if(sd==NULL){ - ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); - return; + if( flag ){ //If flag != 0, we attach a player and open the storage + if(sd==NULL){ + ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); + return; + } + } gstor=gstorage->id2storage(guild_id); if(!gstor) { @@ -998,20 +1002,21 @@ void intif_parse_LoadGuildStorage(int fd) 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; + ShowWarning("intif_parse_LoadGuildStorage: storage received for a client already open (User %d:%d)\n", flag?sd->status.account_id:1, flag?sd->status.char_id: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; + ShowWarning("intif_parse_LoadGuildStorage: received storage for an already modified non-saved storage! (User %d:%d)\n", flag?sd->status.account_id:1, flag?sd->status.char_id: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; + if( RFIFOW(fd,2)-13 != sizeof(struct guild_storage) ){ + ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-13 , sizeof(struct guild_storage)); + gstor->storage_status = 0; return; } - memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage)); + memcpy(gstor,RFIFOP(fd,13),sizeof(struct guild_storage)); + if( flag ) gstorage->open(sd); } @@ -2005,7 +2010,31 @@ void intif_parse_MessageToFD(int fd) { return; } +/*========================================== + * Item Bound System [Xantara][Mhalicot] + *------------------------------------------*/ +#ifdef BOUND_ITEMS +void intif_itembound_req(int char_id,int aid,int guild_id) { + struct guild_storage *gstor = gstorage->id2storage2(guild_id); + WFIFOHEAD(inter_fd,12); + WFIFOW(inter_fd,0) = 0x3056; + WFIFOL(inter_fd,2) = char_id; + WFIFOL(inter_fd,6) = aid; + WFIFOW(inter_fd,10) = guild_id; + WFIFOSET(inter_fd,12); + if(gstor) + gstor->lock = 1; //Lock for retrieval process +} + +//3856 +void intif_parse_Itembound_ack(int fd) { + struct guild_storage *gstor; + int guild_id = RFIFOW(fd,6); + gstor = gstorage->id2storage2(guild_id); + if(gstor) gstor->lock = 0; //Unlock now that operation is completed +} +#endif //----------------------------------------------------------------- // Communication from the inter server // Return a 0 (false) if there were any errors. @@ -2088,7 +2117,10 @@ int intif_parse(int fd) case 0x3853: intif->pAuctionClose(fd); break; case 0x3854: intif->pAuctionMessage(fd); break; case 0x3855: intif->pAuctionBid(fd); break; - + //Bound items +#ifdef BOUND_ITEMS + case 0x3856: intif->pItembound_ack(fd); break; +#endif // Mercenary System case 0x3870: intif->pMercenaryReceived(fd); break; case 0x3871: intif->pMercenaryDeleted(fd); break; @@ -2127,8 +2159,8 @@ void intif_defaults(void) { 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,-1, 7, 7, 7,11, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] + -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] @@ -2263,6 +2295,7 @@ void intif_defaults(void) { intif->pAuctionClose = intif_parse_AuctionClose; intif->pAuctionMessage = intif_parse_AuctionMessage; intif->pAuctionBid = intif_parse_AuctionBid; + intif->pItembound_ack = intif_parse_Itembound_ack; intif->pMercenaryReceived = intif_parse_MercenaryReceived; intif->pMercenaryDeleted = intif_parse_MercenaryDeleted; intif->pMercenarySaved = intif_parse_MercenarySaved; diff --git a/src/map/intif.h b/src/map/intif.h index 768e735de..577d58923 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -75,6 +75,9 @@ struct intif_interface { int (*guild_emblem) (int guild_id, int len, const char *data); int (*guild_castle_dataload) (int num, int *castle_ids); int (*guild_castle_datasave) (int castle_id, int index, int value); +#ifdef BOUND_ITEMS + void (*itembound_req) (int char_id, int aid, int guild_id); +#endif int (*request_petdata) (int account_id, int char_id, int pet_id); int (*save_petdata) (int account_id, struct s_pet *p); int (*delete_petdata) (int pet_id); @@ -161,6 +164,7 @@ struct intif_interface { void (*pAuctionClose) (int fd); void (*pAuctionMessage) (int fd); void (*pAuctionBid) (int fd); + void (*pItembound_ack) (int fd); void (*pMercenaryReceived) (int fd); void (*pMercenaryDeleted) (int fd); void (*pMercenarySaved) (int fd); diff --git a/src/map/mail.c b/src/map/mail.c index 2378cbe2a..6b1537d87 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -82,8 +82,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { if( amount < 0 || amount > sd->status.inventory[idx].amount ) return 1; if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || - !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) ) - return 1; + !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) || + (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) + return 1; sd->mail.index = idx; sd->mail.nameid = sd->status.inventory[idx].nameid; diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 813aebee0..e6f68ea4f 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -212,6 +212,7 @@ struct NORMALITEM_INFO { #endif #if PACKETVER >= 20080102 int HireExpireDate; + unsigned short bindOnEquipType; #endif #if PACKETVER >= 20120925 struct { diff --git a/src/map/party.c b/src/map/party.c index ab05c23f7..69b343fb7 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -547,7 +547,14 @@ int party_member_withdraw(int party_id, int account_id, int char_id) } if( sd && sd->status.party_id == party_id && sd->status.char_id == char_id ) { - sd->status.party_id = 0; +#ifdef BOUND_ITEMS + int idxlist[MAX_INVENTORY]; //or malloc to reduce consumtion + int j,i; + j = pc->bound_chk(sd,3,idxlist); + for(i=0;i<j;i++) + pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER); +#endif + sd->status.party_id = 0; clif->charnameupdate(sd); //Update name display [Skotlex] //TODO: hp bars should be cleared too if( p->instances ) diff --git a/src/map/pc.c b/src/map/pc.c index 35d883b6f..ba445b4f4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -568,6 +568,14 @@ bool pc_can_give_items(struct map_session_data *sd) return pc->has_permission(sd, PC_PERM_TRADE); } +/** + * Determines if player can give / drop / trade / vend bounded items + */ +bool pc_can_give_bounded_items(struct map_session_data *sd) +{ + return pc->has_permission(sd, PC_PERM_TRADE_BOUNDED); +} + /*========================================== * prepares character for saving. *------------------------------------------*/ @@ -991,6 +999,10 @@ int pc_isequip(struct map_session_data *sd,int n) *------------------------------------------*/ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { int i; +#ifdef BOUND_ITEMS + int j; + int idxlist[MAX_INVENTORY]; +#endif int64 tick = timer->gettick(); uint32 ip = session[sd->fd]->client_addr; @@ -1190,7 +1202,15 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim * Check if player have any item cooldowns on **/ pc->itemcd_do(sd,true); - + +#ifdef BOUND_ITEMS + // Party bound item check + if(sd->status.party_id == 0 && (j = pc->bound_chk(sd,3,idxlist))) { // Party was deleted while character offline + for(i=0;i<j;i++) + pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER); + } +#endif + /* [Ind/Hercules] */ sd->sc_display = NULL; sd->sc_display_count = 0; @@ -3948,8 +3968,8 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l { // Stackable | Non Rental for( i = 0; i < MAX_INVENTORY; i++ ) { - if( sd->status.inventory[i].nameid == item_data->nameid && memcmp(&sd->status.inventory[i].card, &item_data->card, sizeof(item_data->card)) == 0 ) - { + if( sd->status.inventory[i].nameid == item_data->nameid && sd->status.inventory[i].bound == item_data->bound && memcmp(&sd->status.inventory[i].card, &item_data->card, sizeof(item_data->card)) == 0 ) + { if( amount > MAX_AMOUNT - sd->status.inventory[i].amount || ( data->stack.inventory && amount > data->stack.amount - sd->status.inventory[i].amount ) ) return 5; sd->status.inventory[i].amount += amount; @@ -4500,8 +4520,8 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; } - if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) ) - { // Check item trade restrictions [Skotlex] + if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > 1 && !pc->can_give_bounded_items(sd))) + { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1;/* TODO: there is no official response to this? */ } @@ -4513,8 +4533,8 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun if( itemdb->isstackable2(data) && !item_data->expire_time ) { ARR_FIND( 0, MAX_CART, i, - sd->status.cart[i].nameid == item_data->nameid && - sd->status.cart[i].card[0] == item_data->card[0] && sd->status.cart[i].card[1] == item_data->card[1] && + sd->status.cart[i].nameid == item_data->nameid && sd->status.cart[i].bound == item_data->bound && + sd->status.cart[i].card[0] == item_data->card[0] && sd->status.cart[i].card[1] == item_data->card[1] && sd->status.cart[i].card[2] == item_data->card[2] && sd->status.cart[i].card[3] == item_data->card[3] ); }; @@ -4647,7 +4667,25 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount) return flag; } - + /*========================================== + * Bound Item Check + * Type: + * 1 Account Bound + * 2 Guild Bound + * 3 Party Bound + * 4 Character Bound + *------------------------------------------*/ +int pc_bound_chk(TBL_PC *sd,int type,int *idxlist) +{ + int i=0, j=0; + for(i=0;i<MAX_INVENTORY;i++){ + if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0 && sd->status.inventory[i].bound == type) { + idxlist[j] = i; + j++; + } + } + return j; +} /*========================================== * Display item stolen msg to player sd *------------------------------------------*/ @@ -7965,8 +8003,8 @@ int pc_setmadogear(TBL_PC* sd, int flag) *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { - if( item && item->expire_time ) - return 0; + if( item && (item->expire_time || (item->bound && !pc->can_give_bounded_items(sd))) ) + return 0; if( !pc->can_give_items(sd) ) //check if this GM level can drop items return 0; return (itemdb_isdropable(item, pc->get_group_level(sd))); @@ -10293,6 +10331,7 @@ void pc_defaults(void) { pc->class2idx = pc_class2idx; pc->get_group_level = pc_get_group_level; pc->can_give_items = pc_can_give_items; + pc->can_give_bounded_items = pc_can_give_bounded_items; pc->can_use_command = pc_can_use_command; pc->has_permission = pc_has_permission; diff --git a/src/map/pc.h b/src/map/pc.h index fc37d0ef2..d517d8fcf 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -749,7 +749,8 @@ struct pc_interface { int (*get_group_level) (struct map_session_data *sd); //int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called bool (*can_give_items) (struct map_session_data *sd); - + bool (*can_give_bounded_items) (struct map_session_data *sd); + bool (*can_use_command) (struct map_session_data *sd, const char *command); bool (*has_permission) (struct map_session_data *sd, enum e_pc_permission permission); int (*set_group) (struct map_session_data *sd, int group_id); @@ -788,6 +789,10 @@ struct pc_interface { int (*additem) (struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type); int (*getzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd); int (*delitem) (struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type); + + //Bound items + int (*bound_chk) (TBL_PC *sd,int type,int *idxlist); + // Special Shop System int (*paycash) (struct map_session_data *sd, int price, int points); int (*getcash) (struct map_session_data *sd, int cash, int points); diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index be02b5f15..41bc19cba 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -55,6 +55,7 @@ const struct pc_permission_name_table pc_g_permission_name[NUM_PC_PERM] = { { "disable_pvp", PC_PERM_DISABLE_PVP }, { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD }, { "hchsys_admin", PC_PERM_HCHSYS_ADMIN }, + { "can_trade_bounded", PC_PERM_TRADE_BOUNDED }, }; static DBMap* pc_group_db; // id -> GroupSettings diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 8f350c2b6..63e7acc51 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -30,6 +30,7 @@ enum e_pc_permission { PC_PERM_DISABLE_PVP = 0x080000, // #20 PC_PERM_DISABLE_CMD_DEAD = 0x100000, PC_PERM_HCHSYS_ADMIN = 0x200000, + PC_PERM_TRADE_BOUNDED = 0x400000, }; /// Total number of PC permissions (without PC_PERM_NONE). @@ -37,7 +38,7 @@ enum e_pc_permission { /// so it's possible to apply sizeof to it [C-FAQ 1.24] /// Whenever adding new permission: 1. add enum entry above, 2. add entry into /// pc_g_permission_name (in pc.c), 3. increase NUM_PC_PERM below by 1. -#define NUM_PC_PERM 22 +#define NUM_PC_PERM 23 struct pc_permission_name_table { const char *name; diff --git a/src/map/script.c b/src/map/script.c index d51f27ce9..174d12316 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5946,6 +5946,7 @@ BUILDIN(rentitem) it.nameid = nameid; it.identify = 1; it.expire_time = (unsigned int)(time(NULL) + seconds); + it.bound = 0; if( (flag = pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) ) { @@ -10850,6 +10851,7 @@ BUILDIN(successremovecards) { item_tmp.refine = sd->status.inventory[i].refine; item_tmp.attribute = sd->status.inventory[i].attribute; item_tmp.expire_time = sd->status.inventory[i].expire_time; + item_tmp.bound = sd->status.inventory[i].bound; for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) item_tmp.card[j]=sd->status.inventory[i].card[j]; @@ -10923,7 +10925,8 @@ BUILDIN(failedremovecards) { item_tmp.refine = sd->status.inventory[i].refine; item_tmp.attribute = sd->status.inventory[i].attribute; item_tmp.expire_time = sd->status.inventory[i].expire_time; - + item_tmp.bound = sd->status.inventory[i].bound; + for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) item_tmp.card[j]=sd->status.inventory[i].card[j]; @@ -11573,7 +11576,8 @@ BUILDIN(getinventorylist) pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.inventory[i].card[k]); } pc->setreg(sd,reference_uid(script->add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); - j++; + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_bound"), j),sd->status.inventory[i].bound); + j++; } } pc->setreg(sd,script->add_str("@inventorylist_count"),j); @@ -17529,6 +17533,219 @@ BUILDIN(bg_join_team) { return true; } + +/*==============[Mhalicot]================== + * getitembound <item id>,<amount>,<type>{,<account ID>}; + * getitembound "<item id>",<amount>,<type>{,<account ID>}; + * Type: + * 1 - Account Bound + * 2 - Guild Bound + * 3 - Party Bound + * 4 - Character Bound + *------------------------------------------*/ +BUILDIN(getitembound) +{ + int nameid, amount, i, flag; + struct item it; + struct script_data *data; + char bound = script_getnum(st,4); + TBL_PC *sd; + + data = script_getdata(st,2); + get_val(st,data); + if( data_isstring(data) ) { // "<item name>" + const char *name = script->conv_str(st,data); + struct item_data *item_data = itemdb->search_name(name); + if( item_data == NULL ) { + ShowError("buildin_getitembound: Nonexistant item %s requested.\n", name); + return 1; //No item created. + } + nameid = item_data->nameid; + } else if( data_isint(data) ) { // <item id> + nameid = script->conv_num(st,data); + if( nameid <= 0 || !itemdb->exists(nameid) ) { + ShowError("buildin_getitembound: Nonexistant item %d requested.\n", nameid); + return 1; //No item created. + } + } else { + ShowError("buildin_getitembound: invalid data type for argument #1 (%d).", data->type); + return 1; + } + + if( itemdb->isstackable(nameid) || itemdb_type(nameid) == IT_PETEGG ) { + ShowError("buildin_getitembound: invalid item type. Bound only work for non stackeable items (Item %d).", nameid); + return 1; + } + + if( (amount = script_getnum(st,3)) <= 0) + return 0; //return if amount <=0, skip the useless iteration + + memset(&it,0,sizeof(it)); + it.nameid = nameid; + it.identify = 1; + it.bound = bound; + + if( bound < 1 || bound > 4) { //Not a correct bound type + ShowError("script_getitembound: Not a correct bound type! Type=%d\n",bound); + return 1; + } + + if( script_hasdata(st,5) ) + sd=map->id2sd(script_getnum(st,5)); // Account ID + else + sd=script->rid2sd(st); // Attached player + + if( sd == NULL ) // no target + return 0; + + for( i = 0; i < amount; i++ ) { + if( (flag = pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) ) { + clif->additem(sd, 0, 0, flag); + if( pc->candrop(sd,&it) ) + map->addflooritem(&it,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + } + } + + return 0; +} + +/*==============[Mhalicot]================== + * getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; + * getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; + *------------------------------------------*/ +BUILDIN(getitembound2) +{ + int nameid,amount,get_count,i,flag = 0; + int iden,ref,attr,c1,c2,c3,c4; + char bound=0; + struct item_data *item_data; + struct item item_tmp; + TBL_PC *sd; + struct script_data *data; + + bound = script_getnum(st,11); + if( bound < 1 || bound > 4) { //Not a correct bound type + ShowError("script_getitembound2: Not a correct bound type! Type=%d\n",bound); + return 1; + } + if( script_hasdata(st,12) ) + sd=map->id2sd(script_getnum(st,12)); + else + sd=script->rid2sd(st); // Attached player + + if( sd == NULL ) // no target + return true; + + data=script_getdata(st,2); + script->get_val(st,data); + if( data_isstring(data) ){ + const char *name=script->conv_str(st,data); + struct item_data *item_data = itemdb->search_name(name); + if( item_data ) + nameid=item_data->nameid; + else + nameid=UNKNOWN_ITEM_ID; + }else + nameid=script->conv_num(st,data); + + amount=script_getnum(st,3); + iden=script_getnum(st,4); + ref=script_getnum(st,5); + attr=script_getnum(st,6); + c1=(short)script_getnum(st,7); + c2=(short)script_getnum(st,8); + c3=(short)script_getnum(st,9); + c4=(short)script_getnum(st,10); + + if(nameid<0) { // Invalide nameid + nameid = -nameid; + flag = 1; + } + + if(nameid > 0) { + memset(&item_tmp,0,sizeof(item_tmp)); + item_data=itemdb->exists(nameid); + if (item_data == NULL) + return -1; + if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){ + if(ref > MAX_REFINE) ref = MAX_REFINE; + } + else if(item_data->type==IT_PETEGG) { + iden = 1; + ref = 0; + } + else { + iden = 1; + ref = attr = 0; + } + + item_tmp.nameid=nameid; + if(!flag) + item_tmp.identify=iden; + else if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR) + item_tmp.identify=0; + item_tmp.refine=ref; + item_tmp.attribute=attr; + item_tmp.card[0]=(short)c1; + item_tmp.card[1]=(short)c2; + item_tmp.card[2]=(short)c3; + item_tmp.card[3]=(short)c4; + item_tmp.bound=bound; + + //Check if it's stackable. + if (!itemdb->isstackable(nameid)) + get_count = 1; + else + get_count = amount; + + for (i = 0; i < amount; i += get_count) { + // if not pet egg + if (!pet->create_egg(sd, nameid)) { + if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); + if( pc->candrop(sd,&item_tmp) ) + map->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); + } + } + } + } + + return true; +} +/*==============[Mhalicot]================== + * countbound {<type>}; + * Creates an array of bounded item IDs + * Returns amount of items found + * Type: + * 1 - Account Bound + * 2 - Guild Bound + * 3 - Party Bound + *------------------------------------------*/ +BUILDIN(countbound) +{ + int i, type, j=0, k=0; + TBL_PC *sd; + + if( (sd = script->rid2sd(st)) == NULL ) + return false; + + type = script_hasdata(st,2)?script_getnum(st,2):0; + + for(i=0;i<MAX_INVENTORY;i++){ + if(sd->status.inventory[i].nameid > 0 && ( + (!type && sd->status.inventory[i].bound > 0) || + (type && sd->status.inventory[i].bound == type) + )) { + pc->setreg(sd,reference_uid(script->add_str("@bound_items"), k),sd->status.inventory[i].nameid); + k++; + j += sd->status.inventory[i].amount; + } + } + + script_pushint(st,j); + return 0; +} + /* bg_match_over( arena_name {, optional canceled } ) */ /* returns 0 when successful, 1 otherwise */ BUILDIN(bg_match_over) { @@ -18109,7 +18326,13 @@ void script_parse_builtin(void) { BUILDIN_DEF(bindatcmd, "ss???"), BUILDIN_DEF(unbindatcmd, "s"), BUILDIN_DEF(useatcmd, "s"), - + /** + * Item bound [Mhalicot\Hercules] + **/ + BUILDIN_DEF(getitembound,"vii?"), + BUILDIN_DEF(getitembound2,"viiiiiiiii?"), + BUILDIN_DEF(countbound, "?"), + //Quest Log System [Inkfish] BUILDIN_DEF(questinfo, "ii??"), BUILDIN_DEF(setquest, "i"), diff --git a/src/map/storage.c b/src/map/storage.c index cc1100d28..df406257d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -107,7 +107,8 @@ int compare_item(struct item *a, struct item *b) a->identify == b->identify && a->refine == b->refine && a->attribute == b->attribute && - a->expire_time == b->expire_time ) + a->expire_time == b->expire_time && + a->bound == b->bound ) { int i; for (i = 0; i < MAX_SLOTS && (a->card[i] == b->card[i]); i++); @@ -140,6 +141,11 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } + if( (item_data->bound > 1) && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(294)); + return 1; + } + if( itemdb->isstackable2(data) ) {//Stackable for( i = 0; i < MAX_STORAGE; i++ ) @@ -429,12 +435,17 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time ) - { //Check if item is storable. [Skotlex] + if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time || (item_data->bound && !pc->can_give_bounded_items(sd)) ) + { //Check if item is storable. [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1; } + if( (item_data->bound == 1 || item_data->bound > 2) && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(294)); + return 1; + } + if(itemdb->isstackable2(data)){ //Stackable for(i=0;i<MAX_GUILD_STORAGE;i++){ if(compare_item(&stor->items[i], item_data)) { diff --git a/src/map/trade.c b/src/map/trade.c index 8dd30371b..7085fdda3 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -365,6 +365,12 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) return; } + if( ((item->bound == 1 || item->bound > 2) || (item->bound == 2 && sd->status.guild_id != target_sd->status.guild_id)) && !pc->can_give_bounded_items(sd) ) { // Item Bound + clif->message(sd->fd, msg_txt(293)); + clif->tradeitemok(sd, index+2, 1); + return; + } + //Locate a trade position ARR_FIND( 0, 10, trade_i, sd->deal.item[trade_i].index == index || sd->deal.item[trade_i].amount == 0 ); if( trade_i == 10 ) //No space left diff --git a/src/map/vending.c b/src/map/vending.c index 7d6d02cfb..be3826754 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -257,7 +257,8 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || !sd->status.cart[index].identify // unidentified item || sd->status.cart[index].attribute == 1 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case - || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item + || (sd->status.cart[index].bound && !pc->can_give_bounded_items(sd)) // can't trade account bound items and has no permission + || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item continue; sd->vending[i].index = index; -- cgit v1.2.3-70-g09d2 From 97001710c06ed7053d18c8baaac602eb563b64b3 Mon Sep 17 00:00:00 2001 From: Haru <haru@dotalux.com> Date: Tue, 27 Aug 2013 08:08:34 +0200 Subject: Introducing the Hercules Standalone Script Syntax Checker - Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another. --- script-checker | 18 ++++++ src/common/core.c | 14 ++++- src/common/mapindex.c | 17 +++-- src/common/mapindex.h | 3 +- src/map/atcommand.c | 5 +- src/map/atcommand.h | 2 +- src/map/battle.c | 5 +- src/map/battle.h | 2 +- src/map/battleground.c | 5 +- src/map/battleground.h | 2 +- src/map/chrif.c | 6 +- src/map/chrif.h | 2 +- src/map/clif.c | 5 +- src/map/clif.h | 2 +- src/map/duel.c | 5 +- src/map/duel.h | 2 +- src/map/elemental.c | 5 +- src/map/elemental.h | 2 +- src/map/guild.c | 15 +++-- src/map/guild.h | 2 +- src/map/homunculus.c | 6 +- src/map/homunculus.h | 2 +- src/map/instance.c | 5 +- src/map/instance.h | 2 +- src/map/irc-bot.c | 5 +- src/map/irc-bot.h | 2 +- src/map/itemdb.c | 15 +++-- src/map/itemdb.h | 4 +- src/map/map.c | 168 +++++++++++++++++++++++++++++-------------------- src/map/map.h | 2 +- src/map/mercenary.c | 5 +- src/map/mercenary.h | 2 +- src/map/mob.c | 20 ++++-- src/map/mob.h | 4 +- src/map/npc.c | 69 ++++++++++---------- src/map/npc.h | 4 +- src/map/party.c | 5 +- src/map/party.h | 2 +- src/map/pc.c | 4 +- src/map/pc.h | 2 +- src/map/pet.c | 6 +- src/map/pet.h | 2 +- src/map/quest.c | 5 +- src/map/quest.h | 2 +- src/map/script.c | 72 +++++++++++++++------ src/map/script.h | 2 +- src/map/skill.c | 15 +++-- src/map/skill.h | 4 +- src/map/status.c | 5 +- src/map/status.h | 2 +- src/map/storage.c | 4 +- src/map/storage.h | 2 +- src/map/unit.c | 5 +- src/map/unit.h | 2 +- src/map/vending.c | 2 +- src/map/vending.h | 2 +- 56 files changed, 382 insertions(+), 197 deletions(-) create mode 100755 script-checker (limited to 'src/map/storage.c') diff --git a/script-checker b/script-checker new file mode 100755 index 000000000..ec79fcc61 --- /dev/null +++ b/script-checker @@ -0,0 +1,18 @@ +#!/bin/bash + +ORIG_CWD="$(pwd)" +BASEDIR="$(dirname "$0")" +EXECUTABLE="./map-server" + +cd "${BASEDIR}" +if [ -z "$1" ]; then + exit -1 +elif [[ "$1" =~ ^\/ ]]; then + FILE="$1" +else + FILE="${ORIG_CWD}/$1" +fi +if [ ! -x "$EXECUTABLE" ]; then + exit -1 +fi +"$EXECUTABLE" --script-check "${FILE}" 2>&1 diff --git a/src/common/core.c b/src/common/core.c index 6a73d2d39..f57cc4c79 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -302,10 +302,20 @@ int main (int argc, char **argv) { arg_v = argv; } core_defaults(); + + { + int i; + for(i = 0; i < argc; i++) { + if( strcmp(argv[i], "--script-check") == 0 ) { + msg_silent = 0x7; // silence information and status messages + } + } + } iMalloc->init();// needed for Show* in display_title() [FlavioJS] - - console->display_title(); + + if (!(msg_silent&0x1)) + console->display_title(); #ifdef MINICORE // minimalist Core usercheck(); diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 83de21b2b..a95e143c3 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -21,7 +21,12 @@ int max_index = 0; char mapindex_cfgfile[80] = "db/map_index.txt"; -#define mapindex_exists(id) (indexes[id].name[0] != '\0') +#define mapindex_exists_sub(id) (indexes[id].name[0] != '\0') + +bool mapindex_exists(int id) { + return mapindex_exists_sub(id); +} + /// Retrieves the map name from 'string' (removing .gat extension if present). /// Result gets placed either into 'buf' or in a static local buffer. const char* mapindex_getmapname(const char* string, char* output) { @@ -102,7 +107,7 @@ int mapindex_addmap(int index, const char* name) { return 0; } - if (mapindex_exists(index)) { + if (mapindex_exists_sub(index)) { ShowWarning("(mapindex_add) Overriding index %d: map \"%s\" -> \"%s\"\n", index, indexes[index].name, map_name); strdb_remove(mapindex_db, indexes[index].name); } @@ -129,18 +134,18 @@ unsigned short mapindex_name2id(const char* name) { } const char* mapindex_id2name_sub(unsigned short id,const char *file, int line, const char *func) { - if (id > MAX_MAPINDEX || !mapindex_exists(id)) { + if (id > MAX_MAPINDEX || !mapindex_exists_sub(id)) { ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache. %s:%s:%d\n", id,file,func,line); return indexes[0].name; // dummy empty string so that the callee doesn't crash } return indexes[id].name; } -void mapindex_init(void) { +int mapindex_init(void) { FILE *fp; char line[1024]; int last_index = -1; - int index; + int index, total = 0; char map_name[12]; if( ( fp = fopen(mapindex_cfgfile,"r") ) == NULL ){ @@ -158,6 +163,7 @@ void mapindex_init(void) { index = last_index+1; case 2: //Map with ID given mapindex_addmap(index,map_name); + total++; break; default: continue; @@ -169,6 +175,7 @@ void mapindex_init(void) { if( !strdb_iget(mapindex_db, MAP_DEFAULT) ) { ShowError("mapindex_init: MAP_DEFAULT '%s' not found in cache! update mapindex.h MAP_DEFAULT var!!!\n",MAP_DEFAULT); } + return total; } int mapindex_removemap(int index){ diff --git a/src/common/mapindex.h b/src/common/mapindex.h index 43953a8e0..646f73f18 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -56,12 +56,13 @@ extern char mapindex_cfgfile[80]; #define MAP_MALAYA "malaya" #define MAP_ECLAGE "eclage" +bool mapindex_exists(int id); const char* mapindex_getmapname(const char* string, char* output); const char* mapindex_getmapname_ext(const char* string, char* output); unsigned short mapindex_name2id(const char*); #define mapindex_id2name(n) mapindex_id2name_sub(n,__FILE__, __LINE__, __func__) const char* mapindex_id2name_sub(unsigned short,const char *file, int line, const char *func); -void mapindex_init(void); +int mapindex_init(void); void mapindex_final(void); int mapindex_addmap(int index, const char* name); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 0ba977ff4..b11a4f4c0 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -10149,7 +10149,10 @@ void atcommand_doload(void) { atcommand->config_read(map->ATCOMMAND_CONF_FILENAME); } -void do_init_atcommand(void) { +void do_init_atcommand(bool minimal) { + if (minimal) + return; + atcommand->at_symbol = '@'; atcommand->char_symbol = '#'; atcommand->binding_count = 0; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 63c38e4d1..74ab30bed 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -77,7 +77,7 @@ struct atcommand_interface { /* */ char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others) /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ bool (*parse) (const int fd, struct map_session_data* sd, const char* message, int type); diff --git a/src/map/battle.c b/src/map/battle.c index 94222f663..c090c5623 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6759,7 +6759,10 @@ int battle_config_read(const char* cfgName) return 0; } -void do_init_battle(void) { +void do_init_battle(bool minimal) { + if (minimal) + return; + battle->delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR); timer->add_func_list(battle->delay_damage_sub, "battle_delay_damage_sub"); diff --git a/src/map/battle.h b/src/map/battle.h index bf08ab8d6..0f3a22c4b 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -506,7 +506,7 @@ struct battle_interface { int attr_fix_table[4][ELE_MAX][ELE_MAX]; struct eri *delay_damage_ers; //For battle delay damage structures. /* init */ - void (*init) (void); + void (*init) (bool minimal); /* final */ void (*final) (void); /* damage calculation */ diff --git a/src/map/battleground.c b/src/map/battleground.c index 62688659e..76cf22471 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -757,7 +757,10 @@ enum BATTLEGROUNDS_QUEUE_ACK bg_canqueue(struct map_session_data *sd, struct bg_ return BGQA_SUCCESS; } -void do_init_battleground(void) { +void do_init_battleground(bool minimal) { + if (minimal) + return; + bg->team_db = idb_alloc(DB_OPT_RELEASE_DATA); timer->add_func_list(bg->send_xy_timer, "bg_send_xy_timer"); timer->add_interval(timer->gettick() + battle_config.bg_update_interval, bg->send_xy_timer, 0, 0, battle_config.bg_update_interval); diff --git a/src/map/battleground.h b/src/map/battleground.h index a5e540924..fab614d08 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -75,7 +75,7 @@ struct battleground_interface { DBMap *team_db; // int bg_id -> struct battleground_data* unsigned int team_counter; // Next bg_id /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ struct bg_arena *(*name2arena) (char *name); diff --git a/src/map/chrif.c b/src/map/chrif.c index a13217060..87ec71ec5 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1611,8 +1611,10 @@ int do_final_chrif(void) { /*========================================== * *------------------------------------------*/ -int do_init_chrif(void) { - +int do_init_chrif(bool minimal) { + if (minimal) + return 0; + chrif->auth_db = idb_alloc(DB_OPT_BASE); chrif->auth_db_ers = ers_new(sizeof(struct auth_node),"chrif.c::auth_db_ers",ERS_OPT_NONE); diff --git a/src/map/chrif.h b/src/map/chrif.h index 9df4b9931..56aa569a3 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -63,7 +63,7 @@ struct chrif_interface { int state; /* */ int (*final) (void); - int (*init) (void); + int (*init) (bool minimal); /* funcs */ void (*setuserid) (char* id); void (*setpasswd) (char* pwd); diff --git a/src/map/clif.c b/src/map/clif.c index c1e7cb1c9..5f88557fd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18046,10 +18046,13 @@ void clif_bc_ready(void) { /*========================================== * *------------------------------------------*/ -int do_init_clif(void) { +int do_init_clif(bool minimal) { const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00", "0xffffff" }; int i; + if (minimal) + return 0; + /** * Setup Color Table (saves unnecessary load of strtoul on every call) **/ diff --git a/src/map/clif.h b/src/map/clif.h index cbe3fa857..1710cfc88 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -526,7 +526,7 @@ struct clif_interface { /* */ bool ally_only; /* core */ - int (*init) (void); + int (*init) (bool minimal); void (*final) (void); int (*setip) (const char* ip); void (*setbindip) (const char* ip); diff --git a/src/map/duel.c b/src/map/duel.c index 4e41865d4..5e305244a 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -166,7 +166,10 @@ void duel_reject(const unsigned int did, struct map_session_data* sd) { void do_final_duel(void) { } -void do_init_duel(void) { +void do_init_duel(bool minimal) { + if (minimal) + return; + memset(&duel->list[0], 0, sizeof(duel->list)); } diff --git a/src/map/duel.h b/src/map/duel.h index d1ec58415..d60c9531a 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -34,7 +34,7 @@ struct duel_interface { void (*showinfo) (const unsigned int did, struct map_session_data* sd); int (*checktime) (struct map_session_data* sd); - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); } duel_s; diff --git a/src/map/elemental.c b/src/map/elemental.c index f15b735b2..2581d1839 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -931,7 +931,10 @@ void reload_elemental_skilldb(void) { elemental->read_skilldb(); } -int do_init_elemental(void) { +int do_init_elemental(bool minimal) { + if (minimal) + return 0; + elemental->read_db(); elemental->read_skilldb(); diff --git a/src/map/elemental.h b/src/map/elemental.h index 3cd819d53..8ffffa5e3 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -73,7 +73,7 @@ struct elemental_interface { struct s_elemental_db db[MAX_ELEMENTAL_CLASS]; // Elemental Database /* */ - int (*init) (void); + int (*init) (bool minimal); void (*final) (void); /* funcs */ bool (*class) (int class_); diff --git a/src/map/guild.c b/src/map/guild.c index 0ae45bede..908c38341 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2172,12 +2172,15 @@ void guild_flags_clear(void) { guild->flags_count = 0; } -void do_init_guild(void) { - 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); +void do_init_guild(bool minimal) { + if (minimal) + return; + + 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); diff --git a/src/map/guild.h b/src/map/guild.h index 348a6c7e4..8da9036e6 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -56,7 +56,7 @@ struct s_guild_skill_tree { struct guild_interface { - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ DBMap* db; // int guild_id -> struct guild* diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 52f0572c0..cb54d2d8b 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1229,8 +1229,12 @@ void homunculus_skill_reload(void) { homun->skill_db_read(); } -void do_init_homunculus(void) { +void do_init_homunculus(bool minimal) { int class_; + + if (minimal) + return; + homun->read_db(); homun->exp_db_read(); homun->skill_db_read(); diff --git a/src/map/homunculus.h b/src/map/homunculus.h index e3ec38f7b..bf1de6171 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -91,7 +91,7 @@ struct homunculus_interface { struct s_homunculus_db db[MAX_HOMUNCULUS_CLASS]; struct homun_skill_tree_entry skill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE]; /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); void (*reload) (void); void (*reload_skill) (void); diff --git a/src/map/instance.c b/src/map/instance.c index 6b96c3112..ab68c9e22 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -691,7 +691,10 @@ void do_final_instance(void) { instance->instances = 0; } -void do_init_instance(void) { +void do_init_instance(bool minimal) { + if (minimal) + return; + timer->add_func_list(instance->destroy_timer, "instance_destroy_timer"); } diff --git a/src/map/instance.h b/src/map/instance.h index 27a9401b4..4f65d7db0 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -47,7 +47,7 @@ struct instance_data { }; struct instance_interface { - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); void (*reload) (void); /* start point */ diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index f67446629..0f487d8f7 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -386,7 +386,7 @@ void irc_relay(char *name, const char *msg) { /** * IRC bot initializer */ -void irc_bot_init(void) { +void irc_bot_init(bool minimal) { /// Command handlers const struct irc_func irc_func_base[] = { { "PING" , ircbot->pong }, @@ -399,6 +399,9 @@ void irc_bot_init(void) { struct irc_func* function; int i; + if (minimal) + return; + if( !hChSys.irc ) return; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 52ff0c9be..305cdfd91 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -34,7 +34,7 @@ struct irc_bot_interface { unsigned int size; } funcs; /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ int (*parse) (int fd); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 3fc8d526b..e29b74cd4 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1927,7 +1927,7 @@ int itemdb_uid_load() { /*==================================== * read all item-related databases *------------------------------------*/ -void itemdb_read(void) { +void itemdb_read(bool minimal) { int i; DBData prev; @@ -1945,6 +1945,9 @@ void itemdb_read(void) { } } + if (minimal) + return; + itemdb->read_combos(); itemdb->read_groups(); itemdb->read_chains(); @@ -2065,7 +2068,7 @@ void itemdb_reload(void) { db_clear(itemdb->names); // read new data - itemdb->read(); + itemdb->read(false); //Epoque's awesome @reloaditemdb fix - thanks! [Ind] //- Fixes the need of a @reloadmobdb after a @reloaditemdb to re-link monster drop data @@ -2174,12 +2177,16 @@ void do_final_itemdb(void) { db_destroy(itemdb->names); } -void do_init_itemdb(void) { +void do_init_itemdb(bool minimal) { memset(itemdb->array, 0, sizeof(itemdb->array)); itemdb->other = idb_alloc(DB_OPT_BASE); itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH); itemdb->create_dummy_data(); //Dummy data item. - itemdb->read(); + itemdb->read(minimal); + + if (minimal) + return; + clif->cashshop_load(); } void itemdb_defaults(void) { diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 2579d84ca..80d2fd0ce 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -266,7 +266,7 @@ struct item_package { #define itemdb_canauction(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canauction_sub) struct itemdb_interface { - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); void (*reload) (void); void (*name_constants) (void); @@ -343,7 +343,7 @@ struct itemdb_interface { int (*read_sqldb) (void); uint64 (*unique_id) (int8 flag, int64 value); int (*uid_load) (); - void (*read) (void); + void (*read) (bool minimal); void (*destroy_item_data) (struct item_data *self, int free_self); int (*final_sub) (DBKey key, DBData *data, va_list ap); }; diff --git a/src/map/map.c b/src/map/map.c index 781cc0ff9..cd192b7d4 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2905,7 +2905,7 @@ int map_readfromcache(struct map_data *m, char *buffer) { } -int map_addmap(char* mapname) { +int map_addmap(const char* mapname) { map->list[map->count].instance_id = -1; mapindex_getmapname(mapname, map->list[map->count++].name); return 0; @@ -5419,6 +5419,8 @@ void map_load_defaults(void) { } int do_init(int argc, char *argv[]) { + bool minimal = false; + char *scriptcheck = NULL; int i; #ifdef GCOLLECT @@ -5468,6 +5470,11 @@ int do_init(int argc, char *argv[]) map->LOG_CONF_NAME = argv[++i]; } else if( strcmp(arg, "run-once") == 0 ) { // close the map-server as soon as its done.. for testing [Celest] runflag = CORE_ST_STOP; + } else if( strcmp(arg, "script-check") == 0 ) { + minimal = true; + runflag = CORE_ST_STOP; + if( map->arg_next_value(arg, i, argc) ) + scriptcheck = argv[++i]; } else { ShowError("Unknown option '%s'.\n", argv[i]); exit(EXIT_FAILURE); @@ -5489,39 +5496,42 @@ int do_init(int argc, char *argv[]) } map_load_defaults(); - map->config_read(map->MAP_CONF_NAME); - CREATE(map->list,struct map_data,map->count); - map->count = 0; - map->config_read_sub(map->MAP_CONF_NAME); - // loads npcs - map->reloadnpc(false); + if (!minimal) { + map->config_read(map->MAP_CONF_NAME); + CREATE(map->list,struct map_data,map->count); + map->count = 0; + map->config_read_sub(map->MAP_CONF_NAME); - chrif->checkdefaultlogin(); + // loads npcs + map->reloadnpc(false); - if (!map->ip_set || !map->char_ip_set) { - char ip_str[16]; - ip2str(addr_[0], ip_str); + chrif->checkdefaultlogin(); - ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n"); + if (!map->ip_set || !map->char_ip_set) { + char ip_str[16]; + ip2str(addr_[0], ip_str); - if (naddr_ == 0) - ShowError("Unable to determine your IP address...\n"); - else if (naddr_ > 1) - ShowNotice("Multiple interfaces detected...\n"); + ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n"); - ShowInfo("Defaulting to %s as our IP address\n", ip_str); + if (naddr_ == 0) + ShowError("Unable to determine your IP address...\n"); + else if (naddr_ > 1) + ShowNotice("Multiple interfaces detected...\n"); - if (!map->ip_set) - clif->setip(ip_str); - if (!map->char_ip_set) - chrif->setip(ip_str); - } + ShowInfo("Defaulting to %s as our IP address\n", ip_str); - battle->config_read(map->BATTLE_CONF_FILENAME); - atcommand->msg_read(map->MSG_CONF_NAME); + if (!map->ip_set) + clif->setip(ip_str); + if (!map->char_ip_set) + chrif->setip(ip_str); + } + + battle->config_read(map->BATTLE_CONF_FILENAME); + atcommand->msg_read(map->MSG_CONF_NAME); + map->inter_config_read(map->INTER_CONF_NAME); + logs->config_read(map->LOG_CONF_NAME); + } script->config_read(map->SCRIPT_CONF_NAME); - map->inter_config_read(map->INTER_CONF_NAME); - logs->config_read(map->LOG_CONF_NAME); map->id_db = idb_alloc(DB_OPT_BASE); map->pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex] @@ -5538,53 +5548,77 @@ int do_init(int argc, char *argv[]) map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_NONE); ers_chunk_size(map->flooritem_ers, 100); - - map->sql_init(); - if (logs->config.sql_logs) - logs->sql_init(); - mapindex_init(); + if (!minimal) { + map->sql_init(); + if (logs->config.sql_logs) + logs->sql_init(); + } + + i = mapindex_init(); + + if (minimal) { + // Pretend all maps from the mapindex are on this mapserver + CREATE(map->list,struct map_data,i); + + for( i = 0; i < MAX_MAPINDEX; i++ ) { + if (mapindex_exists(i)) { + map->addmap(mapindex_id2name(i)); + } + } + } + if(map->enable_grf) grfio_init(map->GRF_PATH_FILENAME); map->readallmaps(); - timer->add_func_list(map->freeblock_timer, "map_freeblock_timer"); - timer->add_func_list(map->clearflooritem_timer, "map_clearflooritem_timer"); - timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); - timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - - HPM->load_sub = HPM_map_plugin_load_sub; - HPM->symbol_defaults_sub = map_hp_symbols; - HPM->config_read(); - HPM->event(HPET_INIT); - - atcommand->init(); - battle->init(); - instance->init(); - chrif->init(); - clif->init(); - ircbot->init(); - script->init(); - itemdb->init(); - skill->init(); - map->read_zone_db();/* read after item and skill initalization */ - mob->init(); - pc->init(); - status->init(); - party->init(); - guild->init(); - gstorage->init(); - pet->init(); - homun->init(); - mercenary->init(); - elemental->init(); - quest->init(); - npc->init(); - unit->init(); - bg->init(); - duel->init(); - vending->init(); + + if (!minimal) { + timer->add_func_list(map->freeblock_timer, "map_freeblock_timer"); + timer->add_func_list(map->clearflooritem_timer, "map_clearflooritem_timer"); + timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); + timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); + + HPM->load_sub = HPM_map_plugin_load_sub; + HPM->symbol_defaults_sub = map_hp_symbols; + HPM->config_read(); + HPM->event(HPET_INIT); + } + + atcommand->init(minimal); + battle->init(minimal); + instance->init(minimal); + chrif->init(minimal); + clif->init(minimal); + ircbot->init(minimal); + script->init(minimal); + itemdb->init(minimal); + skill->init(minimal); + if (!minimal) + map->read_zone_db();/* read after item and skill initalization */ + mob->init(minimal); + pc->init(minimal); + status->init(minimal); + party->init(minimal); + guild->init(minimal); + gstorage->init(minimal); + pet->init(minimal); + homun->init(minimal); + mercenary->init(minimal); + elemental->init(minimal); + quest->init(minimal); + npc->init(minimal); + unit->init(minimal); + bg->init(minimal); + duel->init(minimal); + vending->init(minimal); + + if (minimal) { + if (npc->parsesrcfile(scriptcheck, false) == 0) + exit(EXIT_SUCCESS); + exit(EXIT_FAILURE); + } npc->event_do_oninit(); // Init npcs (OnInit) diff --git a/src/map/map.h b/src/map/map.h index 6b7d2a630..31ee0ef60 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1020,7 +1020,7 @@ struct map_interface { int (*eraseallipport_sub) (DBKey key, DBData *data, va_list va); char* (*init_mapcache) (FILE *fp); int (*readfromcache) (struct map_data *m, char *buffer); - int (*addmap) (char *mapname); + int (*addmap) (const char *mapname); void (*delmapid) (int id); void (*zone_db_clear) (void); void (*list_final) (void); diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 8c74a5e1e..a38b37b1e 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -490,7 +490,10 @@ int read_mercenary_skilldb(void) { return 0; } -void do_init_mercenary(void) { +void do_init_mercenary(bool minimal) { + if (minimal) + return; + mercenary->read_db(); mercenary->read_skilldb(); diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 3245606cf..3f2214b65 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -59,7 +59,7 @@ struct mercenary_interface { /* funcs */ - void (*init) (void); + void (*init) (bool minimal); bool (*class) (int class_); struct view_data * (*get_viewdata) (int class_); diff --git a/src/map/mob.c b/src/map/mob.c index 97f8ea6c1..c5a79dffe 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4534,7 +4534,12 @@ bool mob_readdb_itemratio(char* str[], int columns, int current) /** * read all mob-related databases */ -void mob_load(void) { +void mob_load(bool minimal) { + if (minimal) { + // Only read the mob db in minimal mode + mob->readdb(); + return; + } sv->readdb(map->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb mob->readchatdb(); if (map->db_use_sql_mob_db) { @@ -4569,7 +4574,7 @@ void mob_reload(void) { } } - mob->load(); + mob->load(false); } void mob_clear_spawninfo() @@ -4583,15 +4588,18 @@ void mob_clear_spawninfo() /*========================================== * Circumference initialization of mob *------------------------------------------*/ -int do_init_mob(void) -{ //Initialize the mob database +int do_init_mob(bool minimal) { + // Initialize the mob database memset(mob->db_data,0,sizeof(mob->db_data)); //Clear the array - mob->db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns + mob->db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns mob->makedummymobdb(0); //The first time this is invoked, it creates the dummy mob item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_NONE); item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"mob.c::item_drop_list_ers",ERS_OPT_NONE); - mob->load(); + mob->load(minimal); + + if (minimal) + return 0; timer->add_func_list(mob->delayspawn,"mob_delayspawn"); timer->add_func_list(mob->delay_item_drop,"mob_delay_item_drop"); diff --git a/src/map/mob.h b/src/map/mob.h index 2f425e285..31a8666a2 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -259,7 +259,7 @@ struct mob_interface { int manuk[8]; int splendide[5]; /* */ - int (*init) (void); + int (*init) (bool mimimal); int (*final) (void); void (*reload) (void); /* */ @@ -354,7 +354,7 @@ struct mob_interface { int (*read_sqlskilldb) (void); bool (*readdb_race2) (char *fields[], int columns, int current); bool (*readdb_itemratio) (char *str[], int columns, int current); - void (*load) (void); + void (*load) (bool minimal); void (*clear_spawninfo) (); }; diff --git a/src/map/npc.c b/src/map/npc.c index d78b3f8d4..9330d59d3 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1253,6 +1253,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) { } return 0; } + /*========================================== * Cash Shop Buy List *------------------------------------------*/ @@ -3498,8 +3499,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char //Read file and create npc/func/mapflag/monster... accordingly. //@runOnInit should we exec OnInit when it's done ? -void npc_parsesrcfile(const char* filepath, bool runOnInit) -{ +int npc_parsesrcfile(const char* filepath, bool runOnInit) { int16 m, x, y; int lines = 0; FILE* fp; @@ -3512,7 +3512,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) if( fp == NULL ) { ShowError("npc_parsesrcfile: File not found '%s'.\n", filepath); - return; + return -1; } fseek(fp, 0, SEEK_END); len = ftell(fp); @@ -3525,7 +3525,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) ShowError("npc_parsesrcfile: Failed to read file '%s' - %s\n", filepath, strerror(errno)); aFree(buffer); fclose(fp); - return; + return -1; } fclose(fp); @@ -3660,7 +3660,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) } aFree(buffer); - return; + return 0; } int npc_script_event(struct map_session_data* sd, enum npce_event type) @@ -3937,8 +3937,7 @@ static void npc_debug_warps(void) { /*========================================== * npc initialization *------------------------------------------*/ -int do_init_npc(void) -{ +int do_init_npc(bool minimal) { struct npc_src_list *file; int i; @@ -3965,43 +3964,47 @@ int do_init_npc(void) npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); npc->path_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, 0); - npc->timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE); - npc_last_npd = NULL; npc_last_path = NULL; npc_last_ref = NULL; - // process all npc files - ShowStatus("Loading NPCs...\r"); - for( file = npc->src_files; file != NULL; file = file->next ) { - ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name); - npc->parsesrcfile(file->name,false); + if (!minimal) { + npc->timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE); + + // process all npc files + ShowStatus("Loading NPCs...\r"); + for( file = npc->src_files; file != NULL; file = file->next ) { + ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name); + npc->parsesrcfile(file->name,false); + } + ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", + npc_id - START_NPC_NUM, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob); } - ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", - npc_id - START_NPC_NUM, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob); itemdb->name_constants(); + + if (!minimal) { + map->zone_init(); - map->zone_init(); - - npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ + npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ - // set up the events cache - memset(script_event, 0, sizeof(script_event)); - npc->read_event_script(); + // set up the events cache + memset(script_event, 0, sizeof(script_event)); + npc->read_event_script(); - //Debug function to locate all endless loop warps. - if (battle_config.warp_point_debug) - npc->debug_warps(); + //Debug function to locate all endless loop warps. + if (battle_config.warp_point_debug) + npc->debug_warps(); - timer->add_func_list(npc->event_do_clock,"npc_event_do_clock"); - timer->add_func_list(npc->timerevent,"npc_timerevent"); + timer->add_func_list(npc->event_do_clock,"npc_event_do_clock"); + timer->add_func_list(npc->timerevent,"npc_timerevent"); + } // Init dummy NPC npc->fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data)); diff --git a/src/map/npc.h b/src/map/npc.h index 5ec201e55..10f3406b4 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -140,7 +140,7 @@ struct npc_interface { struct npc_src_list *src_files; struct unit_data base_ud; /* */ - int (*init) (void); + int (*init) (bool minimal); int (*final) (void); /* */ int (*get_new_npc_id) (void); @@ -218,7 +218,7 @@ struct npc_interface { void (*parse_mob2) (struct spawn_data *mobspawn); const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); - void (*parsesrcfile) (const char *filepath, bool runOnInit); + int (*parsesrcfile) (const char *filepath, bool runOnInit); int (*script_event) (struct map_session_data *sd, enum npce_event type); void (*read_event_script) (void); int (*path_db_clear_sub) (DBKey key, DBData *data, va_list args); diff --git a/src/map/party.c b/src/map/party.c index ab05c23f7..2801d0466 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -1306,7 +1306,10 @@ void do_final_party(void) { db_destroy(party->booking_db); // Party Booking [Spiria] } // Constructor, init vars -void do_init_party(void) { +void do_init_party(bool minimal) { + if (minimal) + return; + 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"); diff --git a/src/map/party.h b/src/map/party.h index ab14d1a31..91f4c1b7d 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -73,7 +73,7 @@ struct party_interface { DBMap* booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria] unsigned long booking_nextid; /* funcs */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ struct party_data* (*search) (int party_id); diff --git a/src/map/pc.c b/src/map/pc.c index d1d76fd4c..89b094043 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -10215,7 +10215,9 @@ void do_final_pc(void) { return; } -void do_init_pc(void) { +void do_init_pc(bool minimal) { + if (minimal) + return; pc->itemcd_db = idb_alloc(DB_OPT_RELEASE_DATA); diff --git a/src/map/pc.h b/src/map/pc.h index 7ae92c9a5..af03aa2f3 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -742,7 +742,7 @@ struct pc_interface { /* */ struct eri *sc_display_ers; /* funcs */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); struct map_session_data* (*get_dummy_sd) (void); diff --git a/src/map/pet.c b/src/map/pet.c index 7dcf06c02..612ddfada 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -1328,8 +1328,10 @@ int read_petdb() /*========================================== * Initialization process relationship skills *------------------------------------------*/ -int do_init_pet(void) -{ +int do_init_pet(bool minimal) { + if (minimal) + return 0; + pet->read_db(); pet->item_drop_ers = ers_new(sizeof(struct item_drop),"pet.c::item_drop_ers",ERS_OPT_NONE); diff --git a/src/map/pet.h b/src/map/pet.h index f95e860a2..f9a756de2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -106,7 +106,7 @@ struct pet_interface { struct eri *item_drop_ers; //For loot drops delay structures. struct eri *item_drop_list_ers; /* */ - int (*init) (void); + int (*init) (bool minimal); int (*final) (void); /* */ int (*hungry_val) (struct pet_data *pd); diff --git a/src/map/quest.c b/src/map/quest.c index f40b60c3d..0719b8dbb 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -351,7 +351,10 @@ int quest_read_db(void) { return 0; } -void do_init_quest(void) { +void do_init_quest(bool minimal) { + if (minimal) + return; + quest->read_db(); } diff --git a/src/map/quest.h b/src/map/quest.h index 340bc8608..0725a8c46 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -19,7 +19,7 @@ typedef enum quest_check_type { HAVEQUEST, PLAYTIME, HUNTING } quest_check_type; struct quest_interface { struct s_quest_db db[MAX_QUEST_DB]; /* */ - void (*init) (void); + void (*init) (bool minimal); void (*reload) (void); /* */ int (*search_db) (int quest_id); diff --git a/src/map/script.c b/src/map/script.c index 3b0557235..ea3867083 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1863,66 +1863,98 @@ void read_constdb(void) { fclose(fp); } +// Standard UNIX tab size is 8 +#define TAB_SIZE 8 +#define update_tabstop(tabstop,chars) \ + do { \ + (tabstop) -= (chars); \ + while ((tabstop) <= 0) (tabstop) += TAB_SIZE; \ + } while (false) + /*========================================== * Display emplacement line of script *------------------------------------------*/ const char* script_print_line(StringBuf* buf, const char* p, const char* mark, int line) { - int i; + int i, mark_pos = 0, tabstop = TAB_SIZE; if( p == NULL || !p[0] ) return NULL; if( line < 0 ) - StrBuf->Printf(buf, "*% 5d : ", -line); + StrBuf->Printf(buf, "*%5d: ", -line); // len = 8 else - StrBuf->Printf(buf, " % 5d : ", line); - for(i=0;p[i] && p[i] != '\n';i++){ - if(p + i != mark) - StrBuf->Printf(buf, "%c", p[i]); + StrBuf->Printf(buf, " %5d: ", line); // len = 8 + update_tabstop(tabstop,8); // len = 8 + for( i=0; p[i] && p[i] != '\n'; i++ ) { + char c = p[i]; + int w = 1; + // Like Clang does, let's print the code with tabs expanded to spaces to ensure that the marker will be under the right character + if( c == '\t' ) { + c = ' '; + w = tabstop; + } + update_tabstop(tabstop, w); + if( p + i < mark) + mark_pos += w; + if( p + i != mark) + StrBuf->Printf(buf, "%*c", w, c); else - StrBuf->Printf(buf, "\'%c\'", p[i]); + StrBuf->Printf(buf, CL_BT_RED"%*c"CL_RESET, w, c); } StrBuf->AppendStr(buf, "\n"); + if( mark ) { + StrBuf->AppendStr(buf, " "CL_BT_CYAN); // len = 8 + for( ; mark_pos > 0; mark_pos-- ) { + StrBuf->AppendStr(buf, "~"); + } + StrBuf->AppendStr(buf, CL_RESET CL_BT_GREEN"^"CL_RESET"\n"); + } return p+i+(p[i] == '\n' ? 1 : 0); } +#undef TAB_SIZE +#undef update_tabstop +#define CONTEXTLINES 3 void script_errorwarning_sub(StringBuf *buf, const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos) { // Find the line where the error occurred int j; int line = start_line; - const char *p; - const char *linestart[5] = { NULL, NULL, NULL, NULL, NULL }; + const char *p, *error_linepos; + const char *linestart[CONTEXTLINES]; + memset(linestart, '\0', sizeof(linestart)); for(p=src;p && *p;line++){ const char *lineend=strchr(p,'\n'); if(lineend==NULL || error_pos<lineend){ break; } - for( j = 0; j < 4; j++ ) { + for( j = 0; j < CONTEXTLINES-1; j++ ) { linestart[j] = linestart[j+1]; } - linestart[4] = p; - p=lineend+1; + linestart[CONTEXTLINES-1] = p; + p = lineend+1; } + error_linepos = p; if( line >= 0 ) - StrBuf->Printf(buf, "script error in file '%s' line %d\n", file, line); + StrBuf->Printf(buf, "script error in file '%s' line %d column %d\n", file, line, error_pos-error_linepos+1); else StrBuf->Printf(buf, "script error in file '%s' item ID %d\n", file, -line); StrBuf->Printf(buf, " %s\n", error_msg); - for(j = 0; j < 5; j++ ) { - script->print_line(buf, linestart[j], NULL, line + j - 5); + for(j = 0; j < CONTEXTLINES; j++ ) { + script->print_line(buf, linestart[j], NULL, line + j - CONTEXTLINES); } p = script->print_line(buf, p, error_pos, -line); - for(j = 0; j < 5; j++) { + for(j = 0; j < CONTEXTLINES; j++) { p = script->print_line(buf, p, NULL, line + j + 1 ); } } +#undef CONTEXTLINES void script_error(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos) { StringBuf buf; StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "\a\n"); + StrBuf->AppendStr(&buf, "\a"); script->errorwarning_sub(&buf, src, file, start_line, error_msg, error_pos); @@ -3694,7 +3726,7 @@ void do_final_script(void) { /*========================================== * Initialization *------------------------------------------*/ -void do_init_script(void) { +void do_init_script(bool minimal) { script->st_db = idb_alloc(DB_OPT_BASE); script->userfunc_db = strdb_alloc(DB_OPT_DUP_KEY,0); script->autobonus_db = strdb_alloc(DB_OPT_DUP_KEY,0); @@ -3707,6 +3739,10 @@ void do_init_script(void) { script->parse_builtin(); script->read_constdb(); + + if (minimal) + return; + mapreg->init(); } diff --git a/src/map/script.h b/src/map/script.h index a4d14c777..6aebc8a30 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -507,7 +507,7 @@ struct script_interface { int potion_hp, potion_per_hp, potion_sp, potion_per_sp; int potion_target; /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); int (*reload) (void); /* parse */ diff --git a/src/map/skill.c b/src/map/skill.c index b70e58c46..c16ab832c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -18027,7 +18027,7 @@ bool skill_parse_row_changematerialdb(char* split[], int columns, int current) { * create_arrow_db.txt * abra_db.txt *------------------------------*/ -void skill_readdb(void) { +void skill_readdb(bool minimal) { // init skill db structures db_clear(skill->name2id_db); @@ -18050,6 +18050,10 @@ void skill_readdb(void) { safestrncpy(skill->db[0].desc, "Unknown Skill", sizeof(skill->db[0].desc)); sv->readdb(map->db_path, DBPATH"skill_db.txt", ',', 17, 17, MAX_SKILL_DB, skill->parse_row_skilldb); + + if (minimal) + return; + sv->readdb(map->db_path, DBPATH"skill_require_db.txt", ',', 32, 32, MAX_SKILL_DB, skill->parse_row_requiredb); #ifdef RENEWAL_CAST sv->readdb(map->db_path, "re/skill_cast_db.txt", ',', 8, 8, MAX_SKILL_DB, skill->parse_row_castdb); @@ -18077,7 +18081,7 @@ void skill_reload (void) { struct map_session_data *sd; int i,c,k; - skill->read_db(); + skill->read_db(false); //[Ind/Hercules] refresh index cache for(c = 0; c < CLASS_COUNT; c++) { @@ -18103,9 +18107,12 @@ void skill_reload (void) { /*========================================== * *------------------------------------------*/ -int do_init_skill (void) { +int do_init_skill(bool minimal) { skill->name2id_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, MAX_SKILL_NAME_LENGTH); - skill->read_db(); + skill->read_db(minimal); + + if (minimal) + return 0; skill->group_db = idb_alloc(DB_OPT_BASE); skill->unit_db = idb_alloc(DB_OPT_BASE); diff --git a/src/map/skill.h b/src/map/skill.h index fca4952ef..918216e8a 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1797,10 +1797,10 @@ typedef int (*SkillFunc)(struct block_list *src, struct block_list *target, uint * Skill.c Interface **/ struct skill_interface { - int (*init) (void); + int (*init) (bool minimal); int (*final) (void); void (*reload) (void); - void (*read_db) (void); + void (*read_db) (bool minimal); /* */ DBMap* cd_db; // char_id -> struct skill_cd DBMap* name2id_db; diff --git a/src/map/status.c b/src/map/status.c index c06de4dfe..17fa4dd38 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -11536,7 +11536,10 @@ int status_readdb(void) /*========================================== * Status db init and destroy. *------------------------------------------*/ -int do_init_status(void) { +int do_init_status(bool minimal) { + if (minimal) + return 0; + timer->add_func_list(status->change_timer,"status_change_timer"); timer->add_func_list(status->kaahi_heal_timer,"status_kaahi_heal_timer"); timer->add_func_list(status->natural_heal_timer,"status_natural_heal_timer"); diff --git a/src/map/status.h b/src/map/status.h index 254f3bfab..7d48e5684 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1864,7 +1864,7 @@ struct status_interface { int64 natural_heal_prev_tick; unsigned int natural_heal_diff_tick; /* */ - int (*init) (void); + int (*init) (bool minimal); void (*final) (void); /* funcs */ int (*get_refine_chance) (enum refine_type wlv, int refine); diff --git a/src/map/storage.c b/src/map/storage.c index cc1100d28..45a80867d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -717,7 +717,9 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) { return 0; } -void do_init_gstorage(void) { +void do_init_gstorage(bool minimal) { + if (minimal) + return; gstorage->db = idb_alloc(DB_OPT_RELEASE_DATA); } void do_final_gstorage(void) { diff --git a/src/map/storage.h b/src/map/storage.h index 9258e0265..8a10c9f3b 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -36,7 +36,7 @@ struct guild_storage_interface { struct guild_storage *(*id2storage) (int guild_id); struct guild_storage *(*id2storage2) (int guild_id); /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ int (*delete) (int guild_id); diff --git a/src/map/unit.c b/src/map/unit.c index c7ba2f6f9..b1240def2 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2573,7 +2573,10 @@ int unit_free(struct block_list *bl, clr_type clrtype) { return 0; } -int do_init_unit(void) { +int do_init_unit(bool minimal) { + if (minimal) + return 0; + timer->add_func_list(unit->attack_timer, "unit_attack_timer"); timer->add_func_list(unit->walktoxy_timer,"unit_walktoxy_timer"); timer->add_func_list(unit->walktobl_sub, "unit_walktobl_sub"); diff --git a/src/map/unit.h b/src/map/unit.h index 0567688a1..8220b7e8f 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -72,7 +72,7 @@ extern const short dirx[8]; extern const short diry[8]; struct unit_interface { - int (*init) (void); + int (*init) (bool minimal); int (*final) (void); /* */ struct unit_data* (*bl2ud) (struct block_list *bl); diff --git a/src/map/vending.c b/src/map/vending.c index 7d6d02cfb..c7a2dfa68 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -360,7 +360,7 @@ void final(void) { db_destroy(vending->db); } -void init(void) { +void init(bool minimal) { vending->db = idb_alloc(DB_OPT_BASE); vending->next_id = 0; } diff --git a/src/map/vending.h b/src/map/vending.h index 968811ecd..b760bf064 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -20,7 +20,7 @@ struct vending_interface { unsigned int next_id;/* next vender id */ DBMap *db; /* */ - void (*init) (void); + void (*init) (bool minimal); void (*final) (void); /* */ void (*close) (struct map_session_data* sd); -- cgit v1.2.3-70-g09d2 From b9b32ac7609e33c21b488d722103cc0eea16b12c Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Thu, 7 Nov 2013 16:04:51 -0200 Subject: Item Bound Fixes/Adjustments/Improvements Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et> --- conf/groups.conf | 2 +- conf/messages.conf | 4 +- doc/permissions.txt | 2 +- sql-files/main.sql | 1 + sql-files/upgrades/2013-10-31--07-49.sql | 4 +- sql-files/upgrades/index.txt | 3 +- src/char/char.c | 32 ++-- src/char/int_storage.c | 58 ++++--- src/char/inter.c | 18 +-- src/common/mmo.h | 12 +- src/config/core.h | 3 +- src/map/atcommand.c | 20 +-- src/map/clif.c | 33 ++-- src/map/clif.h | 8 + src/map/guild.c | 39 ++--- src/map/guild.h | 2 - src/map/intif.c | 28 ++-- src/map/intif.h | 2 - src/map/mail.c | 6 +- src/map/packets_struct.h | 1 - src/map/party.c | 10 +- src/map/pc.c | 92 +++++++---- src/map/pc.h | 5 +- src/map/pc_groups.c | 2 +- src/map/pc_groups.h | 2 +- src/map/script.c | 252 ++++++++----------------------- src/map/script.h | 1 + src/map/storage.c | 8 +- src/map/trade.c | 23 +-- src/map/vending.c | 2 +- 30 files changed, 285 insertions(+), 390 deletions(-) (limited to 'src/map/storage.c') diff --git a/conf/groups.conf b/conf/groups.conf index c1a8d10e6..d31f46f24 100644 --- a/conf/groups.conf +++ b/conf/groups.conf @@ -261,7 +261,7 @@ groups: ( log_commands: true permissions: { can_trade: true - can_trade_bounded: false + can_trade_bound: false can_party: true all_skill: false all_equipment: false diff --git a/conf/messages.conf b/conf/messages.conf index 3564de043..2d429d79e 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -317,8 +317,8 @@ 291: Weather effects will dispell on warp/refresh 292: Killer state reset. //Item Bind System -293: This bounded item cannot be traded to that character. -294: This bounded item cannot be stored there. +293: This bound item cannot be traded to that character. +294: This bound item cannot be stored there. 295: Please enter an item name or ID (usage: @itembound <item name/ID> <quantity> <bound_type>). 296: Please enter all parameters (usage: @itembound2 <item name/ID> <quantity> 297: <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>). diff --git a/doc/permissions.txt b/doc/permissions.txt index c2aeba081..7280395dc 100644 --- a/doc/permissions.txt +++ b/doc/permissions.txt @@ -31,5 +31,5 @@ show_bossmobs : Ability to see boss mobs with @showmobs. disable_pvm : Ability to disable Player vs. Monster. disable_pvp : Ability to disable Player vs. Player. disable_commands_when_dead : Ability to disable @command usage when dead. -can_trade_bounded : Ability to trade or otherwise distribute bounded items (drop, storage, vending etc...). +can_trade_bound: Ability to trade or otherwise distribute bound items (drop, storage, vending etc...). hchsys_admin : Hercules Chat System Admin (Ability to modify channel settings regardless of ownership and join password-protected channels without requiring a password.) diff --git a/sql-files/main.sql b/sql-files/main.sql index ddf3b6712..387d01893 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -666,6 +666,7 @@ INSERT INTO `sql_updates` (`timestamp`) VALUES (1381423003); INSERT INTO `sql_updates` (`timestamp`) VALUES (1382892428); INSERT INTO `sql_updates` (`timestamp`) VALUES (1383162785); INSERT INTO `sql_updates` (`timestamp`) VALUES (1383167577); +INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); -- -- Table structure for table `sstatus` diff --git a/sql-files/upgrades/2013-10-31--07-49.sql b/sql-files/upgrades/2013-10-31--07-49.sql index 40e0421c8..e18c7e20d 100644 --- a/sql-files/upgrades/2013-10-31--07-49.sql +++ b/sql-files/upgrades/2013-10-31--07-49.sql @@ -1,4 +1,6 @@ +#1383205740 ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite`; ALTER TABLE `cart_inventory` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; ALTER TABLE `storage` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`; \ No newline at end of file +ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); \ No newline at end of file diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index 1fc0ebd77..133366319 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -8,4 +8,5 @@ 2013-10-10--16-36.sql 2013-10-27--16-47.sql 2013-10-30--19-53.sql -2013-10-30--21-12.sql \ No newline at end of file +2013-10-30--21-12.sql +2013-10-31--07-49.sql \ No newline at end of file diff --git a/src/char/char.c b/src/char/char.c index 9e84f0245..ce4fcbe53 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -747,7 +747,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 8, SQLDT_UINT, &item.bound, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL); for( j = 0; j < MAX_SLOTS; ++j ) SQL->StmtBindColumn(stmt, 9+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); @@ -894,7 +894,7 @@ int inventory_to_sql(const struct item items[], int max, int id) { SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &item.favorite, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 9, SQLDT_CHAR, &item.bound, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 9, SQLDT_UCHAR, &item.bound, 0, NULL, NULL); for( j = 0; j < MAX_SLOTS; ++j ) SQL->StmtBindColumn(stmt, 10+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); @@ -1243,17 +1243,17 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SQL->StmtExecute(stmt) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.favorite, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_CHAR, &tmp_item.bound, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.favorite, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UCHAR, &tmp_item.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_UINT64, &tmp_item.unique_id, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) if( SQL_ERROR == SQL->StmtBindColumn(stmt, 11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) @@ -1283,8 +1283,8 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.bound, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_ULONGLONG, &tmp_item.unique_id, 0, NULL, NULL) ) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &tmp_item.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &tmp_item.unique_id, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) if( SQL_ERROR == SQL->StmtBindColumn(stmt, 10+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) @@ -2959,7 +2959,7 @@ int parse_frommap(int fd) break; } //Check account only if this ain't final save. Final-save goes through because of the char-map reconnect - if (RFIFOB(fd,12) || RFIFOB(fd,13) || ( + if (RFIFOB(fd,12) || ( (character = (struct online_char_data*)idb_get(online_char_db, aid)) != NULL && character->char_id == cid)) { diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 6443aa743..30671df5e 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -107,8 +107,7 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p) StrBuf->Destroy(&buf); - for( i = 0; i < MAX_GUILD_STORAGE && SQL_SUCCESS == SQL->NextRow(sql_handle); ++i ) - { + for( i = 0; i < MAX_GUILD_STORAGE && SQL_SUCCESS == SQL->NextRow(sql_handle); ++i ) { item = &p->items[i]; SQL->GetData(sql_handle, 0, &data, NULL); item->id = atoi(data); SQL->GetData(sql_handle, 1, &data, NULL); item->nameid = atoi(data); @@ -120,9 +119,8 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p) SQL->GetData(sql_handle, 7, &data, NULL); item->bound = atoi(data); SQL->GetData(sql_handle, 8, &data, NULL); item->unique_id = strtoull(data, NULL, 10); item->expire_time = 0; - item->bound = 0; - for( j = 0; j < MAX_SLOTS; ++j ) - { + + for( j = 0; j < MAX_SLOTS; ++j ) { SQL->GetData(sql_handle, 9+j, &data, NULL); item->card[j] = atoi(data); } } @@ -239,14 +237,15 @@ int mapif_parse_SaveGuildStorage(int fd) return 0; } -#ifdef BOUND_ITEMS int mapif_itembound_ack(int fd, int aid, int guild_id) { +#ifdef GP_BOUND_ITEMS WFIFOHEAD(fd,8); WFIFOW(fd,0) = 0x3856; WFIFOL(fd,2) = aid; WFIFOW(fd,6) = guild_id; WFIFOSET(fd,8); +#endif return 0; } @@ -254,23 +253,23 @@ int mapif_itembound_ack(int fd, int aid, int guild_id) //Guild bound items pull for offline characters [Akinari] //Revised by [Mhalicot] //------------------------------------------------ -int mapif_parse_itembound_retrieve(int fd) +int mapif_parse_ItemBoundRetrieve(int fd) { +#ifdef GP_BOUND_ITEMS StringBuf buf; SqlStmt* stmt; struct item item; int j, i=0, s; - bool found=false; struct item items[MAX_INVENTORY]; int char_id = RFIFOL(fd,2); int aid = RFIFOL(fd,6); int guild_id = RFIFOW(fd,10); StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`"); + StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`"); for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); - StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`='%d'",inventory_db,char_id); + StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`='%d' AND `bound` = '%d'",inventory_db,char_id,IBT_GUILD); stmt = SQL->StmtMalloc(sql_handle); if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) @@ -290,15 +289,14 @@ int mapif_parse_itembound_retrieve(int fd) SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 8, SQLDT_UINT, &item.bound, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL); for( j = 0; j < MAX_SLOTS; ++j ) - SQL->StmtBindColumn(stmt, 9+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 10+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); while( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) { - if(item.bound == 2) { - memcpy(&items[i],&item,sizeof(struct item)); - i++; - } + memcpy(&items[i],&item,sizeof(struct item)); + i++; } SQL->FreeResult(sql_handle); @@ -312,10 +310,9 @@ int mapif_parse_itembound_retrieve(int fd) StrBuf->Clear(&buf); StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE",inventory_db); for(j=0; j<i; j++) { - if( found ) + if( j ) StrBuf->AppendStr(&buf, " OR"); - else - found = true; + StrBuf->Printf(&buf, " `id`=%d",items[j].id); } @@ -329,21 +326,18 @@ int mapif_parse_itembound_retrieve(int fd) } //Now let's update the guild storage with those deleted items - found = false; StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "INSERT INTO `%s` (`guild_id`, `nameid`, `amount`, `identify`, `refine`, `attribute`, `expire_time`, `bound`", guild_storage_db); + StrBuf->Printf(&buf, "INSERT INTO `%s` (`guild_id`, `nameid`, `amount`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", guild_storage_db); for( j = 0; j < MAX_SLOTS; ++j ) StrBuf->Printf(&buf, ", `card%d`", j); StrBuf->AppendStr(&buf, ") VALUES "); for( j = 0; j < i; ++j ) { - if( found ) + if( j ) StrBuf->AppendStr(&buf, ","); - else - found = true; StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'", - guild_id, items[j].nameid, items[j].amount, items[j].identify, items[j].refine, items[j].attribute, items[j].expire_time, items[j].bound); + guild_id, items[j].nameid, items[j].amount, items[j].identify, items[j].refine, items[j].attribute, items[j].expire_time, items[j].bound, items[j].unique_id); for( s = 0; s < MAX_SLOTS; ++s ) StrBuf->Printf(&buf, ", '%d'", items[j].card[s]); StrBuf->AppendStr(&buf, ")"); @@ -364,21 +358,21 @@ int mapif_parse_itembound_retrieve(int fd) //Finally reload storage and tell map we're done mapif_load_guild_storage(fd,aid,guild_id,0); mapif_itembound_ack(fd,aid,guild_id); +#endif return 0; } -#endif int inter_storage_parse_frommap(int fd) { RFIFOHEAD(fd); switch(RFIFOW(fd,0)){ - case 0x3018: mapif_parse_LoadGuildStorage(fd); break; - case 0x3019: mapif_parse_SaveGuildStorage(fd); break; -#ifdef BOUND_ITEMS - case 0x3056: mapif_parse_itembound_retrieve(fd); break; + case 0x3018: mapif_parse_LoadGuildStorage(fd); break; + case 0x3019: mapif_parse_SaveGuildStorage(fd); break; +#ifdef GP_BOUND_ITEMS + case 0x3056: mapif_parse_ItemBoundRetrieve(fd); break; #endif - default: - return 0; + default: + return 0; } return 1; } diff --git a/src/char/inter.c b/src/char/inter.c index 54672faee..b213f1608 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -48,15 +48,15 @@ unsigned int party_share_level = 10; // recv. packet list int inter_recv_packet_length[] = { -1,-1, 7,-1, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000- - 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- - -1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party - -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- - -1, 9, 0, 0, 0, 0, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- - -1,-1,10,10, 0,-1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus] [Mhalicot] - 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] - -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] - 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- - -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator] + 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- + -1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party + -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- + -1, 9, 0, 0, 0, 0, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- + -1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus], Item Bound [Mhalicot] + 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] + -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] + 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- + -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator] }; struct WisData { diff --git a/src/common/mmo.h b/src/common/mmo.h index f676893ea..369f5c894 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -222,7 +222,8 @@ struct item { char attribute; short card[MAX_SLOTS]; unsigned int expire_time; - char favorite, bound; + char favorite; + unsigned char bound; uint64 unique_id; }; @@ -249,6 +250,15 @@ enum e_mmo_charstatus_opt { OPT_ALLOW_PARTY = 0x2, }; +enum e_item_bound_type { + IBT_MIN = 0x1, + IBT_ACCOUNT = 0x1, + IBT_GUILD = 0x2, + IBT_PARTY = 0x3, + IBT_CHARACTER = 0x4, + IBT_MAX = 0x4, +}; + struct s_skill { unsigned short id; unsigned char lv; diff --git a/src/config/core.h b/src/config/core.h index 481c35af8..daadc6455 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -62,8 +62,7 @@ //#define NSI_UNIQUE_ID /// Comment to disable Guild/Party Bound item system -/// By default, we recover/remove Guild/Party Bound items automatically -#define BOUND_ITEMS +#define GP_BOUND_ITEMS /// Uncomment to enable real-time server stats (in and out data and ram usage). [Ai4rei] //#define SHOW_SERVER_STATS diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3f3e9679e..e19428d36 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1104,7 +1104,7 @@ ACMD(item) sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2 ))) { clif->message(fd, msg_txt(295)); // Please enter an item name or ID (usage: @itembound <item name/ID> <quantity> <bound_type>). - return -1; + return false; } else if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) @@ -1123,7 +1123,7 @@ ACMD(item) return false; } - if( bound < 0 || bound > 4 ) { + if( bound < IBT_MIN || bound > IBT_MAX ) { clif->message(fd, msg_txt(298)); // Invalid bound type return false; } @@ -1137,9 +1137,6 @@ ACMD(item) return false; } get_count = 1; - } else if( bound ) { - clif->message(fd, msg_txt(499)); // Cannot create bounded stackable items. - return false; } for (i = 0; i < number; i += get_count) { @@ -1148,7 +1145,7 @@ ACMD(item) memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; - item_tmp.bound = bound; + item_tmp.bound = (unsigned char)bound; if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); @@ -1192,9 +1189,9 @@ ACMD(item2) if (number <= 0) number = 1; - if( bound < 0 || bound > 4 ) { + if( bound < IBT_MIN || bound > IBT_MAX ) { clif->message(fd, msg_txt(298)); // Invalid bound type - return -1; + return false; } item_id = 0; @@ -1225,10 +1222,6 @@ ACMD(item2) if (refine > MAX_REFINE) refine = MAX_REFINE; } else { - if( bound ) { - clif->message(fd, msg_txt(499)); // Cannot create bounded stackable items. - return false; - } identify = 1; refine = attr = 0; } @@ -1238,11 +1231,12 @@ ACMD(item2) item_tmp.identify = identify; item_tmp.refine = refine; item_tmp.attribute = attr; + item_tmp.bound = (unsigned char)bound; item_tmp.card[0] = c1; item_tmp.card[1] = c2; item_tmp.card[2] = c3; item_tmp.card[3] = c4; - item_tmp.bound = bound; + if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } diff --git a/src/map/clif.c b/src/map/clif.c index 04614158a..fecf0be0e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1802,13 +1802,13 @@ void clif_selllist(struct map_session_data *sd) if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) ) continue; - if( sd->status.inventory[i].expire_time || (sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) ) - continue; // Cannot Sell Rental Items or Account Bounded Items + if( sd->status.inventory[i].expire_time ) + continue; // Cannot Sell Rental Items if( sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) continue; // Don't allow sale of bound items - val=sd->inventory_data[i]->value_sell; + val=sd->inventory_data[i]->value_sell; if( val < 0 ) continue; WFIFOW(fd,4+c*10)=i+2; @@ -2232,7 +2232,10 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.HireExpireDate = sd->status.inventory[n].expire_time; #endif #if PACKETVER >= 20071002 - p.bindOnEquipType = sd->status.inventory[n].bound ? 2 : 0; + /* why restrict the flag to non-stackable? because this is the only packet allows stackable to, + * show the color, and therefore it'd be inconsistent with the rest (aka it'd show yellow, you relog/refresh and boom its gone) + */ + p.bindOnEquipType = sd->status.inventory[n].bound && !itemdb->isstackable2(sd->inventory_data[n]) ? 2 : 0; #endif } p.result = (unsigned char)fail; @@ -2381,7 +2384,6 @@ void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, stru #if PACKETVER >= 20080102 p->HireExpireDate = i->expire_time; - p->bindOnEquipType = i->bound ? 2 : 0; #endif #if PACKETVER >= 20120925 @@ -15067,8 +15069,8 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || - !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { // Quest Item or something else + !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else + (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { clif->auction_setitem(sd->fd, idx, true); return; } @@ -15145,13 +15147,11 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) return; } - // Auction checks... - if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { - clif->message(sd->fd, msg_txt(293)); - clif->auction_message(fd, 2); // The auction has been canceled - return; + if( sd->status.zeny < (auction.hours * battle_config.auction_feeperhour) ) { + clif_Auction_message(fd, 5); // You do not have enough zeny to pay the Auction Fee. + return; } - + if( auction.buynow > battle_config.auction_maximumprice ) { // Zeny Limits auction.buynow = battle_config.auction_maximumprice; @@ -15177,6 +15177,13 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) return; } + // Auction checks... + if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(293)); + clif->auction_message(fd, 2); // The auction has been canceled + return; + } + safestrncpy(auction.item_name, item->jname, sizeof(auction.item_name)); auction.type = item->type; memcpy(&auction.item, &sd->status.inventory[sd->auction.index], sizeof(struct item)); diff --git a/src/map/clif.h b/src/map/clif.h index 710cb6590..cc222d8aa 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -450,6 +450,14 @@ enum e_UNEQUIP_ITEM_ACK { #endif }; +enum e_trade_item_ok { + TIO_SUCCESS = 0x0, + TIO_OVERWEIGHT = 0x1, + TIO_CANCEL = 0x2, + /* feedback-friendly code that causes the client not to display a error message */ + TIO_INDROCKS = 0x9, +}; + /** * Structures **/ diff --git a/src/map/guild.c b/src/map/guild.c index 719d6bf69..cba568bd8 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -866,7 +866,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c if(online_member_sd == NULL) return 0; // noone online to inform -#ifdef BOUND_ITEMS +#ifdef GP_BOUND_ITEMS //Guild bound item check guild->retrieveitembound(char_id,account_id,guild_id); #endif @@ -904,25 +904,12 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c return 0; } -#ifdef BOUND_ITEMS -void guild_retrieveitembound(int char_id,int aid,int guild_id) -{ +void guild_retrieveitembound(int char_id,int aid,int guild_id) { +#ifdef GP_BOUND_ITEMS TBL_PC *sd = map->id2sd(aid); if(sd){ //Character is online - int idxlist[MAX_INVENTORY]; - int j,i; - j = pc->bound_chk(sd,2,idxlist); - if(j) { - struct guild_storage *gstor = gstorage->id2storage(guild_id); - for(i=0;i<j;i++) { //Loop the matching items, guild_storage_additem takes care of opening storage - if(gstor) - gstorage->additem(sd,gstor,&sd->status.inventory[idxlist[i]],sd->status.inventory[idxlist[i]].amount); - pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,4,LOG_TYPE_GSTORAGE); - } - gstorage->close(sd); //Close and save the storage - } - } - else { //Character is offline, ask char server to do the job + pc->bound_clear(sd,IBT_GUILD); + } else { //Character is offline, ask char server to do the job struct guild_storage *gstor = gstorage->id2storage2(guild_id); if(gstor && gstor->storage_status == 1) { //Someone is in guild storage, close them struct s_mapiterator* iter = mapit_getallusers(); @@ -936,8 +923,8 @@ void guild_retrieveitembound(int char_id,int aid,int guild_id) } intif->itembound_req(char_id,aid,guild_id); } -} #endif +} int guild_send_memberinfoshort(struct map_session_data *sd,int online) { // cleaned up [LuzZza] @@ -1854,11 +1841,6 @@ int guild_break(struct map_session_data *sd,char *name) { struct unit_data *ud; int i; -#ifdef BOUND_ITEMS - int j; - int idxlist[MAX_INVENTORY]; -#endif - nullpo_ret(sd); if( (g=sd->guild)==NULL ) @@ -1901,11 +1883,8 @@ int guild_break(struct map_session_data *sd,char *name) { } } -#ifdef BOUND_ITEMS - //Guild bound item check - Removes the bound flag - j = pc->bound_chk(sd,2,idxlist); - for(i=0;i<j;i++) - sd->status.inventory[idxlist[i]].bound = 0; +#ifdef GP_BOUND_ITEMS + pc->bound_clear(sd,IBT_GUILD); #endif intif->guild_break(g->guild_id); @@ -2380,4 +2359,6 @@ void guild_defaults(void) { guild->check_member = guild_check_member; guild->get_alliance_count = guild_get_alliance_count; guild->castle_reconnect_sub = guild_castle_reconnect_sub; + /* */ + guild->retrieveitembound = guild_retrieveitembound; } diff --git a/src/map/guild.h b/src/map/guild.h index 9326d8d5a..1a04a98ef 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -148,9 +148,7 @@ struct guild_interface { /* guild aura */ void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); /* item bound [Mhalicot]*/ -#ifdef BOUND_ITEMS void (*retrieveitembound) (int char_id,int aid,int guild_id); -#endif /* */ int (*payexp_timer) (int tid, int64 tick, int id, intptr_t data); TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id); diff --git a/src/map/intif.c b/src/map/intif.c index b8b16a356..5cf385fe4 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -994,7 +994,6 @@ void intif_parse_LoadGuildStorage(int fd) ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4)); return; } - } gstor=gstorage->id2storage(guild_id); if(!gstor) { @@ -1002,12 +1001,12 @@ void intif_parse_LoadGuildStorage(int fd) 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", flag?sd->status.account_id:1, flag?sd->status.char_id:1); - return; + ShowWarning("intif_parse_LoadGuildStorage: storage received for a client already open (User %d:%d)\n", flag?sd->status.account_id:0, flag?sd->status.char_id:0); + 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", flag?sd->status.account_id:1, flag?sd->status.char_id:1); - return; + ShowWarning("intif_parse_LoadGuildStorage: received storage for an already modified non-saved storage! (User %d:%d)\n", flag?sd->status.account_id:0, flag?sd->status.char_id:0); + return; } if( RFIFOW(fd,2)-13 != sizeof(struct guild_storage) ){ ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-13 , sizeof(struct guild_storage)); @@ -1017,7 +1016,7 @@ void intif_parse_LoadGuildStorage(int fd) memcpy(gstor,RFIFOP(fd,13),sizeof(struct guild_storage)); if( flag ) - gstorage->open(sd); + gstorage->open(sd); } // ACK guild_storage saved @@ -2013,8 +2012,8 @@ void intif_parse_MessageToFD(int fd) { /*========================================== * Item Bound System [Xantara][Mhalicot] *------------------------------------------*/ -#ifdef BOUND_ITEMS void intif_itembound_req(int char_id,int aid,int guild_id) { +#ifdef GP_BOUND_ITEMS struct guild_storage *gstor = gstorage->id2storage2(guild_id); WFIFOHEAD(inter_fd,12); WFIFOW(inter_fd,0) = 0x3056; @@ -2024,17 +2023,20 @@ void intif_itembound_req(int char_id,int aid,int guild_id) { WFIFOSET(inter_fd,12); if(gstor) gstor->lock = 1; //Lock for retrieval process +#endif } //3856 void intif_parse_Itembound_ack(int fd) { +#ifdef GP_BOUND_ITEMS struct guild_storage *gstor; int guild_id = RFIFOW(fd,6); gstor = gstorage->id2storage2(guild_id); - if(gstor) gstor->lock = 0; //Unlock now that operation is completed -} + if(gstor) + gstor->lock = 0; //Unlock now that operation is completed #endif +} //----------------------------------------------------------------- // Communication from the inter server // Return a 0 (false) if there were any errors. @@ -2118,9 +2120,9 @@ int intif_parse(int fd) case 0x3854: intif->pAuctionMessage(fd); break; case 0x3855: intif->pAuctionBid(fd); break; //Bound items -#ifdef BOUND_ITEMS +#ifdef GP_BOUND_ITEMS case 0x3856: intif->pItembound_ack(fd); break; -#endif +#endif // Mercenary System case 0x3870: intif->pMercenaryReceived(fd); break; case 0x3871: intif->pMercenaryDeleted(fd); break; @@ -2160,7 +2162,7 @@ void intif_defaults(void) { 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, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] - -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] + -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] @@ -2248,6 +2250,8 @@ void intif_defaults(void) { /* */ intif->CheckForCharServer = CheckForCharServer; /* */ + intif->itembound_req = intif_itembound_req; + /* parse functions */ intif->pWisMessage = intif_parse_WisMessage; intif->pWisEnd = intif_parse_WisEnd; intif->pWisToGM_sub = mapif_parse_WisToGM_sub; diff --git a/src/map/intif.h b/src/map/intif.h index 577d58923..5e996b6fe 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -75,9 +75,7 @@ struct intif_interface { int (*guild_emblem) (int guild_id, int len, const char *data); int (*guild_castle_dataload) (int num, int *castle_ids); int (*guild_castle_datasave) (int castle_id, int index, int value); -#ifdef BOUND_ITEMS void (*itembound_req) (int char_id, int aid, int guild_id); -#endif int (*request_petdata) (int account_id, int char_id, int pet_id); int (*save_petdata) (int account_id, struct s_pet *p); int (*delete_petdata) (int pet_id); diff --git a/src/map/mail.c b/src/map/mail.c index 6b1537d87..76c94879b 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -82,9 +82,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { if( amount < 0 || amount > sd->status.inventory[idx].amount ) return 1; if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || - !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) - return 1; + !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) || + (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) + return 1; sd->mail.index = idx; sd->mail.nameid = sd->status.inventory[idx].nameid; diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e6f68ea4f..813aebee0 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -212,7 +212,6 @@ struct NORMALITEM_INFO { #endif #if PACKETVER >= 20080102 int HireExpireDate; - unsigned short bindOnEquipType; #endif #if PACKETVER >= 20120925 struct { diff --git a/src/map/party.c b/src/map/party.c index 16b9d99f9..0a7467162 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -547,14 +547,10 @@ int party_member_withdraw(int party_id, int account_id, int char_id) } if( sd && sd->status.party_id == party_id && sd->status.char_id == char_id ) { -#ifdef BOUND_ITEMS - int idxlist[MAX_INVENTORY]; //or malloc to reduce consumtion - int j,i; - j = pc->bound_chk(sd,3,idxlist); - for(i=0;i<j;i++) - pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER); +#ifdef GP_BOUND_ITEMS + pc->bound_clear(sd,IBT_PARTY); #endif - sd->status.party_id = 0; + sd->status.party_id = 0; clif->charnameupdate(sd); //Update name display [Skotlex] //TODO: hp bars should be cleared too if( p->instances ) diff --git a/src/map/pc.c b/src/map/pc.c index 31a38372a..752151888 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -573,7 +573,7 @@ bool pc_can_give_items(struct map_session_data *sd) */ bool pc_can_give_bounded_items(struct map_session_data *sd) { - return pc->has_permission(sd, PC_PERM_TRADE_BOUNDED); + return pc->has_permission(sd, PC_PERM_TRADE_BOUND); } /*========================================== @@ -999,10 +999,6 @@ int pc_isequip(struct map_session_data *sd,int n) *------------------------------------------*/ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { int i; -#ifdef BOUND_ITEMS - int j; - int idxlist[MAX_INVENTORY]; -#endif int64 tick = timer->gettick(); uint32 ip = session[sd->fd]->client_addr; @@ -1203,12 +1199,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim **/ pc->itemcd_do(sd,true); -#ifdef BOUND_ITEMS - // Party bound item check - if(sd->status.party_id == 0 && (j = pc->bound_chk(sd,3,idxlist))) { // Party was deleted while character offline - for(i=0;i<j;i++) - pc->delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER); - } +#ifdef GP_BOUND_ITEMS + if( sd->status.party_id == 0 ) + pc->bound_clear(sd,IBT_PARTY); #endif /* [Ind/Hercules] */ @@ -3962,6 +3955,28 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l if(sd->weight + w > sd->max_weight) return 2; + if( item_data->bound ) { + switch( (enum e_item_bound_type)item_data->bound ) { + case IBT_CHARACTER: + case IBT_ACCOUNT: + break; /* no restrictions */ + case IBT_PARTY: + if( !sd->status.party_id ) { + ShowError("pc_additem: can't add party_bound item to character without party!\n"); + ShowError("pc_additem: %s - x%d %s (%d)\n",sd->status.name,amount,data->jname,data->nameid); + return 7;/* need proper code? */ + } + break; + case IBT_GUILD: + if( !sd->status.guild_id ) { + ShowError("pc_additem: can't add guild_bound item to character without guild!\n"); + ShowError("pc_additem: %s - x%d %s (%d)\n",sd->status.name,amount,data->jname,data->nameid); + return 7;/* need proper code? */ + } + break; + } + } + i = MAX_INVENTORY; if( itemdb->isstackable2(data) && item_data->expire_time == 0 ) @@ -3969,7 +3984,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l for( i = 0; i < MAX_INVENTORY; i++ ) { if( sd->status.inventory[i].nameid == item_data->nameid && sd->status.inventory[i].bound == item_data->bound && memcmp(&sd->status.inventory[i].card, &item_data->card, sizeof(item_data->card)) == 0 ) - { + { if( amount > MAX_AMOUNT - sd->status.inventory[i].amount || ( data->stack.inventory && amount > data->stack.amount - sd->status.inventory[i].amount ) ) return 5; sd->status.inventory[i].amount += amount; @@ -4520,7 +4535,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; } - if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > 1 && !pc->can_give_bounded_items(sd))) + if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bounded_items(sd))) { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1;/* TODO: there is no official response to this? */ @@ -4667,24 +4682,38 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount) return flag; } - /*========================================== - * Bound Item Check - * Type: - * 1 Account Bound - * 2 Guild Bound - * 3 Party Bound - * 4 Character Bound - *------------------------------------------*/ -int pc_bound_chk(TBL_PC *sd,int type,int *idxlist) -{ - int i=0, j=0; - for(i=0;i<MAX_INVENTORY;i++){ - if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0 && sd->status.inventory[i].bound == type) { - idxlist[j] = i; - j++; - } +void pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { + int i; + + switch( type ) { + /* both restricted to inventory */ + case IBT_PARTY: + case IBT_CHARACTER: + for( i = 0; i < MAX_INVENTORY; i++ ){ + if( sd->status.inventory[i].bound == type ) { + pc->delitem(sd,i,sd->status.inventory[i].amount,0,1,LOG_TYPE_OTHER); + } + } + break; + case IBT_ACCOUNT: + ShowError("Helllo! You reached pc_bound_clear for IBT_ACCOUNT, unfortunately no scenario was expected for this!\n"); + break; + case IBT_GUILD: { + struct guild_storage *gstor = gstorage->id2storage(sd->status.guild_id); + + for( i = 0; i < MAX_INVENTORY; i++ ){ + if(sd->status.inventory[i].bound == type) { + if( gstor ) + gstorage->additem(sd,gstor,&sd->status.inventory[i],sd->status.inventory[i].amount); + pc->delitem(sd,i,sd->status.inventory[i].amount,0,1,gstor?LOG_TYPE_GSTORAGE:LOG_TYPE_OTHER); + } + } + if( gstor ) + gstorage->close(sd); + } + break; } - return j; + } /*========================================== * Display item stolen msg to player sd @@ -10366,7 +10395,6 @@ void pc_defaults(void) { pc->class2idx = pc_class2idx; pc->get_group_level = pc_get_group_level; pc->can_give_items = pc_can_give_items; - pc->bound_chk = pc_bound_chk; pc->can_give_bounded_items = pc_can_give_bounded_items; pc->can_use_command = pc_can_use_command; @@ -10600,4 +10628,6 @@ void pc_defaults(void) { pc->rental_expire = pc_rental_expire; pc->scdata_received = pc_scdata_received; + + pc->bound_clear = pc_bound_clear; } diff --git a/src/map/pc.h b/src/map/pc.h index 3645fc599..93463d19b 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -791,9 +791,6 @@ struct pc_interface { int (*getzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd); int (*delitem) (struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type); - //Bound items - int (*bound_chk) (TBL_PC *sd,int type,int *idxlist); - // Special Shop System int (*paycash) (struct map_session_data *sd, int price, int points); int (*getcash) (struct map_session_data *sd, int cash, int points); @@ -986,6 +983,8 @@ struct pc_interface { void (*rental_expire) (struct map_session_data *sd, int i); void (*scdata_received) (struct map_session_data *sd); + + void (*bound_clear) (struct map_session_data *sd, enum e_item_bound_type type); }; struct pc_interface *pc; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index c44e2634a..f95878e97 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -417,7 +417,7 @@ void do_init_pc_groups(void) { { "disable_pvp", PC_PERM_DISABLE_PVP }, { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD }, { "hchsys_admin", PC_PERM_HCHSYS_ADMIN }, - { "can_trade_bounded", PC_PERM_TRADE_BOUNDED }, + { "can_trade_bound", PC_PERM_TRADE_BOUND }, }; unsigned char i, len = ARRAYLENGTH(pc_g_defaults); diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index df99b19df..943fb7fa5 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -30,7 +30,7 @@ enum e_pc_permission { PC_PERM_DISABLE_PVP = 0x080000, // #20 PC_PERM_DISABLE_CMD_DEAD = 0x100000, PC_PERM_HCHSYS_ADMIN = 0x200000, - PC_PERM_TRADE_BOUNDED = 0x400000, + PC_PERM_TRADE_BOUND = 0x400000, }; // Cached config settings for quick lookup diff --git a/src/map/script.c b/src/map/script.c index 6dce018ef..cf3c3fb50 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3779,6 +3779,17 @@ int script_reload(void) { return 0; } +/* returns name of current function being run, from within the stack [Ind/Hercules] */ +const char *script_getfuncname(struct script_state *st) { + struct script_data *data; + + data = &st->stack->stack_data[st->start]; + + if( data->type == C_NAME && script->str_data[data->u.num].type == C_FUNC ) + return script->get_str(data->u.num); + + return NULL; +} //----------------------------------------------------------------------------- // buildin functions @@ -5763,10 +5774,13 @@ BUILDIN(checkweight2) /*========================================== * getitem <item id>,<amount>{,<account ID>}; * getitem "<item name>",<amount>{,<account ID>}; + * + * getitembound <item id>,<amount>,<type>{,<account ID>}; + * getitembound "<item id>",<amount>,<type>{,<account ID>}; *------------------------------------------*/ BUILDIN(getitem) { - int nameid,amount,get_count,i,flag = 0; + int nameid,amount,get_count,i,flag = 0, offset = 0; struct item it; TBL_PC *sd; struct script_data *data; @@ -5778,7 +5792,7 @@ BUILDIN(getitem) {// "<item name>" const char *name=script->conv_str(st,data); if( (item_data = itemdb->search_name(name)) == NULL ){ - ShowError("buildin_getitem: Nonexistant item %s requested.\n", name); + ShowError("buildin_%s: Nonexistant item %s requested.\n", script->getfuncname(st), name); return false; //No item created. } nameid=item_data->nameid; @@ -5790,11 +5804,11 @@ BUILDIN(getitem) flag = 1; } if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ){ - ShowError("buildin_getitem: Nonexistant item %d requested.\n", nameid); + ShowError("buildin_%s: Nonexistant item %d requested.\n", script->getfuncname(st), nameid); return false; //No item created. } } else { - ShowError("buildin_getitem: invalid data type for argument #1 (%d).", data->type); + ShowError("buildin_%s: invalid data type for argument #1 (%d).", script->getfuncname(st), data->type); return false; } @@ -5804,13 +5818,28 @@ BUILDIN(getitem) memset(&it,0,sizeof(it)); it.nameid=nameid; + if(!flag) it.identify=1; else it.identify=itemdb->isidentified2(item_data); - if( script_hasdata(st,4) ) - sd=map->id2sd(script_getnum(st,4)); // <Account ID> + if( !strcmp(script->getfuncname(st),"getitembound") ) { + int bound = script_getnum(st,4); + if( bound < IBT_MIN || bound > IBT_MAX ) { //Not a correct bound type + ShowError("script_getitembound: Not a correct bound type! Type=%d\n",bound); + return false; + } + if( item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR ) { + ShowError("script_getitembound: can't bind a pet egg/armor!\n",bound); + return false; + } + it.bound = (unsigned char)bound; + offset += 1; + } + + if( script_hasdata(st,4+offset) ) + sd=map->id2sd(script_getnum(st,4+offset)); // <Account ID> else sd=script->rid2sd(st); // Attached player @@ -5842,15 +5871,24 @@ BUILDIN(getitem) *------------------------------------------*/ BUILDIN(getitem2) { - int nameid,amount,get_count,i,flag = 0; - int iden,ref,attr,c1,c2,c3,c4; + int nameid,amount,get_count,i,flag = 0, offset = 0; + int iden,ref,attr,c1,c2,c3,c4, bound = 0; struct item_data *item_data; struct item item_tmp; TBL_PC *sd; struct script_data *data; - if( script_hasdata(st,11) ) - sd=map->id2sd(script_getnum(st,11)); // <Account ID> + if( !strcmp(script->getfuncname(st),"getitembound2") ) { + bound = script_getnum(st,11); + if( bound < IBT_MIN || bound > IBT_MAX ) { //Not a correct bound type + ShowError("script_getitembound2: Not a correct bound type! Type=%d\n",bound); + return false; + } + offset += 1; + } + + if( script_hasdata(st,11+offset) ) + sd=map->id2sd(script_getnum(st,11+offset)); // <Account ID> else sd=script->rid2sd(st); // Attached player @@ -5878,6 +5916,11 @@ BUILDIN(getitem2) c3=(short)script_getnum(st,9); c4=(short)script_getnum(st,10); + if( bound && (itemdb_type(nameid) == IT_PETEGG || itemdb_type(nameid) == IT_PETARMOR) ) { + ShowError("script_getitembound2: can't bind a pet egg/armor!\n",bound); + return false; + } + if(nameid<0) { // Invalide nameid nameid = -nameid; flag = 1; @@ -5907,6 +5950,7 @@ BUILDIN(getitem2) item_tmp.identify=0; item_tmp.refine=ref; item_tmp.attribute=attr; + item_tmp.bound=(unsigned char)bound; item_tmp.card[0]=(short)c1; item_tmp.card[1]=(short)c2; item_tmp.card[2]=(short)c3; @@ -17562,185 +17606,6 @@ BUILDIN(bg_join_team) { return true; } - -/*==============[Mhalicot]================== - * getitembound <item id>,<amount>,<type>{,<account ID>}; - * getitembound "<item id>",<amount>,<type>{,<account ID>}; - * Type: - * 1 - Account Bound - * 2 - Guild Bound - * 3 - Party Bound - * 4 - Character Bound - *------------------------------------------*/ -BUILDIN(getitembound) -{ - int nameid, amount, i, flag; - struct item it; - struct script_data *data; - char bound = script_getnum(st,4); - TBL_PC *sd; - - data = script_getdata(st,2); - get_val(st,data); - if( data_isstring(data) ) { // "<item name>" - const char *name = script->conv_str(st,data); - struct item_data *item_data = itemdb->search_name(name); - if( item_data == NULL ) { - ShowError("buildin_getitembound: Nonexistant item %s requested.\n", name); - return 1; //No item created. - } - nameid = item_data->nameid; - } else if( data_isint(data) ) { // <item id> - nameid = script->conv_num(st,data); - if( nameid <= 0 || !itemdb->exists(nameid) ) { - ShowError("buildin_getitembound: Nonexistant item %d requested.\n", nameid); - return 1; //No item created. - } - } else { - ShowError("buildin_getitembound: invalid data type for argument #1 (%d).", data->type); - return 1; - } - - if( itemdb->isstackable(nameid) || itemdb_type(nameid) == IT_PETEGG ) { - ShowError("buildin_getitembound: invalid item type. Bound only work for non stackeable items (Item %d).", nameid); - return 1; - } - - if( (amount = script_getnum(st,3)) <= 0) - return 0; //return if amount <=0, skip the useless iteration - - memset(&it,0,sizeof(it)); - it.nameid = nameid; - it.identify = 1; - it.bound = bound; - - if( bound < 1 || bound > 4) { //Not a correct bound type - ShowError("script_getitembound: Not a correct bound type! Type=%d\n",bound); - return 1; - } - - if( script_hasdata(st,5) ) - sd=map->id2sd(script_getnum(st,5)); // Account ID - else - sd=script->rid2sd(st); // Attached player - - if( sd == NULL ) // no target - return 0; - - for( i = 0; i < amount; i++ ) { - if( (flag = pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) ) { - clif->additem(sd, 0, 0, flag); - if( pc->candrop(sd,&it) ) - map->addflooritem(&it,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); - } - } - - return 0; -} - -/*==============[Mhalicot]================== - * getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; - * getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>; - *------------------------------------------*/ -BUILDIN(getitembound2) -{ - int nameid,amount,get_count,i,flag = 0; - int iden,ref,attr,c1,c2,c3,c4; - char bound=0; - struct item_data *item_data; - struct item item_tmp; - TBL_PC *sd; - struct script_data *data; - - bound = script_getnum(st,11); - if( bound < 1 || bound > 4) { //Not a correct bound type - ShowError("script_getitembound2: Not a correct bound type! Type=%d\n",bound); - return 1; - } - if( script_hasdata(st,12) ) - sd=map->id2sd(script_getnum(st,12)); - else - sd=script->rid2sd(st); // Attached player - - if( sd == NULL ) // no target - return true; - - data=script_getdata(st,2); - script->get_val(st,data); - if( data_isstring(data) ){ - const char *name=script->conv_str(st,data); - struct item_data *item_data = itemdb->search_name(name); - if( item_data ) - nameid=item_data->nameid; - else - nameid=UNKNOWN_ITEM_ID; - }else - nameid=script->conv_num(st,data); - - amount=script_getnum(st,3); - iden=script_getnum(st,4); - ref=script_getnum(st,5); - attr=script_getnum(st,6); - c1=(short)script_getnum(st,7); - c2=(short)script_getnum(st,8); - c3=(short)script_getnum(st,9); - c4=(short)script_getnum(st,10); - - if(nameid<0) { // Invalide nameid - nameid = -nameid; - flag = 1; - } - - if(nameid > 0) { - memset(&item_tmp,0,sizeof(item_tmp)); - item_data=itemdb->exists(nameid); - if (item_data == NULL) - return -1; - if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){ - if(ref > MAX_REFINE) ref = MAX_REFINE; - } - else if(item_data->type==IT_PETEGG) { - iden = 1; - ref = 0; - } - else { - iden = 1; - ref = attr = 0; - } - - item_tmp.nameid=nameid; - if(!flag) - item_tmp.identify=iden; - else if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR) - item_tmp.identify=0; - item_tmp.refine=ref; - item_tmp.attribute=attr; - item_tmp.card[0]=(short)c1; - item_tmp.card[1]=(short)c2; - item_tmp.card[2]=(short)c3; - item_tmp.card[3]=(short)c4; - item_tmp.bound=bound; - - //Check if it's stackable. - if (!itemdb->isstackable(nameid)) - get_count = 1; - else - get_count = amount; - - for (i = 0; i < amount; i += get_count) { - // if not pet egg - if (!pet->create_egg(sd, nameid)) { - if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { - clif->additem(sd, 0, 0, flag); - if( pc->candrop(sd,&item_tmp) ) - map->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); - } - } - } - } - - return true; -} /*==============[Mhalicot]================== * countbound {<type>}; * Creates an array of bounded item IDs @@ -17749,6 +17614,7 @@ BUILDIN(getitembound2) * 1 - Account Bound * 2 - Guild Bound * 3 - Party Bound + * 4 - Character Bound *------------------------------------------*/ BUILDIN(countbound) { @@ -18355,11 +18221,12 @@ void script_parse_builtin(void) { BUILDIN_DEF(bindatcmd, "ss???"), BUILDIN_DEF(unbindatcmd, "s"), BUILDIN_DEF(useatcmd, "s"), + /** - * Item bound [Mhalicot\Hercules] + * Item bound [Xantara] [Akinari] [Mhalicot/Hercules] **/ - BUILDIN_DEF(getitembound,"vii?"), - BUILDIN_DEF(getitembound2,"viiiiiiiii?"), + BUILDIN_DEF2(getitem,"getitembound","vii?"), + BUILDIN_DEF2(getitem2,"getitembound2","viiiiiiiii?"), BUILDIN_DEF(countbound, "?"), //Quest Log System [Inkfish] @@ -18652,6 +18519,7 @@ void script_defaults(void) { script->buildin_mobuseskill_sub = buildin_mobuseskill_sub; script->cleanfloor_sub = script_cleanfloor_sub; script->run_func = run_func; + script->getfuncname = script_getfuncname; /* script_config base */ script->config.warn_func_mismatch_argtypes = 1; diff --git a/src/map/script.h b/src/map/script.h index 6aebc8a30..a846365dd 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -630,6 +630,7 @@ struct script_interface { int (*buildin_mobuseskill_sub) (struct block_list *bl, va_list ap); int (*cleanfloor_sub) (struct block_list *bl, va_list ap); int (*run_func) (struct script_state *st); + const char *(*getfuncname) (struct script_state *st); }; struct script_interface *script; diff --git a/src/map/storage.c b/src/map/storage.c index cffbf23ec..0a2e6d118 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -141,7 +141,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } - if( (item_data->bound > 1) && !pc->can_give_bounded_items(sd) ) { + if( item_data->bound > IBT_ACCOUNT && !pc->can_give_bounded_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } @@ -435,13 +435,13 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time || (item_data->bound && !pc->can_give_bounded_items(sd)) ) + if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time ) { //Check if item is storable. [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1; } - if( (item_data->bound == 1 || item_data->bound > 2) && !pc->can_give_bounded_items(sd) ) { + if( item_data->bound && item_data->bound != IBT_GUILD && !pc->can_give_bounded_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } @@ -531,6 +531,8 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) if(gstorage->additem(sd,stor,&sd->status.inventory[index],amount)==0) pc->delitem(sd,index,amount,0,4,LOG_TYPE_GSTORAGE); + else + clif->dropitem(sd, index,0); return 1; } diff --git a/src/map/trade.c b/src/map/trade.c index 7085fdda3..327d19880 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -335,7 +335,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) if( amount == 0 ) { //Why do this.. ~.~ just send an ack, the item won't display on the trade window. - clif->tradeitemok(sd, index, 0); + clif->tradeitemok(sd, index, TIO_SUCCESS); return; } @@ -354,35 +354,38 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) (pc->get_partner(sd) != target_sd || !itemdb_canpartnertrade(item, src_lv, dst_lv)) ) //Can't partner-trade { clif->message (sd->fd, msg_txt(260)); - clif->tradeitemok(sd, index+2, 1); + clif->tradeitemok(sd, index+2, TIO_INDROCKS); return; } if( item->expire_time ) { // Rental System clif->message (sd->fd, msg_txt(260)); - clif->tradeitemok(sd, index+2, 1); + clif->tradeitemok(sd, index+2, TIO_INDROCKS); return; } - if( ((item->bound == 1 || item->bound > 2) || (item->bound == 2 && sd->status.guild_id != target_sd->status.guild_id)) && !pc->can_give_bounded_items(sd) ) { // Item Bound + if( item->bound && + !( item->bound == IBT_GUILD && sd->status.guild_id == target_sd->status.guild_id ) && + !( item->bound == IBT_PARTY && sd->status.party_id == target_sd->status.party_id ) + && !pc->can_give_bounded_items(sd) ) { clif->message(sd->fd, msg_txt(293)); - clif->tradeitemok(sd, index+2, 1); + clif->tradeitemok(sd, index+2, TIO_INDROCKS); return; } - + //Locate a trade position ARR_FIND( 0, 10, trade_i, sd->deal.item[trade_i].index == index || sd->deal.item[trade_i].amount == 0 ); if( trade_i == 10 ) //No space left { - clif->tradeitemok(sd, index+2, 1); + clif->tradeitemok(sd, index+2, TIO_OVERWEIGHT); return; } trade_weight = sd->inventory_data[index]->weight * amount; if( target_sd->weight + sd->deal.weight + trade_weight > target_sd->max_weight ) { //fail to add item -- the player was over weighted. - clif->tradeitemok(sd, index+2, 1); + clif->tradeitemok(sd, index+2, TIO_OVERWEIGHT); return; } @@ -402,7 +405,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) } sd->deal.weight += trade_weight; - clif->tradeitemok(sd, index+2, 0); // Return the index as it was received + clif->tradeitemok(sd, index+2, TIO_SUCCESS); // Return the index as it was received clif->tradeadditem(sd, target_sd, index+2, amount); } @@ -446,7 +449,7 @@ void trade_tradeok(struct map_session_data *sd) { return; } sd->state.deal_locked = 1; - clif->tradeitemok(sd, 0, 0); + clif->tradeitemok(sd, 0, TIO_SUCCESS); clif->tradedeal_lock(sd, 0); clif->tradedeal_lock(target_sd, 1); } diff --git a/src/map/vending.c b/src/map/vending.c index 14a5e64d1..d5e5d1804 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -257,7 +257,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || !sd->status.cart[index].identify // unidentified item || sd->status.cart[index].attribute == 1 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case - || (sd->status.cart[index].bound && !pc->can_give_bounded_items(sd)) // can't trade account bound items and has no permission + || (sd->status.cart[index].bound && !pc->can_give_bounded_items(sd)) // can't trade bound items w/o permission || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item continue; -- cgit v1.2.3-70-g09d2 From 8083daec0d94f78510411c9b225abcfa7e829e95 Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Thu, 7 Nov 2013 17:05:56 -0200 Subject: Further item bind adjustments Thanks to Haruna! Signed-off-by: shennetsind <ind@henn.et> --- sql-files/upgrades/2013-10-31--07-49.sql | 2 +- src/map/atcommand.c | 4 ++-- src/map/buyingstore.c | 2 +- src/map/clif.c | 6 +++--- src/map/intif.c | 6 +++++- src/map/mail.c | 2 +- src/map/pc.c | 8 ++++---- src/map/pc.h | 2 +- src/map/storage.c | 4 ++-- src/map/trade.c | 2 +- src/map/vending.c | 2 +- 11 files changed, 22 insertions(+), 18 deletions(-) (limited to 'src/map/storage.c') diff --git a/sql-files/upgrades/2013-10-31--07-49.sql b/sql-files/upgrades/2013-10-31--07-49.sql index e18c7e20d..f0c51b0d9 100644 --- a/sql-files/upgrades/2013-10-31--07-49.sql +++ b/sql-files/upgrades/2013-10-31--07-49.sql @@ -2,5 +2,5 @@ ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite`; ALTER TABLE `cart_inventory` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; ALTER TABLE `storage` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); \ No newline at end of file diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e19428d36..316e5a39b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1123,7 +1123,7 @@ ACMD(item) return false; } - if( bound < IBT_MIN || bound > IBT_MAX ) { + if(!strcmpi(command+1,"itembound") && !(bound >= IBT_MIN && bound <= IBT_MAX) ) { clif->message(fd, msg_txt(298)); // Invalid bound type return false; } @@ -1189,7 +1189,7 @@ ACMD(item2) if (number <= 0) number = 1; - if( bound < IBT_MIN || bound > IBT_MAX ) { + if( !strcmpi(command+1,"itembound2") && !(bound >= IBT_MIN && bound <= IBT_MAX) ) { clif->message(fd, msg_txt(298)); // Invalid bound type return false; } diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 44ece49c6..a9f1412ed 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -290,7 +290,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bounded_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) + if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; diff --git a/src/map/clif.c b/src/map/clif.c index fecf0be0e..70b81ffab 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1805,7 +1805,7 @@ void clif_selllist(struct map_session_data *sd) if( sd->status.inventory[i].expire_time ) continue; // Cannot Sell Rental Items - if( sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) + if( sd->status.inventory[i].bound && !pc->can_give_bound_items(sd)) continue; // Don't allow sale of bound items val=sd->inventory_data[i]->value_sell; @@ -15070,7 +15070,7 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else - (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { + (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) { clif->auction_setitem(sd->fd, idx, true); return; } @@ -15178,7 +15178,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) } // Auction checks... - if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { + if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(293)); clif->auction_message(fd, 2); // The auction has been canceled return; diff --git a/src/map/intif.c b/src/map/intif.c index 5cf385fe4..e6ff91af7 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2120,9 +2120,13 @@ int intif_parse(int fd) case 0x3854: intif->pAuctionMessage(fd); break; case 0x3855: intif->pAuctionBid(fd); break; //Bound items + case 0x3856: #ifdef GP_BOUND_ITEMS - case 0x3856: intif->pItembound_ack(fd); break; + intif->pItembound_ack(fd); +#else + ShowWarning("intif_parse: Received 0x3856 with GP_BOUND_ITEMS disabled !!!\n") #endif + break; // Mercenary System case 0x3870: intif->pMercenaryReceived(fd); break; case 0x3871: intif->pMercenaryDeleted(fd); break; diff --git a/src/map/mail.c b/src/map/mail.c index 76c94879b..007f7592d 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -83,7 +83,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { return 1; if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) + (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) return 1; sd->mail.index = idx; diff --git a/src/map/pc.c b/src/map/pc.c index 752151888..07fba6e57 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -571,7 +571,7 @@ bool pc_can_give_items(struct map_session_data *sd) /** * Determines if player can give / drop / trade / vend bounded items */ -bool pc_can_give_bounded_items(struct map_session_data *sd) +bool pc_can_give_bound_items(struct map_session_data *sd) { return pc->has_permission(sd, PC_PERM_TRADE_BOUND); } @@ -4535,7 +4535,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; } - if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bounded_items(sd))) + if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd))) { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1;/* TODO: there is no official response to this? */ @@ -8058,7 +8058,7 @@ int pc_setmadogear(TBL_PC* sd, int flag) *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { - if( item && (item->expire_time || (item->bound && !pc->can_give_bounded_items(sd))) ) + if( item && (item->expire_time || (item->bound && !pc->can_give_bound_items(sd))) ) return 0; if( !pc->can_give_items(sd) ) //check if this GM level can drop items return 0; @@ -10395,7 +10395,7 @@ void pc_defaults(void) { pc->class2idx = pc_class2idx; pc->get_group_level = pc_get_group_level; pc->can_give_items = pc_can_give_items; - pc->can_give_bounded_items = pc_can_give_bounded_items; + pc->can_give_bound_items = pc_can_give_bound_items; pc->can_use_command = pc_can_use_command; pc->has_permission = pc_has_permission; diff --git a/src/map/pc.h b/src/map/pc.h index 93463d19b..32ca214c0 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -750,7 +750,7 @@ struct pc_interface { int (*get_group_level) (struct map_session_data *sd); //int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called bool (*can_give_items) (struct map_session_data *sd); - bool (*can_give_bounded_items) (struct map_session_data *sd); + bool (*can_give_bound_items) (struct map_session_data *sd); bool (*can_use_command) (struct map_session_data *sd, const char *command); bool (*has_permission) (struct map_session_data *sd, unsigned int permission); diff --git a/src/map/storage.c b/src/map/storage.c index 0a2e6d118..db85b3c98 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -141,7 +141,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } - if( item_data->bound > IBT_ACCOUNT && !pc->can_give_bounded_items(sd) ) { + if( item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } @@ -441,7 +441,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( item_data->bound && item_data->bound != IBT_GUILD && !pc->can_give_bounded_items(sd) ) { + if( item_data->bound && item_data->bound != IBT_GUILD && !pc->can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } diff --git a/src/map/trade.c b/src/map/trade.c index 327d19880..ffd1336f5 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -368,7 +368,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) if( item->bound && !( item->bound == IBT_GUILD && sd->status.guild_id == target_sd->status.guild_id ) && !( item->bound == IBT_PARTY && sd->status.party_id == target_sd->status.party_id ) - && !pc->can_give_bounded_items(sd) ) { + && !pc->can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(293)); clif->tradeitemok(sd, index+2, TIO_INDROCKS); return; diff --git a/src/map/vending.c b/src/map/vending.c index d5e5d1804..f16a208e4 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -257,7 +257,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || !sd->status.cart[index].identify // unidentified item || sd->status.cart[index].attribute == 1 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case - || (sd->status.cart[index].bound && !pc->can_give_bounded_items(sd)) // can't trade bound items w/o permission + || (sd->status.cart[index].bound && !pc->can_give_bound_items(sd)) // can't trade bound items w/o permission || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item continue; -- cgit v1.2.3-70-g09d2 From ee1290403076d39d25def09753cf20c1dd157d09 Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Sat, 14 Dec 2013 19:17:31 -0200 Subject: Replaced pc->get_group_level with a macro (pc_get_group_level) Because 2 jumps to get a single value is just awful. Signed-off-by: shennetsind <ind@henn.et> --- src/map/atcommand.c | 58 +++++++++++++++++++++++++-------------------------- src/map/buyingstore.c | 4 ++-- src/map/clif.c | 22 +++++++++---------- src/map/mail.c | 2 +- src/map/pc.c | 16 +++----------- src/map/pc.h | 3 ++- src/map/script.c | 6 +++--- src/map/storage.c | 4 ++-- src/map/trade.c | 4 ++-- src/map/vending.c | 2 +- 10 files changed, 56 insertions(+), 65 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 51c447ed9..66f4a4a75 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -398,7 +398,7 @@ ACMD(mapmove) { return false; } - if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc->get_group_level(sd) < battle_config.gm_ignore_warpable_area) { + if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) { //This is to prevent the pc->setpos call from printing an error. clif->message(fd, msg_txt(2)); if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1)) @@ -437,7 +437,7 @@ ACMD(where) { pl_sd = map->nick2sd(atcmd_player_name); if (pl_sd == NULL || strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 || - (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > pc->get_group_level(sd) && !pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) + (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) ) { clif->message(fd, msg_txt(3)); // Character not found. return false; @@ -554,12 +554,12 @@ ACMD(who) { else if (stristr(info->command, "3") != NULL) display_type = 3; - level = pc->get_group_level(sd); + level = pc_get_group_level(sd); StrBuf->Init(&buf); iter = mapit_getallusers(); for (pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter)) { - if (!((pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc->get_group_level(pl_sd) > level)) { // you can look only lower or same level + if (!((pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level if (stristr(pl_sd->status.name, player_name) == NULL // search with no case sensitive || (map_id >= 0 && pl_sd->bl.m != map_id)) continue; @@ -646,12 +646,12 @@ ACMD(whogm) match_text[j] = TOLOWER(match_text[j]); count = 0; - level = pc->get_group_level(sd); + level = pc_get_group_level(sd); iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - pl_level = pc->get_group_level(pl_sd); + pl_level = pc_get_group_level(pl_sd); if (!pl_level) continue; @@ -2674,7 +2674,7 @@ ACMD(recall) { return false; } - if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) + if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif->message(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. return false; @@ -2895,7 +2895,7 @@ ACMD(doom) iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pl_sd->fd != fd && pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) + if (pl_sd->fd != fd && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); @@ -2920,7 +2920,7 @@ ACMD(doommap) iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m && pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) + if (pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); @@ -3002,7 +3002,7 @@ ACMD(kick) return false; } - if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) + if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; @@ -3024,7 +3024,7 @@ ACMD(kickall) iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kick only lower or same gm level + if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kick only lower or same gm level if (sd->status.account_id != pl_sd->status.account_id) clif->GM_kick(NULL, pl_sd); } @@ -3360,7 +3360,7 @@ ACMD(recallall) count = 0; iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (sd->status.account_id != pl_sd->status.account_id && pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { + if (sd->status.account_id != pl_sd->status.account_id && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) continue; // Don't waste time warping the character to the same place. if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) @@ -3422,7 +3422,7 @@ ACMD(guildrecall) for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.guild_id == g->guild_id) { - if (pc->get_group_level(pl_sd) > pc->get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) + if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; // Skip GMs greater than you... or chars already on the cell if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; @@ -3478,7 +3478,7 @@ ACMD(partyrecall) iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.party_id == p->party.party_id) { - if (pc->get_group_level(pl_sd) > pc->get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) + if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; // Skip GMs greater than you... or chars already on the cell if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; @@ -4106,7 +4106,7 @@ ACMD(nuke) { } if ((pl_sd = map->nick2sd(atcmd_player_name)) != NULL) { - if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kill only lower or same GM level + if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kill only lower or same GM level skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); clif->message(fd, msg_txt(109)); // Player has been nuked! } else { @@ -4390,7 +4390,7 @@ ACMD(jail) { return false; } - if (pc->get_group_level(sd) < pc->get_group_level(pl_sd)) + if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; @@ -4441,7 +4441,7 @@ ACMD(unjail) { return false; } - if (pc->get_group_level(sd) < pc->get_group_level(pl_sd)) { // you can jail only lower or same GM + if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; @@ -4519,7 +4519,7 @@ ACMD(jailfor) { return false; } - if (pc->get_group_level(pl_sd) > pc->get_group_level(sd)) { + if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) { clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; } @@ -5263,7 +5263,7 @@ ACMD(useskill) { return false; } - if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) + if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; @@ -6415,7 +6415,7 @@ ACMD(mute) { return false; } - if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) + if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. return false; @@ -7218,7 +7218,7 @@ int atcommand_mutearea_sub(struct block_list *bl,va_list ap) id = va_arg(ap, int); time = va_arg(ap, int); - if (id != bl->id && !pc->get_group_level(pl_sd)) { + if (id != bl->id && !pc_get_group_level(pl_sd)) { pl_sd->status.manner -= time; if (pl_sd->status.manner < 0) sc_start(&pl_sd->bl,SC_NOCHAT,100,0,0); @@ -7801,7 +7801,7 @@ ACMD(clone) { return true; } - if(pc->get_group_level(pl_sd) > pc->get_group_level(sd)) { + if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) { clif->message(fd, msg_txt(126)); // Cannot clone a player of higher GM level than yourself. return true; } @@ -8376,7 +8376,7 @@ ACMD(accinfo) { //remove const type safestrncpy(query, message, NAME_LENGTH); - intif->request_accinfo( sd->fd, sd->bl.id, pc->get_group_level(sd), query ); + intif->request_accinfo( sd->fd, sd->bl.id, pc_get_group_level(sd), query ); return true; } @@ -9770,7 +9770,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message // 1 = player invoked if ( type == 1) { //Commands are disabled on maps flagged as 'nocommand' - if ( map->list[sd->bl.m].nocommand && pc->get_group_level(sd) < map->list[sd->bl.m].nocommand ) { + if ( map->list[sd->bl.m].nocommand && pc_get_group_level(sd) < map->list[sd->bl.m].nocommand ) { clif->message(fd, msg_txt(143)); return false; } @@ -9805,7 +9805,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message break; } - if( !pc->get_group_level(sd) ) { + if( !pc_get_group_level(sd) ) { if( x >= 1 || y >= 1 ) { /* we have command */ info = atcommand->get_info_byname(atcommand->check_alias(command + 1)); if( !info || info->char_groups[pcg->get_idx(sd->group)] == 0 ) /* if we can't use or doesn't exist: don't even display the command failed message */ @@ -9848,8 +9848,8 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if( binding != NULL && binding->npc_event[0] && ( - (*atcmd_msg == atcommand->at_symbol && pc->get_group_level(sd) >= binding->group_lv) - || (*atcmd_msg == atcommand->char_symbol && pc->get_group_level(sd) >= binding->group_lv_char) + (*atcmd_msg == atcommand->at_symbol && pc_get_group_level(sd) >= binding->group_lv) + || (*atcmd_msg == atcommand->char_symbol && pc_get_group_level(sd) >= binding->group_lv_char) ) ) { // Check if self or character invoking; if self == character invoked, then self invoke. @@ -9876,7 +9876,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message //Grab the command information and check for the proper GM level required to use it or if the command exists info = atcommand->get_info_byname(atcommand->check_alias(command + 1)); if (info == NULL) { - if( pc->get_group_level(sd) ) { // TODO: remove or replace with proper permission + if( pc_get_group_level(sd) ) { // TODO: remove or replace with proper permission sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif->message(fd, output); atcommand->get_suggestions(sd, command + 1, *message == atcommand->at_symbol); @@ -9898,7 +9898,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message } for(i = 0; i < map->list[sd->bl.m].zone->disabled_commands_count; i++) { if( info->func == map->list[sd->bl.m].zone->disabled_commands[i]->cmd ) { - if( pc->get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv ) { + if( pc_get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv ) { clif->colormes(sd->fd,COLOR_RED,"This command is disabled in this area"); return true; } else diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index a9f1412ed..fc43df5bd 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -123,7 +123,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha break; } - if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc->get_group_level(sd), pc->get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) + if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc_get_group_level(sd), pc_get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) {// restrictions: allowed, no character-bound items and at least one must be owned break; } @@ -290,7 +290,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) + if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc_get_group_level(sd), pc_get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; diff --git a/src/map/clif.c b/src/map/clif.c index e51c59461..9e507c57f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1805,7 +1805,7 @@ void clif_selllist(struct map_session_data *sd) { if( sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] ) { - if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) ) + if( !itemdb_cansell(&sd->status.inventory[i], pc_get_group_level(sd)) ) continue; if( sd->status.inventory[i].expire_time ) @@ -5855,7 +5855,7 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len) WFIFOW(fd,0) = 0x97; WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8; safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH); - WFIFOL(fd,28) = (ssd && pc->get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char + WFIFOL(fd,28) = (ssd && pc_get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char safestrncpy((char*)WFIFOP(fd,32), mes, mes_len); WFIFOSET(fd,WFIFOW(fd,2)); #endif @@ -9749,7 +9749,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) { sc = status->get_sc(bl); if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) && bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple - pc->get_group_level(sd) < battle_config.hack_info_GM_level + pc_get_group_level(sd) < battle_config.hack_info_GM_level ) { char gm_msg[256]; sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id); @@ -10406,8 +10406,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) } // if player ignores everyone - if (dstsd->state.ignoreAll && pc->get_group_level(sd) <= pc->get_group_level(dstsd)) { - if (dstsd->sc.option & OPTION_INVISIBLE && pc->get_group_level(sd) < pc->get_group_level(dstsd)) + if (dstsd->state.ignoreAll && pc_get_group_level(sd) <= pc_get_group_level(dstsd)) { + if (dstsd->sc.option & OPTION_INVISIBLE && pc_get_group_level(sd) < pc_get_group_level(dstsd)) clif->wis_end(fd, 1); // 1: target character is not logged in else clif->wis_end(fd, 3); // 3: everyone ignored by target @@ -10422,7 +10422,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) return; } - if( pc->get_group_level(sd) <= pc->get_group_level(dstsd) ) { + if( pc_get_group_level(sd) <= pc_get_group_level(dstsd) ) { // if player ignores the source character ARR_FIND(0, MAX_IGNORE_LIST, i, dstsd->ignore[i].name[0] == '\0' || strcmp(dstsd->ignore[i].name, sd->status.name) == 0); if(i < MAX_IGNORE_LIST && dstsd->ignore[i].name[0] != '\0') { // source char present in ignore list @@ -13615,7 +13615,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) { if (type == 2) { if (!battle_config.client_accept_chatdori) return; - if (pc->get_group_level(sd) > 0 || sd->bl.id != id) + if (pc_get_group_level(sd) > 0 || sd->bl.id != id) return; value = battle_config.client_accept_chatdori; @@ -13626,7 +13626,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) { return; } - if (type == 2 || ( (pc->get_group_level(sd)) > pc->get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) { + if (type == 2 || ( (pc_get_group_level(sd)) > pc_get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) { clif->manner_message(sd, 0); clif->manner_message(dstsd, 5); @@ -14584,7 +14584,7 @@ void clif_parse_Check(int fd, struct map_session_data *sd) safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname)); - if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) { + if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { return; } @@ -15173,7 +15173,7 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || - !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else + !itemdb_canauction(&sd->status.inventory[idx],pc_get_group_level(sd)) || // Quest Item or something else (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) { clif->auction_setitem(sd->fd, idx, true); return; @@ -17956,7 +17956,7 @@ void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) { int i; /* TODO maybe this could be a new permission? using gm level in the meantime */ - if( !tsd || pc->get_group_level(tsd) >= pc->get_group_level(sd) ) + if( !tsd || pc_get_group_level(tsd) >= pc_get_group_level(sd) ) return; for( i = 0; i < EQI_MAX; i++ ) { diff --git a/src/map/mail.c b/src/map/mail.c index 007f7592d..020d92383 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -82,7 +82,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { if( amount < 0 || amount > sd->status.inventory[idx].amount ) return 1; if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || - !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) || + !itemdb_canmail(&sd->status.inventory[idx],pc_get_group_level(sd)) || (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) return 1; diff --git a/src/map/pc.c b/src/map/pc.c index 24b57c826..0c5c59e13 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -76,15 +76,6 @@ struct map_session_data* pc_get_dummy_sd(void) return dummy_sd; } -/** - * Gets player's group level. - * @see pc_group_get_level() - */ -int pc_get_group_level(struct map_session_data *sd) -{ - return pcg->get_level(sd->group); -} - /** * Sets player's group. * Caller should handle error (preferably display message and disconnect). @@ -4210,7 +4201,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( !item->script ) //if it has no script, you can't really consume it! return 0; - if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc->get_group_level(sd) < item->item_usage.override) ) { + if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) { clif->msgtable(sd->fd,0x297); //clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474)); return 0; // You cannot use this item while sitting. @@ -4539,7 +4530,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; } - if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd))) + if( !itemdb_cancartstore(item_data, pc_get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd))) { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1;/* TODO: there is no official response to this? */ @@ -8070,7 +8061,7 @@ int pc_candrop(struct map_session_data *sd, struct item *item) return 0; if( !pc->can_give_items(sd) ) //check if this GM level can drop items return 0; - return (itemdb_isdropable(item, pc->get_group_level(sd))); + return (itemdb_isdropable(item, pc_get_group_level(sd))); } /*========================================== @@ -10472,7 +10463,6 @@ void pc_defaults(void) { pc->get_dummy_sd = pc_get_dummy_sd; pc->class2idx = pc_class2idx; - pc->get_group_level = pc_get_group_level; pc->can_give_items = pc_can_give_items; pc->can_give_bound_items = pc_can_give_bound_items; diff --git a/src/map/pc.h b/src/map/pc.h index 3de1e35fe..0cad4f5c6 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -684,6 +684,8 @@ enum equip_pos { #define pc_readaccountreg2str(sd,reg) (pc->readregistry_str((sd),(reg),1)) #define pc_setaccountreg2str(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),1)) +#define pc_get_group_level(sd) ( (sd)->group->level ) + struct skill_tree_entry { short id; unsigned short idx; @@ -754,7 +756,6 @@ struct pc_interface { struct map_session_data* (*get_dummy_sd) (void); int (*class2idx) (int class_); - int (*get_group_level) (struct map_session_data *sd); //int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called bool (*can_give_items) (struct map_session_data *sd); bool (*can_give_bound_items) (struct map_session_data *sd); diff --git a/src/map/script.c b/src/map/script.c index b1c4d8d6b..bc150b6ee 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7991,7 +7991,7 @@ BUILDIN(getgmlevel) if( sd == NULL ) return true;// no player attached, report source - script_pushint(st, pc->get_group_level(sd)); + script_pushint(st, pc_get_group_level(sd)); return true; } @@ -9485,11 +9485,11 @@ BUILDIN(getusersname) sd = script->rid2sd(st); if (!sd) return true; - group_level = pc->get_group_level(sd); + group_level = pc_get_group_level(sd); iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > group_level) + if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level) continue; // skip hidden sessions /* Temporary fix for bugreport:1023. diff --git a/src/map/storage.c b/src/map/storage.c index db85b3c98..859bfcb9e 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -135,7 +135,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } - if( !itemdb_canstore(item_data, pc->get_group_level(sd)) ) + if( !itemdb_canstore(item_data, pc_get_group_level(sd)) ) { //Check if item is storable. [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1; @@ -435,7 +435,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time ) + if( !itemdb_canguildstore(item_data, pc_get_group_level(sd)) || item_data->expire_time ) { //Check if item is storable. [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1; diff --git a/src/map/trade.c b/src/map/trade.c index ffd1336f5..f772c5faf 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -348,8 +348,8 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) return; item = &sd->status.inventory[index]; - src_lv = pc->get_group_level(sd); - dst_lv = pc->get_group_level(target_sd); + src_lv = pc_get_group_level(sd); + dst_lv = pc_get_group_level(target_sd); if( !itemdb_cantrade(item, src_lv, dst_lv) && //Can't trade (pc->get_partner(sd) != target_sd || !itemdb_canpartnertrade(item, src_lv, dst_lv)) ) //Can't partner-trade { diff --git a/src/map/vending.c b/src/map/vending.c index f16a208e4..dc22499dd 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -258,7 +258,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || sd->status.cart[index].attribute == 1 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case || (sd->status.cart[index].bound && !pc->can_give_bound_items(sd)) // can't trade bound items w/o permission - || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item + || !itemdb_cantrade(&sd->status.cart[index], pc_get_group_level(sd), pc_get_group_level(sd)) ) // untradeable item continue; sd->vending[i].index = index; -- cgit v1.2.3-70-g09d2 From f6daed397dee844234cacd90d395c0b74c404598 Mon Sep 17 00:00:00 2001 From: shennetsind <ind@henn.et> Date: Sun, 15 Dec 2013 19:28:03 -0200 Subject: Replaced pc->pc_has_permission/can_give_items/can_give_bound_items with equivalent macros Because 2/3 jumps to perform such a operation is just awful Signed-off-by: shennetsind <ind@henn.et> --- src/map/atcommand.c | 68 +++++++++++++++++++++++++-------------------------- src/map/battle.c | 4 +-- src/map/buyingstore.c | 8 +++--- src/map/chat.c | 4 +-- src/map/clif.c | 24 +++++++++--------- src/map/intif.c | 2 +- src/map/mail.c | 6 ++--- src/map/party.c | 2 +- src/map/pc.c | 45 +++++++--------------------------- src/map/pc.h | 5 +++- src/map/pet.c | 2 +- src/map/script.c | 2 +- src/map/skill.c | 10 ++++---- src/map/storage.c | 8 +++--- src/map/trade.c | 4 +-- src/map/vending.c | 4 +-- 16 files changed, 87 insertions(+), 111 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 66f4a4a75..953f1a0dc 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -404,11 +404,11 @@ ACMD(mapmove) { if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } - if (map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); return false; } @@ -437,7 +437,7 @@ ACMD(where) { pl_sd = map->nick2sd(atcmd_player_name); if (pl_sd == NULL || strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 || - (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) + (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) ) { clif->message(fd, msg_txt(3)); // Character not found. return false; @@ -465,12 +465,12 @@ ACMD(jumpto) { return false; } - if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map. return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. return false; } @@ -498,7 +498,7 @@ ACMD(jump) sscanf(message, "%hd %hd", &x, &y); - if (map->list[sd->bl.m].flag.noteleport && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (map->list[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. return false; } @@ -559,7 +559,7 @@ ACMD(who) { iter = mapit_getallusers(); for (pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter)) { - if (!((pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level + if (!((pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level if (stristr(pl_sd->status.name, player_name) == NULL // search with no case sensitive || (map_id >= 0 && pl_sd->bl.m != map_id)) continue; @@ -573,7 +573,7 @@ ACMD(who) { break; } case 3: { - if (pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) + if (pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) StrBuf->Printf(&buf, msg_txt(912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) " StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists @@ -729,11 +729,11 @@ ACMD(load) { int16 m; m = map->mapindex2mapid(sd->status.save_point.map); - if (m >= 0 && map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map. return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. return false; } @@ -1859,11 +1859,11 @@ ACMD(go) if (town >= 0 && town < ARRAYLENGTH(data)) { m = map->mapname2mapid(data[town].map); - if (m >= 0 && map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); return false; } @@ -2680,11 +2680,11 @@ ACMD(recall) { return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1019)); // You are not authorized to warp someone to this map. return false; } - if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1020)); // You are not authorized to warp this player from their map. return false; } @@ -3352,7 +3352,7 @@ ACMD(recallall) memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. return false; } @@ -3363,7 +3363,7 @@ ACMD(recallall) if (sd->status.account_id != pl_sd->status.account_id && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) continue; // Don't waste time warping the character to the same place. - if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) + if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; else { if (pc_isdead(pl_sd)) { //Wake them up @@ -3404,7 +3404,7 @@ ACMD(guildrecall) return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. return false; } @@ -3424,7 +3424,7 @@ ACMD(guildrecall) if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.guild_id == g->guild_id) { if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; // Skip GMs greater than you... or chars already on the cell - if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) + if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; else pc->setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); @@ -3461,7 +3461,7 @@ ACMD(partyrecall) return false; } - if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) { + if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. return false; } @@ -3480,7 +3480,7 @@ ACMD(partyrecall) if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.party_id == p->party.party_id) { if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; // Skip GMs greater than you... or chars already on the cell - if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) + if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; else pc->setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); @@ -6665,7 +6665,7 @@ ACMD(showmobs) return true; } - if(mob->db(mob_id)->status.mode&MD_BOSS && !pc->has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs. + if(mob->db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs. clif->message(fd, msg_txt(1251)); // Can't show boss mobs! return true; } @@ -8660,7 +8660,7 @@ ACMD(join) { return false; } if( channel->pass[0] != '\0' && strcmp(channel->pass,pass) != 0 ) { - if( pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sd->stealth = true; } else { sprintf(atcmd_output, msg_txt(1401),name,command); // '%s' Channel is password protected (usage: %s <#channel_name> <password>) @@ -8753,11 +8753,11 @@ ACMD(channel) { sub1[0] = sub2[0] = sub3[0] = '\0'; if( !message || !*message || sscanf(message, "%s %s %s %s", subcmd, sub1, sub2, sub3) < 1 ) { - atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) )); + atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) )); return true; } - if( strcmpi(subcmd,"create") == 0 && ( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) ) { + if( strcmpi(subcmd,"create") == 0 && ( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) ) { if( sub1[0] != '#' ) { clif->message(fd, msg_txt(1405));// Channel name must start with a '#' return false; @@ -8806,7 +8806,7 @@ ACMD(channel) { } } else { DBIterator *iter = db_iterator(clif->channel_db); - bool show_all = pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ? true : false; + bool show_all = pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ? true : false; clif->message(fd, msg_txt(1410)); // -- Public Channels if( hChSys.local ) { sprintf(atcmd_output, msg_txt(1409), hChSys.local_name, map->list[sd->bl.m].channel ? db_size(map->list[sd->bl.m].channel->users) : 0);// - #%s ( %d users ) @@ -8839,7 +8839,7 @@ ACMD(channel) { return false; } - if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s' clif->message(fd, atcmd_output); return false; @@ -8931,7 +8931,7 @@ ACMD(channel) { return false; } - if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s' clif->message(fd, atcmd_output); return false; @@ -8949,7 +8949,7 @@ ACMD(channel) { return false; } - if( pc->has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { + if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user. return false; } @@ -8987,7 +8987,7 @@ ACMD(channel) { return false; } - if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s' clif->message(fd, atcmd_output); return false; @@ -9032,7 +9032,7 @@ ACMD(channel) { return false; } - if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s' clif->message(fd, atcmd_output); return false; @@ -9053,7 +9053,7 @@ ACMD(channel) { DBIterator *iter = NULL; DBKey key; DBData *data; - bool isA = pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN)?true:false; + bool isA = pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN)?true:false; if( sub1[0] != '#' ) { clif->message(fd, msg_txt(1405));// Channel name must start with a '#' return false; @@ -9112,7 +9112,7 @@ ACMD(channel) { return false; } - if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s' clif->message(fd, atcmd_output); return false; @@ -9203,7 +9203,7 @@ ACMD(channel) { } } else { - atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) )); + atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) )); } return true; @@ -9892,7 +9892,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message (*command == atcommand->char_symbol && info->char_groups[pcg->get_idx(sd->group)] == 0) ) { return false; } - if( pc_isdead(sd) && pc->has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) { + if( pc_isdead(sd) && pc_has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) { clif->message(fd, msg_txt(1393)); // You can't use commands while dead return true; } diff --git a/src/map/battle.c b/src/map/battle.c index 802d2ec02..3b8064278 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5830,11 +5830,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB - if (pc->has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVM) ) + if (pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVM) ) return 0; break; case BL_PC: - if (pc->has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVP)) + if (pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVP)) return 0; break; default:/* anything else goes */ diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index fc43df5bd..2a15e66fc 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -76,7 +76,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha return; } - if( !pc->can_give_items(sd) ) + if( !pc_can_give_items(sd) ) {// custom: GM is not allowed to buy (give zeny) sd->buyingstore.slots = 0; clif->message(sd->fd, msg_txt(246)); @@ -197,7 +197,7 @@ void buyingstore_open(struct map_session_data* sd, int account_id) return; } - if( !pc->can_give_items(sd) ) + if( !pc_can_give_items(sd) ) {// custom: GM is not allowed to sell clif->message(sd->fd, msg_txt(246)); return; @@ -235,7 +235,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( !pc->can_give_items(sd) ) + if( !pc_can_give_items(sd) ) {// custom: GM is not allowed to sell clif->message(sd->fd, msg_txt(246)); clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0); @@ -290,7 +290,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc_get_group_level(sd), pc_get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) + if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc_can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc_get_group_level(sd), pc_get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; diff --git a/src/map/chat.c b/src/map/chat.c index 858878430..52d7f246a 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -121,7 +121,7 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) { return 0; } - if( !cd->pub && strncmp(pass, cd->pass, sizeof(cd->pass)) != 0 && !pc->has_permission(sd, PC_PERM_JOIN_ALL_CHAT) ) + if( !cd->pub && strncmp(pass, cd->pass, sizeof(cd->pass)) != 0 && !pc_has_permission(sd, PC_PERM_JOIN_ALL_CHAT) ) { clif->joinchatfail(sd,1); return 0; @@ -315,7 +315,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername) { if( i == cd->users ) return -1; - if (pc->has_permission(cd->usersd[i], PC_PERM_NO_CHAT_KICK)) + if (pc_has_permission(cd->usersd[i], PC_PERM_NO_CHAT_KICK)) return 0; //gm kick protection [Valaris] idb_put(cd->kick_list,cd->usersd[i]->status.char_id,(void*)1); diff --git a/src/map/clif.c b/src/map/clif.c index 9e507c57f..6a55ad344 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1811,7 +1811,7 @@ void clif_selllist(struct map_session_data *sd) if( sd->status.inventory[i].expire_time ) continue; // Cannot Sell Rental Items - if( sd->status.inventory[i].bound && !pc->can_give_bound_items(sd)) + if( sd->status.inventory[i].bound && !pc_can_give_bound_items(sd)) continue; // Don't allow sale of bound items val=sd->inventory_data[i]->value_sell; @@ -2846,7 +2846,7 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap) { if( !tsd->fd || tsd == sd ) return 0; - if( !pc->has_permission(tsd, PC_PERM_VIEW_HPMETER) ) + if( !pc_has_permission(tsd, PC_PERM_VIEW_HPMETER) ) return 0; WFIFOHEAD(tsd->fd,packet_len(cmd)); WFIFOW(tsd->fd,0) = cmd; @@ -3663,7 +3663,7 @@ void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok) } void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) { - if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { clif->colormes(sd->fd,COLOR_RED,msg_txt(1455)); return; } else { @@ -4232,7 +4232,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds } if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting. (sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround - pc->has_permission(sd, PC_PERM_VIEW_HPMETER) + pc_has_permission(sd, PC_PERM_VIEW_HPMETER) ) clif->hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp); @@ -9267,7 +9267,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { instance->check_idle(map->list[sd->bl.m].instance_id); } - if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) { + if( pc_has_permission(sd,PC_PERM_VIEW_HPMETER) ) { map->list[sd->bl.m].hpmeter_visible++; sd->state.hpmeter_visible = 1; } @@ -13695,7 +13695,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) { int x,y,type; - if (!pc->has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE)) + if (!pc_has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE)) return; x = RFIFOW(fd,2); @@ -14579,7 +14579,7 @@ void clif_parse_Check(int fd, struct map_session_data *sd) char charname[NAME_LENGTH]; struct map_session_data* pl_sd; - if(!pc->has_permission(sd, PC_PERM_USE_CHECK)) + if(!pc_has_permission(sd, PC_PERM_USE_CHECK)) return; safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname)); @@ -15171,10 +15171,10 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) return; } - if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || + if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || !itemdb_canauction(&sd->status.inventory[idx],pc_get_group_level(sd)) || // Quest Item or something else - (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) { + (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) ) { clif->auction_setitem(sd->fd, idx, true); return; } @@ -15282,7 +15282,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) } // Auction checks... - if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bound_items(sd) ) { + if( sd->status.inventory[sd->auction.index].bound && !pc_can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(293)); clif->auction_message(fd, 2); // The auction has been canceled return; @@ -15335,7 +15335,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd) unsigned int auction_id = RFIFOL(fd,2); int bid = RFIFOL(fd,6); - if( !pc->can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish] + if( !pc_can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish] clif->message(sd->fd, msg_txt(246)); return; } @@ -15626,7 +15626,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) { if (!tsd) return; - if( tsd->status.show_equip || pc->has_permission(sd, PC_PERM_VIEW_EQUIPMENT) ) + if( tsd->status.show_equip || pc_has_permission(sd, PC_PERM_VIEW_EQUIPMENT) ) clif->viewequip_ack(sd, tsd); else clif->viewequip_fail(sd); diff --git a/src/map/intif.c b/src/map/intif.c index 4cfcc3f91..b9d4d1746 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -893,7 +893,7 @@ int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) { char *message; int len; - if (!pc->has_permission(sd, permission)) + if (!pc_has_permission(sd, permission)) return 0; wisp_name = va_arg(va, char*); message = va_arg(va, char*); diff --git a/src/map/mail.c b/src/map/mail.c index 020d92383..371aa892f 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -64,7 +64,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { return 1; if( idx == 0 ) { // Zeny Transfer - if( amount < 0 || !pc->can_give_items(sd) ) + if( amount < 0 || !pc_can_give_items(sd) ) return 1; if( amount > sd->status.zeny ) @@ -81,9 +81,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { return 1; if( amount < 0 || amount > sd->status.inventory[idx].amount ) return 1; - if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || + if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time || !itemdb_canmail(&sd->status.inventory[idx],pc_get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) + (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) ) return 1; sd->mail.index = idx; diff --git a/src/map/party.c b/src/map/party.c index cab12548b..7af6acff5 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -333,7 +333,7 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd) } // confirm whether the account has the ability to invite before checking the player - if( !pc->has_permission(sd, PC_PERM_PARTY) || (tsd && !pc->has_permission(tsd, PC_PERM_PARTY)) ) { + if( !pc_has_permission(sd, PC_PERM_PARTY) || (tsd && !pc_has_permission(tsd, PC_PERM_PARTY)) ) { clif->message(sd->fd, msg_txt(81)); // "Your GM level doesn't authorize you to preform this action on the specified player." return 0; } diff --git a/src/map/pc.c b/src/map/pc.c index 0c5c59e13..9a0760d61 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -92,14 +92,6 @@ int pc_set_group(struct map_session_data *sd, int group_id) return 0; } -/** - * Checks if player has permission to perform action. - */ -bool pc_has_permission(struct map_session_data *sd, unsigned int permission) -{ - return ((sd->extra_temp_permissions&permission) != 0 || pcg->has_permission(sd->group, permission)); -} - /** * Checks if commands used by player should be logged. */ @@ -551,22 +543,6 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds) sd->rental_timer = timer->add(timer->gettick() + min(tick,3600000), pc->inventory_rental_end, sd->bl.id, 0); } -/** - * Determines if player can give / drop / trade / vend items - */ -bool pc_can_give_items(struct map_session_data *sd) -{ - return pc->has_permission(sd, PC_PERM_TRADE); -} - -/** - * Determines if player can give / drop / trade / vend bounded items - */ -bool pc_can_give_bound_items(struct map_session_data *sd) -{ - return pc->has_permission(sd, PC_PERM_TRADE_BOUND); -} - /*========================================== * prepares character for saving. *------------------------------------------*/ @@ -920,7 +896,7 @@ int pc_isequip(struct map_session_data *sd,int n) item = sd->inventory_data[n]; - if(pc->has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT)) + if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT)) return 1; if(item == NULL) @@ -1442,7 +1418,7 @@ int pc_calc_skilltree(struct map_session_data *sd) } } - if( pc->has_permission(sd, PC_PERM_ALL_SKILL) ) { + if( pc_has_permission(sd, PC_PERM_ALL_SKILL) ) { for( i = 0; i < MAX_SKILL; i++ ) { switch(skill->db[i].nameid) { /** @@ -1638,7 +1614,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) int skill_point, novice_skills; int c = sd->class_; - if (!battle_config.skillup_limit || pc->has_permission(sd, PC_PERM_ALL_SKILL)) + if (!battle_config.skillup_limit || pc_has_permission(sd, PC_PERM_ALL_SKILL)) return c; skill_point = pc->calc_skillpoint(sd); @@ -4530,7 +4506,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun return 1; } - if( !itemdb_cancartstore(item_data, pc_get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd))) + if( !itemdb_cancartstore(item_data, pc_get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd))) { // Check item trade restrictions [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1;/* TODO: there is no official response to this? */ @@ -5112,7 +5088,7 @@ int pc_memo(struct map_session_data* sd, int pos) { nullpo_ret(sd); // check mapflags - if( sd->bl.m >= 0 && (map->list[sd->bl.m].flag.nomemo || map->list[sd->bl.m].flag.nowarpto) && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE) ) { + if( sd->bl.m >= 0 && (map->list[sd->bl.m].flag.nomemo || map->list[sd->bl.m].flag.nowarpto) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) { clif->skill_mapinfomessage(sd, 1); // "Saved point cannot be memorized." return 0; } @@ -6309,7 +6285,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) { clif->updatestatus(sd,SP_SKILLPOINT); if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */ clif->updatestatus(sd,SP_CARTINFO); - if (!pc->has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown + if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown clif->skillinfoblock(sd); } else if( battle_config.skillup_limit ){ if( sd->sktree.second ) @@ -6342,7 +6318,7 @@ int pc_allskillup(struct map_session_data *sd) } } - if (pc->has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex] + if (pc_has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex] //and except SG_DEVIL [Komurka] and MO_TRIPLEATTACK and RG_SNATCHER [ultramage] for(i=0;i<MAX_SKILL;i++){ switch( skill->db[i].nameid ) { @@ -8057,9 +8033,9 @@ int pc_setmadogear(TBL_PC* sd, int flag) *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { - if( item && (item->expire_time || (item->bound && !pc->can_give_bound_items(sd))) ) + if( item && (item->expire_time || (item->bound && !pc_can_give_bound_items(sd))) ) return 0; - if( !pc->can_give_items(sd) ) //check if this GM level can drop items + if( !pc_can_give_items(sd) ) //check if this GM level can drop items return 0; return (itemdb_isdropable(item, pc_get_group_level(sd))); } @@ -10463,11 +10439,8 @@ void pc_defaults(void) { pc->get_dummy_sd = pc_get_dummy_sd; pc->class2idx = pc_class2idx; - pc->can_give_items = pc_can_give_items; - pc->can_give_bound_items = pc_can_give_bound_items; pc->can_use_command = pc_can_use_command; - pc->has_permission = pc_has_permission; pc->set_group = pc_set_group; pc->should_log_commands = pc_should_log_commands; diff --git a/src/map/pc.h b/src/map/pc.h index 0cad4f5c6..5264fa557 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -684,7 +684,11 @@ enum equip_pos { #define pc_readaccountreg2str(sd,reg) (pc->readregistry_str((sd),(reg),1)) #define pc_setaccountreg2str(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),1)) +/* pc_groups easy access */ #define pc_get_group_level(sd) ( (sd)->group->level ) +#define pc_has_permission(sd,permission) ( ((sd)->extra_temp_permissions&(permission)) != 0 || ((sd)->group->e_permissions&(permission)) != 0 ) +#define pc_can_give_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE) ) +#define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) ) struct skill_tree_entry { short id; @@ -761,7 +765,6 @@ struct pc_interface { bool (*can_give_bound_items) (struct map_session_data *sd); bool (*can_use_command) (struct map_session_data *sd, const char *command); - bool (*has_permission) (struct map_session_data *sd, unsigned int permission); int (*set_group) (struct map_session_data *sd, int group_id); bool (*should_log_commands) (struct map_session_data *sd); diff --git a/src/map/pet.c b/src/map/pet.c index 8cdc78e16..c04d9267a 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -872,7 +872,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick } } - if(!target && pd->loot && pd->msd && pc->has_permission(pd->msd, PC_PERM_TRADE) && pd->loot->count < pd->loot->max && DIFF_TICK(tick,pd->ud.canact_tick)>0) { + if(!target && pd->loot && pd->msd && pc_has_permission(pd->msd, PC_PERM_TRADE) && pd->loot->count < pd->loot->max && DIFF_TICK(tick,pd->ud.canact_tick)>0) { //Use half the pet's range of sight. map->foreachinrange(pet->ai_sub_hard_lootsearch,&pd->bl, pd->db->range2/2, BL_ITEM,pd,&target); diff --git a/src/map/script.c b/src/map/script.c index bc150b6ee..aa8ac7f63 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9489,7 +9489,7 @@ BUILDIN(getusersname) iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level) + if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level) continue; // skip hidden sessions /* Temporary fix for bugreport:1023. diff --git a/src/map/skill.c b/src/map/skill.c index 245df05e5..6893a9f57 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -446,7 +446,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) if (idx == 0) return 1; // invalid skill id - if (pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL)) + if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL)) return 0; // can do any damn thing they want if( skill_id == AL_TELEPORT && sd->skillitem == skill_id && sd->skillitemlv > 2 ) @@ -6309,7 +6309,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case MC_VENDING: if(sd) { //Prevent vending of GMs with unnecessary Level to trade/drop. [Skotlex] - if ( !pc->can_give_items(sd) ) + if ( !pc_can_give_items(sd) ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); else { sd->state.prevend = sd->state.workinprogress = 3; @@ -12262,7 +12262,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16 int i; bool is_chorus = ( skill->get_inf2(skill_id)&INF2_CHORUS_SKILL ); - if (!battle_config.player_skill_partner_check || pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL)) + if (!battle_config.player_skill_partner_check || pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL)) return is_chorus ? MAX_PARTY : 99; //As if there were infinite partners. if (cast_flag) { //Execute the skill on the partners. @@ -12358,7 +12358,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id if (sd->chatID) return 0; - if( pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) + if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check. sd->spiritball_old = sd->spiritball; //Need to do Spiritball check. @@ -13282,7 +13282,7 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, if( sd->chatID ) return 0; - if( pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) { + if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check. sd->spiritball_old = sd->spiritball; //Need to do Spiritball check. diff --git a/src/map/storage.c b/src/map/storage.c index 859bfcb9e..e65ed7b80 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -85,7 +85,7 @@ int storage_storageopen(struct map_session_data *sd) if(sd->state.storage_flag) return 1; //Already open? - if( !pc->can_give_items(sd) ) + if( !pc_can_give_items(sd) ) { //check is this GM level is allowed to put items to storage clif->message(sd->fd, msg_txt(246)); return 1; @@ -141,7 +141,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } - if( item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd) ) { + if( item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } @@ -387,7 +387,7 @@ int storage_guild_storageopen(struct map_session_data* sd) if(sd->state.storage_flag) return 1; //Can't open both storages at a time. - if( !pc->can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] clif->message(sd->fd, msg_txt(246)); return 1; } @@ -441,7 +441,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( item_data->bound && item_data->bound != IBT_GUILD && !pc->can_give_bound_items(sd) ) { + if( item_data->bound && item_data->bound != IBT_GUILD && !pc_can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(294)); return 1; } diff --git a/src/map/trade.c b/src/map/trade.c index f772c5faf..6f079bdd3 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -69,7 +69,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta return; } - if (!pc->can_give_items(sd) || !pc->can_give_items(target_sd)) //check if both GMs are allowed to trade + if (!pc_can_give_items(sd) || !pc_can_give_items(target_sd)) //check if both GMs are allowed to trade { clif->message(sd->fd, msg_txt(246)); clif->tradestart(sd, 2); // GM is not allowed to trade @@ -368,7 +368,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) if( item->bound && !( item->bound == IBT_GUILD && sd->status.guild_id == target_sd->status.guild_id ) && !( item->bound == IBT_PARTY && sd->status.party_id == target_sd->status.party_id ) - && !pc->can_give_bound_items(sd) ) { + && !pc_can_give_bound_items(sd) ) { clif->message(sd->fd, msg_txt(293)); clif->tradeitemok(sd, index+2, TIO_INDROCKS); return; diff --git a/src/map/vending.c b/src/map/vending.c index dc22499dd..7d248351c 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -53,7 +53,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) { if( !vsd->state.vending ) return; // not vending - if (!pc->can_give_items(sd) || !pc->can_give_items(vsd)) { //check if both GMs are allowed to trade + if (!pc_can_give_items(sd) || !pc_can_give_items(vsd)) { //check if both GMs are allowed to trade // GM is not allowed to trade clif->message(sd->fd, msg_txt(246)); return; @@ -257,7 +257,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || !sd->status.cart[index].identify // unidentified item || sd->status.cart[index].attribute == 1 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case - || (sd->status.cart[index].bound && !pc->can_give_bound_items(sd)) // can't trade bound items w/o permission + || (sd->status.cart[index].bound && !pc_can_give_bound_items(sd)) // can't trade bound items w/o permission || !itemdb_cantrade(&sd->status.cart[index], pc_get_group_level(sd), pc_get_group_level(sd)) ) // untradeable item continue; -- cgit v1.2.3-70-g09d2 From b6b3f58795288701d0e162d43fa6f0a47af913b3 Mon Sep 17 00:00:00 2001 From: Haru <haru@dotalux.com> Date: Sun, 4 May 2014 06:13:56 +0200 Subject: Fixed order of includes in all source files - Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com> --- src/char/char.c | 44 +++++----- src/char/char.h | 1 - src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 +++-- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 ++--- src/char/int_guild.h | 3 - src/char/int_homun.c | 21 +++-- src/char/int_homun.h | 2 + src/char/int_mail.c | 20 +++-- src/char/int_mail.h | 3 + src/char/int_mercenary.c | 22 +++-- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 - src/char/int_pet.c | 22 +++-- src/char/int_quest.c | 22 ++--- src/char/int_storage.c | 22 +++-- src/char/inter.c | 43 ++++----- src/char/inter.h | 5 +- src/char/pincode.c | 11 ++- src/common/HPM.c | 31 ++++--- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +--- src/common/cbasetypes.h | 6 ++ src/common/conf.c | 3 + src/common/conf.h | 1 + src/common/console.c | 223 ++++++++++++++++++++++++----------------------- src/common/console.h | 21 +++-- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 ++- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 ++- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 + src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 +++-- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 ++- src/common/sql.h | 3 +- src/common/strlib.c | 13 +-- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 +++++-- src/common/sysinfo.h | 16 ---- src/common/thread.c | 31 ++++--- src/common/thread.h | 1 - src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 -- src/config/renewal.h | 1 + src/login/account.h | 1 + src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 +-- src/login/login.c | 21 +++-- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 +++++++------ src/map/battle.h | 2 +- src/map/battleground.c | 33 +++---- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 ++ src/map/chat.c | 23 ++--- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 + src/map/duel.c | 10 ++- src/map/duel.h | 4 + src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 + src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +--- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 + src/map/intif.c | 51 ++++++----- src/map/intif.h | 13 +-- src/map/irc-bot.c | 22 ++--- src/map/irc-bot.h | 2 + src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 ++--- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 +-- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 + src/map/mob.c | 69 ++++++++------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 ++++----- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 + src/map/pc.c | 59 +++++++------ src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 +-- src/map/pc_groups.h | 4 + src/map/pet.c | 48 +++++----- src/map/pet.h | 10 ++- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 + src/map/script.c | 79 +++++++++-------- src/map/script.h | 12 +-- src/map/searchstore.c | 11 ++- src/map/searchstore.h | 6 ++ src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 +-- src/map/status.c | 59 +++++++------ src/map/status.h | 16 ++-- src/map/storage.c | 32 +++---- src/map/storage.h | 5 +- src/map/trade.c | 24 ++--- src/map/unit.c | 63 ++++++------- src/map/unit.h | 12 ++- src/map/vending.c | 27 +++--- src/map/vending.h | 1 + src/tool/mapcache.c | 14 +-- 144 files changed, 1676 insertions(+), 1367 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/char/char.c b/src/char/char.c index 77e393c0d..6c0902644 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,7 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "char.h" + +#include <signal.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <time.h> + +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_storage.h" +#include "inter.h" +#include "pincode.h" +#include "../common/HPM.h" #include "../common/cbasetypes.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -13,25 +36,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/console.h" -#include "../common/HPM.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_elemental.h" -#include "int_party.h" -#include "int_storage.h" -#include "char.h" -#include "inter.h" -#include "pincode.h" - -#include <sys/types.h> -#include <time.h> -#include <signal.h> -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5497,7 +5501,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->setSQL(sql_handle); + console->input->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 2928929de..09a78f6b9 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,7 +5,6 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ -#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 924930867..886b5be26 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" +#define HERCULES_CORE + +#include "int_auction.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "int_mail.h" +#include "inter.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_mail.h" -#include "int_auction.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index ed0c2a9ed..3a36e75a2 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_elemental.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c90891fc4..c869e6fc2 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -struct s_elemental; +#include "../common/cbasetypes.h" void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 895cbbb94..ffbe48e10 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,21 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH +#include "int_guild.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_guild.h" - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 4eb7d310b..5e657ff06 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,9 +20,6 @@ enum { GS_REMOVE = 0x8000, }; -struct guild; -struct guild_castle; - int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 143277f05..795a6b927 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_homun.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 561dc848f..9477f4f03 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,6 +4,8 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ +#include "../common/cbasetypes.h" + struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 826771676..86a36d59f 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_mail.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 7c06cdc1f..824ba48a3 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,6 +4,9 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ +struct item; +struct mail_message; + int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index aecb3844a..1dffb656c 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_mercenary.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { char* data; diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index b614b8cf7..195a83b34 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,7 +4,9 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -struct s_mercenary; +#include "../common/cbasetypes.h" + +struct mmo_charstatus; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 7c328c452..3e4a743d6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/socket.h" -#include "../common/showmsg.h" -#include "../common/mapindex.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + #include "int_party.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" + struct party_data { struct party party; unsigned int min_lv, max_lv; diff --git a/src/char/int_party.h b/src/char/int_party.h index 84f00635a..098c1e9a9 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,8 +14,6 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; -struct party; - int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 25f00e6f0..29c40eff9 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_pet.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct s_pet *pet_pt; //--------------------------------------------------------- diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 061dd89d9..61b43c57d 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,23 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/db.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_quest.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 966e61bb3..bf7b76da0 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" // StringBuf -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "int_storage.h" #include <stdio.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" // StringBuf #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index c48b26fdd..8b6368e9d 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,33 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "char.h" +#define HERCULES_CORE + #include "inter.h" -#include "int_party.h" -#include "int_guild.h" -#include "int_storage.h" -#include "int_pet.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_mail.h" -#include "int_auction.h" -#include "int_quest.h" -#include "int_elemental.h" +#include <errno.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> -#include <errno.h> - +#include <string.h> #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] +#include "char.h" +#include "int_auction.h" +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mail.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_pet.h" +#include "int_quest.h" +#include "int_storage.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 25b0c2a96..5e655237e 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,9 +5,10 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -struct accreg; -#include "../common/sql.h" #include "char.h" +#include "../common/sql.h" + +struct accreg; int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index d51953448..59182f12d 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pincode.h" + +#include <stdlib.h> + +#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "char.h" -#include "pincode.h" - -#include <stdlib.h> int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 9ffce87de..00b92dc60 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,26 +1,31 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "HPM.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "../common/cbasetypes.h" -#include "../common/mmo.h" +#include "../common/conf.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/timer.h" -#include "../common/conf.h" -#include "../common/utils.h" -#include "../common/console.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" -#include "HPM.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #ifndef WIN32 -#include <unistd.h> +# include <unistd.h> #endif struct malloc_interface iMalloc_HPM; @@ -686,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->addCommand,"addCPCommand"); + HPM->share(console->input->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -755,7 +760,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->addCommand("plugins",CPCMD_A(plugins)); + console->input->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 0f0df4cda..9c176cfd6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,8 +4,12 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#include "../common/cbasetypes.h" +#ifndef HERCULES_CORE +#error You should never include HPM.h from a plugin. +#endif + #include "../common/HPMi.h" +#include "../common/cbasetypes.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 19206aeca..b98e87d90 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/console.h" +#include "../common/core.h" #include "../common/sql.h" struct script_state; @@ -20,18 +20,6 @@ struct map_session_data; #define HPExport #endif -#ifndef _COMMON_SHOWMSG_H_ - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); -#endif - /* after */ #include "../common/showmsg.h" @@ -192,7 +180,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef _COMMON_HPM_H_ +#ifndef HERCULES_CORE HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index f44e80413..da0d6b307 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,5 +442,11 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index b816b2f7f..46a034497 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,7 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + #include "conf.h" + #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index 9aff3df47..e5b637e47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,6 +6,7 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" + #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index d8f352c8a..6a82db555 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,42 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT +#include "console.h" + +#include <stdio.h> +#include <stdlib.h> + #include "../common/cbasetypes.h" -#include "../common/showmsg.h" #include "../common/core.h" +#include "../common/showmsg.h" #include "../common/sysinfo.h" -#include "../config/core.h" -#include "console.h" #ifndef MINICORE - #include "../common/ers.h" - #include "../common/malloc.h" - #include "../common/atomic.h" - #include "../common/spinlock.h" - #include "../common/thread.h" - #include "../common/mutex.h" - #include "../common/timer.h" - #include "../common/strlib.h" - #include "../common/sql.h" +# include "../common/atomic.h" +# include "../common/ers.h" +# include "../common/malloc.h" +# include "../common/mutex.h" +# include "../common/spinlock.h" +# include "../common/sql.h" +# include "../common/strlib.h" +# include "../common/thread.h" +# include "../common/timer.h" #endif -#include <stdio.h> -#include <stdlib.h> #if !defined(WIN32) - #include <unistd.h> - #include <sys/time.h> +# include <sys/time.h> +# include <unistd.h> #else - #include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling +# ifdef CONSOLE_INPUT +# include <conio.h> /* _kbhit() */ +# endif #endif +struct console_interface console_s; #ifdef CONSOLE_INPUT - #if defined(WIN32) - #include <conio.h> /* _kbhit() */ - #endif +struct console_input_interface console_input_s; #endif -struct console_interface console_s; - /*====================================== * CORE : Display title *--------------------------------------*/ @@ -116,12 +120,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( console->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); - console->parse_list_subs(console->cmd_list[i],2); + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( console->input->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); + console->input->parse_list_subs(console->input->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); } } } @@ -144,7 +148,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->SQL, line); + Sql_HerculesUpdateSkip(console->input->SQL, line); } /** @@ -206,7 +210,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->cmds,struct CParseEntry *, len); + RECREATE(console->input->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -220,12 +224,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->cmd_count++; - console->cmds[i] = cmd; + console->input->cmd_count++; + console->input->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; } } @@ -233,11 +237,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->input->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); - console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; + RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); + console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; break; } } @@ -256,23 +260,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + if( i == console->input->cmd_list_count ) { + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->cmds[console->cmd_count - 1] = cmd; - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; - i = console->cmd_list_count - 1; + console->input->cmds[console->input->cmd_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + i = console->input->cmd_list_count - 1; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -281,13 +285,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); - CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->cmds[console->cmd_count-1]->next_count = 0; + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->input->cmds[console->input->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; - cmd = console->cmds[console->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; + cmd = console->input->cmds[console->input->cmd_count-1]; continue; } @@ -302,7 +306,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->parse_list_subs(cmd->u.next[i],depth + 1); + console->input->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -320,21 +324,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { + if( i == console->input->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -351,7 +355,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->parse_list_subs(cmd,2); + console->input->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -392,95 +396,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->ptstate ) {/* loopx */ - if( console->key_pressed() ) { + while( console->input->ptstate ) {/* loopx */ + if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->parse(input); + console->input->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); } } - ramutex_lock( console->ptmutex ); - racond_wait( console->ptcond, console->ptmutex, -1 ); - ramutex_unlock( console->ptmutex ); + ramutex_lock( console->input->ptmutex ); + racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); + ramutex_unlock( console->input->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); for(i = 0; i < cinput.count; i++) { - console->parse_sub(cinput.queue[i]); + console->input->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->ptlock); - racond_signal(console->ptcond); + LeaveSpinLock(&console->input->ptlock); + racond_signal(console->input->ptcond); return 0; } void console_parse_final(void) { - if( console->ptstate ) { - InterlockedDecrement(&console->ptstate); - racond_signal(console->ptcond); + if( console->input->ptstate ) { + InterlockedDecrement(&console->input->ptstate); + racond_signal(console->input->ptcond); /* wait for thread to close */ - rathread_wait(console->pthread, NULL); + rathread_wait(console->input->pthread, NULL); - racond_destroy(console->ptcond); - ramutex_destroy(console->ptmutex); + racond_destroy(console->input->ptcond); + ramutex_destroy(console->input->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->ptstate = 1; + console->input->ptstate = 1; - InitializeSpinLock(&console->ptlock); + InitializeSpinLock(&console->input->ptlock); - console->ptmutex = ramutex_create(); - console->ptcond = racond_create(); + console->input->ptmutex = ramutex_create(); + console->input->ptcond = racond_create(); - if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ + if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->input->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->SQL = SQL_handle; + console->input->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->cmd_count = console->cmd_list_count = 0; - console->load_defaults(); - console->parse_init(); + console->input->cmd_count = console->input->cmd_list_count = 0; + console->input->load_defaults(); + console->input->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->parse_final(); - for( i = 0; i < console->cmd_count; i++ ) { - if( console->cmds[i]->next_count ) - aFree(console->cmds[i]->u.next); - aFree(console->cmds[i]); + console->input->parse_final(); + for( i = 0; i < console->input->cmd_count; i++ ) { + if( console->input->cmds[i]->next_count ) + aFree(console->input->cmds[i]->u.next); + aFree(console->input->cmds[i]); } - aFree(console->cmds); - aFree(console->cmd_list); + aFree(console->input->cmds); + aFree(console->input->cmd_list); #endif } void console_defaults(void) { @@ -489,17 +493,20 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->parse_init = console_parse_init; - console->parse_final = console_parse_final; - console->parse_timer = console_parse_timer; - console->pthread_main = cThread_main; - console->parse = console_parse; - console->parse_sub = console_parse_sub; - console->key_pressed = console_parse_key_pressed; - console->load_defaults = console_load_defaults; - console->parse_list_subs = console_parse_list_subs; - console->addCommand = console_parse_create; - console->setSQL = console_setSQL; - console->SQL = NULL; + console->input = &console_input_s; + console->input->parse_init = console_parse_init; + console->input->parse_final = console_parse_final; + console->input->parse_timer = console_parse_timer; + console->input->pthread_main = cThread_main; + console->input->parse = console_parse; + console->input->parse_sub = console_parse_sub; + console->input->key_pressed = console_parse_key_pressed; + console->input->load_defaults = console_load_defaults; + console->input->parse_list_subs = console_parse_list_subs; + console->input->addCommand = console_parse_create; + console->input->setSQL = console_setSQL; + console->input->SQL = NULL; +#else + console->input = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index 3d19ddc9d..d2c58f978 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,11 +4,13 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../common/thread.h" +#include "../config/core.h" // MAX_CONSOLE_INPUT + +#include "../common/cbasetypes.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../config/core.h" +#include "../common/thread.h" /** * Queue Max @@ -47,11 +49,8 @@ struct { unsigned short count; } cinput; -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); #ifdef CONSOLE_INPUT +struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -77,7 +76,17 @@ struct console_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); +}; +#else +struct console_input_interface; #endif + +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); + + struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 49b272488..85f824866 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,36 +2,40 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" #include "core.h" + +#include "../common/cbasetypes.h" #include "../common/console.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" #ifndef MINICORE - #include "../common/db.h" - #include "../common/socket.h" - #include "../common/timer.h" - #include "../common/thread.h" - #include "../common/sql.h" - #include "../config/core.h" - #include "../common/HPM.h" - #include "../common/utils.h" - #include "../common/conf.h" - #include "../common/ers.h" +# include "../common/HPM.h" +# include "../common/conf.h" +# include "../common/db.h" +# include "../common/ers.h" +# include "../common/socket.h" +# include "../common/sql.h" +# include "../common/thread.h" +# include "../common/timer.h" +# include "../common/utils.h" #endif +#include <signal.h> #include <stdio.h> #include <stdlib.h> -#include <signal.h> #include <string.h> #ifndef _WIN32 -#include <unistd.h> +# include <unistd.h> #else -#include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index e9f7c5961..ba75e6b01 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,11 +7,10 @@ #include "../common/db.h" #include "../common/mmo.h" -#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG - #include <signal.h> +# include <signal.h> #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 8d6b08815..1781aa96f 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,14 +67,18 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ + +#define HERCULES_CORE + +#include "db.h" + #include <stdio.h> #include <stdlib.h> -#include "db.h" -#include "../common/mmo.h" +#include "../common/ers.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 67abe6f19..0d2548806 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,10 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include "../common/cbasetypes.h" #include <stdarg.h> +#include "../common/cbasetypes.h" + /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * * DBRelease - Enumeration of release options. * diff --git a/src/common/des.c b/src/common/des.c index ed6d098dc..7f952be76 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,8 +1,11 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" -#include "../common/des.h" +#define HERCULES_CORE + +#include "des.h" + +#include "../common/cbasetypes.h" /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index 5a3d7314a..d9895e4f2 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,14 +39,18 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ + +#define HERCULES_CORE + +#include "ers.h" + #include <stdlib.h> #include <string.h> #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #include "../common/nullpo.h" -#include "ers.h" +#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index bde0ed720..1111fb3f3 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,13 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/nullpo.h" +#define HERCULES_CORE + #include "grfio.h" #include <stdio.h> @@ -17,6 +12,14 @@ #include <sys/stat.h> #include <zlib.h> +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 5b39cbab6..13cf0b5ce 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/malloc.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE + +#include "malloc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" + struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 3128a3cb0..5c69c7063 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/db.h" +#define HERCULES_CORE + #include "mapindex.h" -#include <string.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> + +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index 05fde42cc..e7b506e27 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,11 +6,15 @@ * ***********************************************************/ -#include "../common/random.h" +#define HERCULES_CORE + #include "md5calc.h" -#include <string.h> + #include <stdio.h> #include <stdlib.h> +#include <string.h> + +#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index d535d2874..1d826463e 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,11 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include "cbasetypes.h" -#include "../common/db.h" #include <time.h> +#include "../common/cbasetypes.h" +#include "../common/db.h" + // server->client protocol version // 0 - pre-? // 1 - ? - 0x196 @@ -96,6 +97,7 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 +#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 0668dbc41..12524c3b7 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,6 +1,10 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "mutex.h" + #ifdef WIN32 #include "../common/winapi.h" #else @@ -13,7 +17,6 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" -#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index eeb24e6ff..3b83b66d6 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,6 +4,7 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ +#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1cb471aff..1891835f1 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,10 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "nullpo.h" + #include <stdio.h> #include <stdarg.h> #include <string.h> -#include "../common/nullpo.h" + #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index e46c52cad..7019a31f3 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,17 +1,23 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "random.h" + +#include <time.h> // time + +#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 + #include "../common/showmsg.h" #include "../common/timer.h" // gettick -#include "random.h" + #if defined(WIN32) - #include "../common/winapi.h" +# include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) - #include <sys/types.h> - #include <unistd.h> +# include <sys/types.h> +# include <unistd.h> #endif -#include <time.h> // time -#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 14342fe5e..1dbcba282 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/strlib.h" // StringBuf +#define HERCULES_CORE + #include "showmsg.h" -#include "core.h" //[Ind] - For SERVER_TYPE +#include <stdarg.h> #include <stdio.h> +#include <stdlib.h> // atexit #include <string.h> -#include <stdarg.h> #include <time.h> -#include <stdlib.h> // atexit #include "../../3rdparty/libconfig/libconfig.h" +#include "../common/cbasetypes.h" +#include "../common/core.h" //[Ind] - For SERVER_TYPE +#include "../common/strlib.h" // StringBuf + #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" #else // not WIN32 -#include <unistd.h> +# include <unistd.h> #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 49fbc34fb..5b32f39ae 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,12 +5,14 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#ifndef _COMMON_HPMI_H_ - #include "../../3rdparty/libconfig/libconfig.h" -#endif - #include <stdarg.h> +#ifdef HERCULES_CORE +# include "../../3rdparty/libconfig/libconfig.h" +#else +# include "../common/HPMi.h" +#endif + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -90,7 +92,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifndef _COMMON_HPMI_H_ +#ifdef HERCULES_CORE extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -101,7 +103,18 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); +#else + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); #endif + extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 35d350e95..3738f2c2a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,48 +2,50 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../config/core.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ - #include "socket.h" +#undef _H_SOCKET_C_ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" + #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" #else - #include <errno.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <netinet/tcp.h> - #include <net/if.h> - #include <unistd.h> - #include <sys/time.h> - #include <sys/ioctl.h> - #include <netdb.h> - #include <arpa/inet.h> - - #ifndef SIOCGIFCONF - #include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] - #endif - #ifndef FIONBIO - #include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] - #endif - - #ifdef HAVE_SETRLIMIT - #include <sys/resource.h> - #endif +# include <arpa/inet.h> +# include <errno.h> +# include <net/if.h> +# include <netdb.h> +# include <netinet/in.h> +# include <netinet/tcp.h> +# include <sys/ioctl.h> +# include <sys/socket.h> +# include <sys/time.h> +# include <unistd.h> + +# ifndef SIOCGIFCONF +# include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] +# endif +# ifndef FIONBIO +# include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] +# endif + +# ifdef HAVE_SETRLIMIT +# include <sys/resource.h> +# endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 75adde4cf..804b9284f 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ +#include <time.h> + #include "../common/cbasetypes.h" #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" typedef long in_addr_t; #else - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> +# include <netinet/in.h> +# include <sys/socket.h> +# include <sys/types.h> #endif -#include <time.h> - struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 29fbb355b..0058e1d83 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,4 +1,3 @@ -#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -15,14 +14,14 @@ // // +#include "../common/atomic.h" +#include "../common/cbasetypes.h" +#include "../common/thread.h" + #ifdef WIN32 #include "../common/winapi.h" #endif -#include "../common/cbasetypes.h" -#include "../common/atomic.h" -#include "../common/thread.h" - #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index 79ccc8e92..aeb56bff0 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "sql.h" + +#include <stdlib.h> // strtoul +#include <string.h> // strlen/strnlen/memcpy/memset + #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "sql.h" #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" // Needed before mysql.h #endif #include <mysql.h> -#include <string.h>// strlen/strnlen/memcpy/memset -#include <stdlib.h>// strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 1fb436853..807e0843c 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,10 +5,9 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ -#include "../common/cbasetypes.h" #include <stdarg.h>// va_list - +#include "../common/cbasetypes.h" // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index 361595b07..e2e802915 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#define STRLIB_C +#define HERCULES_CORE + +#define _H_STRLIB_C_ #include "strlib.h" +#undef _H_STRLIB_C_ +#include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <errno.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index 10844d257..decf661a6 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,15 +5,16 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include "../common/cbasetypes.h" #include <stdarg.h> +#include "../common/cbasetypes.h" + #ifndef __USE_GNU - #define __USE_GNU // required to enable strnlen on some platforms - #include <string.h> - #undef __USE_GNU +# define __USE_GNU // required to enable strnlen on some platforms +# include <string.h> +# undef __USE_GNU #else - #include <string.h> +# include <string.h> #endif #ifdef WIN32 @@ -165,7 +166,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef STRLIB_C +#ifndef _H_STRLIB_C_ #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -189,6 +190,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* STRLIB_C */ +#endif /* _H_STRLIB_C_ */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index a56896458..3fdfadb41 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,23 +4,39 @@ /// See sysinfo.h for a description of this file -#define _COMMON_SYSINFO_P_ +#define HERCULES_CORE + #include "sysinfo.h" -#undef _COMMON_SYSINFO_P_ + +#include <stdio.h> // fopen +#include <stdlib.h> // atoi #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/strlib.h" #include "../common/malloc.h" +#include "../common/strlib.h" #ifdef WIN32 -#include <windows.h> -#include <string.h> // strlen +# include <string.h> // strlen +# include <windows.h> #else -#include <unistd.h> +# include <unistd.h> #endif -#include <stdio.h> // fopen -#include <stdlib.h> // atoi + +/// Private interface fields +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index 17faac26b..c0c4d276a 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,23 +13,7 @@ #include "../common/cbasetypes.h" -#ifdef _COMMON_SYSINFO_P_ -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; -#else struct sysinfo_private; -#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4d110f2dd..4f73aa9b3 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,24 +6,27 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "thread.h" + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" + #ifdef WIN32 -#include "../common/winapi.h" -#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -#define __thread __declspec( thread ) +# include "../common/winapi.h" +# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +# define __thread __declspec( thread ) #else -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <signal.h> -#include <pthread.h> -#include <sched.h> +# include <stdlib.h> +# include <unistd.h> +# include <string.h> +# include <signal.h> +# include <pthread.h> +# include <sched.h> #endif -#include "cbasetypes.h" -#include "malloc.h" -#include "showmsg.h" -#include "thread.h" - // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index d6b2bbc6e..887c03179 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,7 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 526854582..10f14b0f2 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,11 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" +#define HERCULES_CORE + #include "timer.h" #include <stdio.h> @@ -14,11 +11,17 @@ #include <string.h> #include <time.h> +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" + #ifdef WIN32 -#include "../common/winapi.h" // GetTickCount() +# include "../common/winapi.h" // GetTickCount() #else -#include <unistd.h> -#include <sys/time.h> // struct timeval, gettimeofday() +# include <sys/time.h> // struct timeval, gettimeofday() +# include <unistd.h> #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 47747dd32..84925f707 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,33 +2,35 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/core.h" -#include "socket.h" +#define HERCULES_CORE + #include "utils.h" -#include <stdio.h> +#include <math.h> // floor() #include <stdarg.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <math.h> // floor() +#include <sys/stat.h> // cache purposes [Ind/Hercules] + +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" #ifdef WIN32 - #include "../common/winapi.h" - #ifndef F_OK - #define F_OK 0x0 - #endif /* F_OK */ +# include "../common/winapi.h" +# ifndef F_OK +# define F_OK 0x0 +# endif /* F_OK */ #else - #include <unistd.h> - #include <dirent.h> - #include <sys/stat.h> +# include <dirent.h> +# include <sys/stat.h> +# include <unistd.h> #endif -#include <sys/stat.h> // cache purposes [Ind/Hercules] - struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index f89546b8a..823651163 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,10 +5,11 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ -#include "../common/cbasetypes.h" #include <stdio.h> // FILE* #include <time.h> +#include "../common/cbasetypes.h" + /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index 6557cb987..f9baa4d7d 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,13 +52,6 @@ #define DEFTYPE_MAX CHAR_MAX #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif - /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36615d63b..36bdd3958 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,5 +74,6 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL +#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 234e7c0c1..329ae31c8 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM +#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 1483196ab..2e4ed7ab9 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,17 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "account.h" + +#include <stdlib.h> +#include <string.h> + +#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "../common/console.h" -#include "../common/socket.h" -#include "account.h" -#include <stdlib.h> -#include <string.h> /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->setSQL(db->accounts); + console->input->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 74f45e418..081f28d84 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "ipban.h" + +#include <stdlib.h> +#include <string.h> + +#include "login.h" +#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -9,11 +18,6 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "login.h" -#include "ipban.h" -#include "loginlog.h" -#include <stdlib.h> -#include <string.h> // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index af59fcf38..cb46e0226 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,6 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "login.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "account.h" +#include "ipban.h" +#include "loginlog.h" +#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -12,15 +24,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/HPM.h" -#include "account.h" -#include "ipban.h" -#include "login.h" -#include "loginlog.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index 14c361a15..e77b96a0e 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/mmo.h" // NAME_LENGTH,SEX_* #include "../common/core.h" // CORE_ST_LAST +#include "../common/mmo.h" // NAME_LENGTH,SEX_* enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index 730fb6e62..a86ad431c 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,6 +4,7 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ +#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -11,5 +12,4 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); - #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 231ac783b..2cbc02c93 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,13 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "loginlog.h" + +#include <string.h> +#include <stdlib.h> // exit + #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" -#include <string.h> -#include <stdlib.h> // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 061479d87..cb8c979c6 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,25 +1,15 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/HPM.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/socket.h" -#include "../common/strlib.h" - +#define HERCULES_CORE #include "HPMmap.h" -#include "pc.h" -#include "map.h" -// +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -37,12 +27,14 @@ #include "itemdb.h" #include "log.h" #include "mail.h" +#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" +#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -54,11 +46,19 @@ #include "trade.h" #include "unit.h" #include "vending.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5fd0faf86..df3be40a5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,57 +2,60 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "battle.h" #include "chat.h" -#include "clif.h" #include "chrif.h" +#include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" +#include "mail.h" #include "map.h" -#include "pc.h" -#include "pc_groups.h" // groupid2name -#include "status.h" -#include "skill.h" +#include "mapreg.h" +#include "mercenary.h" #include "mob.h" #include "npc.h" -#include "pet.h" -#include "homunculus.h" -#include "mail.h" -#include "mercenary.h" -#include "elemental.h" #include "party.h" -#include "guild.h" +#include "pc.h" +#include "pc_groups.h" // groupid2name +#include "pet.h" +#include "quest.h" #include "script.h" +#include "searchstore.h" +#include "skill.h" +#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "mapreg.h" -#include "quest.h" -#include "searchstore.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" #include "HPMmap.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> - struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index bc4ab30a3..c8a1863af 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ +#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" -#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 9089b7102..0865ee4ba 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/sysinfo.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "pc.h" -#include "status.h" -#include "skill.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" -#include "mob.h" -#include "itemdb.h" -#include "clif.h" -#include "pet.h" -#include "guild.h" -#include "party.h" +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT #include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <math.h> + +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "skill.h" +#include "status.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index 88038ddb4..fbe097c78 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "../common/cbasetypes.h" #include "map.h" //ELE_MAX +#include "../common/cbasetypes.h" /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index 68539e25d..a7169de0e 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,29 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/conf.h" +#define HERCULES_CORE #include "battleground.h" + +#include <string.h> +#include <stdio.h> + #include "battle.h" #include "clif.h" +#include "homunculus.h" #include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" // struct mob_data #include "npc.h" -#include "pc.h" #include "party.h" +#include "pc.h" #include "pet.h" -#include "homunculus.h" -#include "mercenary.h" -#include "mapreg.h" - -#include <string.h> -#include <stdio.h> +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index 05c4eb060..ec0a86f14 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ -#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" +#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 2a15e66fc..80264b30d 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,18 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" // ARR_FIND -#include "../common/showmsg.h" // ShowWarning -#include "../common/socket.h" // RBUF* -#include "../common/strlib.h" // safestrncpy +#define HERCULES_CORE + +#include "buyingstore.h" // struct s_buyingstore + #include "atcommand.h" // msg_txt #include "battle.h" // battle_config.* -#include "buyingstore.h" // struct s_buyingstore +#include "chrif.h" #include "clif.h" // clif->buyingstore_* #include "log.h" // log_pick_pc, log_zeny #include "pc.h" // struct map_session_data -#include "chrif.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" // ARR_FIND +#include "../common/showmsg.h" // ShowWarning +#include "../common/socket.h" // RBUF* +#include "../common/strlib.h" // safestrncpy struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 5141a1013..914631872 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,6 +5,11 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + +struct map_session_data; + /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index 08fc4a575..c9d3e6d46 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,12 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "chat.h" + +#include <stdio.h> +#include <string.h> + #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -15,10 +16,12 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "chat.h" - -#include <stdio.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index b0c6cd905..cbc2a391e 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,9 +6,12 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE +#include "../common/cbasetypes.h" +#include "../common/db.h" -struct map_session_data; struct chat_data; +struct map_session_data; +struct npc_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 99a1935fd..81e2d387c 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,15 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/ers.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT +#include "chrif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <time.h> #include "map.h" #include "battle.h" @@ -25,15 +26,17 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" -#include "chrif.h" #include "quest.h" #include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 25e955604..84efc66d3 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,9 +5,11 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ -#include "../common/cbasetypes.h" #include <time.h> + #include "map.h" //TBL_stuff +#include "../common/cbasetypes.h" +#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index 062a437a2..1da6070e8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,56 +2,59 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/conf.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT +#include "clif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <time.h> -#include "map.h" -#include "chrif.h" -#include "pc.h" -#include "status.h" -#include "npc.h" -#include "itemdb.h" -#include "chat.h" -#include "trade.h" -#include "storage.h" -#include "script.h" -#include "skill.h" #include "atcommand.h" -#include "intif.h" #include "battle.h" #include "battleground.h" -#include "mob.h" -#include "party.h" -#include "unit.h" +#include "chat.h" +#include "chrif.h" +#include "elemental.h" #include "guild.h" -#include "vending.h" -#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" #include "log.h" -#include "clif.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" -#include "irc-bot.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <time.h> +#include "script.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "trade.h" +#include "unit.h" +#include "vending.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index bbe07b718..f54c4afce 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ +#include <stdarg.h> + +#include "map.h" +#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" -#include "../common/socket.h" -#include "../map/map.h" -#include "../map/packets_struct.h" -#include <stdarg.h> /** * Declarations @@ -20,7 +20,6 @@ struct item; struct item_data; struct storage_data; struct guild_storage; -struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index f38ead858..975a00c50 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,10 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" +#define HERCULES_CORE + #include "date.h" + #include <time.h> +#include "../common/cbasetypes.h" + int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index 46f0d86c3..b3ed59b2f 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,6 +4,8 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ +#include "../common/cbasetypes.h" + int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index af2741f77..a423ef240 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,18 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" +#define HERCULES_CORE -#include "atcommand.h" // msg_txt -#include "clif.h" #include "duel.h" -#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> +#include "atcommand.h" // msg_txt +#include "clif.h" +#include "pc.h" +#include "../common/cbasetypes.h" + /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 5405d2eee..956aed36d 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,6 +5,10 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ +#include "../common/cbasetypes.h" + +struct map_session_data; + struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index f335600d6..323df41e1 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/random.h" -#include "../common/strlib.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "elemental.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "elemental.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index 6d04a41a5..aa27aadc9 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,6 +7,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index fa5805c8b..69f67238d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,35 +2,38 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" +#include "../config/core.h" // GP_BOUND_ITEMS #include "guild.h" -#include "storage.h" -#include "battle.h" -#include "npc.h" -#include "pc.h" -#include "status.h" -#include "mob.h" -#include "intif.h" -#include "clif.h" -#include "skill.h" -#include "log.h" -#include "instance.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" +#include "clif.h" +#include "instance.h" +#include "intif.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "pc.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct guild_interface guild_s; /*========================================== diff --git a/src/map/guild.h b/src/map/guild.h index b03bd664d..34e27a56c 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,18 +5,10 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -//#include "../common/mmo.h" -#include "map.h" // NAME_LENGTH - -/** - * Declarations - **/ -struct guild; -struct guild_member; -struct guild_position; -struct guild_castle; -struct map_session_data; -struct mob_data; +#include "map.h" // EVENT_NAME_LENGTH, TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index ff9f7a5b1..b6a83d1cb 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,43 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "../config/core.h" // DBPATH +#include "homunculus.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" - -#include "homunculus.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index e6d59e30e..9eef6af5b 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,9 +5,10 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ +#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "pc.h" +#include "../common/mmo.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index caf622b3d..5789d7dd6 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,30 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/db.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "clif.h" #include "instance.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <time.h> +#include "clif.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index 712a0f141..ae649eda7 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,8 +6,11 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db +#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point + struct block_list; +struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 6bd24368a..383150fbc 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,37 +1,40 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "map.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "intif.h" + +#include <fcntl.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> + +#include "atcommand.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "pc.h" -#include "intif.h" -#include "log.h" -#include "storage.h" -#include "party.h" +#include "elemental.h" #include "guild.h" -#include "pet.h" -#include "atcommand.h" -#include "mercenary.h" #include "homunculus.h" -#include "elemental.h" +#include "log.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include <sys/types.h> -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <fcntl.h> -#include <string.h> - +#include "storage.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index 290dcfcdc..b6ee727f3 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,19 +5,22 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ +#include "../common/cbasetypes.h" /** * Declarations **/ -struct party_member; +struct auction_data; struct guild_member; struct guild_position; -struct s_pet; +struct guild_storage; +struct mail_message; +struct map_session_data; +struct party_member; +struct s_elemental; struct s_homunculus; struct s_mercenary; -struct s_elemental; -struct mail_message; -struct auction_data; +struct s_pet; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index ff28082e7..6f016697f 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,23 +2,25 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/random.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "clif.h" #include "irc-bot.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "clif.h" +#include "map.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" + //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index c15a5d46a..60f03fca5 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,6 +6,8 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ +#include "../common/cbasetypes.h" + #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5eeb90be5..1981f435c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,23 +2,28 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH, RENEWAL #include "itemdb.h" -#include "map.h" -#include "battle.h" // struct battle_config -#include "script.h" // item script processing -#include "pc.h" // W_MUSICAL, W_WHIP #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" // struct battle_config +#include "map.h" +#include "mob.h" // MAX_MOB_DB +#include "pc.h" // W_MUSICAL, W_WHIP +#include "script.h" // item script processing +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct itemdb_interface itemdb_s; /** diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 77fb2e2ec..12766b288 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,9 +5,12 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "map.h" +#include "../common/sql.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 19a98f34b..523ef1d65 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "battle.h" -#include "itemdb.h" +#define HERCULES_CORE + #include "log.h" -#include "map.h" -#include "mob.h" -#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" +#include "itemdb.h" +#include "map.h" +#include "mob.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" + struct log_interface log_s; /// obtain log type character for item/zeny logs diff --git a/src/map/log.h b/src/map/log.h index b2cb92c20..ecfedeac2 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,11 +11,10 @@ /** * Declarations **/ -struct block_list; -struct map_session_data; -struct mob_data; struct item; struct item_data; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 371aa892f..7ba7d7470 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,19 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#define HERCULES_CORE #include "mail.h" -#include "atcommand.h" -#include "itemdb.h" -#include "clif.h" -#include "pc.h" -#include "log.h" #include <time.h> #include <string.h> +#include "atcommand.h" +#include "clif.h" +#include "itemdb.h" +#include "log.h" +#include "pc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct mail_interface mail_s; void mail_clear(struct map_session_data *sd) diff --git a/src/map/mail.h b/src/map/mail.h index 8df537ff3..30b032ef4 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,7 +5,11 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/mmo.h" +#include "../common/cbasetypes.h" + +struct item; +struct mail_message; +struct map_session_data; struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 24a07699f..bccb51d7e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,62 +2,66 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/timer.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/showmsg.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" -#include "path.h" + +#include <math.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "HPMmap.h" +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "chrif.h" #include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" #include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" #include "npc.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "party.h" +#include "path.h" #include "pc.h" +#include "pet.h" +#include "quest.h" +#include "script.h" +#include "skill.h" #include "status.h" -#include "mob.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "chat.h" -#include "itemdb.h" #include "storage.h" -#include "skill.h" #include "trade.h" -#include "party.h" #include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "quest.h" -#include "script.h" -#include "mapreg.h" -#include "guild.h" -#include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" -#include "atcommand.h" -#include "log.h" -#include "mail.h" -#include "irc-bot.h" -#include "HPMmap.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/core.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <math.h> #ifndef _WIN32 #include <unistd.h> #endif @@ -5480,8 +5484,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->addCommand("gm:info",CPCMD_A(gm_position)); - console->addCommand("gm:use",CPCMD_A(gm_use)); + console->input->addCommand("gm:info",CPCMD_A(gm_position)); + console->input->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5837,7 +5841,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->setSQL(map->mysql_handle); + console->input->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index 6b2e9d909..8277c7a62 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ +#include <stdarg.h> + +#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" -#include "../config/core.h" #include "../common/sql.h" -#include "atcommand.h" -#include <stdarg.h> +struct mob_data; struct npc_data; -struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,7 +36,6 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM -#define MAX_LEVEL 175 #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] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index 61c25f24e..f026fde00 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "mapreg.h" + +#include <stdlib.h> +#include <string.h> + +#include "map.h" // map->mysql_handle +#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -10,11 +19,6 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "map.h" // map->mysql_handle -#include "script.h" -#include "mapreg.h" -#include <stdlib.h> -#include <string.h> struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 495621014..26bc8c188 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "mercenary.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "mercenary.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index dd9266b2e..b998ac006 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,6 +6,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 8f12d4b1b..11ac74621 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,46 +2,49 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/socket.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "pet.h" -#include "status.h" +#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP #include "mob.h" -#include "homunculus.h" -#include "mercenary.h" + +#include <math.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "clif.h" +#include "date.h" #include "elemental.h" #include "guild.h" +#include "homunculus.h" +#include "intif.h" #include "itemdb.h" -#include "skill.h" -#include "battle.h" -#include "party.h" -#include "npc.h" #include "log.h" -#include "script.h" -#include "atcommand.h" -#include "date.h" +#include "map.h" +#include "mercenary.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <math.h> +#include "script.h" +#include "skill.h" +#include "status.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index 80175b1db..d07f78c77 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,12 +5,11 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "../common/mmo.h" // struct item -#include "guild.h" // struct guardian_data #include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status data, struct status_change -#include "unit.h" // unit_stop_walking(), unit_stop_attack() -#include "npc.h" +#include "status.h" // struct status_data, struct status_change +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // struct item #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 27759d185..289c42d44 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/db.h" -#include "../common/socket.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "log.h" +#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "npc.h" + +#include <errno.h> +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "chat.h" #include "clif.h" +#include "instance.h" #include "intif.h" -#include "pc.h" -#include "status.h" #include "itemdb.h" -#include "script.h" +#include "log.h" +#include "map.h" #include "mob.h" +#include "pc.h" #include "pet.h" -#include "instance.h" -#include "battle.h" +#include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "npc.h" -#include "chat.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <time.h> -#include <errno.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index d11db0164..a277d4968 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/db.h" struct HPluginData; -struct block_list; -struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 9d5639efc..f245ffea5 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifdef PCRE_SUPPORT +#define HERCULES_CORE -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#ifdef PCRE_SUPPORT -#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() - -#include "../../3rdparty/pcre/include/pcre.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> + +#include "../../3rdparty/pcre/include/pcre.h" + +#include "mob.h" // struct mob_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index cf5e7bbe3..7c49e241c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,34 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/socket.h" // last_tick -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/strlib.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "atcommand.h" //msg_txt() -#include "pc.h" -#include "map.h" -#include "instance.h" #include "battle.h" -#include "intif.h" #include "clif.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" #include "log.h" +#include "map.h" +#include "mob.h" // struct mob_data +#include "pc.h" #include "skill.h" #include "status.h" -#include "itemdb.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // last_tick +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index ed8289af6..3bad22b13 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,11 +5,12 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ -#include "../common/mmo.h" // struct party -#include "../config/core.h" #include <stdarg.h> -#include "map.h" +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct party #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index ae9fc389d..d02e9ee4a 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA #include "path.h" -#include "map.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index 0b67a0120..b48ff05fb 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,6 +6,7 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk +#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index c8fb14e55..45adfe22a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,21 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/timer.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -25,32 +20,40 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" +#include "elemental.h" +#include "guild.h" // guild->search(), guild_request_info() +#include "homunculus.h" +#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" -#include "path.h" -#include "homunculus.h" -#include "instance.h" #include "mercenary.h" -#include "elemental.h" +#include "mob.h" // struct mob_data #include "npc.h" // fake_nd -#include "pet.h" // pet_unlocktarget() #include "party.h" // party->search() -#include "guild.h" // guild->search(), guild_request_info() +#include "path.h" +#include "pc_groups.h" +#include "pet.h" // pet_unlocktarget() +#include "quest.h" #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "pc_groups.h" -#include "quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pc_interface pc_s; @@ -10651,9 +10654,7 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) -#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index 70df9ca56..c4026a48d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus -#include "../common/ers.h" -#include "../common/timer.h" // INVALID_TIMER -#include "atcommand.h" // AtCommandType +#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT + #include "battle.h" // battle_config -#include "battleground.h" +#include "battleground.h" // enum bg_queue_types #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" -#include "log.h" -#include "map.h" // RC_MAX -#include "mob.h" -#include "pc_groups.h" -#include "script.h" // struct script_reg, struct script_regstr +#include "itemdb.h" // MAX_ITEMDELAYS +#include "log.h" // struct e_log_pick_type +#include "map.h" // RC_MAX, ELE_MAX +#include "pc_groups.h" // GroupSettings +#include "script.h" // struct reg_db #include "searchstore.h" // struct s_search_store_info -#include "status.h" // OPTION_*, struct weapon_atk -#include "unit.h" // unit_stop_attack(), unit_stop_walking() +#include "status.h" // enum sc_type, OPTION_* +#include "unit.h" // struct unit_data, struct view_data #include "vending.h" // struct s_vending +#include "../common/cbasetypes.h" +#include "../common/ers.h" // struct eri +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,9 +742,8 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; -#endif + unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 906462c7e..a917ef409 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,6 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pc_groups.h" + +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -10,12 +18,6 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp -#include "pc_groups.h" -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() - static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 5c03f999f..7c8cdd82a 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,6 +5,10 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" + /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index 993497434..aa2be4473 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,37 +2,39 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/db.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "pc.h" -#include "status.h" -#include "map.h" -#include "path.h" -#include "intif.h" -#include "clif.h" -#include "chrif.h" #include "pet.h" -#include "itemdb.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" // msg_txt() #include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mob.h" #include "npc.h" +#include "path.h" +#include "pc.h" #include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "atcommand.h" // msg_txt() -#include "log.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 4ec30b3fb..8dde0fac2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,8 +5,14 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // NAME_LENGTH, struct s_pet + +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index bde276f9d..b76d6bc82 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,36 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "npc.h" -#include "itemdb.h" -#include "script.h" -#include "intif.h" -#include "battle.h" -#include "mob.h" -#include "party.h" -#include "unit.h" -#include "log.h" -#include "clif.h" #include "quest.h" -#include "chrif.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <time.h> +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "script.h" +#include "unit.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index e01e35619..87894d639 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,6 +5,10 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES + #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index aecdf9b28..e4cf7f227 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,6 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "script.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "pet.h" +#include "quest.h" +#include "skill.h" +#include "status.h" +#include "status.h" +#include "storage.h" +#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -10,47 +50,10 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/sysinfo.h" - -#include "map.h" -#include "path.h" -#include "clif.h" -#include "chrif.h" -#include "itemdb.h" -#include "pc.h" -#include "status.h" -#include "storage.h" -#include "mob.h" -#include "npc.h" -#include "pet.h" -#include "mapreg.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "intif.h" -#include "skill.h" -#include "status.h" -#include "chat.h" -#include "battle.h" -#include "battleground.h" -#include "party.h" -#include "guild.h" -#include "atcommand.h" -#include "log.h" -#include "unit.h" -#include "pet.h" -#include "mail.h" -#include "script.h" -#include "quest.h" -#include "elemental.h" -#include "../config/core.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> #ifndef WIN32 #include <sys/time.h> #endif diff --git a/src/map/script.h b/src/map/script.h index 90b18d87f..899c745da 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,17 +5,19 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ -#include "../common/strlib.h" //StringBuf -#include "../common/cbasetypes.h" -#include "map.h" //EVENT_NAME_LENGTH - #include <setjmp.h> #include <errno.h> +#include "map.h" //EVENT_NAME_LENGTH +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct item +#include "../common/sql.h" // Sql +#include "../common/strlib.h" //StringBuf + /** * Declarations **/ -struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 0144aea93..72b28aacd 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,14 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "searchstore.h" // struct s_search_store_info + +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data -#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 827e39053..c9b93ba54 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,6 +5,12 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ +#include <time.h> + +#include "map.h" // MESSAGE_SIZE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index c8388770a..b2e94ec79 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,46 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "pc.h" -#include "status.h" +#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() #include "skill.h" -#include "pet.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "date.h" +#include "elemental.h" +#include "guild.h" #include "homunculus.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mercenary.h" -#include "elemental.h" #include "mob.h" #include "npc.h" -#include "battle.h" -#include "battleground.h" #include "party.h" -#include "itemdb.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "intif.h" -#include "log.h" -#include "chrif.h" -#include "guild.h" -#include "date.h" +#include "status.h" #include "unit.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <math.h> - +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index dda310bd4..b6dbb1fcb 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,19 +5,23 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../common/mmo.h" // MAX_SKILL, struct square -#include "../common/db.h" +#include "../config/core.h" // RENEWAL_CAST + #include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // MAX_SKILL, struct square /** * Declarations **/ -struct map_session_data; struct homun_data; +struct map_session_data; +struct mercenary_data; struct skill_unit; -struct skill_unit_group; -struct status_change_entry; struct square; +struct status_change_entry; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index 4c2bc6d22..eb06138da 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,43 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP +#include "status.h" +#include <math.h> +#include <memory.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "npc.h" -#include "mob.h" -#include "clif.h" -#include "guild.h" +#include "script.h" #include "skill.h" -#include "itemdb.h" -#include "battle.h" -#include "chrif.h" #include "skill.h" -#include "status.h" -#include "script.h" #include "unit.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" #include "vending.h" - -#include <time.h> -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index e47c2b365..baa586297 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,14 +5,18 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ +#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD + +#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct mob_data; -struct pet_data; +struct elemental_data; struct homun_data; struct mercenary_data; -struct status_change; +struct mob_data; +struct npc_data; +struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1878,11 +1882,7 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; -#ifdef RENEWAL_ASPD - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; -#else - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] -#endif + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index e65ed7b80..2db5fff3d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,28 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" +#define HERCULES_CORE -#include "map.h" // struct map_session_data #include "storage.h" -#include "chrif.h" -#include "itemdb.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "guild.h" -#include "battle.h" -#include "atcommand.h" -#include "log.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "guild.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" // struct map_session_data +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 8f9f904f6..5edb68cfc 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,11 +5,12 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -struct storage_data; +#include "../common/cbasetypes.h" +#include "../common/db.h" + struct guild_storage; struct item; struct map_session_data; -struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 44b669ebd..83426c407 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/socket.h" +#define HERCULES_CORE #include "trade.h" + +#include <stdio.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" +#include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" #include "pc.h" -#include "npc.h" -#include "battle.h" -#include "chrif.h" #include "storage.h" -#include "intif.h" -#include "atcommand.h" -#include "log.h" - -#include <stdio.h> -#include <string.h> +#include "../common/nullpo.h" +#include "../common/socket.h" struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 151d4bad5..0ad770e80 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,45 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/showmsg.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // RENEWAL_CAST +#include "unit.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" #include "path.h" #include "pc.h" -#include "mob.h" #include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "script.h" #include "skill.h" -#include "clif.h" -#include "duel.h" -#include "npc.h" -#include "guild.h" #include "status.h" -#include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "storage.h" #include "trade.h" #include "vending.h" -#include "party.h" -#include "intif.h" -#include "chrif.h" -#include "script.h" -#include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/HPM.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 33fa4e052..9e05647b1 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,15 +5,13 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ -//#include "map.h" -struct block_list; -struct unit_data; -struct map_session_data; - #include "clif.h" // clr_type -#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "../common/cbasetypes.h" + +struct map_session_data; +struct block_list; struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index 9462975b3..c8ac814db 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,24 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE + +#include "vending.h" + +#include <stdio.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" #include "itemdb.h" -#include "atcommand.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" -#include "chrif.h" -#include "vending.h" #include "pc.h" -#include "npc.h" #include "skill.h" -#include "battle.h" -#include "log.h" - -#include <stdio.h> -#include <string.h> +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a212f8385..a70726374 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/db.h" + struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 85d5fb548..96d51aec6 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,6 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "../config/core.h" // RENEWAL + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -8,12 +16,6 @@ #include "../common/showmsg.h" #include "../common/utils.h" -#include "../config/renewal.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #ifndef _WIN32 #include <unistd.h> #endif -- cgit v1.2.3-70-g09d2 From 94657284973f4037596bae468ebfbee5c217e02b Mon Sep 17 00:00:00 2001 From: panikon <panikon@zoho.com> Date: Sat, 10 May 2014 06:08:56 -0300 Subject: Revert "Fixed order of includes in all source files" This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/ --- src/char/char.c | 44 +++++----- src/char/char.h | 1 + src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 ++--- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 +++-- src/char/int_guild.h | 3 + src/char/int_homun.c | 21 ++--- src/char/int_homun.h | 2 - src/char/int_mail.c | 20 ++--- src/char/int_mail.h | 3 - src/char/int_mercenary.c | 22 ++--- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 + src/char/int_pet.c | 22 ++--- src/char/int_quest.c | 22 +++-- src/char/int_storage.c | 22 ++--- src/char/inter.c | 43 +++++---- src/char/inter.h | 5 +- src/char/pincode.c | 11 +-- src/common/HPM.c | 31 +++---- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +++- src/common/cbasetypes.h | 6 -- src/common/conf.c | 3 - src/common/conf.h | 1 - src/common/console.c | 223 +++++++++++++++++++++++------------------------ src/common/console.h | 21 ++--- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 +-- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 +-- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 - src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 ++--- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 +-- src/common/sql.h | 3 +- src/common/strlib.c | 13 ++- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 ++----- src/common/sysinfo.h | 16 ++++ src/common/thread.c | 31 +++---- src/common/thread.h | 1 + src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 ++ src/config/renewal.h | 1 - src/login/account.h | 1 - src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 ++- src/login/login.c | 21 ++--- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 ++++++------- src/map/battle.h | 2 +- src/map/battleground.c | 33 ++++--- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 -- src/map/chat.c | 23 +++-- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 - src/map/duel.c | 10 +-- src/map/duel.h | 4 - src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 - src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +++- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 - src/map/intif.c | 51 +++++------ src/map/intif.h | 13 ++- src/map/irc-bot.c | 22 +++-- src/map/irc-bot.h | 2 - src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 +++-- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 ++- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 - src/map/mob.c | 69 +++++++-------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 +++++---- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 - src/map/pc.c | 59 ++++++------- src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 ++- src/map/pc_groups.h | 4 - src/map/pet.c | 48 +++++----- src/map/pet.h | 10 +-- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 - src/map/script.c | 79 ++++++++--------- src/map/script.h | 12 ++- src/map/searchstore.c | 11 +-- src/map/searchstore.h | 6 -- src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 ++- src/map/status.c | 59 ++++++------- src/map/status.h | 16 ++-- src/map/storage.c | 32 ++++--- src/map/storage.h | 5 +- src/map/trade.c | 24 +++-- src/map/unit.c | 63 +++++++------ src/map/unit.h | 12 +-- src/map/vending.c | 27 +++--- src/map/vending.h | 1 - src/tool/mapcache.c | 14 ++- 144 files changed, 1367 insertions(+), 1676 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/char/char.c b/src/char/char.c index 6c0902644..77e393c0d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,30 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "char.h" - -#include <signal.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> - -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_storage.h" -#include "inter.h" -#include "pincode.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -36,6 +13,25 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/console.h" +#include "../common/HPM.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_elemental.h" +#include "int_party.h" +#include "int_storage.h" +#include "char.h" +#include "inter.h" +#include "pincode.h" + +#include <sys/types.h> +#include <time.h> +#include <signal.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5501,7 +5497,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(sql_handle); + console->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 09a78f6b9..2928929de 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,6 +5,7 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ +#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 886b5be26..924930867 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_auction.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "int_mail.h" -#include "inter.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/db.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_mail.h" +#include "int_auction.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index 3a36e75a2..ed0c2a9ed 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_elemental.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c869e6fc2..c90891fc4 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -#include "../common/cbasetypes.h" +struct s_elemental; void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index ffbe48e10..895cbbb94 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,25 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "int_guild.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" +#include "../common/db.h" +#include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_guild.h" + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 5e657ff06..4eb7d310b 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,6 +20,9 @@ enum { GS_REMOVE = 0x8000, }; +struct guild; +struct guild_castle; + int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 795a6b927..143277f05 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,23 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_homun.h" +#include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" -#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 9477f4f03..561dc848f 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,8 +4,6 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ -#include "../common/cbasetypes.h" - struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 86a36d59f..826771676 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mail.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 824ba48a3..7c06cdc1f 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,9 +4,6 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ -struct item; -struct mail_message; - int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index 1dffb656c..aecb3844a 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mercenary.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 195a83b34..b614b8cf7 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,9 +4,7 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -#include "../common/cbasetypes.h" - -struct mmo_charstatus; +struct s_mercenary; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 3e4a743d6..7c328c452 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_party.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/socket.h" +#include "../common/showmsg.h" +#include "../common/mapindex.h" #include "../common/sql.h" -#include "../common/strlib.h" +#include "char.h" +#include "inter.h" +#include "int_party.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct party_data { struct party party; diff --git a/src/char/int_party.h b/src/char/int_party.h index 098c1e9a9..84f00635a 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,6 +14,8 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; +struct party; + int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 29c40eff9..25f00e6f0 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_pet.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/showmsg.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct s_pet *pet_pt; diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 61b43c57d..061dd89d9 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,25 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_quest.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index bf7b76da0..966e61bb3 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "int_storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" // StringBuf +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index 972407ef3..515ca0ec4 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,34 +2,33 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/mmo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "char.h" #include "inter.h" +#include "int_party.h" +#include "int_guild.h" +#include "int_storage.h" +#include "int_pet.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_mail.h" +#include "int_auction.h" +#include "int_quest.h" +#include "int_elemental.h" -#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> +#include <stdlib.h> +#include <errno.h> + #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] -#include "char.h" -#include "int_auction.h" -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mail.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_pet.h" -#include "int_quest.h" -#include "int_storage.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 5e655237e..25b0c2a96 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,10 +5,9 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -#include "char.h" -#include "../common/sql.h" - struct accreg; +#include "../common/sql.h" +#include "char.h" int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index 59182f12d..d51953448 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pincode.h" - -#include <stdlib.h> - -#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" +#include "char.h" +#include "pincode.h" + +#include <stdlib.h> int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 00b92dc60..9ffce87de 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,31 +1,26 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "HPM.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/console.h" +#include "../common/mmo.h" #include "../common/core.h" #include "../common/malloc.h" -#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" #include "../common/timer.h" +#include "../common/conf.h" #include "../common/utils.h" +#include "../common/console.h" +#include "../common/strlib.h" +#include "../common/sql.h" +#include "../common/sysinfo.h" +#include "HPM.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #ifndef WIN32 -# include <unistd.h> +#include <unistd.h> #endif struct malloc_interface iMalloc_HPM; @@ -691,7 +686,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->input->addCommand,"addCPCommand"); + HPM->share(console->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -760,7 +755,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->input->addCommand("plugins",CPCMD_A(plugins)); + console->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 9c176cfd6..0f0df4cda 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,12 +4,8 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#ifndef HERCULES_CORE -#error You should never include HPM.h from a plugin. -#endif - -#include "../common/HPMi.h" #include "../common/cbasetypes.h" +#include "../common/HPMi.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index b98e87d90..19206aeca 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/console.h" #include "../common/core.h" +#include "../common/console.h" #include "../common/sql.h" struct script_state; @@ -20,6 +20,18 @@ struct map_session_data; #define HPExport #endif +#ifndef _COMMON_SHOWMSG_H_ + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); +#endif + /* after */ #include "../common/showmsg.h" @@ -180,7 +192,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef HERCULES_CORE +#ifndef _COMMON_HPM_H_ HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index da0d6b307..f44e80413 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,11 +442,5 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index 46a034497..b816b2f7f 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,10 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - #include "conf.h" - #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index e5b637e47..9aff3df47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,7 +6,6 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" - #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index 6a82db555..d8f352c8a 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,46 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT -#include "console.h" - -#include <stdio.h> -#include <stdlib.h> - #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/showmsg.h" +#include "../common/core.h" #include "../common/sysinfo.h" +#include "../config/core.h" +#include "console.h" #ifndef MINICORE -# include "../common/atomic.h" -# include "../common/ers.h" -# include "../common/malloc.h" -# include "../common/mutex.h" -# include "../common/spinlock.h" -# include "../common/sql.h" -# include "../common/strlib.h" -# include "../common/thread.h" -# include "../common/timer.h" + #include "../common/ers.h" + #include "../common/malloc.h" + #include "../common/atomic.h" + #include "../common/spinlock.h" + #include "../common/thread.h" + #include "../common/mutex.h" + #include "../common/timer.h" + #include "../common/strlib.h" + #include "../common/sql.h" #endif +#include <stdio.h> +#include <stdlib.h> #if !defined(WIN32) -# include <sys/time.h> -# include <unistd.h> + #include <unistd.h> + #include <sys/time.h> #else -# include "../common/winapi.h" // Console close event handling -# ifdef CONSOLE_INPUT -# include <conio.h> /* _kbhit() */ -# endif + #include "../common/winapi.h" // Console close event handling #endif -struct console_interface console_s; #ifdef CONSOLE_INPUT -struct console_input_interface console_input_s; + #if defined(WIN32) + #include <conio.h> /* _kbhit() */ + #endif #endif +struct console_interface console_s; + /*====================================== * CORE : Display title *--------------------------------------*/ @@ -120,12 +116,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( console->input->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); - console->input->parse_list_subs(console->input->cmd_list[i],2); + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( console->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); + console->parse_list_subs(console->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); } } } @@ -148,7 +144,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->input->SQL, line); + Sql_HerculesUpdateSkip(console->SQL, line); } /** @@ -210,7 +206,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->input->cmds,struct CParseEntry *, len); + RECREATE(console->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -224,12 +220,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->input->cmd_count++; - console->input->cmds[i] = cmd; + console->cmd_count++; + console->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); - console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); + console->cmd_list[console->cmd_list_count - 1] = cmd; } } @@ -237,11 +233,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->input->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); - console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; + RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); + console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; break; } } @@ -260,23 +256,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->input->cmd_list_count ) { - RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + if( i == console->cmd_list_count ) { + RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->input->cmds[console->input->cmd_count - 1] = cmd; - RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); - console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; - i = console->input->cmd_list_count - 1; + console->cmds[console->cmd_count - 1] = cmd; + RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); + console->cmd_list[console->cmd_list_count - 1] = cmd; + i = console->cmd_list_count - 1; } - cmd = console->input->cmd_list[i]; + cmd = console->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -285,13 +281,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); - CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->input->cmds[console->input->cmd_count-1]->next_count = 0; + RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->cmds[console->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; - cmd = console->input->cmds[console->input->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; + cmd = console->cmds[console->cmd_count-1]; continue; } @@ -306,7 +302,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->input->parse_list_subs(cmd->u.next[i],depth + 1); + console->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -324,21 +320,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->input->cmd_list_count ) { + if( i == console->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->input->cmd_list[i]; + cmd = console->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -355,7 +351,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->input->parse_list_subs(cmd,2); + console->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -396,95 +392,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->input->ptstate ) {/* loopx */ - if( console->input->key_pressed() ) { + while( console->ptstate ) {/* loopx */ + if( console->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->input->parse(input); + console->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->input->ptlock); + EnterSpinLock(&console->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->input->ptlock); + LeaveSpinLock(&console->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->input->ptlock); + LeaveSpinLock(&console->ptlock); } } - ramutex_lock( console->input->ptmutex ); - racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); - ramutex_unlock( console->input->ptmutex ); + ramutex_lock( console->ptmutex ); + racond_wait( console->ptcond, console->ptmutex, -1 ); + ramutex_unlock( console->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->input->ptlock); + EnterSpinLock(&console->ptlock); for(i = 0; i < cinput.count; i++) { - console->input->parse_sub(cinput.queue[i]); + console->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->input->ptlock); - racond_signal(console->input->ptcond); + LeaveSpinLock(&console->ptlock); + racond_signal(console->ptcond); return 0; } void console_parse_final(void) { - if( console->input->ptstate ) { - InterlockedDecrement(&console->input->ptstate); - racond_signal(console->input->ptcond); + if( console->ptstate ) { + InterlockedDecrement(&console->ptstate); + racond_signal(console->ptcond); /* wait for thread to close */ - rathread_wait(console->input->pthread, NULL); + rathread_wait(console->pthread, NULL); - racond_destroy(console->input->ptcond); - ramutex_destroy(console->input->ptmutex); + racond_destroy(console->ptcond); + ramutex_destroy(console->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->input->ptstate = 1; + console->ptstate = 1; - InitializeSpinLock(&console->input->ptlock); + InitializeSpinLock(&console->ptlock); - console->input->ptmutex = ramutex_create(); - console->input->ptcond = racond_create(); + console->ptmutex = ramutex_create(); + console->ptcond = racond_create(); - if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ + if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->input->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->input->SQL = SQL_handle; + console->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->input->cmd_count = console->input->cmd_list_count = 0; - console->input->load_defaults(); - console->input->parse_init(); + console->cmd_count = console->cmd_list_count = 0; + console->load_defaults(); + console->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->input->parse_final(); - for( i = 0; i < console->input->cmd_count; i++ ) { - if( console->input->cmds[i]->next_count ) - aFree(console->input->cmds[i]->u.next); - aFree(console->input->cmds[i]); + console->parse_final(); + for( i = 0; i < console->cmd_count; i++ ) { + if( console->cmds[i]->next_count ) + aFree(console->cmds[i]->u.next); + aFree(console->cmds[i]); } - aFree(console->input->cmds); - aFree(console->input->cmd_list); + aFree(console->cmds); + aFree(console->cmd_list); #endif } void console_defaults(void) { @@ -493,20 +489,17 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->input = &console_input_s; - console->input->parse_init = console_parse_init; - console->input->parse_final = console_parse_final; - console->input->parse_timer = console_parse_timer; - console->input->pthread_main = cThread_main; - console->input->parse = console_parse; - console->input->parse_sub = console_parse_sub; - console->input->key_pressed = console_parse_key_pressed; - console->input->load_defaults = console_load_defaults; - console->input->parse_list_subs = console_parse_list_subs; - console->input->addCommand = console_parse_create; - console->input->setSQL = console_setSQL; - console->input->SQL = NULL; -#else - console->input = NULL; + console->parse_init = console_parse_init; + console->parse_final = console_parse_final; + console->parse_timer = console_parse_timer; + console->pthread_main = cThread_main; + console->parse = console_parse; + console->parse_sub = console_parse_sub; + console->key_pressed = console_parse_key_pressed; + console->load_defaults = console_load_defaults; + console->parse_list_subs = console_parse_list_subs; + console->addCommand = console_parse_create; + console->setSQL = console_setSQL; + console->SQL = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index d2c58f978..3d19ddc9d 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,13 +4,11 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../config/core.h" // MAX_CONSOLE_INPUT - -#include "../common/cbasetypes.h" +#include "../common/thread.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../common/thread.h" +#include "../config/core.h" /** * Queue Max @@ -49,8 +47,11 @@ struct { unsigned short count; } cinput; +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); #ifdef CONSOLE_INPUT -struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -76,17 +77,7 @@ struct console_input_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); -}; -#else -struct console_input_interface; #endif - -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); - - struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 85f824866..49b272488 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,40 +2,36 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" -#include "core.h" - -#include "../common/cbasetypes.h" -#include "../common/console.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/random.h" #include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/strlib.h" +#include "core.h" +#include "../common/console.h" +#include "../common/random.h" #include "../common/sysinfo.h" #ifndef MINICORE -# include "../common/HPM.h" -# include "../common/conf.h" -# include "../common/db.h" -# include "../common/ers.h" -# include "../common/socket.h" -# include "../common/sql.h" -# include "../common/thread.h" -# include "../common/timer.h" -# include "../common/utils.h" + #include "../common/db.h" + #include "../common/socket.h" + #include "../common/timer.h" + #include "../common/thread.h" + #include "../common/sql.h" + #include "../config/core.h" + #include "../common/HPM.h" + #include "../common/utils.h" + #include "../common/conf.h" + #include "../common/ers.h" #endif -#include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <signal.h> #include <string.h> #ifndef _WIN32 -# include <unistd.h> +#include <unistd.h> #else -# include "../common/winapi.h" // Console close event handling +#include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index ba75e6b01..e9f7c5961 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,10 +7,11 @@ #include "../common/db.h" #include "../common/mmo.h" +#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG -# include <signal.h> + #include <signal.h> #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 1781aa96f..8d6b08815 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,18 +67,14 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ - -#define HERCULES_CORE - -#include "db.h" - #include <stdio.h> #include <stdlib.h> -#include "../common/ers.h" -#include "../common/malloc.h" +#include "db.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" +#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 0d2548806..67abe6f19 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,8 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include <stdarg.h> - #include "../common/cbasetypes.h" +#include <stdarg.h> /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * diff --git a/src/common/des.c b/src/common/des.c index 7f952be76..ed6d098dc 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,11 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder - -#define HERCULES_CORE - -#include "des.h" - #include "../common/cbasetypes.h" +#include "../common/des.h" + /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index d9895e4f2..5a3d7314a 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,18 +39,14 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ - -#define HERCULES_CORE - -#include "ers.h" - #include <stdlib.h> #include <string.h> #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/nullpo.h" #include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL +#include "../common/nullpo.h" +#include "ers.h" #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index 1111fb3f3..bde0ed720 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,8 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/nullpo.h" #include "grfio.h" #include <stdio.h> @@ -12,14 +17,6 @@ #include <sys/stat.h> #include <zlib.h> -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" - //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 13cf0b5ce..5b39cbab6 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "malloc.h" +#include "../common/malloc.h" +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" - struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5c69c7063..3128a3cb0 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/db.h" #include "mapindex.h" +#include <string.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> - -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index e7b506e27..05fde42cc 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,15 +6,11 @@ * ***********************************************************/ -#define HERCULES_CORE - +#include "../common/random.h" #include "md5calc.h" - +#include <string.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> - -#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index 1d826463e..d535d2874 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,9 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include <time.h> - -#include "../common/cbasetypes.h" +#include "cbasetypes.h" #include "../common/db.h" +#include <time.h> // server->client protocol version // 0 - pre-? @@ -97,7 +96,6 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 -#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 12524c3b7..0668dbc41 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,10 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "mutex.h" - #ifdef WIN32 #include "../common/winapi.h" #else @@ -17,6 +13,7 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" +#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index 3b83b66d6..eeb24e6ff 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,7 +4,6 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ -#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1891835f1..1cb471aff 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,14 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "nullpo.h" - #include <stdio.h> #include <stdarg.h> #include <string.h> - +#include "../common/nullpo.h" #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index 7019a31f3..e46c52cad 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,23 +1,17 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "random.h" - -#include <time.h> // time - -#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 - #include "../common/showmsg.h" #include "../common/timer.h" // gettick - +#include "random.h" #if defined(WIN32) -# include "../common/winapi.h" + #include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) -# include <sys/types.h> -# include <unistd.h> + #include <sys/types.h> + #include <unistd.h> #endif +#include <time.h> // time +#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 1dbcba282..14342fe5e 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,26 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/strlib.h" // StringBuf #include "showmsg.h" +#include "core.h" //[Ind] - For SERVER_TYPE -#include <stdarg.h> #include <stdio.h> -#include <stdlib.h> // atexit #include <string.h> +#include <stdarg.h> #include <time.h> +#include <stdlib.h> // atexit #include "../../3rdparty/libconfig/libconfig.h" -#include "../common/cbasetypes.h" -#include "../common/core.h" //[Ind] - For SERVER_TYPE -#include "../common/strlib.h" // StringBuf - #ifdef WIN32 -# include "../common/winapi.h" +#include "../common/winapi.h" #else // not WIN32 -# include <unistd.h> +#include <unistd.h> #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 5b32f39ae..49fbc34fb 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,14 +5,12 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#include <stdarg.h> - -#ifdef HERCULES_CORE -# include "../../3rdparty/libconfig/libconfig.h" -#else -# include "../common/HPMi.h" +#ifndef _COMMON_HPMI_H_ + #include "../../3rdparty/libconfig/libconfig.h" #endif +#include <stdarg.h> + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -92,7 +90,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifdef HERCULES_CORE +#ifndef _COMMON_HPMI_H_ extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -103,18 +101,7 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); -#else - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); #endif - extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 3738f2c2a..35d350e95 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,50 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../config/core.h" +#include "../common/HPM.h" -#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ + #include "socket.h" -#undef _H_SOCKET_C_ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" - #ifdef WIN32 -# include "../common/winapi.h" + #include "../common/winapi.h" #else -# include <arpa/inet.h> -# include <errno.h> -# include <net/if.h> -# include <netdb.h> -# include <netinet/in.h> -# include <netinet/tcp.h> -# include <sys/ioctl.h> -# include <sys/socket.h> -# include <sys/time.h> -# include <unistd.h> - -# ifndef SIOCGIFCONF -# include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] -# endif -# ifndef FIONBIO -# include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] -# endif - -# ifdef HAVE_SETRLIMIT -# include <sys/resource.h> -# endif + #include <errno.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <netinet/tcp.h> + #include <net/if.h> + #include <unistd.h> + #include <sys/time.h> + #include <sys/ioctl.h> + #include <netdb.h> + #include <arpa/inet.h> + + #ifndef SIOCGIFCONF + #include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] + #endif + #ifndef FIONBIO + #include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] + #endif + + #ifdef HAVE_SETRLIMIT + #include <sys/resource.h> + #endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 804b9284f..75adde4cf 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ -#include <time.h> - #include "../common/cbasetypes.h" #ifdef WIN32 -# include "../common/winapi.h" + #include "../common/winapi.h" typedef long in_addr_t; #else -# include <netinet/in.h> -# include <sys/socket.h> -# include <sys/types.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> #endif +#include <time.h> + struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 0058e1d83..29fbb355b 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,3 +1,4 @@ +#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -14,14 +15,14 @@ // // -#include "../common/atomic.h" -#include "../common/cbasetypes.h" -#include "../common/thread.h" - #ifdef WIN32 #include "../common/winapi.h" #endif +#include "../common/cbasetypes.h" +#include "../common/atomic.h" +#include "../common/thread.h" + #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index aeb56bff0..79ccc8e92 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "sql.h" - -#include <stdlib.h> // strtoul -#include <string.h> // strlen/strnlen/memcpy/memset - #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "sql.h" #ifdef WIN32 -# include "../common/winapi.h" // Needed before mysql.h +#include "../common/winapi.h" #endif #include <mysql.h> +#include <string.h>// strlen/strnlen/memcpy/memset +#include <stdlib.h>// strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 807e0843c..1fb436853 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,9 +5,10 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ +#include "../common/cbasetypes.h" #include <stdarg.h>// va_list -#include "../common/cbasetypes.h" + // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index e2e802915..361595b07 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#define _H_STRLIB_C_ +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#define STRLIB_C #include "strlib.h" -#undef _H_STRLIB_C_ -#include <errno.h> #include <stdio.h> #include <stdlib.h> +#include <errno.h> -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index decf661a6..10844d257 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,16 +5,15 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include <stdarg.h> - #include "../common/cbasetypes.h" +#include <stdarg.h> #ifndef __USE_GNU -# define __USE_GNU // required to enable strnlen on some platforms -# include <string.h> -# undef __USE_GNU + #define __USE_GNU // required to enable strnlen on some platforms + #include <string.h> + #undef __USE_GNU #else -# include <string.h> + #include <string.h> #endif #ifdef WIN32 @@ -166,7 +165,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef _H_STRLIB_C_ +#ifndef STRLIB_C #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -190,6 +189,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* _H_STRLIB_C_ */ +#endif /* STRLIB_C */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3fdfadb41..a56896458 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,39 +4,23 @@ /// See sysinfo.h for a description of this file -#define HERCULES_CORE - +#define _COMMON_SYSINFO_P_ #include "sysinfo.h" - -#include <stdio.h> // fopen -#include <stdlib.h> // atoi +#undef _COMMON_SYSINFO_P_ #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/malloc.h" #include "../common/strlib.h" +#include "../common/malloc.h" #ifdef WIN32 -# include <string.h> // strlen -# include <windows.h> +#include <windows.h> +#include <string.h> // strlen #else -# include <unistd.h> +#include <unistd.h> #endif - -/// Private interface fields -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; +#include <stdio.h> // fopen +#include <stdlib.h> // atoi /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index c0c4d276a..17faac26b 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,7 +13,23 @@ #include "../common/cbasetypes.h" +#ifdef _COMMON_SYSINFO_P_ +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; +#else struct sysinfo_private; +#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4f73aa9b3..4d110f2dd 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,27 +6,24 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "thread.h" - -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" - #ifdef WIN32 -# include "../common/winapi.h" -# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -# define __thread __declspec( thread ) +#include "../common/winapi.h" +#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +#define __thread __declspec( thread ) #else -# include <stdlib.h> -# include <unistd.h> -# include <string.h> -# include <signal.h> -# include <pthread.h> -# include <sched.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <signal.h> +#include <pthread.h> +#include <sched.h> #endif +#include "cbasetypes.h" +#include "malloc.h" +#include "showmsg.h" +#include "thread.h" + // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index 887c03179..d6b2bbc6e 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,6 +1,7 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 10f14b0f2..526854582 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,8 +2,11 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" #include "timer.h" #include <stdio.h> @@ -11,17 +14,11 @@ #include <string.h> #include <time.h> -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" - #ifdef WIN32 -# include "../common/winapi.h" // GetTickCount() +#include "../common/winapi.h" // GetTickCount() #else -# include <sys/time.h> // struct timeval, gettimeofday() -# include <unistd.h> +#include <unistd.h> +#include <sys/time.h> // struct timeval, gettimeofday() #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 84925f707..47747dd32 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,35 +2,33 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/core.h" +#include "socket.h" #include "utils.h" -#include <math.h> // floor() -#include <stdarg.h> #include <stdio.h> +#include <stdarg.h> #include <stdlib.h> #include <string.h> -#include <sys/stat.h> // cache purposes [Ind/Hercules] - -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" +#include <math.h> // floor() #ifdef WIN32 -# include "../common/winapi.h" -# ifndef F_OK -# define F_OK 0x0 -# endif /* F_OK */ + #include "../common/winapi.h" + #ifndef F_OK + #define F_OK 0x0 + #endif /* F_OK */ #else -# include <dirent.h> -# include <sys/stat.h> -# include <unistd.h> + #include <unistd.h> + #include <dirent.h> + #include <sys/stat.h> #endif +#include <sys/stat.h> // cache purposes [Ind/Hercules] + struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index 823651163..f89546b8a 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,11 +5,10 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ +#include "../common/cbasetypes.h" #include <stdio.h> // FILE* #include <time.h> -#include "../common/cbasetypes.h" - /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index f9baa4d7d..6557cb987 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,6 +52,13 @@ #define DEFTYPE_MAX CHAR_MAX #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif + /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36bdd3958..36615d63b 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,6 +74,5 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL -#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 329ae31c8..234e7c0c1 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,7 +7,6 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM -#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 2e4ed7ab9..1483196ab 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,22 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "account.h" - -#include <stdlib.h> -#include <string.h> - -#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "../common/console.h" +#include "../common/socket.h" +#include "account.h" +#include <stdlib.h> +#include <string.h> /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -657,7 +652,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->input->setSQL(db->accounts); + console->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 081f28d84..74f45e418 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,15 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "ipban.h" - -#include <stdlib.h> -#include <string.h> - -#include "login.h" -#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -18,6 +9,11 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "login.h" +#include "ipban.h" +#include "loginlog.h" +#include <stdlib.h> +#include <string.h> // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index cb46e0226..af59fcf38 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,18 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "login.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "account.h" -#include "ipban.h" -#include "loginlog.h" -#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -24,6 +12,15 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" +#include "account.h" +#include "ipban.h" +#include "login.h" +#include "loginlog.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index e77b96a0e..14c361a15 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" // NAME_LENGTH,SEX_* +#include "../common/core.h" // CORE_ST_LAST enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index a86ad431c..730fb6e62 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,7 +4,6 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ -#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -12,4 +11,5 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); + #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 2cbc02c93..231ac783b 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,18 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "loginlog.h" - -#include <string.h> -#include <stdlib.h> // exit - #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" +#include <string.h> +#include <stdlib.h> // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index cb8c979c6..061479d87 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,15 +1,25 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/HPM.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/strlib.h" -#include "HPMmap.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "HPMmap.h" +#include "pc.h" +#include "map.h" +// #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -27,14 +37,12 @@ #include "itemdb.h" #include "log.h" #include "mail.h" -#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" -#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -46,19 +54,11 @@ #include "trade.h" #include "unit.h" #include "vending.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index df3be40a5..5fd0faf86 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,60 +2,57 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/sysinfo.h" -#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "battle.h" #include "chat.h" -#include "chrif.h" #include "clif.h" +#include "chrif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" -#include "mail.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" #include "pc_groups.h" // groupid2name +#include "status.h" +#include "skill.h" +#include "mob.h" +#include "npc.h" #include "pet.h" -#include "quest.h" +#include "homunculus.h" +#include "mail.h" +#include "mercenary.h" +#include "elemental.h" +#include "party.h" +#include "guild.h" #include "script.h" -#include "searchstore.h" -#include "skill.h" -#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "mapreg.h" +#include "quest.h" +#include "searchstore.h" #include "HPMmap.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> + struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index c8a1863af..bc4ab30a3 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ -#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" +#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 0865ee4ba..9089b7102 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT -#include "battle.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battleground.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "skill.h" -#include "status.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" +#include "../common/timer.h" #include "../common/nullpo.h" -#include "../common/random.h" +#include "../common/malloc.h" #include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "../common/sysinfo.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" +#include "../common/HPM.h" + +#include "map.h" +#include "path.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" +#include "mob.h" +#include "itemdb.h" +#include "clif.h" +#include "pet.h" +#include "guild.h" +#include "party.h" +#include "battle.h" +#include "battleground.h" +#include "chrif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index fbe097c78..88038ddb4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "map.h" //ELE_MAX #include "../common/cbasetypes.h" +#include "map.h" //ELE_MAX /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index a7169de0e..68539e25d 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,32 +2,29 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/conf.h" #include "battleground.h" - -#include <string.h> -#include <stdio.h> - #include "battle.h" #include "clif.h" -#include "homunculus.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" // struct mob_data #include "npc.h" -#include "party.h" #include "pc.h" +#include "party.h" #include "pet.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include "homunculus.h" +#include "mercenary.h" +#include "mapreg.h" + +#include <string.h> +#include <stdio.h> struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index ec0a86f14..05c4eb060 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ +#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" -#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 80264b30d..2a15e66fc 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,21 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "buyingstore.h" // struct s_buyingstore - -#include "atcommand.h" // msg_txt -#include "battle.h" // battle_config.* -#include "chrif.h" -#include "clif.h" // clif->buyingstore_* -#include "log.h" // log_pick_pc, log_zeny -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/db.h" // ARR_FIND #include "../common/showmsg.h" // ShowWarning #include "../common/socket.h" // RBUF* #include "../common/strlib.h" // safestrncpy +#include "atcommand.h" // msg_txt +#include "battle.h" // battle_config.* +#include "buyingstore.h" // struct s_buyingstore +#include "clif.h" // clif->buyingstore_* +#include "log.h" // log_pick_pc, log_zeny +#include "pc.h" // struct map_session_data +#include "chrif.h" struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 914631872..5141a1013 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,11 +5,6 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - -struct map_session_data; - /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index c9d3e6d46..08fc4a575 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,13 +2,12 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "chat.h" - -#include <stdio.h> -#include <string.h> - +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/mmo.h" #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -16,12 +15,10 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#include "chat.h" + +#include <stdio.h> +#include <string.h> struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index cbc2a391e..b0c6cd905 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,12 +6,9 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE -#include "../common/cbasetypes.h" -#include "../common/db.h" -struct chat_data; struct map_session_data; -struct npc_data; +struct chat_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 81e2d387c..99a1935fd 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,16 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT -#include "chrif.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/ers.h" +#include "../common/HPM.h" #include "map.h" #include "battle.h" @@ -26,17 +25,15 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" +#include "chrif.h" #include "quest.h" #include "storage.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <time.h> struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 84efc66d3..25e955604 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,11 +5,9 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ +#include "../common/cbasetypes.h" #include <time.h> - #include "map.h" //TBL_stuff -#include "../common/cbasetypes.h" -#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index cb2474961..1a6665307 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,59 +2,56 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT -#include "clif.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/conf.h" +#include "../common/HPM.h" +#include "map.h" +#include "chrif.h" +#include "pc.h" +#include "status.h" +#include "npc.h" +#include "itemdb.h" +#include "chat.h" +#include "trade.h" +#include "storage.h" +#include "script.h" +#include "skill.h" #include "atcommand.h" +#include "intif.h" #include "battle.h" #include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "elemental.h" +#include "mob.h" +#include "party.h" +#include "unit.h" #include "guild.h" +#include "vending.h" +#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" +#include "mercenary.h" +#include "elemental.h" #include "log.h" +#include "clif.h" #include "mail.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "pet.h" #include "quest.h" -#include "script.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "trade.h" -#include "unit.h" -#include "vending.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "irc-bot.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <time.h> struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index 7b27e1fe6..0f4a9e756 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ -#include <stdarg.h> - -#include "map.h" -#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" +#include "../common/socket.h" +#include "../map/map.h" +#include "../map/packets_struct.h" +#include <stdarg.h> /** * Declarations @@ -20,6 +20,7 @@ struct item; struct item_data; struct storage_data; struct guild_storage; +struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index 975a00c50..f38ead858 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,14 +1,10 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - +#include "../common/cbasetypes.h" #include "date.h" - #include <time.h> -#include "../common/cbasetypes.h" - int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index b3ed59b2f..46f0d86c3 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,8 +4,6 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ -#include "../common/cbasetypes.h" - int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index a423ef240..af2741f77 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "atcommand.h" // msg_txt +#include "clif.h" #include "duel.h" +#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> -#include "atcommand.h" // msg_txt -#include "clif.h" -#include "pc.h" -#include "../common/cbasetypes.h" - /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 956aed36d..5405d2eee 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,10 +5,6 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ -#include "../common/cbasetypes.h" - -struct map_session_data; - struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index 323df41e1..f335600d6 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "elemental.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/random.h" +#include "../common/strlib.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "elemental.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index aa27aadc9..6d04a41a5 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,7 +7,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index 69f67238d..fa5805c8b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "guild.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battle.h" -#include "clif.h" -#include "instance.h" -#include "intif.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "pc.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" +#include "../common/timer.h" +#include "../common/nullpo.h" #include "../common/malloc.h" #include "../common/mapindex.h" -#include "../common/nullpo.h" #include "../common/showmsg.h" +#include "../common/ers.h" #include "../common/strlib.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" + +#include "map.h" +#include "guild.h" +#include "storage.h" +#include "battle.h" +#include "npc.h" +#include "pc.h" +#include "status.h" +#include "mob.h" +#include "intif.h" +#include "clif.h" +#include "skill.h" +#include "log.h" +#include "instance.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct guild_interface guild_s; diff --git a/src/map/guild.h b/src/map/guild.h index 34e27a56c..b03bd664d 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,10 +5,18 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -#include "map.h" // EVENT_NAME_LENGTH, TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" +//#include "../common/mmo.h" +#include "map.h" // NAME_LENGTH + +/** + * Declarations + **/ +struct guild; +struct guild_member; +struct guild_position; +struct guild_castle; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index b6a83d1cb..ff9f7a5b1 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,45 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "homunculus.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include "homunculus.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9eef6af5b..e6d59e30e 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,10 +5,9 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ -#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" +#include "pc.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index 5789d7dd6..caf622b3d 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,32 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/db.h" +#include "../common/HPM.h" +#include "clif.h" #include "instance.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdarg.h> #include <time.h> -#include "clif.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" - struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index ae649eda7..712a0f141 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,11 +6,8 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point - struct block_list; -struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 383150fbc..6bd24368a 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,40 +1,37 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "intif.h" - -#include <fcntl.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> - -#include "atcommand.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "map.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" +#include "pc.h" +#include "intif.h" #include "log.h" -#include "mail.h" -#include "map.h" -#include "mercenary.h" +#include "storage.h" #include "party.h" -#include "pc.h" +#include "guild.h" #include "pet.h" +#include "atcommand.h" +#include "mercenary.h" +#include "homunculus.h" +#include "elemental.h" +#include "mail.h" #include "quest.h" -#include "storage.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <fcntl.h> +#include <string.h> + struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index b6ee727f3..290dcfcdc 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,22 +5,19 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ -#include "../common/cbasetypes.h" /** * Declarations **/ -struct auction_data; +struct party_member; struct guild_member; struct guild_position; -struct guild_storage; -struct mail_message; -struct map_session_data; -struct party_member; -struct s_elemental; +struct s_pet; struct s_homunculus; struct s_mercenary; -struct s_pet; +struct s_elemental; +struct mail_message; +struct auction_data; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 6f016697f..ff28082e7 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,25 +2,23 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/random.h" +#include "map.h" +#include "pc.h" +#include "clif.h" #include "irc-bot.h" #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "clif.h" -#include "map.h" -#include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" - //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 60f03fca5..c15a5d46a 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,8 +6,6 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ -#include "../common/cbasetypes.h" - #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 1981f435c..5eeb90be5 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,27 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, RENEWAL -#include "itemdb.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battle.h" // struct battle_config -#include "map.h" -#include "mob.h" // MAX_MOB_DB -#include "pc.h" // W_MUSICAL, W_WHIP -#include "script.h" // item script processing -#include "../common/conf.h" -#include "../common/malloc.h" #include "../common/nullpo.h" +#include "../common/malloc.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/conf.h" +#include "itemdb.h" +#include "map.h" +#include "battle.h" // struct battle_config +#include "script.h" // item script processing +#include "pc.h" // W_MUSICAL, W_WHIP + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct itemdb_interface itemdb_s; diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 12766b288..77fb2e2ec 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,12 +5,9 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ -#include "map.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "../common/sql.h" +#include "map.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 523ef1d65..19a98f34b 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,24 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "log.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/cbasetypes.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "battle.h" #include "itemdb.h" +#include "log.h" #include "map.h" #include "mob.h" #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct log_interface log_s; diff --git a/src/map/log.h b/src/map/log.h index ecfedeac2..b2cb92c20 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,10 +11,11 @@ /** * Declarations **/ -struct item; -struct item_data; +struct block_list; struct map_session_data; struct mob_data; +struct item; +struct item_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 7ba7d7470..371aa892f 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "mail.h" - -#include <time.h> -#include <string.h> - #include "atcommand.h" -#include "clif.h" #include "itemdb.h" -#include "log.h" +#include "clif.h" #include "pc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "log.h" + +#include <time.h> +#include <string.h> struct mail_interface mail_s; diff --git a/src/map/mail.h b/src/map/mail.h index 30b032ef4..8df537ff3 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,11 +5,7 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/cbasetypes.h" - -struct item; -struct mail_message; -struct map_session_data; +#include "../common/mmo.h" struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 01d3dbb9f..315924e2e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,66 +2,62 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/timer.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/showmsg.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/HPM.h" -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" - -#include <math.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "HPMmap.h" -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "path.h" #include "chrif.h" #include "clif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" #include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" #include "npc.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "party.h" -#include "path.h" #include "pc.h" -#include "pet.h" -#include "quest.h" -#include "script.h" -#include "skill.h" #include "status.h" +#include "mob.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "chat.h" +#include "itemdb.h" #include "storage.h" +#include "skill.h" #include "trade.h" +#include "party.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/core.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "battle.h" +#include "battleground.h" +#include "quest.h" +#include "script.h" +#include "mapreg.h" +#include "guild.h" +#include "pet.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" +#include "atcommand.h" +#include "log.h" +#include "mail.h" +#include "irc-bot.h" +#include "HPMmap.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <math.h> #ifndef _WIN32 #include <unistd.h> #endif @@ -5486,8 +5482,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->input->addCommand("gm:info",CPCMD_A(gm_position)); - console->input->addCommand("gm:use",CPCMD_A(gm_use)); + console->addCommand("gm:info",CPCMD_A(gm_position)); + console->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5843,7 +5839,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(map->mysql_handle); + console->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index 539b02ed8..c61868b13 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ -#include <stdarg.h> - -#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" +#include "../config/core.h" #include "../common/sql.h" +#include "atcommand.h" +#include <stdarg.h> -struct mob_data; struct npc_data; +struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,6 +36,7 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM +#define MAX_LEVEL 175 #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] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index f026fde00..61c25f24e 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,15 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mapreg.h" - -#include <stdlib.h> -#include <string.h> - -#include "map.h" // map->mysql_handle -#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -19,6 +10,11 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "map.h" // map->mysql_handle +#include "script.h" +#include "mapreg.h" +#include <stdlib.h> +#include <string.h> struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 26bc8c188..495621014 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mercenary.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "mercenary.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index b998ac006..dd9266b2e 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,7 +6,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 11ac74621..8f12d4b1b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,49 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP -#include "mob.h" - -#include <math.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/socket.h" -#include "atcommand.h" -#include "battle.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" +#include "intif.h" +#include "pc.h" +#include "pet.h" +#include "status.h" +#include "mob.h" +#include "homunculus.h" +#include "mercenary.h" #include "elemental.h" #include "guild.h" -#include "homunculus.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mercenary.h" -#include "npc.h" +#include "skill.h" +#include "battle.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "quest.h" +#include "npc.h" +#include "log.h" #include "script.h" -#include "skill.h" -#include "status.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" +#include "date.h" +#include "quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <math.h> struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index d07f78c77..80175b1db 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,11 +5,12 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status_data, struct status_change -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct item +#include "guild.h" // struct guardian_data +#include "map.h" // struct status_data, struct view_data, struct mob_skill +#include "status.h" // struct status data, struct status_change +#include "unit.h" // unit_stop_walking(), unit_stop_attack() +#include "npc.h" #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 8e5854dbf..20b500630 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "npc.h" - -#include <errno.h> -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/db.h" +#include "../common/socket.h" +#include "../common/HPM.h" -#include "battle.h" -#include "chat.h" +#include "map.h" +#include "log.h" #include "clif.h" -#include "instance.h" #include "intif.h" +#include "pc.h" +#include "status.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "script.h" #include "mob.h" -#include "pc.h" #include "pet.h" -#include "script.h" +#include "instance.h" +#include "battle.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "npc.h" +#include "chat.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include <time.h> +#include <errno.h> struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index 6e9686d33..c154b14d0 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/db.h" struct HPluginData; +struct block_list; +struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index f245ffea5..9d5639efc 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - #ifdef PCRE_SUPPORT +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" + +#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() + +#include "../../3rdparty/pcre/include/pcre.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> - -#include "../../3rdparty/pcre/include/pcre.h" - -#include "mob.h" // struct mob_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include <stdarg.h> /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index 7c49e241c..cf5e7bbe3 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/socket.h" // last_tick +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/strlib.h" +#include "../common/HPM.h" -#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "atcommand.h" //msg_txt() -#include "battle.h" -#include "clif.h" +#include "pc.h" +#include "map.h" #include "instance.h" +#include "battle.h" #include "intif.h" -#include "itemdb.h" +#include "clif.h" #include "log.h" -#include "map.h" -#include "mob.h" // struct mob_data -#include "pc.h" #include "skill.h" #include "status.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // last_tick -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "itemdb.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index 3bad22b13..ed8289af6 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,12 +5,11 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ +#include "../common/mmo.h" // struct party +#include "../config/core.h" #include <stdarg.h> -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct party +#include "map.h" #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index d02e9ee4a..ae9fc389d 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,16 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA -#include "path.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "map.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -19,6 +9,13 @@ #include "../common/random.h" #include "../common/showmsg.h" +#include "path.h" +#include "map.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index b48ff05fb..0b67a0120 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,7 +6,6 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk -#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index 45adfe22a..c8fb14e55 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,16 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/timer.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/sysinfo.h" -#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -20,40 +25,32 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" -#include "elemental.h" -#include "guild.h" // guild->search(), guild_request_info() -#include "homunculus.h" -#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" +#include "path.h" +#include "homunculus.h" +#include "instance.h" #include "mercenary.h" -#include "mob.h" // struct mob_data +#include "elemental.h" #include "npc.h" // fake_nd -#include "party.h" // party->search() -#include "path.h" -#include "pc_groups.h" #include "pet.h" // pet_unlocktarget() -#include "quest.h" +#include "party.h" // party->search() +#include "guild.h" // guild->search(), guild_request_info() #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "pc_groups.h" +#include "quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + struct pc_interface pc_s; @@ -10654,7 +10651,9 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) +#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index c4026a48d..70df9ca56 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT - +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus +#include "../common/ers.h" +#include "../common/timer.h" // INVALID_TIMER +#include "atcommand.h" // AtCommandType #include "battle.h" // battle_config -#include "battleground.h" // enum bg_queue_types +#include "battleground.h" #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" // MAX_ITEMDELAYS -#include "log.h" // struct e_log_pick_type -#include "map.h" // RC_MAX, ELE_MAX -#include "pc_groups.h" // GroupSettings -#include "script.h" // struct reg_db +#include "itemdb.h" +#include "log.h" +#include "map.h" // RC_MAX +#include "mob.h" +#include "pc_groups.h" +#include "script.h" // struct script_reg, struct script_regstr #include "searchstore.h" // struct s_search_store_info -#include "status.h" // enum sc_type, OPTION_* -#include "unit.h" // struct unit_data, struct view_data +#include "status.h" // OPTION_*, struct weapon_atk +#include "unit.h" // unit_stop_attack(), unit_stop_walking() #include "vending.h" // struct s_vending -#include "../common/cbasetypes.h" -#include "../common/ers.h" // struct eri -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,8 +742,9 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; - +#endif unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index a917ef409..906462c7e 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,14 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pc_groups.h" - -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -18,6 +10,12 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp +#include "pc_groups.h" +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() + static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 7c8cdd82a..5c03f999f 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,10 +5,6 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/db.h" - /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index aa2be4473..993497434 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,39 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pet.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/db.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "atcommand.h" // msg_txt() -#include "battle.h" -#include "chrif.h" -#include "clif.h" +#include "pc.h" +#include "status.h" +#include "map.h" +#include "path.h" #include "intif.h" +#include "clif.h" +#include "chrif.h" +#include "pet.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "battle.h" #include "mob.h" #include "npc.h" -#include "path.h" -#include "pc.h" #include "script.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" // msg_txt() +#include "log.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 8dde0fac2..4ec30b3fb 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,14 +5,8 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // NAME_LENGTH, struct s_pet - -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index b76d6bc82..bde276f9d 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,37 +2,36 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "map.h" +#include "pc.h" +#include "npc.h" +#include "itemdb.h" +#include "script.h" +#include "intif.h" +#include "battle.h" +#include "mob.h" +#include "party.h" +#include "unit.h" +#include "log.h" +#include "clif.h" #include "quest.h" +#include "chrif.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdarg.h> #include <time.h> -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "script.h" -#include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index 87894d639..e01e35619 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,10 +5,6 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES - #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index 068be8524..4d77c506b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,46 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "script.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "pet.h" -#include "quest.h" -#include "skill.h" -#include "status.h" -#include "status.h" -#include "storage.h" -#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -50,10 +10,47 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" -#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" + +#include "map.h" +#include "path.h" +#include "clif.h" +#include "chrif.h" +#include "itemdb.h" +#include "pc.h" +#include "status.h" +#include "storage.h" +#include "mob.h" +#include "npc.h" +#include "pet.h" +#include "mapreg.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "intif.h" +#include "skill.h" +#include "status.h" +#include "chat.h" +#include "battle.h" +#include "battleground.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" +#include "log.h" +#include "unit.h" +#include "pet.h" +#include "mail.h" +#include "script.h" +#include "quest.h" +#include "elemental.h" +#include "../config/core.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> #ifndef WIN32 #include <sys/time.h> #endif diff --git a/src/map/script.h b/src/map/script.h index 899c745da..90b18d87f 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,19 +5,17 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ +#include "../common/strlib.h" //StringBuf +#include "../common/cbasetypes.h" +#include "map.h" //EVENT_NAME_LENGTH + #include <setjmp.h> #include <errno.h> -#include "map.h" //EVENT_NAME_LENGTH -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct item -#include "../common/sql.h" // Sql -#include "../common/strlib.h" //StringBuf - /** * Declarations **/ +struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 72b28aacd..0144aea93 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,17 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "searchstore.h" // struct s_search_store_info - -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data +#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index c9b93ba54..827e39053 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,12 +5,6 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ -#include <time.h> - -#include "map.h" // MESSAGE_SIZE -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index b2e94ec79..c8388770a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,48 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() -#include "skill.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" -#include "elemental.h" -#include "guild.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "pet.h" #include "homunculus.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" #include "mercenary.h" +#include "elemental.h" #include "mob.h" #include "npc.h" +#include "battle.h" +#include "battleground.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" +#include "itemdb.h" #include "script.h" -#include "status.h" +#include "intif.h" +#include "log.h" +#include "chrif.h" +#include "guild.h" +#include "date.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <math.h> + #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index b6dbb1fcb..dda310bd4 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,23 +5,19 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../config/core.h" // RENEWAL_CAST - -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "../common/cbasetypes.h" -#include "../common/db.h" #include "../common/mmo.h" // MAX_SKILL, struct square +#include "../common/db.h" +#include "map.h" // struct block_list /** * Declarations **/ -struct homun_data; struct map_session_data; -struct mercenary_data; +struct homun_data; struct skill_unit; -struct square; +struct skill_unit_group; struct status_change_entry; +struct square; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index eb06138da..4c2bc6d22 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,46 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP -#include "status.h" - -#include <math.h> -#include <memory.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/strlib.h" -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "script.h" +#include "npc.h" +#include "mob.h" +#include "clif.h" +#include "guild.h" #include "skill.h" +#include "itemdb.h" +#include "battle.h" +#include "chrif.h" #include "skill.h" +#include "status.h" +#include "script.h" #include "unit.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" #include "vending.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include <time.h> +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <string.h> +#include <math.h> struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index baa586297..e47c2b365 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,18 +5,14 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ -#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD - -#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct elemental_data; -struct homun_data; -struct mercenary_data; struct mob_data; -struct npc_data; struct pet_data; +struct homun_data; +struct mercenary_data; +struct status_change; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1882,7 +1878,11 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD +#ifdef RENEWAL_ASPD + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; +#else + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] +#endif sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index 2db5fff3d..e65ed7b80 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,29 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "map.h" // struct map_session_data #include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" #include "chrif.h" +#include "itemdb.h" #include "clif.h" -#include "guild.h" #include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" // struct map_session_data #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "guild.h" +#include "battle.h" +#include "atcommand.h" +#include "log.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 5edb68cfc..8f9f904f6 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,12 +5,11 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -#include "../common/cbasetypes.h" -#include "../common/db.h" - +struct storage_data; struct guild_storage; struct item; struct map_session_data; +struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 83426c407..44b669ebd 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/socket.h" #include "trade.h" - -#include <stdio.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" #include "clif.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "npc.h" #include "path.h" #include "pc.h" +#include "npc.h" +#include "battle.h" +#include "chrif.h" #include "storage.h" -#include "../common/nullpo.h" -#include "../common/socket.h" +#include "intif.h" +#include "atcommand.h" +#include "log.h" + +#include <stdio.h> +#include <string.h> struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 0ad770e80..151d4bad5 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,48 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // RENEWAL_CAST -#include "unit.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/showmsg.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/HPM.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "path.h" #include "pc.h" +#include "mob.h" #include "pet.h" -#include "script.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" #include "skill.h" +#include "clif.h" +#include "duel.h" +#include "npc.h" +#include "guild.h" #include "status.h" -#include "storage.h" +#include "unit.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "trade.h" #include "vending.h" -#include "../common/HPM.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" +#include "party.h" +#include "intif.h" +#include "chrif.h" +#include "script.h" +#include "storage.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 9e05647b1..33fa4e052 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,13 +5,15 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ +//#include "map.h" +struct block_list; +struct unit_data; +struct map_session_data; + #include "clif.h" // clr_type +#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset -#include "../common/cbasetypes.h" - -struct map_session_data; -struct block_list; +#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index c8ac814db..9462975b3 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,27 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "vending.h" - -#include <stdio.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" #include "clif.h" #include "itemdb.h" -#include "log.h" +#include "atcommand.h" #include "map.h" -#include "npc.h" #include "path.h" +#include "chrif.h" +#include "vending.h" #include "pc.h" +#include "npc.h" #include "skill.h" -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#include "battle.h" +#include "log.h" + +#include <stdio.h> +#include <string.h> struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a70726374..a212f8385 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,7 +7,6 @@ #include "../common/cbasetypes.h" #include "../common/db.h" - struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 96d51aec6..85d5fb548 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,14 +1,6 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "../config/core.h" // RENEWAL - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -16,6 +8,12 @@ #include "../common/showmsg.h" #include "../common/utils.h" +#include "../config/renewal.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #ifndef _WIN32 #include <unistd.h> #endif -- cgit v1.2.3-70-g09d2 From 0ab52ac65bdba93be94e4149e267698d31b41d72 Mon Sep 17 00:00:00 2001 From: Haru <haru@dotalux.com> Date: Sat, 10 May 2014 17:17:13 +0200 Subject: Re-commit of "Fixed order of includes in all source files" This reverts commit 94657284973f4037596bae468ebfbee5c217e02b. --- src/char/char.c | 44 +++++----- src/char/char.h | 1 - src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 +++-- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 ++--- src/char/int_guild.h | 3 - src/char/int_homun.c | 21 +++-- src/char/int_homun.h | 2 + src/char/int_mail.c | 20 +++-- src/char/int_mail.h | 3 + src/char/int_mercenary.c | 22 +++-- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 - src/char/int_pet.c | 22 +++-- src/char/int_quest.c | 22 ++--- src/char/int_storage.c | 22 +++-- src/char/inter.c | 43 ++++----- src/char/inter.h | 5 +- src/char/pincode.c | 11 ++- src/common/HPM.c | 31 ++++--- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +--- src/common/cbasetypes.h | 6 ++ src/common/conf.c | 3 + src/common/conf.h | 1 + src/common/console.c | 223 ++++++++++++++++++++++++----------------------- src/common/console.h | 21 +++-- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 ++- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 ++- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 + src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 +++-- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 ++- src/common/sql.h | 3 +- src/common/strlib.c | 13 +-- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 +++++-- src/common/sysinfo.h | 16 ---- src/common/thread.c | 31 ++++--- src/common/thread.h | 1 - src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 -- src/config/renewal.h | 1 + src/login/account.h | 1 + src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 +-- src/login/login.c | 21 +++-- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 +++++++------ src/map/battle.h | 2 +- src/map/battleground.c | 33 +++---- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 ++ src/map/chat.c | 23 ++--- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 + src/map/duel.c | 10 ++- src/map/duel.h | 4 + src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 + src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +--- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 + src/map/intif.c | 51 ++++++----- src/map/intif.h | 13 +-- src/map/irc-bot.c | 22 ++--- src/map/irc-bot.h | 2 + src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 ++--- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 +-- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 + src/map/mob.c | 69 ++++++++------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 ++++----- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 + src/map/pc.c | 59 +++++++------ src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 +-- src/map/pc_groups.h | 4 + src/map/pet.c | 48 +++++----- src/map/pet.h | 10 ++- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 + src/map/script.c | 79 +++++++++-------- src/map/script.h | 12 +-- src/map/searchstore.c | 11 ++- src/map/searchstore.h | 6 ++ src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 +-- src/map/status.c | 59 +++++++------ src/map/status.h | 16 ++-- src/map/storage.c | 32 +++---- src/map/storage.h | 5 +- src/map/trade.c | 24 ++--- src/map/unit.c | 63 ++++++------- src/map/unit.h | 12 ++- src/map/vending.c | 27 +++--- src/map/vending.h | 1 + src/tool/mapcache.c | 14 +-- 144 files changed, 1676 insertions(+), 1367 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/char/char.c b/src/char/char.c index 77e393c0d..6c0902644 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,7 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "char.h" + +#include <signal.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <time.h> + +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_storage.h" +#include "inter.h" +#include "pincode.h" +#include "../common/HPM.h" #include "../common/cbasetypes.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -13,25 +36,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/console.h" -#include "../common/HPM.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_elemental.h" -#include "int_party.h" -#include "int_storage.h" -#include "char.h" -#include "inter.h" -#include "pincode.h" - -#include <sys/types.h> -#include <time.h> -#include <signal.h> -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5497,7 +5501,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->setSQL(sql_handle); + console->input->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 2928929de..09a78f6b9 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,7 +5,6 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ -#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 924930867..886b5be26 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" +#define HERCULES_CORE + +#include "int_auction.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "int_mail.h" +#include "inter.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_mail.h" -#include "int_auction.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index ed0c2a9ed..3a36e75a2 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_elemental.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c90891fc4..c869e6fc2 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -struct s_elemental; +#include "../common/cbasetypes.h" void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 895cbbb94..ffbe48e10 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,21 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH +#include "int_guild.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_guild.h" - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 4eb7d310b..5e657ff06 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,9 +20,6 @@ enum { GS_REMOVE = 0x8000, }; -struct guild; -struct guild_castle; - int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 143277f05..795a6b927 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_homun.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 561dc848f..9477f4f03 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,6 +4,8 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ +#include "../common/cbasetypes.h" + struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 826771676..86a36d59f 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_mail.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 7c06cdc1f..824ba48a3 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,6 +4,9 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ +struct item; +struct mail_message; + int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index aecb3844a..1dffb656c 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_mercenary.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { char* data; diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index b614b8cf7..195a83b34 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,7 +4,9 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -struct s_mercenary; +#include "../common/cbasetypes.h" + +struct mmo_charstatus; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 7c328c452..3e4a743d6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/socket.h" -#include "../common/showmsg.h" -#include "../common/mapindex.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + #include "int_party.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" + struct party_data { struct party party; unsigned int min_lv, max_lv; diff --git a/src/char/int_party.h b/src/char/int_party.h index 84f00635a..098c1e9a9 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,8 +14,6 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; -struct party; - int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 25f00e6f0..29c40eff9 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_pet.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct s_pet *pet_pt; //--------------------------------------------------------- diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 061dd89d9..61b43c57d 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,23 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "char.h" +#include "inter.h" #include "../common/db.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_quest.h" - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 966e61bb3..bf7b76da0 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" // StringBuf -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "int_storage.h" #include <stdio.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" // StringBuf #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index 515ca0ec4..972407ef3 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,33 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "char.h" +#define HERCULES_CORE + #include "inter.h" -#include "int_party.h" -#include "int_guild.h" -#include "int_storage.h" -#include "int_pet.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_mail.h" -#include "int_auction.h" -#include "int_quest.h" -#include "int_elemental.h" +#include <errno.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> -#include <errno.h> - +#include <string.h> #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] +#include "char.h" +#include "int_auction.h" +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mail.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_pet.h" +#include "int_quest.h" +#include "int_storage.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 25b0c2a96..5e655237e 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,9 +5,10 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -struct accreg; -#include "../common/sql.h" #include "char.h" +#include "../common/sql.h" + +struct accreg; int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index d51953448..59182f12d 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pincode.h" + +#include <stdlib.h> + +#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "char.h" -#include "pincode.h" - -#include <stdlib.h> int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 9ffce87de..00b92dc60 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,26 +1,31 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "HPM.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "../common/cbasetypes.h" -#include "../common/mmo.h" +#include "../common/conf.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/timer.h" -#include "../common/conf.h" -#include "../common/utils.h" -#include "../common/console.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" -#include "HPM.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #ifndef WIN32 -#include <unistd.h> +# include <unistd.h> #endif struct malloc_interface iMalloc_HPM; @@ -686,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->addCommand,"addCPCommand"); + HPM->share(console->input->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -755,7 +760,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->addCommand("plugins",CPCMD_A(plugins)); + console->input->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 0f0df4cda..9c176cfd6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,8 +4,12 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#include "../common/cbasetypes.h" +#ifndef HERCULES_CORE +#error You should never include HPM.h from a plugin. +#endif + #include "../common/HPMi.h" +#include "../common/cbasetypes.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 19206aeca..b98e87d90 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/console.h" +#include "../common/core.h" #include "../common/sql.h" struct script_state; @@ -20,18 +20,6 @@ struct map_session_data; #define HPExport #endif -#ifndef _COMMON_SHOWMSG_H_ - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); -#endif - /* after */ #include "../common/showmsg.h" @@ -192,7 +180,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef _COMMON_HPM_H_ +#ifndef HERCULES_CORE HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index f44e80413..da0d6b307 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,5 +442,11 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index b816b2f7f..46a034497 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,7 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + #include "conf.h" + #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index 9aff3df47..e5b637e47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,6 +6,7 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" + #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index d8f352c8a..6a82db555 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,42 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT +#include "console.h" + +#include <stdio.h> +#include <stdlib.h> + #include "../common/cbasetypes.h" -#include "../common/showmsg.h" #include "../common/core.h" +#include "../common/showmsg.h" #include "../common/sysinfo.h" -#include "../config/core.h" -#include "console.h" #ifndef MINICORE - #include "../common/ers.h" - #include "../common/malloc.h" - #include "../common/atomic.h" - #include "../common/spinlock.h" - #include "../common/thread.h" - #include "../common/mutex.h" - #include "../common/timer.h" - #include "../common/strlib.h" - #include "../common/sql.h" +# include "../common/atomic.h" +# include "../common/ers.h" +# include "../common/malloc.h" +# include "../common/mutex.h" +# include "../common/spinlock.h" +# include "../common/sql.h" +# include "../common/strlib.h" +# include "../common/thread.h" +# include "../common/timer.h" #endif -#include <stdio.h> -#include <stdlib.h> #if !defined(WIN32) - #include <unistd.h> - #include <sys/time.h> +# include <sys/time.h> +# include <unistd.h> #else - #include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling +# ifdef CONSOLE_INPUT +# include <conio.h> /* _kbhit() */ +# endif #endif +struct console_interface console_s; #ifdef CONSOLE_INPUT - #if defined(WIN32) - #include <conio.h> /* _kbhit() */ - #endif +struct console_input_interface console_input_s; #endif -struct console_interface console_s; - /*====================================== * CORE : Display title *--------------------------------------*/ @@ -116,12 +120,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( console->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); - console->parse_list_subs(console->cmd_list[i],2); + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( console->input->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); + console->input->parse_list_subs(console->input->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); } } } @@ -144,7 +148,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->SQL, line); + Sql_HerculesUpdateSkip(console->input->SQL, line); } /** @@ -206,7 +210,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->cmds,struct CParseEntry *, len); + RECREATE(console->input->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -220,12 +224,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->cmd_count++; - console->cmds[i] = cmd; + console->input->cmd_count++; + console->input->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; } } @@ -233,11 +237,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->input->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); - console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; + RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); + console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; break; } } @@ -256,23 +260,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + if( i == console->input->cmd_list_count ) { + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->cmds[console->cmd_count - 1] = cmd; - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; - i = console->cmd_list_count - 1; + console->input->cmds[console->input->cmd_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + i = console->input->cmd_list_count - 1; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -281,13 +285,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); - CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->cmds[console->cmd_count-1]->next_count = 0; + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->input->cmds[console->input->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; - cmd = console->cmds[console->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; + cmd = console->input->cmds[console->input->cmd_count-1]; continue; } @@ -302,7 +306,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->parse_list_subs(cmd->u.next[i],depth + 1); + console->input->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -320,21 +324,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { + if( i == console->input->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -351,7 +355,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->parse_list_subs(cmd,2); + console->input->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -392,95 +396,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->ptstate ) {/* loopx */ - if( console->key_pressed() ) { + while( console->input->ptstate ) {/* loopx */ + if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->parse(input); + console->input->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); } } - ramutex_lock( console->ptmutex ); - racond_wait( console->ptcond, console->ptmutex, -1 ); - ramutex_unlock( console->ptmutex ); + ramutex_lock( console->input->ptmutex ); + racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); + ramutex_unlock( console->input->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); for(i = 0; i < cinput.count; i++) { - console->parse_sub(cinput.queue[i]); + console->input->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->ptlock); - racond_signal(console->ptcond); + LeaveSpinLock(&console->input->ptlock); + racond_signal(console->input->ptcond); return 0; } void console_parse_final(void) { - if( console->ptstate ) { - InterlockedDecrement(&console->ptstate); - racond_signal(console->ptcond); + if( console->input->ptstate ) { + InterlockedDecrement(&console->input->ptstate); + racond_signal(console->input->ptcond); /* wait for thread to close */ - rathread_wait(console->pthread, NULL); + rathread_wait(console->input->pthread, NULL); - racond_destroy(console->ptcond); - ramutex_destroy(console->ptmutex); + racond_destroy(console->input->ptcond); + ramutex_destroy(console->input->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->ptstate = 1; + console->input->ptstate = 1; - InitializeSpinLock(&console->ptlock); + InitializeSpinLock(&console->input->ptlock); - console->ptmutex = ramutex_create(); - console->ptcond = racond_create(); + console->input->ptmutex = ramutex_create(); + console->input->ptcond = racond_create(); - if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ + if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->input->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->SQL = SQL_handle; + console->input->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->cmd_count = console->cmd_list_count = 0; - console->load_defaults(); - console->parse_init(); + console->input->cmd_count = console->input->cmd_list_count = 0; + console->input->load_defaults(); + console->input->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->parse_final(); - for( i = 0; i < console->cmd_count; i++ ) { - if( console->cmds[i]->next_count ) - aFree(console->cmds[i]->u.next); - aFree(console->cmds[i]); + console->input->parse_final(); + for( i = 0; i < console->input->cmd_count; i++ ) { + if( console->input->cmds[i]->next_count ) + aFree(console->input->cmds[i]->u.next); + aFree(console->input->cmds[i]); } - aFree(console->cmds); - aFree(console->cmd_list); + aFree(console->input->cmds); + aFree(console->input->cmd_list); #endif } void console_defaults(void) { @@ -489,17 +493,20 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->parse_init = console_parse_init; - console->parse_final = console_parse_final; - console->parse_timer = console_parse_timer; - console->pthread_main = cThread_main; - console->parse = console_parse; - console->parse_sub = console_parse_sub; - console->key_pressed = console_parse_key_pressed; - console->load_defaults = console_load_defaults; - console->parse_list_subs = console_parse_list_subs; - console->addCommand = console_parse_create; - console->setSQL = console_setSQL; - console->SQL = NULL; + console->input = &console_input_s; + console->input->parse_init = console_parse_init; + console->input->parse_final = console_parse_final; + console->input->parse_timer = console_parse_timer; + console->input->pthread_main = cThread_main; + console->input->parse = console_parse; + console->input->parse_sub = console_parse_sub; + console->input->key_pressed = console_parse_key_pressed; + console->input->load_defaults = console_load_defaults; + console->input->parse_list_subs = console_parse_list_subs; + console->input->addCommand = console_parse_create; + console->input->setSQL = console_setSQL; + console->input->SQL = NULL; +#else + console->input = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index 3d19ddc9d..d2c58f978 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,11 +4,13 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../common/thread.h" +#include "../config/core.h" // MAX_CONSOLE_INPUT + +#include "../common/cbasetypes.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../config/core.h" +#include "../common/thread.h" /** * Queue Max @@ -47,11 +49,8 @@ struct { unsigned short count; } cinput; -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); #ifdef CONSOLE_INPUT +struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -77,7 +76,17 @@ struct console_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); +}; +#else +struct console_input_interface; #endif + +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); + + struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 49b272488..85f824866 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,36 +2,40 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" #include "core.h" + +#include "../common/cbasetypes.h" #include "../common/console.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" #ifndef MINICORE - #include "../common/db.h" - #include "../common/socket.h" - #include "../common/timer.h" - #include "../common/thread.h" - #include "../common/sql.h" - #include "../config/core.h" - #include "../common/HPM.h" - #include "../common/utils.h" - #include "../common/conf.h" - #include "../common/ers.h" +# include "../common/HPM.h" +# include "../common/conf.h" +# include "../common/db.h" +# include "../common/ers.h" +# include "../common/socket.h" +# include "../common/sql.h" +# include "../common/thread.h" +# include "../common/timer.h" +# include "../common/utils.h" #endif +#include <signal.h> #include <stdio.h> #include <stdlib.h> -#include <signal.h> #include <string.h> #ifndef _WIN32 -#include <unistd.h> +# include <unistd.h> #else -#include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index e9f7c5961..ba75e6b01 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,11 +7,10 @@ #include "../common/db.h" #include "../common/mmo.h" -#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG - #include <signal.h> +# include <signal.h> #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 8d6b08815..1781aa96f 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,14 +67,18 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ + +#define HERCULES_CORE + +#include "db.h" + #include <stdio.h> #include <stdlib.h> -#include "db.h" -#include "../common/mmo.h" +#include "../common/ers.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 67abe6f19..0d2548806 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,10 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include "../common/cbasetypes.h" #include <stdarg.h> +#include "../common/cbasetypes.h" + /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * * DBRelease - Enumeration of release options. * diff --git a/src/common/des.c b/src/common/des.c index ed6d098dc..7f952be76 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,8 +1,11 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" -#include "../common/des.h" +#define HERCULES_CORE + +#include "des.h" + +#include "../common/cbasetypes.h" /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index 5a3d7314a..d9895e4f2 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,14 +39,18 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ + +#define HERCULES_CORE + +#include "ers.h" + #include <stdlib.h> #include <string.h> #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #include "../common/nullpo.h" -#include "ers.h" +#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index bde0ed720..1111fb3f3 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,13 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/nullpo.h" +#define HERCULES_CORE + #include "grfio.h" #include <stdio.h> @@ -17,6 +12,14 @@ #include <sys/stat.h> #include <zlib.h> +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 5b39cbab6..13cf0b5ce 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/malloc.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE + +#include "malloc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" + struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 3128a3cb0..5c69c7063 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/db.h" +#define HERCULES_CORE + #include "mapindex.h" -#include <string.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> + +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index 05fde42cc..e7b506e27 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,11 +6,15 @@ * ***********************************************************/ -#include "../common/random.h" +#define HERCULES_CORE + #include "md5calc.h" -#include <string.h> + #include <stdio.h> #include <stdlib.h> +#include <string.h> + +#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index d535d2874..1d826463e 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,11 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include "cbasetypes.h" -#include "../common/db.h" #include <time.h> +#include "../common/cbasetypes.h" +#include "../common/db.h" + // server->client protocol version // 0 - pre-? // 1 - ? - 0x196 @@ -96,6 +97,7 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 +#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 0668dbc41..12524c3b7 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,6 +1,10 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "mutex.h" + #ifdef WIN32 #include "../common/winapi.h" #else @@ -13,7 +17,6 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" -#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index eeb24e6ff..3b83b66d6 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,6 +4,7 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ +#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1cb471aff..1891835f1 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,10 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "nullpo.h" + #include <stdio.h> #include <stdarg.h> #include <string.h> -#include "../common/nullpo.h" + #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index e46c52cad..7019a31f3 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,17 +1,23 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "random.h" + +#include <time.h> // time + +#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 + #include "../common/showmsg.h" #include "../common/timer.h" // gettick -#include "random.h" + #if defined(WIN32) - #include "../common/winapi.h" +# include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) - #include <sys/types.h> - #include <unistd.h> +# include <sys/types.h> +# include <unistd.h> #endif -#include <time.h> // time -#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 14342fe5e..1dbcba282 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/strlib.h" // StringBuf +#define HERCULES_CORE + #include "showmsg.h" -#include "core.h" //[Ind] - For SERVER_TYPE +#include <stdarg.h> #include <stdio.h> +#include <stdlib.h> // atexit #include <string.h> -#include <stdarg.h> #include <time.h> -#include <stdlib.h> // atexit #include "../../3rdparty/libconfig/libconfig.h" +#include "../common/cbasetypes.h" +#include "../common/core.h" //[Ind] - For SERVER_TYPE +#include "../common/strlib.h" // StringBuf + #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" #else // not WIN32 -#include <unistd.h> +# include <unistd.h> #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 49fbc34fb..5b32f39ae 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,12 +5,14 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#ifndef _COMMON_HPMI_H_ - #include "../../3rdparty/libconfig/libconfig.h" -#endif - #include <stdarg.h> +#ifdef HERCULES_CORE +# include "../../3rdparty/libconfig/libconfig.h" +#else +# include "../common/HPMi.h" +#endif + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -90,7 +92,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifndef _COMMON_HPMI_H_ +#ifdef HERCULES_CORE extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -101,7 +103,18 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); +#else + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); #endif + extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 35d350e95..3738f2c2a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,48 +2,50 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../config/core.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ - #include "socket.h" +#undef _H_SOCKET_C_ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" + #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" #else - #include <errno.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <netinet/tcp.h> - #include <net/if.h> - #include <unistd.h> - #include <sys/time.h> - #include <sys/ioctl.h> - #include <netdb.h> - #include <arpa/inet.h> - - #ifndef SIOCGIFCONF - #include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] - #endif - #ifndef FIONBIO - #include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] - #endif - - #ifdef HAVE_SETRLIMIT - #include <sys/resource.h> - #endif +# include <arpa/inet.h> +# include <errno.h> +# include <net/if.h> +# include <netdb.h> +# include <netinet/in.h> +# include <netinet/tcp.h> +# include <sys/ioctl.h> +# include <sys/socket.h> +# include <sys/time.h> +# include <unistd.h> + +# ifndef SIOCGIFCONF +# include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori] +# endif +# ifndef FIONBIO +# include <sys/filio.h> // FIONBIO on Solaris [FlavioJS] +# endif + +# ifdef HAVE_SETRLIMIT +# include <sys/resource.h> +# endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 75adde4cf..804b9284f 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ +#include <time.h> + #include "../common/cbasetypes.h" #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" typedef long in_addr_t; #else - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> +# include <netinet/in.h> +# include <sys/socket.h> +# include <sys/types.h> #endif -#include <time.h> - struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 29fbb355b..0058e1d83 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,4 +1,3 @@ -#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -15,14 +14,14 @@ // // +#include "../common/atomic.h" +#include "../common/cbasetypes.h" +#include "../common/thread.h" + #ifdef WIN32 #include "../common/winapi.h" #endif -#include "../common/cbasetypes.h" -#include "../common/atomic.h" -#include "../common/thread.h" - #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index 79ccc8e92..aeb56bff0 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "sql.h" + +#include <stdlib.h> // strtoul +#include <string.h> // strlen/strnlen/memcpy/memset + #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "sql.h" #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" // Needed before mysql.h #endif #include <mysql.h> -#include <string.h>// strlen/strnlen/memcpy/memset -#include <stdlib.h>// strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 1fb436853..807e0843c 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,10 +5,9 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ -#include "../common/cbasetypes.h" #include <stdarg.h>// va_list - +#include "../common/cbasetypes.h" // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index 361595b07..e2e802915 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#define STRLIB_C +#define HERCULES_CORE + +#define _H_STRLIB_C_ #include "strlib.h" +#undef _H_STRLIB_C_ +#include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <errno.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index 10844d257..decf661a6 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,15 +5,16 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include "../common/cbasetypes.h" #include <stdarg.h> +#include "../common/cbasetypes.h" + #ifndef __USE_GNU - #define __USE_GNU // required to enable strnlen on some platforms - #include <string.h> - #undef __USE_GNU +# define __USE_GNU // required to enable strnlen on some platforms +# include <string.h> +# undef __USE_GNU #else - #include <string.h> +# include <string.h> #endif #ifdef WIN32 @@ -165,7 +166,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef STRLIB_C +#ifndef _H_STRLIB_C_ #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -189,6 +190,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* STRLIB_C */ +#endif /* _H_STRLIB_C_ */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index a56896458..3fdfadb41 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,23 +4,39 @@ /// See sysinfo.h for a description of this file -#define _COMMON_SYSINFO_P_ +#define HERCULES_CORE + #include "sysinfo.h" -#undef _COMMON_SYSINFO_P_ + +#include <stdio.h> // fopen +#include <stdlib.h> // atoi #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/strlib.h" #include "../common/malloc.h" +#include "../common/strlib.h" #ifdef WIN32 -#include <windows.h> -#include <string.h> // strlen +# include <string.h> // strlen +# include <windows.h> #else -#include <unistd.h> +# include <unistd.h> #endif -#include <stdio.h> // fopen -#include <stdlib.h> // atoi + +/// Private interface fields +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index 17faac26b..c0c4d276a 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,23 +13,7 @@ #include "../common/cbasetypes.h" -#ifdef _COMMON_SYSINFO_P_ -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; -#else struct sysinfo_private; -#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4d110f2dd..4f73aa9b3 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,24 +6,27 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "thread.h" + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" + #ifdef WIN32 -#include "../common/winapi.h" -#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -#define __thread __declspec( thread ) +# include "../common/winapi.h" +# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +# define __thread __declspec( thread ) #else -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <signal.h> -#include <pthread.h> -#include <sched.h> +# include <stdlib.h> +# include <unistd.h> +# include <string.h> +# include <signal.h> +# include <pthread.h> +# include <sched.h> #endif -#include "cbasetypes.h" -#include "malloc.h" -#include "showmsg.h" -#include "thread.h" - // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index d6b2bbc6e..887c03179 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,7 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 526854582..10f14b0f2 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,11 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" +#define HERCULES_CORE + #include "timer.h" #include <stdio.h> @@ -14,11 +11,17 @@ #include <string.h> #include <time.h> +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" + #ifdef WIN32 -#include "../common/winapi.h" // GetTickCount() +# include "../common/winapi.h" // GetTickCount() #else -#include <unistd.h> -#include <sys/time.h> // struct timeval, gettimeofday() +# include <sys/time.h> // struct timeval, gettimeofday() +# include <unistd.h> #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 47747dd32..84925f707 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,33 +2,35 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/core.h" -#include "socket.h" +#define HERCULES_CORE + #include "utils.h" -#include <stdio.h> +#include <math.h> // floor() #include <stdarg.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <math.h> // floor() +#include <sys/stat.h> // cache purposes [Ind/Hercules] + +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" #ifdef WIN32 - #include "../common/winapi.h" - #ifndef F_OK - #define F_OK 0x0 - #endif /* F_OK */ +# include "../common/winapi.h" +# ifndef F_OK +# define F_OK 0x0 +# endif /* F_OK */ #else - #include <unistd.h> - #include <dirent.h> - #include <sys/stat.h> +# include <dirent.h> +# include <sys/stat.h> +# include <unistd.h> #endif -#include <sys/stat.h> // cache purposes [Ind/Hercules] - struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index f89546b8a..823651163 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,10 +5,11 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ -#include "../common/cbasetypes.h" #include <stdio.h> // FILE* #include <time.h> +#include "../common/cbasetypes.h" + /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index 6557cb987..f9baa4d7d 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,13 +52,6 @@ #define DEFTYPE_MAX CHAR_MAX #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif - /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36615d63b..36bdd3958 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,5 +74,6 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL +#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 234e7c0c1..329ae31c8 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM +#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 1483196ab..2e4ed7ab9 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,17 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "account.h" + +#include <stdlib.h> +#include <string.h> + +#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "../common/console.h" -#include "../common/socket.h" -#include "account.h" -#include <stdlib.h> -#include <string.h> /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->setSQL(db->accounts); + console->input->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 74f45e418..081f28d84 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "ipban.h" + +#include <stdlib.h> +#include <string.h> + +#include "login.h" +#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -9,11 +18,6 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "login.h" -#include "ipban.h" -#include "loginlog.h" -#include <stdlib.h> -#include <string.h> // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index af59fcf38..cb46e0226 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,6 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "login.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "account.h" +#include "ipban.h" +#include "loginlog.h" +#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -12,15 +24,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/HPM.h" -#include "account.h" -#include "ipban.h" -#include "login.h" -#include "loginlog.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index 14c361a15..e77b96a0e 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/mmo.h" // NAME_LENGTH,SEX_* #include "../common/core.h" // CORE_ST_LAST +#include "../common/mmo.h" // NAME_LENGTH,SEX_* enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index 730fb6e62..a86ad431c 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,6 +4,7 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ +#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -11,5 +12,4 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); - #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 231ac783b..2cbc02c93 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,13 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "loginlog.h" + +#include <string.h> +#include <stdlib.h> // exit + #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" -#include <string.h> -#include <stdlib.h> // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 061479d87..cb8c979c6 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,25 +1,15 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/HPM.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/socket.h" -#include "../common/strlib.h" - +#define HERCULES_CORE #include "HPMmap.h" -#include "pc.h" -#include "map.h" -// +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -37,12 +27,14 @@ #include "itemdb.h" #include "log.h" #include "mail.h" +#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" +#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -54,11 +46,19 @@ #include "trade.h" #include "unit.h" #include "vending.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5fd0faf86..df3be40a5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,57 +2,60 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "battle.h" #include "chat.h" -#include "clif.h" #include "chrif.h" +#include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" +#include "mail.h" #include "map.h" -#include "pc.h" -#include "pc_groups.h" // groupid2name -#include "status.h" -#include "skill.h" +#include "mapreg.h" +#include "mercenary.h" #include "mob.h" #include "npc.h" -#include "pet.h" -#include "homunculus.h" -#include "mail.h" -#include "mercenary.h" -#include "elemental.h" #include "party.h" -#include "guild.h" +#include "pc.h" +#include "pc_groups.h" // groupid2name +#include "pet.h" +#include "quest.h" #include "script.h" +#include "searchstore.h" +#include "skill.h" +#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "mapreg.h" -#include "quest.h" -#include "searchstore.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" #include "HPMmap.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> - struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index bc4ab30a3..c8a1863af 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ +#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" -#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 9089b7102..0865ee4ba 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/sysinfo.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "pc.h" -#include "status.h" -#include "skill.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" -#include "mob.h" -#include "itemdb.h" -#include "clif.h" -#include "pet.h" -#include "guild.h" -#include "party.h" +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT #include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <math.h> + +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "skill.h" +#include "status.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index 88038ddb4..fbe097c78 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "../common/cbasetypes.h" #include "map.h" //ELE_MAX +#include "../common/cbasetypes.h" /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index 68539e25d..a7169de0e 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,29 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/conf.h" +#define HERCULES_CORE #include "battleground.h" + +#include <string.h> +#include <stdio.h> + #include "battle.h" #include "clif.h" +#include "homunculus.h" #include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" // struct mob_data #include "npc.h" -#include "pc.h" #include "party.h" +#include "pc.h" #include "pet.h" -#include "homunculus.h" -#include "mercenary.h" -#include "mapreg.h" - -#include <string.h> -#include <stdio.h> +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index 05c4eb060..ec0a86f14 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ -#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" +#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 2a15e66fc..80264b30d 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,18 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" // ARR_FIND -#include "../common/showmsg.h" // ShowWarning -#include "../common/socket.h" // RBUF* -#include "../common/strlib.h" // safestrncpy +#define HERCULES_CORE + +#include "buyingstore.h" // struct s_buyingstore + #include "atcommand.h" // msg_txt #include "battle.h" // battle_config.* -#include "buyingstore.h" // struct s_buyingstore +#include "chrif.h" #include "clif.h" // clif->buyingstore_* #include "log.h" // log_pick_pc, log_zeny #include "pc.h" // struct map_session_data -#include "chrif.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" // ARR_FIND +#include "../common/showmsg.h" // ShowWarning +#include "../common/socket.h" // RBUF* +#include "../common/strlib.h" // safestrncpy struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 5141a1013..914631872 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,6 +5,11 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + +struct map_session_data; + /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index 08fc4a575..c9d3e6d46 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,12 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "chat.h" + +#include <stdio.h> +#include <string.h> + #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -15,10 +16,12 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "chat.h" - -#include <stdio.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index b0c6cd905..cbc2a391e 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,9 +6,12 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE +#include "../common/cbasetypes.h" +#include "../common/db.h" -struct map_session_data; struct chat_data; +struct map_session_data; +struct npc_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 99a1935fd..81e2d387c 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,15 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/ers.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT +#include "chrif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <time.h> #include "map.h" #include "battle.h" @@ -25,15 +26,17 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" -#include "chrif.h" #include "quest.h" #include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 25e955604..84efc66d3 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,9 +5,11 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ -#include "../common/cbasetypes.h" #include <time.h> + #include "map.h" //TBL_stuff +#include "../common/cbasetypes.h" +#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index 1a6665307..cb2474961 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,56 +2,59 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/conf.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT +#include "clif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <time.h> -#include "map.h" -#include "chrif.h" -#include "pc.h" -#include "status.h" -#include "npc.h" -#include "itemdb.h" -#include "chat.h" -#include "trade.h" -#include "storage.h" -#include "script.h" -#include "skill.h" #include "atcommand.h" -#include "intif.h" #include "battle.h" #include "battleground.h" -#include "mob.h" -#include "party.h" -#include "unit.h" +#include "chat.h" +#include "chrif.h" +#include "elemental.h" #include "guild.h" -#include "vending.h" -#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" #include "log.h" -#include "clif.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" -#include "irc-bot.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <time.h> +#include "script.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "trade.h" +#include "unit.h" +#include "vending.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index 0f4a9e756..7b27e1fe6 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ +#include <stdarg.h> + +#include "map.h" +#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" -#include "../common/socket.h" -#include "../map/map.h" -#include "../map/packets_struct.h" -#include <stdarg.h> /** * Declarations @@ -20,7 +20,6 @@ struct item; struct item_data; struct storage_data; struct guild_storage; -struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index f38ead858..975a00c50 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,10 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" +#define HERCULES_CORE + #include "date.h" + #include <time.h> +#include "../common/cbasetypes.h" + int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index 46f0d86c3..b3ed59b2f 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,6 +4,8 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ +#include "../common/cbasetypes.h" + int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index af2741f77..a423ef240 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,18 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" +#define HERCULES_CORE -#include "atcommand.h" // msg_txt -#include "clif.h" #include "duel.h" -#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> +#include "atcommand.h" // msg_txt +#include "clif.h" +#include "pc.h" +#include "../common/cbasetypes.h" + /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 5405d2eee..956aed36d 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,6 +5,10 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ +#include "../common/cbasetypes.h" + +struct map_session_data; + struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index f335600d6..323df41e1 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/random.h" -#include "../common/strlib.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "elemental.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "elemental.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index 6d04a41a5..aa27aadc9 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,6 +7,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index fa5805c8b..69f67238d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,35 +2,38 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" +#include "../config/core.h" // GP_BOUND_ITEMS #include "guild.h" -#include "storage.h" -#include "battle.h" -#include "npc.h" -#include "pc.h" -#include "status.h" -#include "mob.h" -#include "intif.h" -#include "clif.h" -#include "skill.h" -#include "log.h" -#include "instance.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" +#include "clif.h" +#include "instance.h" +#include "intif.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "pc.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct guild_interface guild_s; /*========================================== diff --git a/src/map/guild.h b/src/map/guild.h index b03bd664d..34e27a56c 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,18 +5,10 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -//#include "../common/mmo.h" -#include "map.h" // NAME_LENGTH - -/** - * Declarations - **/ -struct guild; -struct guild_member; -struct guild_position; -struct guild_castle; -struct map_session_data; -struct mob_data; +#include "map.h" // EVENT_NAME_LENGTH, TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index ff9f7a5b1..b6a83d1cb 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,43 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "../config/core.h" // DBPATH +#include "homunculus.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" - -#include "homunculus.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index e6d59e30e..9eef6af5b 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,9 +5,10 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ +#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "pc.h" +#include "../common/mmo.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index caf622b3d..5789d7dd6 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,30 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/db.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "clif.h" #include "instance.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <time.h> +#include "clif.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index 712a0f141..ae649eda7 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,8 +6,11 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db +#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point + struct block_list; +struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 6bd24368a..383150fbc 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,37 +1,40 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "map.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "intif.h" + +#include <fcntl.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> + +#include "atcommand.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "pc.h" -#include "intif.h" -#include "log.h" -#include "storage.h" -#include "party.h" +#include "elemental.h" #include "guild.h" -#include "pet.h" -#include "atcommand.h" -#include "mercenary.h" #include "homunculus.h" -#include "elemental.h" +#include "log.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include <sys/types.h> -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <fcntl.h> -#include <string.h> - +#include "storage.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index 290dcfcdc..b6ee727f3 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,19 +5,22 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ +#include "../common/cbasetypes.h" /** * Declarations **/ -struct party_member; +struct auction_data; struct guild_member; struct guild_position; -struct s_pet; +struct guild_storage; +struct mail_message; +struct map_session_data; +struct party_member; +struct s_elemental; struct s_homunculus; struct s_mercenary; -struct s_elemental; -struct mail_message; -struct auction_data; +struct s_pet; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index ff28082e7..6f016697f 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,23 +2,25 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/random.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "clif.h" #include "irc-bot.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "clif.h" +#include "map.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" + //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index c15a5d46a..60f03fca5 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,6 +6,8 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ +#include "../common/cbasetypes.h" + #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5eeb90be5..1981f435c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,23 +2,28 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH, RENEWAL #include "itemdb.h" -#include "map.h" -#include "battle.h" // struct battle_config -#include "script.h" // item script processing -#include "pc.h" // W_MUSICAL, W_WHIP #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" // struct battle_config +#include "map.h" +#include "mob.h" // MAX_MOB_DB +#include "pc.h" // W_MUSICAL, W_WHIP +#include "script.h" // item script processing +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct itemdb_interface itemdb_s; /** diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 77fb2e2ec..12766b288 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,9 +5,12 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "map.h" +#include "../common/sql.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 19a98f34b..523ef1d65 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "battle.h" -#include "itemdb.h" +#define HERCULES_CORE + #include "log.h" -#include "map.h" -#include "mob.h" -#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "battle.h" +#include "itemdb.h" +#include "map.h" +#include "mob.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" + struct log_interface log_s; /// obtain log type character for item/zeny logs diff --git a/src/map/log.h b/src/map/log.h index b2cb92c20..ecfedeac2 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,11 +11,10 @@ /** * Declarations **/ -struct block_list; -struct map_session_data; -struct mob_data; struct item; struct item_data; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 371aa892f..7ba7d7470 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,19 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#define HERCULES_CORE #include "mail.h" -#include "atcommand.h" -#include "itemdb.h" -#include "clif.h" -#include "pc.h" -#include "log.h" #include <time.h> #include <string.h> +#include "atcommand.h" +#include "clif.h" +#include "itemdb.h" +#include "log.h" +#include "pc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct mail_interface mail_s; void mail_clear(struct map_session_data *sd) diff --git a/src/map/mail.h b/src/map/mail.h index 8df537ff3..30b032ef4 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,7 +5,11 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/mmo.h" +#include "../common/cbasetypes.h" + +struct item; +struct mail_message; +struct map_session_data; struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 315924e2e..01d3dbb9f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,62 +2,66 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/timer.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/showmsg.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" -#include "path.h" + +#include <math.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "HPMmap.h" +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "chrif.h" #include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" #include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" #include "npc.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "party.h" +#include "path.h" #include "pc.h" +#include "pet.h" +#include "quest.h" +#include "script.h" +#include "skill.h" #include "status.h" -#include "mob.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "chat.h" -#include "itemdb.h" #include "storage.h" -#include "skill.h" #include "trade.h" -#include "party.h" #include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "quest.h" -#include "script.h" -#include "mapreg.h" -#include "guild.h" -#include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" -#include "atcommand.h" -#include "log.h" -#include "mail.h" -#include "irc-bot.h" -#include "HPMmap.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/core.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <math.h> #ifndef _WIN32 #include <unistd.h> #endif @@ -5482,8 +5486,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->addCommand("gm:info",CPCMD_A(gm_position)); - console->addCommand("gm:use",CPCMD_A(gm_use)); + console->input->addCommand("gm:info",CPCMD_A(gm_position)); + console->input->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5839,7 +5843,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->setSQL(map->mysql_handle); + console->input->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index c61868b13..539b02ed8 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ +#include <stdarg.h> + +#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" -#include "../config/core.h" #include "../common/sql.h" -#include "atcommand.h" -#include <stdarg.h> +struct mob_data; struct npc_data; -struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,7 +36,6 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM -#define MAX_LEVEL 175 #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] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index 61c25f24e..f026fde00 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "mapreg.h" + +#include <stdlib.h> +#include <string.h> + +#include "map.h" // map->mysql_handle +#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -10,11 +19,6 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "map.h" // map->mysql_handle -#include "script.h" -#include "mapreg.h" -#include <stdlib.h> -#include <string.h> struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 495621014..26bc8c188 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "mercenary.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "mercenary.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index dd9266b2e..b998ac006 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,6 +6,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 8f12d4b1b..11ac74621 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,46 +2,49 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/socket.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "pet.h" -#include "status.h" +#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP #include "mob.h" -#include "homunculus.h" -#include "mercenary.h" + +#include <math.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "clif.h" +#include "date.h" #include "elemental.h" #include "guild.h" +#include "homunculus.h" +#include "intif.h" #include "itemdb.h" -#include "skill.h" -#include "battle.h" -#include "party.h" -#include "npc.h" #include "log.h" -#include "script.h" -#include "atcommand.h" -#include "date.h" +#include "map.h" +#include "mercenary.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <math.h> +#include "script.h" +#include "skill.h" +#include "status.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index 80175b1db..d07f78c77 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,12 +5,11 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "../common/mmo.h" // struct item -#include "guild.h" // struct guardian_data #include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status data, struct status_change -#include "unit.h" // unit_stop_walking(), unit_stop_attack() -#include "npc.h" +#include "status.h" // struct status_data, struct status_change +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // struct item #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 20b500630..8e5854dbf 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/db.h" -#include "../common/socket.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "log.h" +#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "npc.h" + +#include <errno.h> +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "chat.h" #include "clif.h" +#include "instance.h" #include "intif.h" -#include "pc.h" -#include "status.h" #include "itemdb.h" -#include "script.h" +#include "log.h" +#include "map.h" #include "mob.h" +#include "pc.h" #include "pet.h" -#include "instance.h" -#include "battle.h" +#include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "npc.h" -#include "chat.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <time.h> -#include <errno.h> +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index c154b14d0..6e9686d33 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/db.h" struct HPluginData; -struct block_list; -struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 9d5639efc..f245ffea5 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifdef PCRE_SUPPORT +#define HERCULES_CORE -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#ifdef PCRE_SUPPORT -#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() - -#include "../../3rdparty/pcre/include/pcre.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> + +#include "../../3rdparty/pcre/include/pcre.h" + +#include "mob.h" // struct mob_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index cf5e7bbe3..7c49e241c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,34 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/socket.h" // last_tick -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/strlib.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "atcommand.h" //msg_txt() -#include "pc.h" -#include "map.h" -#include "instance.h" #include "battle.h" -#include "intif.h" #include "clif.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" #include "log.h" +#include "map.h" +#include "mob.h" // struct mob_data +#include "pc.h" #include "skill.h" #include "status.h" -#include "itemdb.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // last_tick +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index ed8289af6..3bad22b13 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,11 +5,12 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ -#include "../common/mmo.h" // struct party -#include "../config/core.h" #include <stdarg.h> -#include "map.h" +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct party #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index ae9fc389d..d02e9ee4a 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA #include "path.h" -#include "map.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index 0b67a0120..b48ff05fb 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,6 +6,7 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk +#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index c8fb14e55..45adfe22a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,21 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/timer.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -25,32 +20,40 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" +#include "elemental.h" +#include "guild.h" // guild->search(), guild_request_info() +#include "homunculus.h" +#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" -#include "path.h" -#include "homunculus.h" -#include "instance.h" #include "mercenary.h" -#include "elemental.h" +#include "mob.h" // struct mob_data #include "npc.h" // fake_nd -#include "pet.h" // pet_unlocktarget() #include "party.h" // party->search() -#include "guild.h" // guild->search(), guild_request_info() +#include "path.h" +#include "pc_groups.h" +#include "pet.h" // pet_unlocktarget() +#include "quest.h" #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "pc_groups.h" -#include "quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pc_interface pc_s; @@ -10651,9 +10654,7 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) -#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index 70df9ca56..c4026a48d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus -#include "../common/ers.h" -#include "../common/timer.h" // INVALID_TIMER -#include "atcommand.h" // AtCommandType +#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT + #include "battle.h" // battle_config -#include "battleground.h" +#include "battleground.h" // enum bg_queue_types #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" -#include "log.h" -#include "map.h" // RC_MAX -#include "mob.h" -#include "pc_groups.h" -#include "script.h" // struct script_reg, struct script_regstr +#include "itemdb.h" // MAX_ITEMDELAYS +#include "log.h" // struct e_log_pick_type +#include "map.h" // RC_MAX, ELE_MAX +#include "pc_groups.h" // GroupSettings +#include "script.h" // struct reg_db #include "searchstore.h" // struct s_search_store_info -#include "status.h" // OPTION_*, struct weapon_atk -#include "unit.h" // unit_stop_attack(), unit_stop_walking() +#include "status.h" // enum sc_type, OPTION_* +#include "unit.h" // struct unit_data, struct view_data #include "vending.h" // struct s_vending +#include "../common/cbasetypes.h" +#include "../common/ers.h" // struct eri +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,9 +742,8 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; -#endif + unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 906462c7e..a917ef409 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,6 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pc_groups.h" + +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -10,12 +18,6 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp -#include "pc_groups.h" -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() - static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 5c03f999f..7c8cdd82a 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,6 +5,10 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" + /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index 993497434..aa2be4473 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,37 +2,39 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/db.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "pc.h" -#include "status.h" -#include "map.h" -#include "path.h" -#include "intif.h" -#include "clif.h" -#include "chrif.h" #include "pet.h" -#include "itemdb.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" // msg_txt() #include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mob.h" #include "npc.h" +#include "path.h" +#include "pc.h" #include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "atcommand.h" // msg_txt() -#include "log.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 4ec30b3fb..8dde0fac2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,8 +5,14 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // NAME_LENGTH, struct s_pet + +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index bde276f9d..b76d6bc82 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,36 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "npc.h" -#include "itemdb.h" -#include "script.h" -#include "intif.h" -#include "battle.h" -#include "mob.h" -#include "party.h" -#include "unit.h" -#include "log.h" -#include "clif.h" #include "quest.h" -#include "chrif.h" +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <time.h> +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "script.h" +#include "unit.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index e01e35619..87894d639 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,6 +5,10 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES + #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index 4d77c506b..068be8524 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,6 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "script.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "pet.h" +#include "quest.h" +#include "skill.h" +#include "status.h" +#include "status.h" +#include "storage.h" +#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -10,47 +50,10 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/sysinfo.h" - -#include "map.h" -#include "path.h" -#include "clif.h" -#include "chrif.h" -#include "itemdb.h" -#include "pc.h" -#include "status.h" -#include "storage.h" -#include "mob.h" -#include "npc.h" -#include "pet.h" -#include "mapreg.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "intif.h" -#include "skill.h" -#include "status.h" -#include "chat.h" -#include "battle.h" -#include "battleground.h" -#include "party.h" -#include "guild.h" -#include "atcommand.h" -#include "log.h" -#include "unit.h" -#include "pet.h" -#include "mail.h" -#include "script.h" -#include "quest.h" -#include "elemental.h" -#include "../config/core.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> #ifndef WIN32 #include <sys/time.h> #endif diff --git a/src/map/script.h b/src/map/script.h index 90b18d87f..899c745da 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,17 +5,19 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ -#include "../common/strlib.h" //StringBuf -#include "../common/cbasetypes.h" -#include "map.h" //EVENT_NAME_LENGTH - #include <setjmp.h> #include <errno.h> +#include "map.h" //EVENT_NAME_LENGTH +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct item +#include "../common/sql.h" // Sql +#include "../common/strlib.h" //StringBuf + /** * Declarations **/ -struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 0144aea93..72b28aacd 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,14 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "searchstore.h" // struct s_search_store_info + +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data -#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 827e39053..c9b93ba54 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,6 +5,12 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ +#include <time.h> + +#include "map.h" // MESSAGE_SIZE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index c8388770a..b2e94ec79 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,46 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "pc.h" -#include "status.h" +#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() #include "skill.h" -#include "pet.h" + +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "date.h" +#include "elemental.h" +#include "guild.h" #include "homunculus.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mercenary.h" -#include "elemental.h" #include "mob.h" #include "npc.h" -#include "battle.h" -#include "battleground.h" #include "party.h" -#include "itemdb.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "intif.h" -#include "log.h" -#include "chrif.h" -#include "guild.h" -#include "date.h" +#include "status.h" #include "unit.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <math.h> - +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index dda310bd4..b6dbb1fcb 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,19 +5,23 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../common/mmo.h" // MAX_SKILL, struct square -#include "../common/db.h" +#include "../config/core.h" // RENEWAL_CAST + #include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // MAX_SKILL, struct square /** * Declarations **/ -struct map_session_data; struct homun_data; +struct map_session_data; +struct mercenary_data; struct skill_unit; -struct skill_unit_group; -struct status_change_entry; struct square; +struct status_change_entry; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index 4c2bc6d22..eb06138da 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,43 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP +#include "status.h" +#include <math.h> +#include <memory.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "npc.h" -#include "mob.h" -#include "clif.h" -#include "guild.h" +#include "script.h" #include "skill.h" -#include "itemdb.h" -#include "battle.h" -#include "chrif.h" #include "skill.h" -#include "status.h" -#include "script.h" #include "unit.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" #include "vending.h" - -#include <time.h> -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> -#include <string.h> -#include <math.h> +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index e47c2b365..baa586297 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,14 +5,18 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ +#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD + +#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct mob_data; -struct pet_data; +struct elemental_data; struct homun_data; struct mercenary_data; -struct status_change; +struct mob_data; +struct npc_data; +struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1878,11 +1882,7 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; -#ifdef RENEWAL_ASPD - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; -#else - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] -#endif + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index e65ed7b80..2db5fff3d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,28 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" +#define HERCULES_CORE -#include "map.h" // struct map_session_data #include "storage.h" -#include "chrif.h" -#include "itemdb.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "guild.h" -#include "battle.h" -#include "atcommand.h" -#include "log.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "guild.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" // struct map_session_data +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 8f9f904f6..5edb68cfc 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,11 +5,12 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -struct storage_data; +#include "../common/cbasetypes.h" +#include "../common/db.h" + struct guild_storage; struct item; struct map_session_data; -struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 44b669ebd..83426c407 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/socket.h" +#define HERCULES_CORE #include "trade.h" + +#include <stdio.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" +#include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" #include "pc.h" -#include "npc.h" -#include "battle.h" -#include "chrif.h" #include "storage.h" -#include "intif.h" -#include "atcommand.h" -#include "log.h" - -#include <stdio.h> -#include <string.h> +#include "../common/nullpo.h" +#include "../common/socket.h" struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 151d4bad5..0ad770e80 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,45 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/showmsg.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // RENEWAL_CAST +#include "unit.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" #include "path.h" #include "pc.h" -#include "mob.h" #include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "script.h" #include "skill.h" -#include "clif.h" -#include "duel.h" -#include "npc.h" -#include "guild.h" #include "status.h" -#include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "storage.h" #include "trade.h" #include "vending.h" -#include "party.h" -#include "intif.h" -#include "chrif.h" -#include "script.h" -#include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/HPM.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 33fa4e052..9e05647b1 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,15 +5,13 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ -//#include "map.h" -struct block_list; -struct unit_data; -struct map_session_data; - #include "clif.h" // clr_type -#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "../common/cbasetypes.h" + +struct map_session_data; +struct block_list; struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index 9462975b3..c8ac814db 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,24 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE + +#include "vending.h" + +#include <stdio.h> +#include <string.h> + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" #include "itemdb.h" -#include "atcommand.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" -#include "chrif.h" -#include "vending.h" #include "pc.h" -#include "npc.h" #include "skill.h" -#include "battle.h" -#include "log.h" - -#include <stdio.h> -#include <string.h> +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a212f8385..a70726374 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/db.h" + struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 85d5fb548..96d51aec6 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,6 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "../config/core.h" // RENEWAL + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -8,12 +16,6 @@ #include "../common/showmsg.h" #include "../common/utils.h" -#include "../config/renewal.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #ifndef _WIN32 #include <unistd.h> #endif -- cgit v1.2.3-70-g09d2 From 0a4975ed611db7d1bcfe501008085e420e743128 Mon Sep 17 00:00:00 2001 From: Shido <the.keikun@gmail.com> Date: Fri, 30 May 2014 10:37:54 +0800 Subject: Fixed typos inside src/ --- src/char/char.c | 50 ++++++------- src/char/int_auction.c | 2 +- src/char/int_guild.c | 10 +-- src/char/int_homun.c | 4 +- src/char/int_party.c | 4 +- src/char/int_quest.c | 2 +- src/char/inter.c | 18 ++--- src/char/pincode.c | 2 +- src/common/HPM.c | 4 +- src/common/HPM.h | 2 +- src/common/atomic.h | 6 +- src/common/conf.h | 2 +- src/common/db.c | 14 ++-- src/common/db.h | 6 +- src/common/ers.c | 8 +- src/common/ers.h | 14 ++-- src/common/grfio.c | 10 +-- src/common/malloc.c | 4 +- src/common/mapindex.c | 2 +- src/common/mmo.h | 4 +- src/common/mutex.h | 16 ++-- src/common/showmsg.c | 6 +- src/common/showmsg.h | 4 +- src/common/socket.c | 14 ++-- src/common/spinlock.h | 2 +- src/common/sql.c | 10 +-- src/common/sql.h | 6 +- src/common/strlib.c | 32 ++++---- src/common/strlib.h | 10 +-- src/common/sysinfo.c | 4 +- src/common/thread.c | 14 ++-- src/common/thread.h | 16 ++-- src/common/timer.c | 6 +- src/common/utils.c | 6 +- src/config/core.h | 4 +- src/config/secure.h | 2 +- src/login/account.h | 2 +- src/login/account_sql.c | 2 +- src/login/login.c | 16 ++-- src/login/login.h | 2 +- src/login/loginlog_sql.c | 2 +- src/map/atcommand.c | 66 ++++++++--------- src/map/battle.c | 66 ++++++++--------- src/map/battle.h | 6 +- src/map/battleground.c | 4 +- src/map/chat.c | 2 +- src/map/chrif.c | 22 +++--- src/map/chrif.h | 2 +- src/map/clif.c | 96 ++++++++++++------------ src/map/clif.h | 2 +- src/map/elemental.c | 4 +- src/map/guild.c | 8 +- src/map/homunculus.c | 4 +- src/map/intif.c | 10 +-- src/map/itemdb.c | 2 +- src/map/map.c | 26 +++---- src/map/map.h | 8 +- src/map/mob.c | 24 +++--- src/map/mob.h | 6 +- src/map/npc.c | 10 +-- src/map/npc_chat.c | 12 +-- src/map/party.c | 4 +- src/map/script.c | 2 +- src/map/skill.c | 188 ++++++++++++++++++++++++----------------------- src/map/status.c | 24 +++--- src/map/status.h | 2 +- src/map/storage.c | 10 +-- src/map/trade.c | 12 +-- src/map/unit.c | 22 +++--- src/map/vending.h | 4 +- 70 files changed, 497 insertions(+), 495 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/char/char.c b/src/char/char.c index 57031e3ee..fe17fd14f 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -118,7 +118,7 @@ bool char_new = true; int char_new_display = 0; bool name_ignoring_case = false; // Allow or not identical name for characters but with a different case by [Yor] -int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor] +int char_name_option = 0; // Option to know which letters/symbols are authorized in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor] char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the requested name cannot be determined #define TRIM_CHARS "\255\xA0\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor] @@ -126,8 +126,8 @@ char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) i int char_del_level = 0; //From which level u can delete character [Lupus] int char_del_delay = 86400; -int log_char = 1; // loggin char or not [devil] -int log_inter = 1; // loggin inter or not [devil] +int log_char = 1; // logging char or not [devil] +int log_inter = 1; // logging inter or not [devil] int char_aegis_delete = 0; // Verify if char is in guild/party or char and reacts as Aegis does (doesn't allow deletion), see char_delete2_req for more information @@ -1387,7 +1387,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything if( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) strcat(t_msg, " accdata"); - if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfuly! + if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfully! SQL->StmtFree(stmt); StrBuf->Destroy(&buf); @@ -1413,7 +1413,7 @@ int mmo_char_sql_init(void) //and send the loginserver the new state.... // Force all users offline in sql when starting char-server - // (useful when servers crashs and don't clean the database) + // (useful when servers crashes and don't clean the database) set_all_offline_sql(); return 0; @@ -1468,7 +1468,7 @@ bool char_slotchange(struct char_session_data *sd, int fd, unsigned short from, } //----------------------------------- -// Function to change chararcter's names +// Function to change character's names //----------------------------------- int rename_char_sql(struct char_session_data *sd, int char_id) { @@ -1540,9 +1540,9 @@ int check_char_name(char * name, char * esc_name) if( strcmpi(name, wisp_server_name) == 0 ) return -1; // nick reserved for internal server messages - // Check Authorised letters/symbols in the name of the character + // Check Authorized letters/symbols in the name of the character if( char_name_option == 1 ) - { // only letters/symbols in char_name_letters are authorised + { // only letters/symbols in char_name_letters are authorized for( i = 0; i < NAME_LENGTH && name[i]; i++ ) if( strchr(char_name_letters, name[i]) == NULL ) return -2; @@ -1576,7 +1576,7 @@ int check_char_name(char * name, char * esc_name) * -1: 'Charname already exists' * -2: 'Char creation denied'/ Unknown error * -3: 'You are underaged' - * -4: 'You are not elegible to open the Character Slot.' + * -4: 'You are not eligible to open the Character Slot.' * -5: 'Symbols in Character Names are forbidden' * char_id: Success **/ @@ -2202,7 +2202,7 @@ void mapif_server_reset(int id); void loginif_reset(void) { int id; - // TODO kick everyone out and reset everything or wait for connect and try to reaquire locks [FlavioJS] + // TODO kick everyone out and reset everything or wait for connect and try to reacquire locks [FlavioJS] for( id = 0; id < ARRAYLENGTH(server); ++id ) mapif_server_reset(id); flush_fifos(); @@ -2286,7 +2286,7 @@ int parse_fromlogin(int fd) { switch( command ) { - // acknowledgement of connect-to-loginserver request + // acknowledgment of connect-to-loginserver request case 0x2711: if (RFIFOREST(fd) < 3) return 0; @@ -2306,7 +2306,7 @@ int parse_fromlogin(int fd) { RFIFOSKIP(fd,3); break; - // acknowledgement of account authentication request + // acknowledgment of account authentication request case 0x2713: if (RFIFOREST(fd) < 33) return 0; @@ -2526,7 +2526,7 @@ int parse_fromlogin(int fd) { unsigned char buf[11]; WBUFW(buf,0) = 0x2b14; WBUFL(buf,2) = RFIFOL(fd,2); - WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of statut, 1: ban + WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of status, 1: ban WBUFL(buf,7) = RFIFOL(fd,7); // status or final date of a banishment mapif_sendall(buf, 11); } @@ -3161,7 +3161,7 @@ int parse_frommap(int fd) memcpy(&char_dat, RFIFOP(fd,13), sizeof(struct mmo_charstatus)); mmo_char_tosql(cid, &char_dat); } else { //This may be valid on char-server reconnection, when re-sending characters that already logged off. - ShowError("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d).\n", aid, cid); + ShowError("parse_from_map (save-char): Received data for non-existing/offline character (%d:%d).\n", aid, cid); set_char_online(id, cid, aid); } @@ -4174,7 +4174,7 @@ int parse_char(int fd) ShowInfo("request connect - account_id:%d/login_id1:%d/login_id2:%d\n", account_id, login_id1, login_id2); if (sd) { - //Received again auth packet for already authentified account?? Discard it. + //Received again auth packet for already authenticated account?? Discard it. //TODO: Perhaps log this as a hack attempt? //TODO: and perhaps send back a reply? break; @@ -4201,7 +4201,7 @@ int parse_char(int fd) break; } - // search authentification + // search authentication node = (struct auth_node*)idb_get(auth_db, account_id); if( node != NULL && node->account_id == account_id && @@ -4232,7 +4232,7 @@ int parse_char(int fd) {// authentication not found (coming from login server) if (login_fd > 0) { // don't send request if no login-server WFIFOHEAD(login_fd,23); - WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account + WFIFOW(login_fd,0) = 0x2712; // ask login-server to authenticate an account WFIFOL(login_fd,2) = sd->account_id; WFIFOL(login_fd,6) = sd->login_id1; WFIFOL(login_fd,10) = sd->login_id2; @@ -4317,7 +4317,7 @@ int parse_char(int fd) break; } - /* set char as online prior to loading its data so 3rd party applications will realise the sql data is not reliable */ + /* set char as online prior to loading its data so 3rd party applications will realize the sql data is not reliable */ set_char_online(-2,char_id,sd->account_id); if( !mmo_char_fromsql(char_id, &char_dat, true) ) { /* failed? set it back offline */ set_char_offline(char_id, sd->account_id); @@ -4459,13 +4459,13 @@ int parse_char(int fd) WFIFOW(fd,0) = 0x6e; /* Others I found [Ind] */ /* 0x02 = Symbols in Character Names are forbidden */ - /* 0x03 = You are not elegible to open the Character Slot. */ + /* 0x03 = You are not eligible to open the Character Slot. */ /* 0x0B = This service is only available for premium users. */ switch (result) { case -1: WFIFOB(fd,2) = 0x00; break; // 'Charname already exists' case -2: WFIFOB(fd,2) = 0xFF; break; // 'Char creation denied' case -3: WFIFOB(fd,2) = 0x01; break; // 'You are underaged' - case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not elegible to open the Character Slot.' + case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not eligible to open the Character Slot.' case -5: WFIFOB(fd,2) = 0x02; break; // 'Symbols in Character Names are forbidden' default: @@ -4641,7 +4641,7 @@ int parse_char(int fd) //Confirm change name. // 0x28f <char_id>.L case 0x28f: - // 0: Sucessfull + // 0: Successful // 1: This character's name has already been changed. You cannot change a character's name more than once. // 2: User information is not correct. // 3: You have failed to change this character's name. @@ -4746,7 +4746,7 @@ int parse_char(int fd) RFIFOSKIP(fd,60); } - return 0; // avoid processing of followup packets here + return 0; // avoid processing of follow-up packets here // checks the entered pin case 0x8b8: @@ -5006,8 +5006,8 @@ static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { } //---------------------------------- -// Reading Lan Support configuration -// Rewrote: Anvanced subnet check [LuzZza] +// Reading LAN Support configuration +// Rewrote: Advanced subnet check [LuzZza] //---------------------------------- int char_lan_config_read(const char *lancfgName) { @@ -5479,7 +5479,7 @@ int do_init(int argc, char **argv) { timer->add_func_list(online_data_cleanup, "online_data_cleanup"); timer->add_interval(timer->gettick() + 1000, online_data_cleanup, 0, 0, 600 * 1000); - //Cleaning the tables for NULL entrys @ startup [Sirius] + //Cleaning the tables for NULL entries @ startup [Sirius] //Chardb clean if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '0'", char_db) ) Sql_ShowDebug(sql_handle); diff --git a/src/char/int_auction.c b/src/char/int_auction.c index d246e9851..8cd870647 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -230,7 +230,7 @@ void inter_auctions_fromsql(void) if( auction->timestamp > now ) endtick = ((int64)(auction->timestamp - now) * 1000) + tick; else - endtick = tick + 10000; // 10 Second's to process ended auctions + endtick = tick + 10000; // 10 seconds to process ended auctions auction->auction_end_timer = timer->add(endtick, auction_end_timer, auction->auction_id, 0); idb_put(auction_db_, auction->auction_id, auction); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index ffbe48e10..a6fcfe48c 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -117,7 +117,7 @@ int inter_guild_tosql(struct guild *g,int flag) // GS_EXPULSION `guild_expulsion` (`guild_id`,`account_id`,`name`,`mes`) // GS_SKILL `guild_skill` (`guild_id`,`id`,`lv`) - // temporary storage for str convertion. They must be twice the size of the + // temporary storage for str conversion. They must be twice the size of the // original string to ensure no overflows will occur. [Skotlex] char t_info[256]; char esc_name[NAME_LENGTH*2+1]; @@ -836,7 +836,7 @@ int guild_calcinfo(struct guild *g) // Save next exp step g->next_exp = nextexp; - // Set the max number of members, Guild Extention skill - currently adds 6 to max per skill lv. + // Set the max number of members, Guild Extension skill - currently adds 6 to max per skill lv. g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6; if(g->max_member > MAX_GUILD) { @@ -1142,8 +1142,8 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member mapif_guild_created(fd,account_id,NULL); return 0; } - // Check Authorised letters/symbols in the name of the character - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name of the character + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { mapif_guild_created(fd,account_id,NULL); @@ -1212,7 +1212,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member // Return guild info to client int mapif_parse_GuildInfo(int fd,int guild_id) { - struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is requied. [Skotlex] + struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is required. [Skotlex] if(g) { if (!guild_calcinfo(g)) diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 795a6b927..acde9eb38 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -248,9 +248,9 @@ bool mapif_homunculus_rename(char *name) { int i; - // Check Authorised letters/symbols in the name of the homun + // Check Authorized letters/symbols in the name of the homun if( char_name_option == 1 ) - {// only letters/symbols in char_name_letters are authorised + {// only letters/symbols in char_name_letters are authorized for( i = 0; i < NAME_LENGTH && name[i]; i++ ) if( strchr(char_name_letters, name[i]) == NULL ) return false; diff --git a/src/char/int_party.c b/src/char/int_party.c index 5dd64a32b..a8722fbe3 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -475,8 +475,8 @@ int mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct part mapif_party_created(fd,leader->account_id,leader->char_id,NULL); return 0; } - // Check Authorised letters/symbols in the name of the character - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name of the character + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { if( name[i] == '"' ) { /* client-special-char */ diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 61b43c57d..d4155b0d6 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -197,7 +197,7 @@ int mapif_parse_quest_save(int fd) { if (j < old_n) { // Update existing quests - // Only states and counts are changable. + // Only states and counts are changeable. ARR_FIND( 0, MAX_QUEST_OBJECTIVES, k, new_qd[i].count[k] != old_qd[j].count[k] ); if (k != MAX_QUEST_OBJECTIVES || new_qd[i].state != old_qd[j].state) success &= mapif_quest_update(char_id, new_qd[i]); diff --git a/src/char/inter.c b/src/char/inter.c index 972407ef3..c2d8de37a 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -589,7 +589,7 @@ void mapif_parse_accinfo(int fd) { inter_msg_to_fd(fd, u_fd, aid, "No matches were found for your criteria, '%s'",query); } else { Sql_ShowDebug(sql_handle); - inter_msg_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it."); + inter_msg_to_fd(fd, u_fd, aid, "An error occurred, bother your admin about it."); } SQL->FreeResult(sql_handle); return; @@ -658,7 +658,7 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc if (SQL->NumRows(sql_handle) == 0) { inter_msg_to_fd(map_fd, u_fd, u_aid, "This account doesn't have characters."); } else { - inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occured, bother your admin about it."); + inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occurred, bother your admin about it."); Sql_ShowDebug(sql_handle); } } else { @@ -1165,7 +1165,7 @@ int check_ttl_wisdata(void) struct WisData *wd = (struct WisData*)idb_get(wis_db, wis_dellist[i]); ShowWarning("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst); // removed. not send information after a timeout. Just no answer for the player - //mapif_wis_end(wd, 1); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + //mapif_wis_end(wd, 1); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target idb_remove(wis_db, wd->id); } } while(wis_delnum >= WISDELLIST_MAX); @@ -1199,7 +1199,7 @@ int mapif_parse_WisRequest(int fd) if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) { ShowWarning("inter: Wis message size too long.\n"); return 0; - } else if (RFIFOW(fd,2)-52 <= 0) { // normaly, impossible, but who knows... + } else if (RFIFOW(fd,2)-52 <= 0) { // normally, impossible, but who knows... ShowError("inter: Wis message doesn't exist.\n"); return 0; } @@ -1216,7 +1216,7 @@ int mapif_parse_WisRequest(int fd) unsigned char buf[27]; WBUFW(buf, 0) = 0x3802; memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH); - WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target mapif_send(fd, buf, 27); } else @@ -1231,7 +1231,7 @@ int mapif_parse_WisRequest(int fd) uint8 buf[27]; WBUFW(buf, 0) = 0x3802; memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH); - WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target mapif_send(fd, buf, 27); } else @@ -1272,7 +1272,7 @@ int mapif_parse_WisReply(int fd) return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server if ((--wd->count) <= 0 || flag != 1) { - mapif_wis_end(wd, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + mapif_wis_end(wd, flag); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target idb_remove(wis_db, id); } @@ -1376,8 +1376,8 @@ int mapif_parse_NameChangeRequest(int fd) type = RFIFOB(fd,10); name = (char*)RFIFOP(fd,11); - // Check Authorised letters/symbols in the name - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { mapif_namechange_ack(fd, account_id, char_id, type, 0, name); diff --git a/src/char/pincode.c b/src/char/pincode.c index 59182f12d..18ad0ffc8 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -33,7 +33,7 @@ void pincode_handle ( int fd, struct char_session_data* sd ) { } if( strlen(sd->pincode) == 4 ){ - if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasnt changed his PIN code for a long time + if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasn't changed his PIN code for a long time pincode->sendstate( fd, sd, PINCODE_EXPIRED ); } else { // Ask user for his PIN code pincode->sendstate( fd, sd, PINCODE_ASK ); diff --git a/src/common/HPM.c b/src/common/HPM.c index d33a4c1aa..f39954175 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -410,7 +410,7 @@ void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, voi *(action.hdatac) += 1; RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac)); - /* RECREATE modified the addresss */ + /* RECREATE modified the address */ HPDataSRC = *(action.HPDataSRCPtr); HPDataSRC[*(action.hdatac) - 1] = HPData; } @@ -578,7 +578,7 @@ void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } -/* todo: add ability for tracking using pID for the upcoming runtime load/unload support. */ +/* TODO: add ability for tracking using pID for the upcoming runtime load/unload support. */ bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) { if( !HPM->hooking ) { ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target); diff --git a/src/common/HPM.h b/src/common/HPM.h index 9c176cfd6..5667f605a 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -24,7 +24,7 @@ #define DLL HINSTANCE #else // ! WIN32 #include <dlfcn.h> - #ifdef RTLD_DEEPBIND // Certain linux ditributions require this, but it's not available everywhere + #ifdef RTLD_DEEPBIND // Certain linux distributions require this, but it's not available everywhere #define plugin_open(x) dlopen((x),RTLD_NOW|RTLD_DEEPBIND) #else // ! RTLD_DEEPBIND #define plugin_open(x) dlopen((x),RTLD_NOW) diff --git a/src/common/atomic.h b/src/common/atomic.h index 1349d0887..526811a09 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -12,7 +12,7 @@ // - Compiler // - Operating System // -// our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+ +// our Abstraction is fully API-Compatible to Microsoft's implementation @ NT5.0+ // #include "../common/cbasetypes.h" @@ -23,7 +23,7 @@ #if _MSC_VER < 1800 #if !defined(_M_X64) -// When compiling for windows 32bit, the 8byte interlocked operations are not provided by microsoft +// When compiling for windows 32bit, the 8byte interlocked operations are not provided by Microsoft // (because they need at least i586 so its not generic enough.. ... ) forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, int64 _cmp){ _asm{ @@ -143,7 +143,7 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){ }//end: InterlockedExchange() -#endif //endif compiler decission +#endif //endif compiler decision #endif /* _COMMON_ATOMIC_H_ */ diff --git a/src/common/conf.h b/src/common/conf.h index e5b637e47..7c275bec2 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -10,7 +10,7 @@ #include "../../3rdparty/libconfig/libconfig.h" /** - * The libconfig interface -- specially for plugins, but we enforce it throughought the core to be consistent + * The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent **/ struct libconfig_interface { int (*read) (config_t *config, FILE *stream); diff --git a/src/common/db.c b/src/common/db.c index bbeaf0b61..11ac06c93 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -3,7 +3,7 @@ * For more information, see LICENCE in the main folder * * This file is separated in five sections: - * (1) Private typedefs, enums, structures, defines and gblobal variables + * (1) Private typedefs, enums, structures, defines and global variables * (2) Private functions * (3) Protected functions used internally * (4) Protected functions used in the interface of the database @@ -89,15 +89,15 @@ * DBNColor - Enumeration of colors of the nodes. * * DBNode - Structure of a node in RED-BLACK trees. * * struct db_free - Structure that holds a deleted node to be freed. * - * DBMap_impl - Struture of the database. * + * DBMap_impl - Structure of the database. * * stats - Statistics about the database system. * \*****************************************************************************/ /** * If defined statistics about database nodes, database creating/destruction - * and function usage are keept and displayed when finalizing the database + * and function usage are kept and displayed when finalizing the database * system. - * WARNING: This adds overhead to every database operation (not shure how much). + * WARNING: This adds overhead to every database operation (not sure how much). * @private * @see #DBStats * @see #stats @@ -511,7 +511,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root) } // Remove the node from the tree - if (y != node) { // both childs existed + if (y != node) { // both child existed // put the left of 'node' in the left of 'y' node->left->parent = y; y->left = node->left; @@ -2066,7 +2066,7 @@ static int db_obj_vforeach(DBMap* self, DBApply func, va_list args) * Apply <code>func</code> to every entry in the database. * Returns the sum of values returned by func. * @param self Interface of the database - * @param func Function to be applyed + * @param func Function to be applied * @param ... Extra arguments for func * @return Sum of the values returned by func * @protected @@ -2345,7 +2345,7 @@ static DBOptions db_obj_options(DBMap* self) * db_default_cmp - Get the default comparator for a type of database. * db_default_hash - Get the default hasher for a type of database. * db_default_release - Get the default releaser for a type of database with the specified options. - * db_custom_release - Get a releaser that behaves a certains way. + * db_custom_release - Get a releaser that behaves a certain way. * db_alloc - Allocate a new database. * db_i2key - Manual cast from 'int' to 'DBKey'. * db_ui2key - Manual cast from 'unsigned int' to 'DBKey'. diff --git a/src/common/db.h b/src/common/db.h index f5714ceaf..4f8d6be79 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -106,7 +106,7 @@ typedef enum DBType { } DBType; /** - * Bitfield of options that define the behaviour of the database. + * Bitfield of options that define the behavior of the database. * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the * types of databases. * @param DB_OPT_BASE Base options: does not duplicate keys, releases nothing @@ -116,7 +116,7 @@ typedef enum DBType { * @param DB_OPT_RELEASE_KEY Releases the key. * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed * from the database. - * WARNING: for funtions that return the data (like DBMap::remove), + * WARNING: for functions that return the data (like DBMap::remove), * a dangling pointer will be returned. * @param DB_OPT_RELEASE_BOTH Releases both key and data. * @param DB_OPT_ALLOW_NULL_KEY Allow NULL keys in the database. @@ -365,7 +365,7 @@ struct DBIterator }; /** - * Public interface of a database. Only contains funtions. + * Public interface of a database. Only contains functions. * All the functions take the interface as the first argument. * @public * @see #db_alloc(const char*,int,DBType,DBOptions,unsigned short) diff --git a/src/common/ers.c b/src/common/ers.c index 39e05a14c..0842d9e15 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -13,16 +13,16 @@ * If it has reusable entries (freed entry), it uses one. * * So no assumption should be made about the data of the entry. * * Entries should be freed in the manager they where allocated from. * - * Failure to do so can lead to unexpected behaviours. * + * Failure to do so can lead to unexpected behaviors. * * * * <H2>Advantages:</H2> * * - The same manager is used for entries of the same size. * * So entries freed in one instance of the manager can be used by other * * instances of the manager. * * - Much less memory allocation/deallocation - program will be faster. * - * - Avoids memory fragmentaion - program will run better for longer. * + * - Avoids memory fragmentation - program will run better for longer. * * * - * <H2>Disavantages:</H2> * + * <H2>Disadvantages:</H2> * * - Unused entries are almost inevitable - memory being wasted. * * - A manager will only auto-destroy when all of its instances are * * destroyed so memory will usually only be recovered near the end. * @@ -104,7 +104,7 @@ struct ers_instance_t { // Interface to ERS struct eri VTable; - // Name, used for debbuging purpouses + // Name, used for debugging purposes char *Name; // Misc options diff --git a/src/common/ers.h b/src/common/ers.h index 7eceaf87a..f32680339 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -13,16 +13,16 @@ * If it has reusable entries (freed entry), it uses one. * * So no assumption should be made about the data of the entry. * * Entries should be freed in the manager they where allocated from. * - * Failure to do so can lead to unexpected behaviours. * + * Failure to do so can lead to unexpected behaviors. * * * * <H2>Advantages:</H2> * * - The same manager is used for entries of the same size. * * So entries freed in one instance of the manager can be used by other * * instances of the manager. * * - Much less memory allocation/deallocation - program will be faster. * - * - Avoids memory fragmentaion - program will run better for longer. * + * - Avoids memory fragmentation - program will run better for longer. * * * - * <H2>Disavantages:</H2> * + * <H2>Disadvantages:</H2> * * - Unused entries are almost inevitable - memory being wasted. * * - A manager will only auto-destroy when all of its instances are * * destroyed so memory will usually only be recovered near the end. * @@ -49,7 +49,7 @@ * ERS - Entry manager. * * ers_new - Allocate an instance of an entry manager. * * ers_report - Print a report about the current state. * - * ers_final - Clears the remainder of the manangers. * + * ers_final - Clears the remainder of the managers. * \*****************************************************************************/ /** @@ -64,7 +64,7 @@ * By default it aligns to one byte, using the "natural order" of the entries. * This should NEVER be set to zero or less. * If greater than one, some memory can be wasted. This should never be needed - * but is here just in case some aligment issues arise. + * but is here just in case some alignment issues arise. */ #ifndef ERS_ALIGNED # define ERS_ALIGNED 1 @@ -102,7 +102,7 @@ typedef struct eri { /** * Free an entry allocated from this manager. * WARNING: Does not check if the entry was allocated by this manager. - * Freeing such an entry can lead to unexpected behaviour. + * Freeing such an entry can lead to unexpected behavior. * @param self Interface of the entry manager * @param entry Entry to be freed */ @@ -170,7 +170,7 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options); void ers_report(void); /** - * Clears the remainder of the manangers + * Clears the remainder of the managers **/ void ers_final(void); #endif /* DISABLE_ERS / not DISABLE_ERS */ diff --git a/src/common/grfio.c b/src/common/grfio.c index 1111fb3f3..f592812f6 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -418,7 +418,7 @@ void* grfio_reads(const char* fname, int* size) declen = (int)ftell(in); fseek(in,0,SEEK_SET); buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination - if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname); + if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occurred in fread grfio_reads, fname=%s \n",fname); fclose(in); if( size ) @@ -440,7 +440,7 @@ void* grfio_reads(const char* fname, int* size) int fsize = entry->srclen_aligned; unsigned char *buf = (unsigned char *)aMalloc(fsize); fseek(in, entry->srcpos, 0); - if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname); + if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occurred in fread in grfio_reads, grfname=%s\n",grfname); fclose(in); buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination @@ -583,7 +583,7 @@ static int grfio_entryread(const char* grfname, int gentry) unsigned char *rBuf; uLongf rSize, eSize; - if(fread(eheader,1,8,fp) != 8) ShowError("An error occured in fread while reading eheader buffer\n"); + if(fread(eheader,1,8,fp) != 8) ShowError("An error occurred in fread while reading header buffer\n"); rSize = getlong(eheader); // Read Size eSize = getlong(eheader+4); // Extend Size @@ -595,7 +595,7 @@ static int grfio_entryread(const char* grfname, int gentry) rBuf = (unsigned char *)aMalloc(rSize); // Get a Read Size grf_filelist = (unsigned char *)aMalloc(eSize); // Get a Extend Size - if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occured in fread \n"); + if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occurred in fread \n"); fclose(fp); decode_zip(grf_filelist, &eSize, rBuf, rSize); // Decode function aFree(rBuf); @@ -827,7 +827,7 @@ void grfio_init(const char* fname) if( grf_num == 0 ) ShowInfo("No GRF loaded, using default data directory\n"); - // Unneccessary area release of filelist + // Unnecessary area release of filelist filelist_compact(); // Resource check diff --git a/src/common/malloc.c b/src/common/malloc.c index 74303fa92..83d1d6656 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -776,7 +776,7 @@ static void memmgr_init (void) { #ifdef LOG_MEMMGR sprintf(memmer_logfile, "log/%s.leaks", SERVER_NAME); - ShowStatus("Memory manager initialised: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile); + ShowStatus("Memory manager initialized: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile); memset(hash_unfill, 0, sizeof(hash_unfill)); #endif /* LOG_MEMMGR */ } @@ -784,7 +784,7 @@ static void memmgr_init (void) /*====================================== -* Initialise +* Initialize *-------------------------------------- */ diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5c69c7063..644f2f619 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -70,7 +70,7 @@ const char* mapindex_getmapname_ext(const char* string, char* output) { } /// Adds a map to the specified index -/// Returns 1 if successful, 0 oherwise +/// Returns 1 if successful, 0 otherwise int mapindex_addmap(int index, const char* name) { char map_name[MAP_NAME_LENGTH]; diff --git a/src/common/mmo.h b/src/common/mmo.h index 4ac7ee793..6ef5b50f5 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -26,7 +26,7 @@ // 20071106 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c // 20080102 - 2008-01-02aSakexe+ - 0x2ec, 0x2ed , 0x2ee // 20081126 - 2008-11-26aSakexe+ - 0x1a2 -// 20090408 - 2009-04-08aSakexe+ - 0x44a (dont use as it overlaps with RE client packets) +// 20090408 - 2009-04-08aSakexe+ - 0x44a (don't use as it overlaps with RE client packets) // 20080827 - 2008-08-27aRagexeRE+ - First RE Client // 20081217 - 2008-12-17aRagexeRE+ - 0x6d (Note: This one still use old Char Info Packet Structure) // 20081218 - 2008-12-17bRagexeRE+ - 0x6d (Note: From this one client use new Char Info Packet Structure) @@ -120,7 +120,7 @@ #define MAX_GUILD_STORAGE 600 #define MAX_PARTY 12 #define MAX_GUILD (16+10*6) // Increased max guild members +6 per 1 extension levels [Lupus] -#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW] +#define MAX_GUILDPOSITION 20 // Increased max guild positions to accommodate for all members [Valaris] (removed) [PoW] #define MAX_GUILDEXPULSION 32 #define MAX_GUILDALLIANCE 16 #define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan] diff --git a/src/common/mutex.h b/src/common/mutex.h index f78e31841..ce13a28b7 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -57,23 +57,23 @@ racond racond_create(); /** * Destroy a Condition variable * - * @param c - the condition varaible to destroy + * @param c - the condition variable to destroy */ void racond_destroy( racond c ); /** - * Waits Until state is signalled + * Waits Until state is signaled * - * @param c - the condition var to wait for signalled state - * @param m - the mutex used for syncronization + * @param c - the condition var to wait for signaled state + * @param m - the mutex used for synchronization * @param timeout_ticks - timeout in ticks ( -1 = INFINITE ) */ void racond_wait( racond c, ramutex m, sysint timeout_ticks); /** - * Sets the given condition var to signalled state + * Sets the given condition var to signaled state * - * @param c - condition var to set in signalled state. + * @param c - condition var to set in signaled state. * * @note: * Only one waiter gets notified. @@ -81,8 +81,8 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks); void racond_signal( racond c ); /** - * Sets notifys all waiting threads thats signalled. - * @param c - condition var to set in signalled state + * Sets notifies all waiting threads thats signaled. + * @param c - condition var to set in signaled state * * @note: * All Waiters getting notified. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 2a8e2d5f8..ece10c1a8 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -88,7 +88,7 @@ int console_msg_log = 0;//[Ind] msg error logging // XXX adapted from eApp (comments are left untouched) [flaviojs] /////////////////////////////////////////////////////////////////////////////// -// ansi compatible printf with control sequence parser for windows +// ANSI compatible printf with control sequence parser for windows // fast hack, handle with care, not everything implemented // // \033[#;...;#m - Set Graphics Rendition (SGR) @@ -147,7 +147,7 @@ int console_msg_log = 0;//[Ind] msg error logging // // \033[u - Restore cursor position (RCP) // Restores the cursor position saved with the (SCP) sequence \033[s. -// (addition, restore to 0,0 if nothinh was saved before) +// (addition, restore to 0,0 if nothing was saved before) // // \033[#J - Erase Display (ED) @@ -282,7 +282,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) } //case '2': // not existing //case '3': // blinking (not implemented) - //case '4': // unterline (not implemented) + //case '4': // underline (not implemented) //case '6': // not existing //case '8': // concealed (not implemented) //case '9': // not existing diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 5b32f39ae..8008acf5a 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -72,9 +72,9 @@ #define CL_XXBL "\033[0;44m" // default on blue #define CL_PASS "\033[0;32;42m" // green on green -#define CL_SPACE " " // space aquivalent of the print messages +#define CL_SPACE " " // space equivalent of the print messages -extern int stdout_with_ansisequence; //If the color ansi sequences are to be used. [flaviojs] +extern int stdout_with_ansisequence; //If the color ANSI sequences are to be used. [flaviojs] extern int msg_silent; //Specifies how silent the console is. [Skotlex] extern int console_msg_log; //Specifies what error messages to log. [Ind] extern char timestamp_format[20]; //For displaying Timestamps [Skotlex] diff --git a/src/common/socket.c b/src/common/socket.c index ac6be68fe..58c2d5bf9 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -360,7 +360,7 @@ int recv_to_fifo(int fd) len = sRecv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0); if( len == SOCKET_ERROR ) - {//An exception has occured + {//An exception has occurred if( sErrno != S_EWOULDBLOCK ) { //ShowDebug("recv_to_fifo: %s, closing connection #%d\n", error_msg(), fd); set_eof(fd); @@ -400,7 +400,7 @@ int send_from_fifo(int fd) len = sSend(fd, (const char *) session[fd]->wdata, (int)session[fd]->wdata_size, MSG_NOSIGNAL); if( len == SOCKET_ERROR ) - {//An exception has occured + {//An exception has occurred if( sErrno != S_EWOULDBLOCK ) { //ShowDebug("send_from_fifo: %s, ending connection #%d\n", error_msg(), fd); #ifdef SHOW_SERVER_STATS @@ -845,7 +845,7 @@ int do_sockets(int next) session[i]->func_send(i); if(session[i]->flag.eof) //func_send can't free a session, this is safe. - { //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex] + { //Finally, even if there is no data to parse, connections signaled eof should be closed, so we call parse_func [Skotlex] session[i]->func_parse(i); //This should close the session immediately. } } @@ -1234,7 +1234,7 @@ void socket_final(void) if(session[i]) sockt->close(i); - // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ + // session[0] aFree(session[0]->rdata); aFree(session[0]->wdata); aFree(session[0]); @@ -1364,7 +1364,7 @@ void socket_init(void) } } #elif defined(HAVE_SETRLIMIT) && !defined(CYGWIN) - // NOTE: getrlimit and setrlimit have bogus behaviour in cygwin. + // NOTE: getrlimit and setrlimit have bogus behavior in cygwin. // "Number of fds is virtually unlimited in cygwin" (sys/param.h) {// set socket limit to FD_SETSIZE struct rlimit rlp; @@ -1405,7 +1405,7 @@ void socket_init(void) socket_config_read(SOCKET_CONF_FILENAME); - // initialise last send-receive tick + // initialize last send-receive tick sockt->last_tick = time(NULL); // session[0] is now currently used for disconnected sessions of the map server, and as such, @@ -1458,7 +1458,7 @@ uint32 str2ip(const char* ip_str) } // Reorders bytes from network to little endian (Windows). -// Neccessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls. +// Necessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls. uint16 ntows(uint16 netshort) { return ((netshort & 0xFF) << 8) | ((netshort & 0xFF00) >> 8); diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 1c0825181..fe0da6669 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -4,7 +4,7 @@ // // CAS based Spinlock Implementation // -// CamelCase names are choosen to be consistent with microsofts winapi +// CamelCase names are chosen to be consistent with Microsoft's WinAPI // which implements CriticalSection by this naming... // // Author: Florian Wilkemeyer <fw@f-ws.de> diff --git a/src/common/sql.c b/src/common/sql.c index ffc4d63ef..a562478ea 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -38,7 +38,7 @@ struct Sql { // Column length receiver. -// Takes care of the possible size missmatch between uint32 and unsigned long. +// Takes care of the possible size mismatch between uint32 and unsigned long. struct s_column_length { uint32* out_length; unsigned long length; @@ -569,7 +569,7 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(SqlStmt* self, size_t i) Sql_P_ShowDebugMysqlFieldInfo("data - ", field->type, field->flags&UNSIGNED_FLAG, self->column_lengths[i].length, ""); column = &self->columns[i]; if( column->buffer_type == MYSQL_TYPE_STRING ) - Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(nul-terminator)"); + Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(null-terminator)"); else Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, ""); mysql_free_result(meta); @@ -765,10 +765,10 @@ int SqlStmt_BindColumn(SqlStmt* self, size_t idx, enum SqlDataType buffer_type, { if( buffer_len < 1 ) { - ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the nul-terminator\n", buffer_len); + ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the null-terminator\n", buffer_len); return SQL_ERROR; } - --buffer_len;// nul-terminator + --buffer_len;// null-terminator } if( !self->bind_columns ) {// initialize the bindings @@ -891,7 +891,7 @@ int SqlStmt_NextRow(SqlStmt* self) if( self->column_lengths[i].out_length ) *self->column_lengths[i].out_length = (uint32)length; if( column->buffer_type == MYSQL_TYPE_STRING ) - {// clear unused part of the string/enum buffer (and nul-terminate) + {// clear unused part of the string/enum buffer (and null-terminate) memset((char*)column->buffer + length, 0, column->buffer_length - length + 1); } else if( column->buffer_type == MYSQL_TYPE_BLOB && length < column->buffer_length ) diff --git a/src/common/sql.h b/src/common/sql.h index 64d8307fc..3bdb76c74 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -166,7 +166,7 @@ struct sql_interface { /// It uses the connection of the parent Sql handle. /// Queries in Sql and SqlStmt are independent and don't affect each other. /// - /// @return SqlStmt handle or NULL if an error occured + /// @return SqlStmt handle or NULL if an error occurred struct SqlStmt* (*StmtMalloc)(Sql* sql); @@ -198,7 +198,7 @@ struct sql_interface { /// Returns the number of parameters in the prepared statement. /// - /// @return Number or paramenters + /// @return Number or parameters size_t (*StmtNumParams)(SqlStmt* self); @@ -237,7 +237,7 @@ struct sql_interface { /// Binds the result of a column to a buffer. /// The buffer will be filled with data when the next row is fetched. /// For string/enum buffer types there has to be enough space for the data - /// and the nul-terminator (an extra byte). + /// and the null-terminator (an extra byte). /// /// @return SQL_SUCCESS or SQL_ERROR int (*StmtBindColumn)(SqlStmt* self, size_t idx, SqlDataType buffer_type, void* buffer, size_t buffer_len, uint32* out_length, int8* out_is_null); diff --git a/src/common/strlib.c b/src/common/strlib.c index 10e893c3a..2ce8fd347 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -147,15 +147,15 @@ char* trim(char* str) if( start == end ) *str = '\0';// empty string else - {// move string with nul terminator + {// move string with null-terminator str[end] = '\0'; memmove(str,str+start,end-start+1); } return str; } -// Converts one or more consecutive occurences of the delimiters into a single space -// and removes such occurences from the beginning and end of string +// Converts one or more consecutive occurrences of the delimiters into a single space +// and removes such occurrences from the beginning and end of string // NOTE: make sure the string is not const!! char* normalize_name(char* str,const char* delims) { @@ -358,18 +358,18 @@ int config_switch(const char* str) { return (int)strtol(str, NULL, 0); } -/// strncpy that always nul-terminates the string +/// strncpy that always null-terminates the string char* safestrncpy(char* dst, const char* src, size_t n) { if( n > 0 ) { char* d = dst; const char* s = src; - d[--n] = '\0';/* nul-terminate string */ + d[--n] = '\0';/* null-terminate string */ for( ; n > 0; --n ) { if( (*d++ = *s++) == '\0' ) - {/* nul-pad remaining bytes */ + {/* null-pad remaining bytes */ while( --n > 0 ) *d++ = '\0'; break; @@ -385,12 +385,12 @@ size_t safestrnlen(const char* string, size_t maxlen) return ( string != NULL ) ? strnlen(string, maxlen) : 0; } -/// Works like snprintf, but always nul-terminates the buffer. -/// Returns the size of the string (without nul-terminator) +/// Works like snprintf, but always null-terminates the buffer. +/// Returns the size of the string (without null-terminator) /// or -1 if the buffer is too small. /// /// @param buf Target buffer -/// @param sz Size of the buffer (including nul-terminator) +/// @param sz Size of the buffer (including null-terminator) /// @param fmt Format string /// @param ... Format arguments /// @return The size of the string or -1 if the buffer is too small @@ -404,7 +404,7 @@ int safesnprintf(char* buf, size_t sz, const char* fmt, ...) va_end(ap); if( ret < 0 || (size_t)ret >= sz ) {// overflow - buf[sz-1] = '\0';// always nul-terminate + buf[sz-1] = '\0';// always null-terminate return -1; } return ret; @@ -631,8 +631,8 @@ int sv_parse_next(struct s_svstate* svstate) /// @param delim Field delimiter /// @param out_pos Array of resulting positions /// @param npos Size of the pos array -/// @param opt Options that determine the parsing behaviour -/// @return Number of fields found in the string or -1 if an error occured +/// @param opt Options that determine the parsing behavior +/// @return Number of fields found in the string or -1 if an error occurred int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, int npos, enum e_svopt opt) { struct s_svstate svstate; int count; @@ -666,11 +666,11 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i /// WARNING: this function modifies the input string /// Starts splitting at startoff and fills the out_fields array. /// out_fields[0] is the start of the next line. -/// Other entries are the start of fields (nul-teminated). +/// Other entries are the start of fields (null-terminated). /// Returns the number of fields found or -1 if an error occurs. /// /// out_fields can be NULL. -/// Fields that don't fit in out_fields are not nul-terminated. +/// Fields that don't fit in out_fields are not null-terminated. /// Extra entries in out_fields are filled with the end of the last field (empty string). /// /// @param str String to parse @@ -679,8 +679,8 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i /// @param delim Field delimiter /// @param out_fields Array of resulting fields /// @param nfields Size of the field array -/// @param opt Options that determine the parsing behaviour -/// @return Number of fields found in the string or -1 if an error occured +/// @param opt Options that determine the parsing behavior +/// @return Number of fields found in the string or -1 if an error occurred int sv_split(char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt) { int pos[1024]; int i; diff --git a/src/common/strlib.h b/src/common/strlib.h index f93d8ad67..f39f27789 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -16,7 +16,7 @@ char *_strtok_r(char* s1, const char* s2, char** lasts); #endif -/// Bitfield determining the behaviour of sv_parse and sv_split. +/// Bitfield determining the behavior of sv_parse and sv_split. typedef enum e_svopt { // default: no escapes and no line terminator SV_NOESCAPE_NOTERMINATE = 0, @@ -73,14 +73,14 @@ struct strlib_interface { int (*e_mail_check) (char* email); int (*config_switch) (const char* str); - /// strncpy that always nul-terminates the string + /// strncpy that always null-terminates the string char *(*safestrncpy) (char* dst, const char* src, size_t n); /// doesn't crash on null pointer size_t (*safestrnlen) (const char* string, size_t maxlen); - /// Works like snprintf, but always nul-terminates the buffer. - /// Returns the size of the string (without nul-terminator) + /// Works like snprintf, but always null-terminates the buffer. + /// Returns the size of the string (without null-terminator) /// or -1 if the buffer is too small. int (*safesnprintf) (char* buf, size_t sz, const char* fmt, ...); @@ -131,7 +131,7 @@ struct sv_interface { /// WARNING: this function modifies the input string /// Starts splitting at startoff and fills the out_fields array. /// out_fields[0] is the start of the next line. - /// Other entries are the start of fields (nul-teminated). + /// Other entries are the start of fields (null-terminated). /// Returns the number of fields found or -1 if an error occurs. int (*split) (char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3fdfadb41..40ef6cfc0 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -226,7 +226,7 @@ bool sysinfo_svn_get_revision(char **out) { // - since it's a cache column, the data might not even exist if ((fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL) { -#ifndef SVNNODEPATH //not sure how to handle branches, so i'll leave this overridable define until a better solution comes up +#ifndef SVNNODEPATH //not sure how to handle branches, so I'll leave this overridable define until a better solution comes up #define SVNNODEPATH trunk #endif // SVNNODEPATH @@ -709,7 +709,7 @@ void sysinfo_vcsrevision_src_retrieve(void) { #endif // WIN32 /** - * Retrieevs the VCS type name. + * Retrieves the VCS type name. * * Once retrieved, the value is stored in sysinfo->p->vcstype_name. */ diff --git a/src/common/thread.c b/src/common/thread.c index 91360537f..4be37d576 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -68,7 +68,7 @@ void rathread_init(){ l_threads[i].myID = i; } - // now lets init thread id 0, which represnts the main thread + // now lets init thread id 0, which represents the main thread #ifdef HAS_TLS g_rathread_ID = 0; #endif @@ -83,7 +83,7 @@ void rathread_final(){ register unsigned int i; // Unterminated Threads Left? - // Should'nt happen .. + // Shouldn't happen .. // Kill 'em all! // for(i = 1; i < RA_THREADS_MAX; i++){ @@ -121,9 +121,9 @@ static void *_raThreadMainRedirector( void *p ){ #ifndef WIN32 // When using posix threads - // the threads inherits the Signal mask from the thread which's spawned + // the threads inherits the Signal mask from the thread which spawned // this thread - // so we've to block everything we dont care about. + // so we've to block everything we don't care about. sigemptyset(&set); sigaddset(&set, SIGINT); sigaddset(&set, SIGTERM); @@ -222,10 +222,10 @@ void rathread_destroy ( rAthread handle ){ #else if( pthread_cancel( handle->hThread ) == 0){ - // We have to join it, otherwise pthread wont re-cycle its internal ressources assoc. with this thread. + // We have to join it, otherwise pthread wont re-cycle its internal resources assoc. with this thread. pthread_join( handle->hThread, NULL ); - // Tell our manager to release ressources ;) + // Tell our manager to release resources ;) rat_thread_terminated(handle); } #endif @@ -265,7 +265,7 @@ int rathread_get_tid(){ #ifdef HAS_TLS return g_rathread_ID; #else - // todo + // TODO #ifdef WIN32 return (int)GetCurrentThreadId(); #else diff --git a/src/common/thread.h b/src/common/thread.h index 7ad326509..992e3e6c8 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -20,7 +20,7 @@ typedef enum RATHREAD_PRIO { * Creates a new Thread * * @param entyPoint - entryProc, - * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint. + * @param param - general purpose parameter, would be given as parameter to the thread's entry point. * * @return not NULL if success */ @@ -31,7 +31,7 @@ rAthread rathread_create( rAthreadProc entryPoint, void *param ); * Creates a new Thread (with more creation options) * * @param entyPoint - entryProc, - * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint + * @param param - general purpose parameter, would be given as parameter to the thread's entry point * @param szStack - stack Size in bytes * @param prio - Priority of the Thread @ OS Scheduler.. * @@ -41,9 +41,9 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta /** - * Destroys the given Thread immediatly + * Destroys the given Thread immediately * - * @note The Handle gets invalid after call! dont use it afterwards. + * @note The Handle gets invalid after call! don't use it afterwards. * * @param handle - thread to destroy. */ @@ -53,7 +53,7 @@ void rathread_destroy ( rAthread handle ); /** * Returns the thread handle of the thread calling this function * - * @note this wont work @ programms main thread + * @note this wont work @ programs main thread * @note the underlying implementation might not perform very well, cache the value received! * * @return not NULL if success @@ -62,10 +62,10 @@ rAthread rathread_self( ); /** - * Returns own thrad id (TID) + * Returns own thread id (TID) * * @note this is an unique identifier for the calling thread, and - * depends on platfrom / compiler, and may not be the systems Thread ID! + * depends on platform/ compiler, and may not be the systems Thread ID! * * @return -1 when fails, otherwise >= 0 */ @@ -93,7 +93,7 @@ void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ); /** - * Gets the current Prio of the given trhead + * Gets the current Prio of the given thread * * @param handle - the thread to get the prio for. */ diff --git a/src/common/timer.c b/src/common/timer.c index 5240ec202..ab0471d51 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -170,14 +170,14 @@ static int64 sys_tick(void) { } if (pGetTickCount64) return (int64)pGetTickCount64(); - // 32-bit fallback. Note: This will wrap around every ~49 days since system startup!!! + // 32-bit fall back. Note: This will wrap around every ~49 days since system startup!!! return (int64)GetTickCount(); #elif defined(ENABLE_RDTSC) // RDTSC: Returns the number of CPU cycles since reset. Unreliable if // the CPU frequency is variable. return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK); #elif defined(HAVE_MONOTONIC_CLOCK) - // Monotinic clock: Implementation-defined. + // Monotonic clock: Implementation-defined. // Clock that cannot be set and represents monotonic time since some // unspecified starting point. This clock is not affected by // discontinuous jumps in the system time (e.g., if the system @@ -188,7 +188,7 @@ static int64 sys_tick(void) { // int64 cast to avoid overflows on platforms where time_t is 32 bit return (int64)tval.tv_sec * 1000 + tval.tv_nsec / 1000000; #else - // Fallback, regular clock: Number of milliseconds since epoch. + // Fall back, regular clock: Number of milliseconds since epoch. // The time returned by gettimeofday() is affected by discontinuous // jumps in the system time (e.g., if the system administrator // manually changes the system time). If you need a monotonically diff --git a/src/common/utils.c b/src/common/utils.c index 80954f848..4e6cb49c2 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -200,7 +200,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name); - // check if the pattern matchs. + // check if the pattern matches. if (entry->d_name && strstr(entry->d_name, pattern)) { func( tmppath ); } @@ -211,7 +211,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) } // is this a directory? if (S_ISDIR(dir_stat.st_mode)) { - // decent recursivly + // decent recursively findfile(tmppath, pat, func); } }//end while @@ -326,7 +326,7 @@ unsigned int get_percentage(const unsigned int A, const unsigned int B) if( B == 0 ) { - ShowError("get_percentage(): divison by zero! (A=%u,B=%u)\n", A, B); + ShowError("get_percentage(): division by zero! (A=%u,B=%u)\n", A, B); return ~0U; } diff --git a/src/config/core.h b/src/config/core.h index 157d94b2f..24e9de710 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -27,7 +27,7 @@ /// CONSOLE_INPUT allows you to type commands into the server's console, /// Disabling it saves one thread. #define CONSOLE_INPUT -/// Maximum number of caracters 'CONSOLE_INPUT' will support per line. +/// Maximum number of characters 'CONSOLE_INPUT' will support per line. #define MAX_CONSOLE_INPUT 150 /// Uncomment to disable Hercules' anonymous stat report @@ -43,7 +43,7 @@ /// By default, all range checks in Aegis are of Square shapes, so a weapon range /// - of 10 allows you to attack from anywhere within a 21x21 area. /// Enabling this changes such checks to circular checks, which is more realistic, -/// - but is not the official behaviour. +/// - but is not the official behavior. //#define CIRCULAR_AREA //This is the distance at which @autoloot works, diff --git a/src/config/secure.h b/src/config/secure.h index e5e3662d1..1a89e36cf 100644 --- a/src/config/secure.h +++ b/src/config/secure.h @@ -49,7 +49,7 @@ /** * Uncomment to disable - * while enabled, movement of invisible (cloaking, hide, etca [not chase walk]) units is not informed to nearby foes, + * while enabled, movement of invisible (cloaking, hide, etc [not chase walk]) units is not informed to nearby foes, * rendering any client-side cheat, that would otherwise make these units visible, to not function. * - "Why is this a setting?" because theres a cost, while enabled if a hidden character uses a skill with cast time, * - for example "cloaking -> walk a bit -> soul break another player" the character display will be momentarily abrupted diff --git a/src/login/account.h b/src/login/account.h index 329ae31c8..a14595519 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -25,7 +25,7 @@ struct mmo_account char email[40]; // e-mail (by default: a@a.com) int group_id; // player group id uint8 char_slots; // this accounts maximum character slots (maximum is limited to MAX_CHARS define in char server) - unsigned int state; // packet 0x006a value + 1 (0: compte OK) + unsigned int state; // packet 0x006a value + 1 (0: complete OK) time_t unban_time; // (timestamp): ban time limit of the account (0 = no ban) time_t expiration_time; // (timestamp): validity limit of the account (0 = unlimited) unsigned int logincount; // number of successful auth attempts diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 2e4ed7ab9..51e499369 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -454,7 +454,7 @@ static bool account_db_sql_load_str(AccountDB* self, struct mmo_account* acc, co } if( SQL->NumRows(sql_handle) > 1 ) - {// serious problem - duplicit account + {// serious problem - duplicate account ShowError("account_db_sql_load_str: multiple accounts found when retrieving data for account '%s'!\n", userid); SQL->FreeResult(sql_handle); return false; diff --git a/src/login/login.c b/src/login/login.c index 43883c6ce..c3f2f6000 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -287,7 +287,7 @@ int lan_subnetcheck(uint32 ip) } //---------------------------------- -// Reading Lan Support configuration +// Reading LAN Support configuration //---------------------------------- int login_lan_config_read(const char *lancfgName) { @@ -724,13 +724,13 @@ int parse_fromchar(int fd) RFIFOSKIP(fd,6); if( !accounts->load_num(accounts, &acc, account_id) ) - ShowNotice("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Error of Unban request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip); else if( acc.unban_time == 0 ) - ShowNotice("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Error of Unban request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip); else { - ShowNotice("Char-server '%s': UnBan request (account: %d, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Unban request (account: %d, ip: %s).\n", server[id].name, account_id, ip); acc.unban_time = 0; accounts->save(accounts, &acc); } @@ -912,7 +912,7 @@ int mmo_auth_new(const char* userid, const char* pass, const char sex, const cha // check if the account doesn't exist already if( accounts->load_str(accounts, &acc, userid) ) { - ShowNotice("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass); + ShowNotice("Attempt of creation of an already existing account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass); return 1; // 1 = Incorrect Password } @@ -1104,7 +1104,7 @@ void login_auth_ok(struct login_session_data* sd) WFIFOSET(fd,3); return; } else if( login_config.min_group_id_to_connect >= 0 && login_config.group_id_to_connect == -1 && sd->group_id < login_config.min_group_id_to_connect ) { - ShowStatus("Connection refused: the minium group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id); + ShowStatus("Connection refused: the minimum group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id); WFIFOHEAD(fd,3); WFIFOW(fd,0) = 0x81; WFIFOB(fd,2) = 1; // 01 = Server closed @@ -1309,7 +1309,7 @@ int parse_login(int fd) // Perform ip-ban check if( login_config.ipban && ipban_check(ipl) ) { - ShowStatus("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n", ip); + ShowStatus("Connection refused: IP isn't authorized (deny/allow, ip: %s).\n", ip); login_log(ipl, "unknown", -3, "ip banned"); WFIFOHEAD(fd,23); WFIFOW(fd,0) = 0x6a; @@ -1772,7 +1772,7 @@ int do_init(int argc, char** argv) { int i; - // intialize engine (to accept config settings) + // initialize engine (to accept config settings) account_engine[0].db = account_engine[0].constructor(); // read login-server configuration diff --git a/src/login/login.h b/src/login/login.h index e77b96a0e..447301ea4 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -72,7 +72,7 @@ struct Login_Config { unsigned int ip_sync_interval; // interval (in minutes) to execute a DNS/IP update (for dynamic IPs) bool log_login; // whether to log login server actions or not char date_format[32]; // date format used in messages - bool new_account_flag,new_acc_length_limit; // autoregistration via _M/_F ? / if yes minimum length is 4? + bool new_account_flag,new_acc_length_limit; // auto-registration via _M/_F ? / if yes minimum length is 4? int start_limited_time; // new account expiration time (-1: unlimited) bool use_md5_passwds; // work with password hashes instead of plaintext passwords? int group_id_to_connect; // required group id to connect diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 2cbc02c93..2c0b1cc03 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -35,7 +35,7 @@ static Sql* sql_handle = NULL; static bool enabled = false; -// Returns the number of failed login attemps by the ip in the last minutes. +// Returns the number of failed login attempts by the ip in the last minutes. unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes) { unsigned long failures = 0; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a7e4cef39..2acea5872 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -947,7 +947,7 @@ ACMD(jobchange) { } } - // High Jobs, Babys and Third + // High Jobs, Babies and Third for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){ if (strncmpi(message, pc->job_name(i), 16) == 0) { job = i; @@ -1329,7 +1329,7 @@ ACMD(baselevelup) clif->message(fd, msg_txt(47)); // Base level can't go any higher. return false; } // End Addition - if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positiv overflow + if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positive overflow level = pc->maxbaselv(sd) - sd->status.base_level; for (i = 0; i < level; i++) status_point += pc->gets_status_point(sd->status.base_level + i); @@ -1389,7 +1389,7 @@ ACMD(joblevelup) clif->message(fd, msg_txt(23)); // Job level can't go any higher. return false; } - if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positiv overflow + if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positive overflow level = pc->maxjoblv(sd) - sd->status.job_level; sd->status.job_level += (unsigned int)level; sd->status.skill_point += level; @@ -1401,11 +1401,11 @@ ACMD(joblevelup) return false; } level *=-1; - if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow + if ((unsigned int)level >= sd->status.job_level) // fix negative overflow level = sd->status.job_level-1; sd->status.job_level -= (unsigned int)level; if (sd->status.skill_point < level) - pc->resetskill(sd,0); //Reset skills since we need to substract more points. + pc->resetskill(sd,0); //Reset skills since we need to subtract more points. if (sd->status.skill_point < level) sd->status.skill_point = 0; else @@ -1631,7 +1631,7 @@ ACMD(model) pc->changelook(sd, LOOK_HAIR, hair_style); pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1657,7 +1657,7 @@ ACMD(dye) if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) { pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1683,7 +1683,7 @@ ACMD(hair_style) if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) { pc->changelook(sd, LOOK_HAIR, hair_style); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1709,7 +1709,7 @@ ACMD(hair_color) if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) { pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1896,7 +1896,7 @@ ACMD(monster) return false; } - if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number) + if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name beginning by a number) mob_id = mob->db_checkid(atoi(monster)); if (mob_id == 0) { @@ -2711,7 +2711,7 @@ ACMD(char_block) * mn: minute * s: second * <example> @ban +1m-2mn1s-6y test_player - * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time. + * this example adds 1 month and 1 second, and subtracts 2 minutes and 6 years at the same time. *------------------------------------------*/ ACMD(char_ban) { @@ -2879,12 +2879,12 @@ ACMD(doom) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); - clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement. + clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment. } } mapit->free(iter); - clif->message(fd, msg_txt(62)); // Judgement was made. + clif->message(fd, msg_txt(62)); // Judgment was made. return true; } @@ -2904,12 +2904,12 @@ ACMD(doommap) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); - clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement. + clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment. } } mapit->free(iter); - clif->message(fd, msg_txt(62)); // Judgement was made. + clif->message(fd, msg_txt(62)); // Judgment was made. return true; } @@ -2984,7 +2984,7 @@ ACMD(kick) if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -3287,7 +3287,7 @@ ACMD(mapexit) { } /*========================================== - * idsearch <part_of_name>: revrited by [Yor] + * idsearch <part_of_name>: rewrite by [Yor] *------------------------------------------*/ ACMD(idsearch) { @@ -3333,7 +3333,7 @@ ACMD(recallall) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -3385,7 +3385,7 @@ ACMD(guildrecall) } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -3442,7 +3442,7 @@ ACMD(partyrecall) } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -4089,7 +4089,7 @@ ACMD(nuke) { skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); clif->message(fd, msg_txt(109)); // Player has been nuked! } else { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } } else { @@ -4286,7 +4286,7 @@ ACMD(servertime) { const struct TimerData * timer_data2 = timer->get(pc->day_timer_tid); if (map->night_flag == 0) { - sprintf(temp, msg_txt(235), // Game time: The game is actualy in daylight for %s. + sprintf(temp, msg_txt(235), // Game time: The game is actually in daylight for %s. txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000))); clif->message(fd, temp); if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0) @@ -4297,7 +4297,7 @@ ACMD(servertime) { txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000))); clif->message(fd, temp); } else { - sprintf(temp, msg_txt(233), // Game time: The game is actualy in night for %s. + sprintf(temp, msg_txt(233), // Game time: The game is actually in night for %s. txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer->gettick()) / 1000))); clif->message(fd, temp); if (DIFF_TICK(timer_data2->tick,timer_data->tick) > 0) @@ -4371,7 +4371,7 @@ ACMD(jail) { if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -4422,7 +4422,7 @@ ACMD(unjail) { if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -4499,7 +4499,7 @@ ACMD(jailfor) { } if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -5245,7 +5245,7 @@ ACMD(useskill) { if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorized you to do this action on this player. return false; } @@ -5460,7 +5460,7 @@ ACMD(autotrade) { status->change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } - /* currently standalones are not supporting buyingstores, so we rely on the previous method */ + /* currently standalone is not supporting buyingstores, so we rely on the previous method */ if( sd->state.buyingstore ) { clif->authfail_fd(fd, 15); return true; @@ -6385,7 +6385,7 @@ ACMD(changesex) int i; pc->resetskill(sd,4); - // to avoid any problem with equipment and invalid sex, equipment is unequiped. + // to avoid any problem with equipment and invalid sex, equipment is unequipped. for( i=0; i<EQI_MAX; i++ ) if( sd->equip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3); chrif->changesex(sd); @@ -6411,7 +6411,7 @@ ACMD(mute) { if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -7700,7 +7700,7 @@ ACMD(accept) { } if(sd->duel_invite <= 0) { - // "Duel: @accept without invititation." + // "Duel: @accept without invitation." clif->message(fd, msg_txt(360)); return false; } @@ -7720,7 +7720,7 @@ ACMD(accept) { ACMD(reject) { if(sd->duel_invite <= 0) { - // "Duel: @reject without invititation." + // "Duel: @reject without invitation." clif->message(fd, msg_txt(362)); return false; } @@ -8632,7 +8632,7 @@ ACMD(join) { if( hChSys.local && strcmpi(name + 1, hChSys.local_name) == 0 ) { if( !map->list[sd->bl.m].channel ) { clif->chsys_mjoin(sd); - if( map->list[sd->bl.m].channel ) /* mjoin might have refused, map has chatting capabilities disabled */ + if( map->list[sd->bl.m].channel ) /* join might have refused, map has chatting capabilities disabled */ return true; } else channel = map->list[sd->bl.m].channel; diff --git a/src/map/battle.c b/src/map/battle.c index 57302166e..810bebae9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -58,7 +58,7 @@ int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last s } /*========================================== - * Get random targetting enemy + * Get random targeting enemy *------------------------------------------*/ int battle_gettargeted_sub(struct block_list *bl, va_list ap) { struct block_list **bl_list; @@ -102,7 +102,7 @@ struct block_list* battle_gettargeted(struct block_list *target) { } -//Returns the id of the current targetted character of the passed bl. [Skotlex] +//Returns the id of the current targeted character of the passed bl. [Skotlex] int battle_gettarget(struct block_list* bl) { switch (bl->type) { @@ -262,7 +262,7 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct if ( !battle_config.delay_battle_damage || amotion <= 1 ) { map->freeblock_lock(); - status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope] + status_fix_damage(src, target, damage, ddelay); // We have to separate here between reflect damage and others [icescope] if( attack_type && !status->isdead(target) && additional_effects ) skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, timer->gettick()); if( dmg_lv > ATK_BLOCK && attack_type ) @@ -358,7 +358,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d } } } - if( tsc && tsc->count ) { //since an atk can only have one type let's optimise this a bit + if( tsc && tsc->count ) { //since an atk can only have one type let's optimize this a bit switch(atk_elem){ case ELE_FIRE: if( tsc->data[SC_SPIDERWEB]) { @@ -463,7 +463,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u damage = battle->calc_elefix(src, bl, skill_id, skill_lv, damage + eatk, nk, n_ele, s_ele, s_ele_, type == EQI_HAND_L, flag); /** - * In RE Shield Bommerang takes weapon element only for damage calculation, + * In RE Shield Boomerang takes weapon element only for damage calculation, * - resist calculation is always against neutral **/ if ( skill_id == CR_SHIELDBOOMERANG ) @@ -482,7 +482,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u } /*========================================== * Calculates the standard damage of a normal attack assuming it hits, - * it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex] + * it calculates nothing extra fancy, is needed for magnum breaks WATK_ELEMENT bonus. [Skotlex] *------------------------------------------ * Pass damage2 as NULL to not calc it. * Flag values: @@ -567,7 +567,7 @@ int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, st else damage += st->batk; - //rodatazone says that Overrefine bonuses are part of baseatk + //rodatazone says that Overrefined bonuses are part of baseatk //Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands. if(sd) { if (type == EQI_HAND_L) { @@ -604,7 +604,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in nullpo_ret(sd); if((skill_lv = pc->checkskill(sd,AL_DEMONBANE)) > 0 && - target->type == BL_MOB && //This bonus doesnt work against players. + target->type == BL_MOB && //This bonus doesn't work against players. (battle->check_undead(st->race,st->def_ele) || st->race==RC_DEMON) ) damage += (int)(skill_lv*(3+sd->status.base_level/20.0)); //damage += (skill_lv * 3); @@ -676,7 +676,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in case W_FIST: if((skill_lv = pc->checkskill(sd,TK_RUN)) > 0) damage += (skill_lv * 10); - // No break, fallthrough to Knuckles + // No break, fall through to Knuckles case W_KNUCKLE: if((skill_lv = pc->checkskill(sd,MO_IRONHAND)) > 0) damage += (skill_lv * 3); @@ -1272,9 +1272,9 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ #else vit_def = def2; #endif - if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesnt work vs players + if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesn't work vs players src->type == BL_MOB && (i=pc->checkskill(tsd,AL_DP)) > 0) - vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn + vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // [orn] if( src->type == BL_MOB && (i=pc->checkskill(tsd,RA_RANGERMAIN))>0 && (sstatus->race == RC_BRUTE || sstatus->race == RC_FISH || sstatus->race == RC_PLANT) ) vit_def += i*5; @@ -1296,7 +1296,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ #ifdef RENEWAL /** * RE DEF Reduction - * Pierce defence gains 1 atk per def/2 + * Pierce defense gains 1 atk per def/2 **/ if( def1 < -399 ) // it stops at -399 @@ -1384,7 +1384,7 @@ int battle_calc_chorusbonus(struct map_session_data *sd) { if (members < 3) return 0; // Bonus remains 0 unless 3 or more Minstrel's/Wanderer's are in the party. if (members > 7) - return 5; // Maximum effect possiable from 7 or more Minstrel's/Wanderer's + return 5; // Maximum effect possible from 7 or more Minstrel's/Wanderer's return members - 2; // Effect bonus from additional Minstrel's/Wanderer's if not above the max possible } @@ -2005,7 +2005,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += 50 * skill_lv; break; case GS_BULLSEYE: - //Only works well against brute/demihumans non bosses. + //Only works well against brute/demi-humans non bosses. if((tst->race == RC_BRUTE || tst->race == RC_DEMIHUMAN) && !(tst->mode&MD_BOSS)) skillratio += 400; @@ -2117,7 +2117,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block RE_LVL_DMOD(150); break; /** - * GC Guilotine Cross + * GC Guillotine Cross **/ case GC_CROSSIMPACT: skillratio += 900 + 100 * skill_lv; @@ -2401,7 +2401,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block { int chorusbonus = battle->calc_chorusbonus(sd); skillratio += 300 + 200 * skill_lv; - //Chorus bonus dont count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech] + //Chorus bonus don't count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech] if (chorusbonus >= 1 && chorusbonus <= 5) skillratio += 100<<(chorusbonus-1); // 1->100; 2->200; 3->400; 4->800; 5->1600 RE_LVL_DMOD(100); @@ -2454,7 +2454,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block if( sc && sc->data[SC_BLAST_OPTION] ) skillratio += (sd ? sd->status.job_level * 5 : 0); break; - // Physical Elemantal Spirits Attack Skills + // Physical Elemental Spirits Attack Skills case EL_CIRCLE_OF_FIRE: case EL_FIRE_BOMB_ATK: case EL_STONE_RAIN: @@ -2557,8 +2557,8 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block return skillratio; } /*========================================== - * Check dammage trough status. - * ATK may be MISS, BLOCKED FAIL, reduc, increase, end status... + * Check damage trough status. + * ATK may be MISS, BLOCKED FAIL, reduce, increase, end status... * After this we apply bg/gvg reduction *------------------------------------------*/ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) { @@ -2715,7 +2715,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam clif->skill_nodamage(bl, bl, RK_MILLENNIUMSHIELD, 1, 1); sce->val3 -= (int)cap_value(damage,INT_MIN,INT_MAX); // absorb damage d->dmg_lv = ATK_BLOCK; - sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stuned when one shield is broken. + sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stunned when one shield is broken. if( sce->val3 <= 0 ) { // Shield Down sce->val2--; if( sce->val2 > 0 ) { @@ -3029,7 +3029,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam short rate = 100; struct status_data *tstatus = status->get_status_data(bl); if ( !(flag&BF_SKILL) && (flag&BF_WEAPON) && damage > 0 && rnd()%100 < tsc->data[SC_POISONINGWEAPON]->val3 ) { - if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5; sc_start(src,bl,tsc->data[SC_POISONINGWEAPON]->val2,rate,tsc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); } @@ -3046,7 +3046,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam /* no data claims these settings affect anything other than players */ if( damage && sd && bl->type == BL_PC ) { switch( skill_id ) { - //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so dont worry about it */ + //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so don't worry about it */ case HW_GRAVITATION: case NJ_ZENYNAGE: case KO_MUCHANAGE: @@ -3254,7 +3254,7 @@ int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int i; if (!sd->skillblown[0].id) return 0; - //Apply the bonus blewcount. [Skotlex] + //Apply the bonus blow count. [Skotlex] for (i = 0; i < ARRAYLENGTH(sd->skillblown) && sd->skillblown[i].id; i++) { if (sd->skillblown[i].id == skill_id) return sd->skillblown[i].val; @@ -3335,7 +3335,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list ad.flag |= battle->range_type(src, target, skill_id, skill_lv); flag.infdef=(tstatus->mode&MD_PLANT?1:0); if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION ) - flag.infdef = 1; // Reberberation takes 1 damage + flag.infdef = 1; // Reverberation takes 1 damage switch(skill_id) { case MG_FIREWALL: @@ -3600,7 +3600,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list } /*========================================== - * Calculate Misc dammage for skill_id + * Calculate Misc damage for skill_id *------------------------------------------*/ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) { int temp; @@ -3908,7 +3908,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * { if (battle_config.agi_penalty_type == 1) flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100; - else //asume type 2: absolute reduction + else // assume type 2: absolute reduction flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num; if(flee < 1) flee = 1; } @@ -4046,7 +4046,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list unsigned lh : 1; //Attack considers left hand (wd.damage2) unsigned weapon : 1; //It's a weapon attack (consider VVS, and all that) #ifdef RENEWAL - unsigned tdef : 1; //Total defence reduction + unsigned tdef : 1; //Total defense reduction #endif } flag; @@ -4065,7 +4065,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list #endif ?1:0); if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION ) - flag.infdef = 1; // Reberberation takes 1 damage + flag.infdef = 1; // Reverberation takes 1 damage //Initial Values wd.type=0; //Normal attack @@ -5694,7 +5694,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t /** * We need to calculate the DMG before the hp reduction, because it can kill the source. - * For futher information: bugreport:4950 + * For further information: bugreport:4950 **/ ret_val = (damage_lv)skill->attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skill_lv,tick,0); @@ -6058,7 +6058,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if(((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres (((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras s_bl->type == BL_PC && src->type != BL_MOB) || (((TBL_MOB*)target)->special_state.ai == 4 && t_bl->id != s_bl->id)) //Zanzoe - { //Targettable by players + { //Targetable by players state |= BCT_ENEMY; strip_enemy = 0; } @@ -6137,7 +6137,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f sd = BL_CAST(BL_PC, t_bl); if( sd->state.monster_ignore && flag&BCT_ENEMY ) - return 0; // Global inminuty only to Attacks + return 0; // Global immunity only to Attacks if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) { @@ -6231,7 +6231,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f break; } default: - //Need some sort of default behaviour for unhandled types. + //Need some sort of default behavior for unhandled types. if (t_bl->type != s_bl->type) state |= BCT_ENEMY; break; @@ -6351,7 +6351,7 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range return true; // No need for path checking. if( d > AREA_SIZE ) - return false; // Avoid targetting objects beyond your range of sight. + return false; // Avoid targeting objects beyond your range of sight. return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL); } diff --git a/src/map/battle.h b/src/map/battle.h index 433dca95f..fc916597d 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -79,7 +79,7 @@ enum e_battle_check_target { //New definitions [Skotlex] * Structures **/ -// dammage structure +// damage structure struct Damage { int64 damage,damage2; //right, left dmg int type,div_; //chk clif_damage for type @TODO add an enum ? ; nb of hit @@ -489,7 +489,7 @@ enum e_battle_config_idletime { BCIDLE_ATCOMMAND = 0x200, }; -// Dammage delayed info +// Damage delayed info struct delay_damage { int src_id; int target_id; @@ -571,7 +571,7 @@ struct battle_interface { int (*check_target) (struct block_list *src, struct block_list *target,int flag); /* is src and bl within range? */ bool (*check_range) (struct block_list *src,struct block_list *bl,int range); - /* consume amo for this skill and lv */ + /* consume ammo for this skill and lv */ void (*consume_ammo) (struct map_session_data* sd, int skill_id, int lv); int (*get_targeted_sub) (struct block_list *bl, va_list ap); int (*get_enemy_sub) (struct block_list *bl, va_list ap); diff --git a/src/map/battleground.c b/src/map/battleground.c index 4558f32c3..f7131513d 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -541,7 +541,7 @@ void bg_match_over(struct bg_arena *arena, bool canceled) { bg->queue_pc_cleanup(sd); } if( canceled ) - clif->colormes(sd->fd,COLOR_RED,"BG Match Cancelled: not enough players"); + clif->colormes(sd->fd,COLOR_RED,"BG Match Canceled: not enough players"); else { pc_setglobalreg(sd, script->add_str(arena->delay_var), (unsigned int)time(NULL)); } @@ -579,7 +579,7 @@ void bg_begin(struct bg_arena *arena) { if( bg->afk_timer_id == INVALID_TIMER && bg->mafksec > 0 ) bg->afk_timer_id = timer->add(timer->gettick()+10000,bg->afk_timer,0,0); - /* TODO: make this a arena-independant var? or just .@? */ + /* TODO: make this a arena-independent var? or just .@? */ mapreg->setreg(script->add_str("$@bg_queue_id"),arena->queue_id); mapreg->setregstr(script->add_str("$@bg_delay_var$"),bg->gdelay_var); diff --git a/src/map/chat.c b/src/map/chat.c index 40a9d2348..cd7b5f811 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -32,7 +32,7 @@ struct chat_data* chat_createchat(struct block_list* bl, const char* title, cons struct chat_data* cd; nullpo_retr(NULL, bl); - /* Given the overhead and the numerous instances (npc allocatted or otherwise) wouldn't it be benefitial to have it use ERS? [Ind] */ + /* Given the overhead and the numerous instances (npc allocated or otherwise) wouldn't it be beneficial to have it use ERS? [Ind] */ cd = (struct chat_data *) aMalloc(sizeof(struct chat_data)); safestrncpy(cd->title, title, sizeof(cd->title)); diff --git a/src/map/chrif.c b/src/map/chrif.c index a69cca573..54cc139f4 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -55,7 +55,7 @@ struct chrif_interface chrif_s; //2b03: Incoming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure) //2b04: Incoming, chrif_recvmap -> 'getting maps from charserver of other mapserver's' //2b05: Outgoing, chrif_changemapserver -> 'Tell the charserver the mapchange / quest for ok...' -//2b06: Incoming, chrif_changemapserverack -> 'awnser of 2b05, ok/fail, data: dunno^^' +//2b06: Incoming, chrif_changemapserverack -> 'answer of 2b05, ok/fail, data: dunno^^' //2b07: Outgoing, chrif_removefriend -> 'Tell charserver to remove friend_id from char_id friend list' //2b08: Outgoing, chrif_searchcharid -> '...' //2b09: Incoming, map_addchariddb -> 'Adds a name to the nick db' @@ -79,7 +79,7 @@ struct chrif_interface chrif_s; //2b1b: Incoming, chrif_recvfamelist -> 'Receive fame ranking lists' //2b1c: Outgoing, chrif_save_scdata -> 'Send sc_data of player for saving.' //2b1d: Incoming, chrif_load_scdata -> 'received sc_data of player for loading.' -//2b1e: Incoming, chrif_update_ip -> 'Reqest forwarded from char-server for interserver IP sync.' [Lance] +//2b1e: Incoming, chrif_update_ip -> 'Request forwarded from char-server for interserver IP sync.' [Lance] //2b1f: Incoming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius] //2b20: Incoming, chrif_removemap -> 'remove maps of a server (sample: its going offline)' [Sirius] //2b21: Incoming, chrif_save_ack. Returned after a character has been "final saved" on the char-server. [Skotlex] @@ -393,7 +393,7 @@ bool chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port) return true; } -/// map-server change request acknowledgement (positive or negative) +/// map-server change request acknowledgment (positive or negative) /// R 2b06 <account_id>.L <login_id1>.L <login_id2>.L <char_id>.L <map_index>.W <x>.W <y>.W <ip>.L <port>.W bool chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) { struct auth_node *node; @@ -853,9 +853,9 @@ void chrif_changedsex(int fd) { // Path to activate this response: // Map(start) (0x2b0e) -> Char(0x2727) -> Login // Login(0x2723) [ALL] -> Char (0x2b0d)[ALL] -> Map (HERE) - // Char will usually be "logged in" despite being forced to log-out in the begining + // Char will usually be "logged in" despite being forced to log-out in the beginning // of this process, but there's no need to perform map-server specific response - // as everything should've been changed through char-server [Panikon] + // as everything should been changed through char-server [Panikon] } /*========================================== * Request Char Server to Divorce Players @@ -944,14 +944,14 @@ void chrif_idbanned(int fd) { } sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters - if (RFIFOB(fd,6) == 0) { // 0: change of statut + if (RFIFOB(fd,6) == 0) { // 0: change of status int ret_status = RFIFOL(fd,7); // status or final date of a banishment if(0<ret_status && ret_status<=9) clif->message(sd->fd, msg_txt(411+ret_status)); // Message IDs (for search convenience): 412, 413, 414, 415, 416, 417, 418, 419, 420 else if(ret_status==100) clif->message(sd->fd, msg_txt(421)); else - clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorised." + clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorized." } else if (RFIFOB(fd,6) == 1) { // 1: ban time_t timestamp; char tmpstr[2048]; @@ -1206,7 +1206,7 @@ bool chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { /*========================================= - * Tell char-server charcter disconnected [Wizputer] + * Tell char-server character disconnected [Wizputer] *-----------------------------------------*/ bool chrif_char_offline_nsd(int account_id, int char_id) { chrif_check(false); @@ -1247,7 +1247,7 @@ bool chrif_char_reset_offline(void) { } /*========================================= - * Tell char-server charcter is online [Wizputer] + * Tell char-server character is online [Wizputer] *-----------------------------------------*/ bool chrif_char_online(struct map_session_data *sd) { chrif_check(false); @@ -1533,7 +1533,7 @@ void chrif_send_report(char* buf, int len) { } /** - * Sends a single scdata for saving into char server, meant to ensure integrity of durationless conditions + * Sends a single scdata for saving into char server, meant to ensure integrity of duration-less conditions **/ void chrif_save_scdata_single(int account_id, int char_id, short type, struct status_change_entry *sce) { @@ -1555,7 +1555,7 @@ void chrif_save_scdata_single(int account_id, int char_id, short type, struct st } /** - * Sends a single scdata deletion request into char server, meant to ensure integrity of durationless conditions + * Sends a single scdata deletion request into char server, meant to ensure integrity of duration-less conditions **/ void chrif_del_scdata_single(int account_id, int char_id, short type) { diff --git a/src/map/chrif.h b/src/map/chrif.h index 661ba8f84..51ab0e9b9 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -53,7 +53,7 @@ struct chrif_interface { int other_mapserver_count; //Holds count of how many other map servers are online (apart of this instance) [Skotlex] /* */ - struct eri *auth_db_ers; //For reutilizing player login structures. + struct eri *auth_db_ers; //For re-utilizing player login structures. DBMap* auth_db; // int id -> struct auth_node* /* */ int packet_len_table[CHRIF_PACKET_LEN_TABLE_SIZE]; diff --git a/src/map/clif.c b/src/map/clif.c index d1ae2eb07..d8714dda0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2588,7 +2588,7 @@ void clif_cartlist(struct map_session_data *sd) { /// Removes cart (ZC_CARTOFF). /// 012b -/// Client behaviour: +/// Client behavior: /// Closes the cart storage and removes all it's items from memory. /// The Num & Weight values of the cart are left untouched and the cart is NOT removed. void clif_clearcart(int fd) @@ -5047,7 +5047,7 @@ void clif_skillcastcancel(struct block_list* bl) /// 4 = "no party" MsgStringTable[163] /// 5 = "no shout" MsgStringTable[164] /// 6 = "no PKing" MsgStringTable[165] -/// 7 = "no alligning" MsgStringTable[383] +/// 7 = "no aligning" MsgStringTable[383] /// ? = ignored /// cause: /// 0 = "not enough skill level" MsgStringTable[214] (AL_WARP) @@ -5425,7 +5425,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) { } -/// Presents a textual list of producable items (ZC_MAKABLEITEMLIST). +/// Presents a textual list of producible items (ZC_MAKABLEITEMLIST). /// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }* /// material id: /// unused by the client @@ -5467,7 +5467,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int } -/// Present a list of producable items (ZC_MAKINGITEM_LIST). +/// Present a list of producible items (ZC_MAKINGITEM_LIST). /// 025a <packet len>.W <mk type>.W { <name id>.W }* /// mk type: /// 1 = cooking @@ -5603,7 +5603,7 @@ void clif_displaymessage(const int fd, const char* mes) { if ( ( len = strnlen(mes, 255) ) > 0 ) { // don't send a void message (it's not displaying on the client chat). @help can send void line. WFIFOHEAD(fd, 5 + len); WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate safestrncpy((char *)WFIFOP(fd,4), mes, len + 1); WFIFOSET(fd, 5 + len); } @@ -5632,7 +5632,7 @@ void clif_displaymessage2(const int fd, const char* mes) { } else { WFIFOHEAD(fd, 5 + len); WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate safestrncpy((char *)WFIFOP(fd,4), line, len + 1); WFIFOSET(fd, 5 + len); } @@ -5669,7 +5669,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) { /* */ WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate WFIFOSET(fd, 5 + len); } @@ -5924,8 +5924,8 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len) /// Inform the player about the result of his whisper action (ZC_ACK_WHISPER). /// 0098 <result>.B /// result: -/// 0 = success to send wisper -/// 1 = target character is not loged in +/// 0 = success to send whisper +/// 1 = target character is not logged in /// 2 = ignored by target /// 3 = everyone ignored by target void clif_wis_end(int fd, int flag) { @@ -6191,7 +6191,7 @@ void clif_item_refine_list(struct map_session_data *sd) /// Notification of an auto-casted skill (ZC_AUTORUN_SKILL). -/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradable>.B +/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv) { int fd; @@ -7276,7 +7276,7 @@ void clif_mvp_noitem(struct map_session_data* sd) /// 0 = "Guild has been created." /// 1 = "You are already in a Guild." /// 2 = "That Guild Name already exists." -/// 3 = "You need the neccessary item to create a Guild." +/// 3 = "You need the necessary item to create a Guild." void clif_guild_created(struct map_session_data *sd,int flag) { int fd; @@ -7669,7 +7669,7 @@ void clif_guild_emblem_area(struct block_list* bl) /// Sends guild skills (ZC_GUILD_SKILLINFO). -/// 0162 <packet len>.W <skill points>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradable>.B }* +/// 0162 <packet len>.W <skill points>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B }* void clif_guild_skillinfo(struct map_session_data* sd) { int fd; @@ -8186,7 +8186,7 @@ void clif_manner_message(struct map_session_data* sd, uint32 type) } -/// Followup to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN). +/// Follow-up to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN). /// 014b <type>.B <GM name>.24B /// type: /// 0 = positive (unmute) @@ -8277,7 +8277,7 @@ void clif_playBGM(struct map_session_data* sd, const char* name) /// term: /// unknown purpose, only relevant to act = 1 /// npc id: -/// The accustic direction of the sound is determined by the +/// The acoustic direction of the sound is determined by the /// relative position of the NPC to the player (3D sound). void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type) { @@ -8643,7 +8643,7 @@ void clif_charnameack (int fd, struct block_list *bl) return; } - // if no receipient specified just update nearby clients + // if no recipient specified just update nearby clients if (fd == 0) clif->send(buf, packet_len(cmd), bl, AREA); else { @@ -8738,7 +8738,7 @@ void clif_slide(struct block_list *bl, int x, int y) /// 008d <packet len>.W <id>.L <message>.?B void clif_disp_overhead(struct block_list *bl, const char* mes) { - unsigned char buf[256]; //This should be more than sufficient, the theorical max is CHAT_SIZE + 8 (pads and extra inserted crap) + unsigned char buf[256]; //This should be more than sufficient, the theoretical max is CHAT_SIZE + 8 (pads and extra inserted crap) size_t len_mes = strlen(mes)+1; //Account for \0 if (len_mes > sizeof(buf)-8) { @@ -8846,7 +8846,7 @@ void clif_starskill(struct map_session_data* sd, const char* mapname, int monste } /*========================================== - * Info about Star Glaldiator save map [Komurka] + * Info about Star Gladiator save map [Komurka] * type: 1: Information, 0: Map registered *------------------------------------------*/ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsigned char type) @@ -8858,7 +8858,7 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig } /*========================================== - * Info about Star Glaldiator hate mob [Komurka] + * Info about Star Gladiator hate mob [Komurka] * type: 1: Register mob, 0: Information. *------------------------------------------*/ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type) @@ -9052,7 +9052,7 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, if( strncmp(name, sd->status.name, namelen) || // the text must start with the speaker's name name[namelen] != ' ' || name[namelen+1] != ':' || name[namelen+2] != ' ' ) // followed by ' : ' { - //Hacked message, or infamous "client desynch" issue where they pick one char while loading another. + //Hacked message, or infamous "client desynchronize" issue where they pick one char while loading another. ShowWarning("clif_process_message: Player '%s' sent a message using an incorrect name! Forcing a relog...\n", sd->status.name); set_eof(fd); // Just kick them out to correct it. return false; @@ -10323,7 +10323,7 @@ void clif_hercules_chsys_quit(struct map_session_data *sd) { /// 1 = pick up item /// 2 = sit down /// 3 = stand up -/// 7 = continous attack +/// 7 = continuous attack /// 12 = (touch skill?) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_ActionRequest(int fd, struct map_session_data *sd) @@ -11037,7 +11037,7 @@ void clif_parse_ChatLeave(int fd, struct map_session_data* sd) } -//Handles notifying asker and rejecter of what has just ocurred. +//Handles notifying asker and rejecter of what has just occurred. //Type is used to determine the correct msg_txt to use: //0: void clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) { @@ -12239,7 +12239,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) { /// Party Booking in KRO [Spiria] /// -/// Request to register a party booking advertisment (CZ_PARTY_BOOKING_REQ_REGISTER). +/// Request to register a party booking advertisement (CZ_PARTY_BOOKING_REQ_REGISTER). /// 0802 <level>.W <map id>.W { <job>.W }*6 void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) { @@ -12259,7 +12259,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) } -/// Result of request to register a party booking advertisment (ZC_PARTY_BOOKING_ACK_REGISTER). +/// Result of request to register a party booking advertisement (ZC_PARTY_BOOKING_ACK_REGISTER). /// 0803 <result>.W /// result: /// 0 = success @@ -12280,7 +12280,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) } -/// Request to search for party booking advertisments (CZ_PARTY_BOOKING_REQ_SEARCH). +/// Request to search for party booking advertisement (CZ_PARTY_BOOKING_REQ_SEARCH). /// 0804 <level>.W <map id>.W <job>.W <last index>.L <result count>.W void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) { @@ -12331,7 +12331,7 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, } -/// Request to delete own party booking advertisment (CZ_PARTY_BOOKING_REQ_DELETE). +/// Request to delete own party booking advertisement (CZ_PARTY_BOOKING_REQ_DELETE). /// 0806 void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) { @@ -12344,7 +12344,7 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) } -/// Result of request to delete own party booking advertisment (ZC_PARTY_BOOKING_ACK_DELETE). +/// Result of request to delete own party booking advertisement (ZC_PARTY_BOOKING_ACK_DELETE). /// 0807 <result>.W /// result: /// 0 = success @@ -12366,7 +12366,7 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag) } -/// Request to update party booking advertisment (CZ_PARTY_BOOKING_REQ_UPDATE). +/// Request to update party booking advertisement (CZ_PARTY_BOOKING_REQ_UPDATE). /// 0808 { <job>.W }*6 void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) { @@ -12384,7 +12384,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) } -/// Notification about new party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_INSERT). +/// Notification about new party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_INSERT). /// 0809 <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6 void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12410,7 +12410,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo } -/// Notification about updated party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_UPDATE). +/// Notification about updated party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_UPDATE). /// 080a <index>.L { <job>.W }*6 void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12431,7 +12431,7 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo } -/// Notification about deleted party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_DELETE). +/// Notification about deleted party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_DELETE). /// 080b <index>.L void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) { @@ -12450,7 +12450,7 @@ void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) /// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE). /// Code written by mkbu95, Spiria, Yommy and Ind -/// Request to register a party booking advertisment (CZ_PARTY_RECRUIT_REQ_REGISTER). +/// Request to register a party booking advertisement (CZ_PARTY_RECRUIT_REQ_REGISTER). /// 08e5 <level>.W <notice>.37B void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd) { @@ -12497,7 +12497,7 @@ void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results, #endif } -/// Result of request to register a party booking advertisment (ZC_PARTY_RECRUIT_ACK_REGISTER). +/// Result of request to register a party booking advertisement (ZC_PARTY_RECRUIT_ACK_REGISTER). /// 08e6 <result>.W /// result: /// 0 = success @@ -12517,7 +12517,7 @@ void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) #endif } -/// Request to search for party booking advertisments (CZ_PARTY_RECRUIT_REQ_SEARCH). +/// Request to search for party booking advertisement (CZ_PARTY_RECRUIT_REQ_SEARCH). /// 08e7 <level>.W <map id>.W <last index>.L <result count>.W void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) { @@ -12533,7 +12533,7 @@ void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) #endif } -/// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE). +/// Request to delete own party booking advertisement (CZ_PARTY_RECRUIT_REQ_DELETE). /// 08e9 void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) { @@ -12545,7 +12545,7 @@ void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) #endif } -/// Result of request to delete own party booking advertisment (ZC_PARTY_RECRUIT_ACK_DELETE). +/// Result of request to delete own party booking advertisement (ZC_PARTY_RECRUIT_ACK_DELETE). /// 08ea <result>.W /// result: /// 0 = success @@ -12566,7 +12566,7 @@ void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag) #endif } -/// Request to update party booking advertisment (CZ_PARTY_RECRUIT_REQ_UPDATE). +/// Request to update party booking advertisement (CZ_PARTY_RECRUIT_REQ_UPDATE). /// 08eb <notice>.37B void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) { @@ -12581,7 +12581,7 @@ void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) #endif } -/// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT). +/// Notification about new party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_INSERT). /// 08ec <index>.L <expire time>.L <char name>.24B <level>.W <notice>.37B void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12603,7 +12603,7 @@ void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_boo #endif } -/// Notification about updated party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_UPDATE). +/// Notification about updated party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_UPDATE). /// 08ed <index>.L <notice>.37B void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad) { @@ -12620,7 +12620,7 @@ void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_boo #endif } -/// Notification about deleted party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_DELETE). +/// Notification about deleted party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_DELETE). /// 08ee <index>.L void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index) { @@ -13172,7 +13172,7 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd) if(!sd->state.gmaster_flag) return; - // compensate for some client defects when using multilanguage mode + // compensate for some client defects when using multilingual mode if (msg1[0] == '|' && msg1[3] == '|') msg1+= 3; // skip duplicate marker if (msg2[0] == '|' && msg2[3] == '|') msg2+= 3; // skip duplicate marker if (msg2[0] == '|') msg2[strnlen(msg2, MAX_GUILDMES2)-1] = '\0'; // delete extra space at the end of string @@ -13612,7 +13612,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) { /// Request to execute GM commands. /// usage: /// /item n - summon n monster or acquire n item/s -/// /item money - grants 2147483647 zenies +/// /item money - grants 2147483647 Zeny /// /item whereisboss - locate boss mob in current map.(not yet implemented) /// /item regenboss_n t - regenerate n boss monster by t millisecond.(not yet implemented) /// /item onekillmonster - toggle an ability to kill mobs in one hit.(not yet implemented) @@ -13993,7 +13993,7 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha } -//Subfunction called from clif_foreachclient to toggle friends on/off [Skotlex] +//Sub-function called from clif_foreachclient to toggle friends on/off [Skotlex] int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap) { int account_id, char_id, online; @@ -14342,7 +14342,7 @@ void clif_parse_ranklist(int fd, struct map_session_data *sd) { case RANKTYPE_BLACKSMITH: case RANKTYPE_ALCHEMIST: case RANKTYPE_TAEKWON: - clif->ranklist(sd, type); // pk_list unsuported atm + clif->ranklist(sd, type); // pk_list unsupported atm break; } } @@ -14672,7 +14672,7 @@ void clif_check(int fd, struct map_session_data* pl_sd) { WFIFOW(fd,34) = pl_sd->battle_status.flee2/10; WFIFOW(fd,36) = pl_sd->battle_status.cri/10; WFIFOW(fd,38) = (2000-pl_sd->battle_status.amotion)/10; // aspd - WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe adelay? + WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe a delay? WFIFOSET(fd,packet_len(0x214)); } @@ -14737,7 +14737,7 @@ void clif_Mail_getattachment(int fd, uint8 flag) /// 0249 <result>.B /// result: /// 0 = success -/// 1 = recipinent does not exist +/// 1 = recipient does not exist void clif_Mail_send(int fd, bool fail) { WFIFOHEAD(fd,packet_len(0x249)); @@ -16068,7 +16068,7 @@ void clif_mercenary_info(struct map_session_data *sd) { /// Mercenary skill tree (ZC_MER_SKILLINFO_LIST). -/// 029d <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B }* +/// 029d <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradeable>.B }* void clif_mercenary_skillblock(struct map_session_data *sd) { struct mercenary_data *md; @@ -17142,7 +17142,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd) { } /*========================================== * Server tells client to display a window similar to Magnifier (item) one - * Server populates the window with avilable elemental converter options according to player's inventory + * Server populates the window with available elemental converter options according to player's inventory *------------------------------------------*/ int clif_elementalconverter_list(struct map_session_data *sd) { int i,c,view,fd; @@ -17587,7 +17587,7 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) { } void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { unsigned short limit = RFIFOW(fd, 4), i, j; - unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash curreny for us, confusing) + unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash currently for us, confusing) if( map->list[sd->bl.m].flag.nocashshop ) { clif->colormes(fd,COLOR_RED,msg_txt(1489)); //Cash Shop is disabled in this map diff --git a/src/map/clif.h b/src/map/clif.h index 7b27e1fe6..e1af44881 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -66,7 +66,7 @@ typedef enum send_target { AREA, // area AREA_WOS, // area, without self AREA_WOC, // area, without chatrooms - AREA_WOSC, // area, without own chatroom + AREA_WOSC, // area, without own chatrooms AREA_CHAT_WOC, // hearable area, without chatrooms CHAT, // current chatroom CHAT_WOS, // current chatroom, without self diff --git a/src/map/elemental.c b/src/map/elemental.c index b414d5b9f..7ffeea410 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -505,7 +505,7 @@ int elemental_change_mode_ack(struct elemental_data *ed, int mode) { else unit->skilluse_id(&ed->bl,bl->id,skill_id,skill_lv); - ed->target_id = 0; // Reset target after casting the skill to avoid continious attack. + ed->target_id = 0; // Reset target after casting the skill to avoid continuous attack. return 1; } @@ -529,7 +529,7 @@ int elemental_change_mode(struct elemental_data *ed, int mode) { else if( mode == EL_MODE_ASSIST ) mode = EL_SKILLMODE_ASSIST; // Assist spirit mode -> Assist spirit skill. else mode = EL_SKILLMODE_PASIVE; // Passive spirit mode -> Passive spirit skill. - // Use a skill inmediately after every change mode. + // Use a skill immediately after every change mode. if( mode != EL_SKILLMODE_AGGRESSIVE ) elemental->change_mode_ack(ed,mode); return 1; diff --git a/src/map/guild.c b/src/map/guild.c index 4bf9c9da0..209f29103 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -61,7 +61,7 @@ int guild_skill_get_max (int id) { return guild->skill_tree[id-GD_SKILLBASE].max; } -// Retrive skill_lv learned by guild +// Retrieve skill_lv learned by guild int guild_checkskill(struct guild *g, int id) { int idx = id - GD_SKILLBASE; if (idx < 0 || idx >= MAX_GUILDSKILL) @@ -764,7 +764,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag) { return 0; if(sd==NULL || sd->guild_invite==0){ - // cancel if player not present or invalide guild_id invitation + // cancel if player not present or invalid guild_id invitation if (flag == 0) { ShowError("guild: member added error %d is not online\n",account_id); intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); @@ -882,7 +882,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c online_member_sd = guild->getavailablesd(g); if(online_member_sd == NULL) - return 0; // noone online to inform + return 0; // no one online to inform #ifdef GP_BOUND_ITEMS //Guild bound item check @@ -2373,7 +2373,7 @@ void guild_defaults(void) { guild->agit_end = guild_agit_end; guild->agit2_start = guild_agit2_start; guild->agit2_end = guild_agit2_end; - /* guild flag cachin */ + /* guild flag caching */ guild->flag_add = guild_flag_add; guild->flag_remove = guild_flag_remove; guild->flags_clear = guild_flags_clear; diff --git a/src/map/homunculus.c b/src/map/homunculus.c index b6a83d1cb..8c47226db 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -809,7 +809,7 @@ bool homunculus_call(struct map_session_data *sd) { return true; } -// Recv homunculus data from char server +// Receive homunculus data from char server bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) { struct map_session_data *sd; struct homun_data *hd; @@ -1157,7 +1157,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) { classid = atoi(split[0]) - HM_CLASS_BASE; if ( classid >= MAX_HOMUNCULUS_CLASS ) { - ShowWarning("homunculus_read_skill_db_sub: Invalud homunculus class %d.\n", atoi(split[0])); + ShowWarning("homunculus_read_skill_db_sub: Invalid homunculus class %d.\n", atoi(split[0])); return false; } diff --git a/src/map/intif.c b/src/map/intif.c index 042896f4f..4dd0fa448 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -238,7 +238,7 @@ int intif_wis_replay(int id, int flag) WFIFOHEAD(inter_fd,7); WFIFOW(inter_fd,0) = 0x3002; WFIFOL(inter_fd,2) = id; - WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WFIFOB(inter_fd,6) = flag; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target WFIFOSET(inter_fd,7); if (battle_config.etc_log) @@ -387,7 +387,7 @@ int intif_request_registry(struct map_session_data *sd, int flag) { nullpo_ret(sd); - /* if char server aint online it doesn't load, shouldn't we kill the session then? */ + /* if char server ain't online it doesn't load, shouldn't we kill the session then? */ if (intif->CheckForCharServer()) return 0; @@ -931,7 +931,7 @@ void intif_parse_WisMessage(int fd) { } //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 + intif_wis_replay(id,0); // success } // Wisp/page transmission result reception @@ -939,7 +939,7 @@ void intif_parse_WisEnd(int fd) { struct map_session_data* sd; if (battle_config.etc_log) - ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target sd = (struct map_session_data *)map->nick2sd((char *) RFIFOP(fd,2)); if (sd != NULL) clif->wis_end(sd->fd, RFIFOB(fd,26)); @@ -1366,7 +1366,7 @@ void intif_parse_DeletePetOk(int fd) { ShowError("pet data delete failure\n"); } -// ACK changing name resquest, players,pets,hommon +// ACK changing name request, players,pets,homun void intif_parse_ChangeNameOk(int fd) { struct map_session_data *sd = NULL; diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 9bc352276..320c64402 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1123,7 +1123,7 @@ void itemdb_read_packages(void) { for( r = 0; r < itemdb->packages[count].random_qty; r++ ) { if( itemdb->packages[count].random_groups[r].random_qty == 1 ) { - //item packages dont stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed. + //item packages don't stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed. ShowWarning("itemdb_read_packages: in '%s' 'Random: %d' group has only 1 random option, drop rate will be 100%!\n",itemdb_name(itemdb->packages[count].id),r+1); itemdb->packages[count].random_groups[r].random_list[0].rate = 10000; } diff --git a/src/map/map.c b/src/map/map.c index e37e902f6..a89478cb1 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -254,7 +254,7 @@ int map_delblock(struct block_list* bl) // blocklist (2ways chainlist) if (bl->prev == NULL) { if (bl->next != NULL) { - // can't delete block (already at the begining of the chain) + // can't delete block (already at the beginning of the chain) ShowError("map_delblock error : bl->next!=NULL\n"); } return 0; @@ -468,7 +468,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, map->freeblock_lock(); for (i = blockcount; i < map->bl_list_count && returnCount < max; i++) { - if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion. + if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasn't queued for deletion. va_list argscopy; va_copy(argscopy, args); returnCount += func(map->bl_list[i], argscopy); @@ -2037,7 +2037,7 @@ void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...) { } /// Applies func to everything in the db. -/// Stops iteratin gif func returns -1. +/// Stops iterating gif func returns -1. void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list args) { DBIterator* iter; struct block_list* bl; @@ -2057,7 +2057,7 @@ void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list } /// Applies func to everything in the db. -/// Stops iteratin gif func returns -1. +/// Stops iterating gif func returns -1. /// @see map_vforeachregen void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...) { va_list args; @@ -4402,7 +4402,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) { - ;/* we dont mind it, the server will take care of it next. */ + ;/* we don't mind it, the server will take care of it next. */ } else { int idx = map->list[m].unit_count; @@ -4435,7 +4435,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) { - ;/* we dont mind it, the server will take care of it next. */ + ;/* we don't mind it, the server will take care of it next. */ } else { int idx = map->list[m].skill_count; @@ -4792,7 +4792,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we don't remove it from the three due to inheritance */ --disabled_skills_count; } /* all ok, process */ @@ -4830,7 +4830,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !libconfig->setting_get_bool(item) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_bool(item) )/* we don't remove it from the three due to inheritance */ --disabled_items_count; } /* all ok, process */ @@ -4875,7 +4875,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !libconfig->setting_get_int(command) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_int(command) )/* we don't remove it from the three due to inheritance */ --disabled_commands_count; } /* all ok, process */ @@ -4911,7 +4911,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we don't remove it from the three due to inheritance */ --capped_skills_count; } /* all ok, process */ @@ -5712,7 +5712,7 @@ int do_init(int argc, char *argv[]) char ip_str[16]; ip2str(sockt->addr_[0], ip_str); - ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n"); + ShowWarning("Not all IP addresses in /conf/map-server.conf configured, auto-detecting...\n"); if (sockt->naddr_ == 0) ShowError("Unable to determine your IP address...\n"); @@ -5736,7 +5736,7 @@ int do_init(int argc, char *argv[]) map->id_db = idb_alloc(DB_OPT_BASE); map->pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex] - map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex] + map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob AI. [Skotlex] map->bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search map->map_db = uidb_alloc(DB_OPT_BASE); map->nick_db = idb_alloc(DB_OPT_BASE); @@ -5795,7 +5795,7 @@ int do_init(int argc, char *argv[]) itemdb->init(minimal); skill->init(minimal); if (!minimal) - map->read_zone_db();/* read after item and skill initalization */ + map->read_zone_db();/* read after item and skill initialization */ mob->init(minimal); pc->init(minimal); status->init(minimal); diff --git a/src/map/map.h b/src/map/map.h index 3ce59a804..38167597a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -324,7 +324,7 @@ struct spawn_data { unsigned int level; struct { unsigned int size : 2; //Holds if mob has to be tiny/large - unsigned int ai : 4; //Special ai for summoned monsters. + unsigned int ai : 4; //Special AI for summoned monsters. //0: Normal mob | 1: Standard summon, attacks mobs //2: Alchemist Marine Sphere | 3: Alchemist Summon Flora | 4: Summon Zanzou unsigned int dynamic : 1; //Whether this data is indexed by a map's dynamic mob list @@ -659,8 +659,8 @@ struct map_data { int nocommand; //Blocks @/# commands for non-gms. [Skotlex] /** * Ice wall reference counter for bugreport:3574 - * - since there are a thounsand mobs out there in a lot of maps checking on, - * - every targetting for icewall on attack path would just be a waste, so, + * - since there are a thousand mobs out there in a lot of maps checking on, + * - every targeting for icewall on attack path would just be a waste, so, * - this counter allows icewall checking be only run when there is a actual ice wall on the map **/ int icewall_num; @@ -732,7 +732,7 @@ struct map_data_other_server { /// Bitfield of flags for the iterator. enum e_mapitflags { MAPIT_NORMAL = 0, - // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players. + // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold authed, active players. }; struct s_mapiterator; diff --git a/src/map/mob.c b/src/map/mob.c index ef47d6b70..552724de0 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -356,7 +356,7 @@ bool mob_ksprotected(struct block_list *src, struct block_list *target) { return false; // KS Protection Disabled if( !(md = BL_CAST(BL_MOB,target)) ) - return false; // Tarjet is not MOB + return false; // Target is not MOB if( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; @@ -1073,7 +1073,7 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) default: if (battle_config.hom_setting&0x4 && (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM) - return 0; //For some reason Homun targets are never overriden. + return 0; //For some reason Homun targets are never overridden. dist = distance_bl(&md->bl, bl); if( @@ -1443,7 +1443,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { //Unlock current target. if (mob->warpchase(md, tbl)) return true; //Chasing this target. - mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Imediately do random walk. + mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Immediately do random walk. tbl = NULL; } } @@ -2084,7 +2084,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { unsigned int base_exp,job_exp; } pt[DAMAGELOG_SIZE]; int i, temp, count, m = md->bl.m, pnum = 0; - int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution + int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are eligible for exp distribution unsigned int mvp_damage; int64 tick = timer->gettick(); bool rebirth, homkillonly; @@ -2302,7 +2302,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { int drop_modifier = mvp_sd ? pc->level_penalty_mod( md->level - mvp_sd->status.base_level, md->status.race, md->status.mode, 2) : second_sd ? pc->level_penalty_mod( md->level - second_sd->status.base_level, md->status.race, md->status.mode, 2): third_sd ? pc->level_penalty_mod( md->level - third_sd->status.base_level, md->status.race, md->status.mode, 2) : - 100;/* no player was attached, we dont use any modifier (100 = rates are not touched) */ + 100;/* no player was attached, we don't use any modifier (100 = rates are not touched) */ #endif dlist->m = md->bl.m; dlist->x = md->bl.x; @@ -2613,7 +2613,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( !rebirth ) { if( pcdb_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client. - /* first we set them dead, then we delay the outsight effect */ + /* first we set them dead, then we delay the out sight effect */ clif->clearunit_area(&md->bl,CLR_DEAD); clif->clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000); } else @@ -2842,7 +2842,7 @@ int mob_warpslave(struct block_list *bl, int range) { } /*========================================== - * Counts slave sub, curently checking if mob master is the given ID. + * Counts slave sub, currently checking if mob master is the given ID. *------------------------------------------*/ int mob_countslave_sub(struct block_list *bl,va_list ap) { @@ -3231,7 +3231,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { continue; } } else { - //Targetted skill + //Targeted skill switch (skill_target) { case MST_RANDOM: //Pick a random enemy within skill range. bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), @@ -3335,7 +3335,7 @@ int mob_is_clone(int class_) } //Flag values: -//&1: Set special ai (fight mobs, not players) +//&1: Set special AI (fight mobs, not players) //If mode is not passed, a default aggressive mode is used. //If master_id is passed, clone is attached to him. //Returns: ID of newly crafted copy. @@ -3621,7 +3621,7 @@ unsigned int mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_ } /** - * Check if global item drop rate is overriden for given item + * Check if global item drop rate is overridden for given item * in db/mob_item_ratio.txt * @param nameid ID of the item * @param mob_id ID of the monster @@ -3773,7 +3773,7 @@ bool mob_parse_dbrow(char** str) { status->calc_misc(&data.bl, mstatus, db->lv); // MVP EXP Bonus: MEXP - // Some new MVP's MEXP multipled by high exp-rate cause overflow. [LuzZza] + // Some new MVP's MEXP multiple by high exp-rate cause overflow. [LuzZza] exp = (double)atoi(str[30]) * (double)battle_config.mvp_exp_rate / 100.; db->mexp = (unsigned int)cap_value(exp, 0, UINT_MAX); @@ -3835,7 +3835,7 @@ bool mob_parse_dbrow(char** str) { ratemax = battle_config.item_drop_treasure_max; } else switch (type) - { // Added suport to restrict normal drops of MVP's [Reddozen] + { // Added support to restrict normal drops of MVP's [Reddozen] case IT_HEALING: rate_adjust = (mstatus->mode&MD_BOSS) ? battle_config.item_rate_heal_boss : battle_config.item_rate_heal; ratemin = battle_config.item_drop_heal_min; diff --git a/src/map/mob.h b/src/map/mob.h index d07f78c77..7e222fa74 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -13,7 +13,7 @@ #define MAX_RANDOMMONSTER 5 -// Change this to increase the table size in your mob_db to accomodate a larger mob database. +// Change this to increase the table size in your mob_db to accommodate 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 #define MAX_MOB_DB 4000 @@ -35,7 +35,7 @@ #define MOB_CLONE_START (MAX_MOB_DB-999) #define MOB_CLONE_END MAX_MOB_DB -//Used to determine default enemy type of mobs (for use in eachinrange calls) +//Used to determine default enemy type of mobs (for use in each in range calls) #define DEFAULT_ENEMY_TYPE(md) ((md)->special_state.ai?BL_CHAR:BL_MOB|BL_PC|BL_HOM|BL_MER) #define MAX_MOB_CHAT 250 //Max Skill's messages @@ -127,7 +127,7 @@ struct mob_data { char name[NAME_LENGTH]; struct { unsigned int size : 2; //Small/Big monsters. - unsigned int ai : 4; //Special ai for summoned monsters. + unsigned int ai : 4; //Special AI for summoned monsters. //0: Normal mob. //1: Standard summon, attacks mobs. //2: Alchemist Marine Sphere diff --git a/src/map/npc.c b/src/map/npc.c index 0817313e2..81615022a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -666,7 +666,7 @@ void npc_timerevent_quit(struct map_session_data* sd) struct npc_data* nd; struct timer_event_data *ted; - // Check timer existance + // Check timer existence if( sd->npc_timer_id == INVALID_TIMER ) return; if( !(td = timer->get(sd->npc_timer_id)) ) @@ -1340,7 +1340,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns return ERROR_TYPE_ITEM_ID; if( !itemdb->isstackable(nameid) && amount > 1 ) { - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; } @@ -1667,7 +1667,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po return ERROR_TYPE_ITEM_ID; if(!itemdb->isstackable(nameid) && amount > 1) { - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = 1; } @@ -1775,7 +1775,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) { if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; } @@ -1898,7 +1898,7 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = p->list[i].qty = 1; } diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 2182e1da2..8bc246819 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -80,7 +80,7 @@ struct pcre_interface libpcre_s; /** - * delete everythign associated with a entry + * delete everything associated with a entry * * This does NOT do the list management */ @@ -245,7 +245,7 @@ void delete_pcreset(struct npc_data* nd, int setid) while (pcreset->head) { struct pcrematch_entry* n = pcreset->head->next; npc_chat->finalize_pcrematch_entry(pcreset->head); - aFree(pcreset->head); // Cleanin' the last ones.. [Lance] + aFree(pcreset->head); // Cleaning the last ones.. [Lance] pcreset->head = n; } @@ -301,7 +301,7 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c * Delete everything associated with a NPC concerning the pattern * matching code * - * this could be more efficent but.. how often do you do this? + * this could be more efficient but.. how often do you do this? */ void npc_chat_finalize(struct npc_data* nd) { @@ -344,10 +344,10 @@ int npc_chat_sub(struct block_list* bl, va_list ap) // iterate across all active sets for (pcreset = npcParse->active; pcreset != NULL; pcreset = pcreset->next) { - // interate across all patterns in that set + // n across all patterns in that set for (e = pcreset->head; e != NULL; e = e->next) { - int offsets[2*10 + 10]; // 1/3 reserved for temp space requred by pcre_exec + int offsets[2*10 + 10]; // 1/3 reserved for temp space required by pcre_exec // perform pattern match int r = libpcre->exec(e->pcre_, e->pcre_extra_, msg, len, 0, 0, offsets, ARRAYLENGTH(offsets)); @@ -380,7 +380,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap) return 0; } -// Various script builtins used to support these functions +// Various script built-ins used to support these functions BUILDIN(defpattern) { int setid = script_getnum(st,2); const char* pattern = script_getstr(st,3); diff --git a/src/map/party.c b/src/map/party.c index 678b2cd54..7cf340edb 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -213,7 +213,7 @@ void party_check_state(struct party_data *p) { int i; memset(&p->state, 0, sizeof(p->state)); 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. + if (!p->party.member[i].online) continue; //Those not online shouldn't apart to skill usage and all that. switch (p->party.member[i].class_) { case JOB_MONK: case JOB_BABY_MONK: @@ -1132,7 +1132,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) { * @param func Function to execute * @param sd Reference character for party, map, area center * @param range Area size (0 = whole map) - * @param ... Adidtional parameters to pass to func() + * @param ... Additional parameters to pass to func() * @return Sum of the return values from func() */ int party_foreachsamemap(int (*func)(struct block_list*,va_list), struct map_session_data *sd, int range, ...) { diff --git a/src/map/script.c b/src/map/script.c index 95cf48a16..6ccbf8eaa 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2765,7 +2765,7 @@ void script_array_add_member(struct script_array *sa, unsigned int idx) { } /** * Obtains the source of the array database for this type and scenario - * Initializes such database when not yet initialised. + * Initializes such database when not yet initialized. **/ struct reg_db *script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { struct reg_db *src = NULL; diff --git a/src/map/skill.c b/src/map/skill.c index 383720361..cb0f4786f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -852,7 +852,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 #ifdef RENEWAL sc_start(src,bl,SC_FREEZE,65-(5*skill_lv),skill_lv,skill->get_time2(skill_id,skill_lv)); #else - //Tharis pointed out that this is normal freeze chance with a base of 300% + // [Tharis] pointed out that this is normal freeze chance with a base of 300% if(tsc->sg_counter >= 3 && sc_start(src,bl,SC_FREEZE,300,skill_lv,skill->get_time2(skill_id,skill_lv))) tsc->sg_counter = 0; @@ -993,7 +993,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; case NPC_MENTALBREAKER: { - //Based on observations by Tharis, Mental Breaker should do SP damage + //Based on observations by [Tharis], Mental Breaker should do SP damage //equal to Matk*skLevel. rate = status->get_matk(src, 2); rate*=skill_lv; @@ -1032,7 +1032,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 sc_start(src,bl,SC_BLIND,100,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case LK_HEADCRUSH: //Headcrush has chance of causing Bleeding status, except on demon and undead element + case LK_HEADCRUSH: // Headcrush has chance of causing Bleeding status, except on demon and undead element if (!(battle->check_undead(tstatus->race, tstatus->def_ele) || tstatus->race == RC_DEMON)) sc_start2(src, bl, SC_BLOODING,50, skill_lv, src->id, skill->get_time2(skill_id,skill_lv)); break; @@ -1296,11 +1296,11 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 sc_start(src, bl, SC_BLOODING, 100, skill_lv, 10000); break; case ITEMID_MELON_BOMB: - sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and moviment speed + sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and movement speed break; case ITEMID_BANANA_BOMB: sc_start(src, bl, SC_BANANA_BOMB, 100, skill_lv, 60000); // Reduces LUK? Needed confirm it, may be it's bugged in kRORE? - sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sitdown for 3 seconds. + sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sit down for 3 seconds. break; } sd->itemid = -1; @@ -1657,7 +1657,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1 return 1; } -/* Splitted off from skill->additional_effect, which is never called when the +/* Split off from skill->additional_effect, which is never called when the * attack skill kills the enemy. Place in this function counter status effects * when using skills (eg: Asura's sp regen penalty, or counter-status effects * from cards) that will take effect on the source, not the target. [Skotlex] @@ -1673,7 +1673,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b nullpo_ret(src); nullpo_ret(bl); - if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! - celest + if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! [celest] sd = BL_CAST(BL_PC, src); dstsd = BL_CAST(BL_PC, bl); @@ -1712,7 +1712,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b case GS_FULLBUSTER: sc_start(src,src,SC_BLIND,2*skill_lv,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case HFLI_SBR44: //[orn] + case HFLI_SBR44: // [orn] case HVAN_EXPLOSION: if(src->type == BL_HOM){ TBL_HOM *hd = (TBL_HOM*)src; @@ -1728,15 +1728,15 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b } if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR - && rnd()%10000 < battle_config.sg_miracle_skill_ratio) //SG_MIRACLE [Komurka] + && rnd()%10000 < battle_config.sg_miracle_skill_ratio) // SG_MIRACLE [Komurka] sc_start(src,src,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration); if( sd && skill_id && attack_type&BF_MAGIC && status->isdead(bl) && !(skill->get_inf(skill_id)&(INF_GROUND_SKILL|INF_SELF_SKILL)) && (rate=pc->checkskill(sd,HW_SOULDRAIN)) > 0 ) { - //Soul Drain should only work on targetted spells [Skotlex] - if( pc_issit(sd) ) pc->setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex] + // Soul Drain should only work on targeted spells [Skotlex] + if( pc_issit(sd) ) pc->setstand(sd); // Character stuck in attacking animation while 'sitting' fix. [Skotlex] if( skill->get_nk(skill_id)&NK_SPLASH && skill->area_temp[1] != bl->id ) ; else { @@ -1756,7 +1756,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b if( attack_type&BF_MAGIC ) { sp += sd->bonus.magic_sp_gain_value; hp += sd->bonus.magic_hp_gain_value; - if( skill_id == WZ_WATERBALL ) {//(bugreport:5303) + if( skill_id == WZ_WATERBALL ) {// (bugreport:5303) struct status_change *sc = NULL; if( ( sc = status->get_sc(src) ) ) { if( sc->data[SC_SOULLINK] @@ -1851,7 +1851,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b break; } dstsd->state.autocast = 0; - //Set canact delay. [Skotlex] + // Set canact delay. [Skotlex] ud = unit->bl2ud(bl); if (ud) { rate = skill->delay_fix(bl, auto_skill_id, auto_skill_lv); @@ -1989,7 +1989,7 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int return 0; sc = status->get_sc(bl); - if (!sc || sc->option&OPTION_MADOGEAR ) //Mado Gear cannot be divested [Ind] + if (!sc || sc->option&OPTION_MADOGEAR ) // Mado Gear cannot be divested [Ind] return 0; for (i = 0; i < ARRAYLENGTH(pos); i++) { @@ -2018,16 +2018,16 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in nullpo_ret(src); if (src != target && map->list[src->m].flag.noknockback) - return 0; //No knocking + return 0; // No knocking if (count == 0) - return 0; //Actual knockback distance is 0. + return 0; // Actual knockback distance is 0. switch (target->type) { case BL_MOB: { struct mob_data* md = BL_CAST(BL_MOB, target); if( md->class_ == MOBID_EMPERIUM ) return 0; - if(src != target && is_boss(target)) //Bosses can't be knocked-back + if(src != target && is_boss(target)) // Bosses can't be knocked-back return 0; } break; @@ -2059,11 +2059,13 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in } -// Checks if 'bl' should reflect back a spell cast by 'src'. -// type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted) -// In case of success returns type of reflection, otherwise 0 -// 1 - Regular reflection (Maya) -// 2 - SL_KAITE reflection +/* + Checks if 'bl' should reflect back a spell cast by 'src'. + type is the type of magic attack: 0: indirect (aoe), 1: direct (targeted) + In case of success returns type of reflection, otherwise 0 + 1 - Regular reflection (Maya) + 2 - SL_KAITE reflection +*/ int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type) { struct status_change *sc = status->get_sc(bl); struct map_session_data* sd = BL_CAST(BL_PC, bl); @@ -2122,8 +2124,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr if(skill_id > 0 && !skill_lv) return 0; - nullpo_ret(src); //Source is the master behind the attack (player/mob/pet) - nullpo_ret(dsrc); //dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src. + nullpo_ret(src); // Source is the master behind the attack (player/mob/pet) + nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src. nullpo_ret(bl); //Target to be attacked. if (src != dsrc) { @@ -2131,7 +2133,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2)) return 0; } else if ((flag&SD_ANIMATION) && skill->get_nk(skill_id)&NK_SPLASH) { - //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex] + //Note that splash attacks often only check versus the targeted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex] if (!status->check_skilluse(src, bl, skill_id, 2)) return 0; } @@ -2185,7 +2187,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr sc = NULL; //Don't need it. /* bugreport:2564 flag&2 disables double casting trigger */ flag |= 2; - /* bugreport:7859 magical reflect'd zeroes blewcount */ + /* bugreport:7859 magical reflected zeroes blow count */ dmg.blewcount = 0; //Spirit of Wizard blocks Kaite's reflection if( type == 2 && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD ) @@ -2207,11 +2209,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr #if MAGIC_REFLECTION_TYPE #ifdef RENEWAL - if( dmg.dmg_lv != ATK_MISS ) //Wiz SL cancelled and consumed fragment + if( dmg.dmg_lv != ATK_MISS ) // Wiz SL canceled and consumed fragment #else // issue:6415 in pre-renewal Kaite reflected the entire damage received - // regardless of caster's equipament (Aegis 11.1) - if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL cancelled and consumed fragment + // regardless of caster's equipment (Aegis 11.1) + if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL canceled and consumed fragment #endif { short s_ele = skill->get_ele(skill_id, skill_lv); @@ -2503,7 +2505,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr { //Updated to not be able to copy skills if the blow will kill you. [Skotlex] int copy_skill = skill_id, cidx = 0; /** - * Copy Referal: dummy skills should point to their source upon copying + * Copy Referral: dummy skills should point to their source upon copying **/ switch( skill_id ) { case AB_DUPLELIGHT_MELEE: @@ -2740,7 +2742,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr struct status_change *ssc = status->get_sc(src); if( ssc && ssc->data[SC_POISONINGWEAPON] && rnd()%100 < 70 + 5*skill_lv ) { short rate = 100; - if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )// Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5; sc_start(src, bl,ssc->data[SC_POISONINGWEAPON]->val2,rate,ssc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); status_change_end(src,SC_POISONINGWEAPON,-1); @@ -2775,8 +2777,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr } /*========================================== - * sub fonction for recursive skill call. - * Checking bl battle flag and display dammage + * sub function for recursive skill call. + * Checking bl battle flag and display damage * then call func with source,target,skill_id,skill_lv,tick,flag *------------------------------------------*/ int skill_area_sub(struct block_list *bl, va_list ap) { @@ -2967,7 +2969,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, if( (idx = skill->get_index(skill_id)) == 0 ) return 0; - // Requeriments + // Requirements for( i = 0; i < ARRAYLENGTH(itemid); i++ ) { itemid[i] = skill->db[idx].itemid[i]; @@ -2989,7 +2991,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, else sp += (st->max_sp * (-sp_rate)) / 100; - if( bl->type == BL_HOM ) { // Intimacy Requeriments + if( bl->type == BL_HOM ) { // Intimacy Requirements struct homun_data *hd = BL_CAST(BL_HOM, bl); switch( skill_id ) { case HFLI_SBR44: @@ -3414,7 +3416,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 return 1; if (skill_id && skill->get_type(skill_id) == BF_MAGIC && status->isimmune(bl) == 100) { - //GTB makes all targetted magic display miss with a single bolt. + //GTB makes all targeted magic display miss with a single bolt. sc_type sct = status->skill2sc(skill_id); if(sct != SC_NONE) status_change_end(bl, sct, INVALID_TIMER); @@ -4054,7 +4056,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); break; - // Celest + // [Celest] case PF_SOULBURN: if (rnd()%100 < (skill_lv < 5 ? 30 + skill_lv * 10 : 70)) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -4139,7 +4141,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if( unit->movepos(src, bl->x+x, bl->y+y, 1, 1) ) { clif->slide(src,bl->x+x,bl->y+y); - clif->fixpos(src); // the official server send these two packts. + clif->fixpos(src); // the official server send these two packets. skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); if( rnd()%100 < 4 * skill_lv ) skill->castend_damage_id(src,bl,GC_CROSSIMPACT,skill_lv,tick,flag); @@ -4562,7 +4564,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 } break; - //recursive homon skill + // Recursive homun skill case MH_MAGMA_FLOW: case MH_HEILIGE_STANGE: if(flag & 1) @@ -4791,7 +4793,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { && (sc = status->get_sc(target)) && sc->data[SC_FOGWALL] && rnd() % 100 < 75 ) { - //Fogwall makes all offensive-type targetted skills fail at 75% + // Fogwall makes all offensive-type targeted skills fail at 75% if (sd) clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0); break; } @@ -4842,8 +4844,8 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { unit->stop_walking(src,1); if( !sd || sd->skillitem != ud->skill_id || skill->get_delay(ud->skill_id,ud->skill_lv) ) - ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish] - if (sd) { //Cooldown application + ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); // Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish] + if (sd) { // Cooldown application int i, cooldown = skill->get_cooldown(ud->skill_id, ud->skill_lv); for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses. if (sd->skillcooldown[i].id == ud->skill_id){ @@ -4886,7 +4888,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { // SC_MAGICPOWER needs to switch states before any damage is actually dealt skill->toggle_magicpower(src, ud->skill_id); - /* On aegis damage skills are also increase by camouflage. Need confirmation on kRo. + /* On aegis damage skills are also increase by camouflage. Need confirmation on kRO. if( ud->skill_id != RA_CAMOUFLAGE ) // only normal attack and auto cast skills benefit from its bonuses status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER); */ @@ -4983,7 +4985,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin int element = 0; enum sc_type type; - if(skill_id > 0 && !skill_lv) return 0; // celest + if(skill_id > 0 && !skill_lv) return 0; // [Celest] nullpo_retr(1, src); nullpo_retr(1, bl); @@ -5024,7 +5026,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin //Check for undead skills that convert a no-damage skill into a damage one. [Skotlex] switch (skill_id) { - case HLIF_HEAL: //[orn] + case HLIF_HEAL: // [orn] if (bl->type != BL_HOM) { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0) ; break ; @@ -5095,7 +5097,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin struct block_list *s_src = battle->get_master(src); short ret = 0; if(!skill->check_unit_range(src, src->x, src->y, skill_id, skill_lv)) //prevent reiteration - ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homon + ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homun if(s_src && !skill->check_unit_range(s_src, s_src->x, s_src->y, skill_id, skill_lv)) ret |= skill->castend_pos2(s_src,s_src->x,s_src->y,skill_id,skill_lv,tick,flag); //cast on master if (hd) @@ -5138,7 +5140,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin map->freeblock_lock(); switch(skill_id) { - case HLIF_HEAL: //[orn] + case HLIF_HEAL: // [orn] case AL_HEAL: /** * Arch Bishop @@ -5494,7 +5496,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (dstsd) { if(dstsd->status.weapon == W_FIST || (dstsd->sc.count && !dstsd->sc.data[type] && - ( //Allow re-enchanting to lenghten time. [Skotlex] + ( //Allow re-enchanting to lengthen time. [Skotlex] dstsd->sc.data[SC_PROPERTYFIRE] || dstsd->sc.data[SC_PROPERTYWATER] || dstsd->sc.data[SC_PROPERTYWIND] || @@ -5716,7 +5718,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { int duration = skill->get_time(skill_id,skill_lv); clif->skill_nodamage(bl,bl,skill_id,skill_lv,sc_start(src,bl,type,100,skill_lv,duration)); // Master - clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homunc + clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homun } break; case NJ_BUNSINJYUTSU: @@ -6050,7 +6052,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin BF_MAGIC, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); break; - case HVAN_EXPLOSION: //[orn] + case HVAN_EXPLOSION: // [orn] case NPC_SELFDESTRUCTION: { //Self Destruction hits everyone in range (allies+enemies) @@ -6183,7 +6185,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin return 0; } clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(src,bl,type,100,skill_lv,unit->getdir(bl),0,0,0)); - if (sd) // If the client receives a skill-use packet inmediately before a walkok packet, it will discard the walk packet! [Skotlex] + if (sd) // If the client receives a skill-use packet immediately before a walkok packet, it will discard the walk packet! [Skotlex] clif->walkok(sd); // So aegis has to resend the walk ok. break; case AS_CLOAKING: @@ -6419,7 +6421,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case MC_IDENTIFY: if(sd) { clif->item_identify_list(sd); - if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, dont consume anything, return */ + if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, don't consume anything, return */ map->freeblock_unlock(); return 1; } @@ -6761,7 +6763,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } clif->skill_nodamage(src,bl,skill_id,skill_lv,1); if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) - || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel. + || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends against dispel. || (dstsd && pc_ismadogear(dstsd)) || rnd()%100 >= 50+10*skill_lv ) { @@ -7071,7 +7073,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin unit->stop_attack(src); //Run skillv tiles overriding the can-move check. if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md) - md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the ai. + md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the AI. } break; @@ -7137,14 +7139,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case WE_MALE: { int hp_rate = (!skill_lv)? 0:skill->db[skill_id].hp_rate[skill_lv-1]; - int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex] + int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it cost the caster. [Skotlex] clif->skill_nodamage(src,bl,skill_id,status->heal(bl, gain_hp, 0, 0),1); } break; case WE_FEMALE: { int sp_rate = (!skill_lv)? 0:skill->db[skill_id].sp_rate[skill_lv-1]; - int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex] + int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it cost the caster. [Skotlex] clif->skill_nodamage(src,bl,skill_id,status->heal(bl, 0, gain_sp, 0),1); } break; @@ -7248,7 +7250,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // if it is already trapping something don't spring it, // remove trap should be used instead break; - // otherwise fallthrough to below + // otherwise fall through to below case UNT_BLASTMINE: case UNT_SKIDTRAP: case UNT_LANDMINE: @@ -7481,7 +7483,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (count == -1) count = 3; else - count++; //Should not retrigger this one. + count++; //Should not re-trigger this one. break; case 7: // stop freeze or stoned { @@ -7696,7 +7698,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } break; - case AM_CALLHOMUN: //[orn] + case AM_CALLHOMUN: // [orn] if( sd ) { if (homun->call(sd)) clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); @@ -7714,7 +7716,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } break; - case HAMI_CASTLE: //[orn] + case HAMI_CASTLE: // [orn] if(rnd()%100 < 20*skill_lv && src != bl) { int x,y; @@ -7724,7 +7726,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin skill->blockhomun_start(hd, skill_id, skill->get_time2(skill_id,skill_lv)); if (unit->movepos(src,bl->x,bl->y,0,0)) { - clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homunc + clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homun clif->slide(src,bl->x,bl->y) ; if (unit->movepos(bl,x,y,0,0)) { @@ -7743,7 +7745,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin else if (sd) clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); break; - case HVAN_CHAOTIC: //[orn] + case HVAN_CHAOTIC: // [orn] { static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}}; int r = rnd()%100; @@ -7764,7 +7766,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin status->heal(bl, hp, 0, 0); } break; - //Homun single-target support skills [orn] + // Homun single-target support skills [orn] case HAMI_BLOODLUST: case HFLI_FLEET: case HFLI_SPEED: @@ -8016,7 +8018,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { // Every time the skill is casted the status change is reseted adding a counter. count += (short)tsc->data[SC_ROLLINGCUTTER]->val1; if( count > 10 ) - count = 10; // Max coounter + count = 10; // Max counter status_change_end(bl, SC_ROLLINGCUTTER, INVALID_TIMER); } sc_start(src,bl,SC_ROLLINGCUTTER,100,count,skill->get_time(skill_id,skill_lv)); @@ -8548,7 +8550,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } if ( tsc && tsc->data[SC__UNLUCKY] && skill_id == SC_UNLUCKY) { //If the target was successfully inflected with the Unlucky status, give 1 of 3 random status's. - switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's reguardless of resistance. + switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's regardless of resistance. case 0: status->change_start(src,bl,SC_POISON,10000,skill_lv,0,0,0,skill->get_time(skill_id,skill_lv),10); break; @@ -8732,7 +8734,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } else { int count = 0; clif->skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-charactors + count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-characters BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); if( sd ) pc->delspiritball(sd, count, 0); clif->skill_nodamage(src, src, skill_id, skill_lv, @@ -8921,7 +8923,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin sc_start(src, bl, type, 100, skill_lv,skill->get_time(skill_id, skill_lv)); if ( madnesscheck >= 8 )//The god of madness deals 9999 fixed unreduceable damage when 8 or more enemy players are affected. status_fix_damage(src, bl, 9999, clif->damage(src, bl, 0, 0, 9999, 0, 0, 0)); - //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealed as reflected damage which I dont have it coded like that yet. [Rytech] + //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealt as reflected damage which I don't have it coded like that yet. [Rytech] } else if( sd ) { int rate = sstatus->int_ / 6 + (sd? sd->status.job_level:0) / 5 + skill_lv * 4; if ( rnd()%100 < rate ) { @@ -9047,7 +9049,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if( sd ) { int elemental_class = skill->get_elemental_type(skill_id,skill_lv); - // Remove previous elemental fisrt. + // Remove previous elemental first. if( sd->ed ) elemental->delete(sd->ed,0); @@ -9070,7 +9072,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin elemental->delete(sd->ed, 0); break; } - switch( skill_lv ) {// Select mode bassed on skill level used. + switch( skill_lv ) {// Select mode based on skill level used. case 2: mode = EL_MODE_ASSIST; break; case 3: mode = EL_MODE_AGGRESSIVE; break; } @@ -9847,7 +9849,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int r; //if(skill_lv <= 0) return 0; - if(skill_id > 0 && !skill_lv) return 0; // celest + if(skill_id > 0 && !skill_lv) return 0; // [Celest] nullpo_ret(src); @@ -10153,7 +10155,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int class_ = skill_id==AM_SPHEREMINE?1142:summons[skill_lv-1]; struct mob_data *md; - // Correct info, don't change any of this! [celest] + // Correct info, don't change any of this! [Celest] md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_MEDIUM, AI_NONE); if (md) { md->master_id = src->id; @@ -10293,7 +10295,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui sc_start(src,src,type,100,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case AM_RESURRECTHOMUN: //[orn] + case AM_RESURRECTHOMUN: // [orn] if (sd) { if (!homun->ressurect(sd, 20*skill_lv, x, y)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -11871,7 +11873,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_POISONSMOKE: if( battle->check_target(ss,bl,BCT_ENEMY) > 0 && !(tsc && tsc->data[sg->val2]) && rnd()%100 < 50 ) { short rate = 100; - if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5 ; sc_start(ss,bl,sg->val2,rate,sg->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); } @@ -11906,7 +11908,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_STEALTHFIELD: if( bl->id == sg->src_id ) - break; // Dont work on Self (video shows that) + break; // Don't work on Self (video shows that) case UNT_NEUTRALBARRIER: sc_start(ss,bl,type,100,sg->skill_lv,sg->interval + 100); break; @@ -12188,8 +12190,8 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { //We don't check for SC_LONGING because someone could always have knocked you back and out of the song/dance. //FIXME: This code is not perfect, it doesn't checks for the real ensemble's owner, //it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble - //which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel - //your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it. + //which overlaps, by stepping outside of the other partner's ensemble will cause you to cancel + //your own. Let's pray that scenario is pretty unlikely and none will complain too much about it. status_change_end(bl, SC_DANCING, INVALID_TIMER); } case MH_STEINWAND: @@ -12235,7 +12237,7 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { if (sce) { status_change_end(bl, type, INVALID_TIMER); if ((sce=sc->data[SC_BLIND])) { - if (bl->type == BL_PC) //Players get blind ended inmediately, others have it still for 30 secs. [Skotlex] + if (bl->type == BL_PC) //Players get blind ended immediately, others have it still for 30 secs. [Skotlex] status_change_end(bl, SC_BLIND, INVALID_TIMER); else { timer->delete(sce->timer, status->change_timer); @@ -12683,7 +12685,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case BS_GREED: clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0); return 0; - default: //Only Mechanic exlcusive skill can be used. + default: //Only Mechanic exclusive skill can be used. break; } } @@ -12996,7 +12998,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id return 0; } break; - case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80% + case AM_REST: //Can't vapo homun if you don't have an active homun or it's hp is < 80% if (!homun_alive(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -13433,7 +13435,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id // There's no need to check if the skill is part of a combo if it's // already been checked before, see unit_skilluse_id2 [Panikon] - // Note that if this check is readded part of issue:8047 will reapear! + // Note that if this check is read part of issue:8047 will reappear! //if( sd->sc.data[SC_COMBOATTACK] && !skill->is_combo(skill_id ) ) // return 0; @@ -13681,7 +13683,7 @@ int skill_consume_requirement( struct map_session_data *sd, uint16 skill_id, uin continue; if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD ) - continue; //Gemstones are checked, but not substracted from inventory. + continue; //Gemstones are checked, but not subtracted from inventory. switch( skill_id ){ case SA_SEISMICWEAPON: @@ -13876,7 +13878,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN ) { if( sd->special_state.no_gemstone ) - { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica + { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card [helvetica] if( skill_id != SA_ABRACADABRA ) req.itemid[i] = req.amount[i] = 0; else if( --req.amount[i] < 1 ) @@ -15033,7 +15035,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { if( su == NULL || su->group == NULL || (*alive) == 0 ) return 0; - if( su->group->state.guildaura ) /* guild auras are not cancelled! */ + if( su->group->state.guildaura ) /* guild auras are not canceled! */ return 0; switch (skill_id) { @@ -15484,7 +15486,7 @@ int skill_delunit (struct skill_unit* su) { } break; case SC_MANHOLE: // Note : Removing the unit don't remove the status (official info) - if( group->val2 ) { // Someone Traped + if( group->val2 ) { // Someone Trapped struct status_change *tsc = status->get_sc(map->id2bl(group->val2)); if( tsc && tsc->data[SC__MANHOLE] ) tsc->data[SC__MANHOLE]->val4 = 0; // Remove the Unit ID @@ -15631,7 +15633,7 @@ int skill_delunitgroup(struct skill_unit_group *group, const char* file, int lin struct status_change* sc = status->get_sc(src); if (sc && sc->data[SC_DANCING]) { - sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to redelete the group. [Skotlex] + sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to re-delete the group. [Skotlex] status_change_end(src, SC_DANCING, INVALID_TIMER); } } @@ -16013,7 +16015,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { return 0; } /*========================================== - * Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds. + * Executes on all skill units every SKILLUNITTIMER_INTERVAL milliseconds. *------------------------------------------*/ int skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { map->freeblock_lock(); @@ -16420,7 +16422,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex] break; default: // Enchanted Stones - make_per += 1000+i*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35 + make_per += 1000+i*500; // Enchanted stone Craft bonus: +15/+20/+25/+30/+35 break; } break; @@ -16468,7 +16470,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, case ITEMID_COATING_BOTTLE: make_per -= (1+rnd()%100)*10; break; - //Common items, recieve no bonus or penalty, listed just because they are commonly produced + //Common items, receive no bonus or penalty, listed just because they are commonly produced case ITEMID_BLUE_POTION: case ITEMID_RED_SLIM_POTION: case ITEMID_ANODYNE: @@ -17371,7 +17373,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) return 0; } -int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn] +int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { // [orn] struct homun_data *hd = (TBL_HOM*)map->id2bl(id); if (data <= 0 || data >= MAX_SKILL) return 0; @@ -17380,7 +17382,7 @@ int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn] return 1; } -int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { //[orn] +int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { // [orn] uint16 idx = skill->get_index(skill_id); nullpo_retr (-1, hd); @@ -17396,7 +17398,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { / return timer->add(timer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx); } -int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {//[orn] +int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {// [orn] struct mercenary_data *md = (TBL_MER*)map->id2bl(id); if( data <= 0 || data >= MAX_SKILL ) return 0; @@ -17984,7 +17986,7 @@ bool skill_parse_row_requiredb(char* split[], int columns, int current) { skill->split_atoi(split[5],skill->db[idx].sp_rate); skill->split_atoi(split[6],skill->db[idx].zeny); - //Wich weapon type are required, see doc/item_db for types + //Which weapon type are required, see doc/item_db for types p = split[7]; for( j = 0; j < 32; j++ ) { int l = atoi(p); @@ -18481,7 +18483,7 @@ void skill_defaults(void) { memset(&skill->area_temp,0,sizeof(skill->area_temp)); memset(&skill->unit_temp,0,sizeof(skill->unit_temp)); skill->unit_group_newid = 0; - /* accesssors */ + /* accessors */ skill->get_index = skill_get_index; skill->get_type = skill_get_type; skill->get_hit = skill_get_hit; diff --git a/src/map/status.c b/src/map/status.c index a716b8913..d05341683 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1121,8 +1121,8 @@ int status_charge(struct block_list* bl, int64 hp, int64 sp) { } //Inflicts damage on the target with the according walkdelay. -//If flag&1, damage is passive and does not triggers cancelling status changes. -//If flag&2, fail if target does not has enough to substract. +//If flag&1, damage is passive and does not triggers canceling status changes. +//If flag&2, fail if target does not has enough to subtract. //If flag&4, if killed, mob must not give exp/loot. //flag will be set to &8 when damaging sp of a dead character int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, int64 in_sp, int walkdelay, int flag) { @@ -1269,7 +1269,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, st->hp = 1; //To let the dead function cast skills and all that. //NOTE: These dead functions should return: [Skotlex] - //0: Death cancelled, auto-revived. + //0: Death canceled, auto-revived. //Non-zero: Standard death. Clear status, cancel move/attack, etc //&2: Also remove object from map. //&4: Also delete object from memory. @@ -1284,7 +1284,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, break; } - if(!flag) //Death cancelled. + if(!flag) //Death canceled. return (int)(hp+sp); //Normal death @@ -1429,7 +1429,7 @@ int status_heal(struct block_list *bl,int64 in_hp,int64 in_sp, int flag) { //If rates are > 0, percent is of current HP/SP //If rates are < 0, percent is of max HP/SP //If !flag, this is heal, otherwise it is damage. -//Furthermore, if flag==2, then the target must not die from the substraction. +//Furthermore, if flag==2, then the target must not die from the subtraction. int status_percent_change(struct block_list *src,struct block_list *target,signed char hp_rate, signed char sp_rate, int flag) { struct status_data *st; unsigned int hp = 0, sp = 0; @@ -1633,11 +1633,11 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( sc && sc->count ) { - if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc + if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stunned/Frozen/etc if (flag != 1) //Can't cast, casted stuff can't damage. return 0; if (!(skill->get_inf(skill_id)&INF_GROUND_SKILL)) - return 0; //Targetted spells can't come off. + return 0; //Targeted spells can't come off. } if ( @@ -1782,7 +1782,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( ( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_CAMOUFLAGE] ) && !(st->mode&(MD_BOSS|MD_DETECTOR)) && flag == 4 ) return 0; } - //If targetting, cloak+hide protect you, otherwise only hiding does. + //If targeting, cloak+hide protect you, otherwise only hiding does. hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); //You cannot hide from ground skills. @@ -1815,7 +1815,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin } } break; - case BL_ITEM: //Allow targetting of items to pick'em up (or in the case of mobs, to loot them). + case BL_ITEM: //Allow targeting of items to pick'em up (or in the case of mobs, to loot them). //TODO: Would be nice if this could be used to judge whether the player can or not pick up the item it targets. [Skotlex] if (st->mode&MD_LOOTER) return 1; @@ -1891,7 +1891,7 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) #ifdef RENEWAL_ASPD short mod = -1; - switch( sd->weapontype2 ){ // adjustment for dual weilding + switch( sd->weapontype2 ){ // adjustment for dual wielding case W_DAGGER: mod = 0; break; // 0, 1, 1 case W_1HSWORD: case W_1HAXE: mod = 1; @@ -2555,7 +2555,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { return 1; } - // sanitize the refine level in case someone decreased the value inbetween + // sanitize the refine level in case someone decreased the value in between if (sd->status.inventory[index].refine > MAX_REFINE) sd->status.inventory[index].refine = MAX_REFINE; @@ -2583,7 +2583,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { wa->matk += status->refine_info[wlv].bonus[r-1] / 100; #endif - //Overrefine bonus. + //Overrefined bonus. if (r) wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100; diff --git a/src/map/status.h b/src/map/status.h index 32bef4df8..b08aa2a04 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -21,7 +21,7 @@ struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] //Also add 100% checks since those are the most used cases where we don't -//want aproximation errors. +//want approximation errors. #define APPLY_RATE(value, rate) ( \ (rate) == 100 ? \ (value) \ diff --git a/src/map/storage.c b/src/map/storage.c index 2db5fff3d..fad23d770 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -544,7 +544,7 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) * @index : storage idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) { @@ -585,7 +585,7 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) * @index : cart inventory idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int amount) { @@ -617,7 +617,7 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int * @index : storage idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int amount) { @@ -648,7 +648,7 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a * Request to save guild storage * return * 0 : fail (no storage) -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagesave(int account_id, int guild_id, int flag) { @@ -669,7 +669,7 @@ int storage_guild_storagesave(int account_id, int guild_id, int flag) * ACK save of guild storage * return * 0 : fail (no storage) -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagesaved(int guild_id) { diff --git a/src/map/trade.c b/src/map/trade.c index 83426c407..8bb47e0cb 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -61,7 +61,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta if( previous_sd ){ previous_sd->trade_partner = 0; clif->tradecancelled(previous_sd); - } // Once cancelled then continue to the new one. + } // Once canceled then continue to the new one. sd->trade_partner = 0; clif->tradecancelled(sd); } @@ -169,7 +169,7 @@ void trade_tradeack(struct map_session_data *sd, int type) { /*========================================== * Check here hacker for duplicate item in trade * normal client refuse to have 2 same types of item (except equipment) in same trade window - * normal client authorise only no equiped item and only from inventory + * normal client authorize only no equipped item and only from inventory *------------------------------------------*/ int impossible_trade_check(struct map_session_data *sd) { @@ -187,9 +187,9 @@ int impossible_trade_check(struct map_session_data *sd) // get inventory of player memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY); - // remove this part: arrows can be trade and equiped + // remove this part: arrows can be trade and equipped // re-added! [celest] - // remove equiped items (they can not be trade) + // remove equipped items (they can not be trade) for (i = 0; i < MAX_INVENTORY; i++) if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & EQP_AMMO)) memset(&inventory[i], 0, sizeof(struct item)); @@ -457,7 +457,7 @@ void trade_tradeok(struct map_session_data *sd) { } /*========================================== - * 'Cancel' is pressed. (or trade was force-cancelled by the code) + * 'Cancel' is pressed. (or trade was force-canceled by the code) *------------------------------------------*/ void trade_tradecancel(struct map_session_data *sd) { struct map_session_data *target_sd; @@ -466,7 +466,7 @@ void trade_tradecancel(struct map_session_data *sd) { target_sd = map->id2sd(sd->trade_partner); if(!sd->state.trading) - { // Not trade acepted + { // Not trade accepted if( target_sd ) { target_sd->trade_partner = 0; clif->tradecancelled(target_sd); diff --git a/src/map/unit.c b/src/map/unit.c index e22d6f697..95feb2a1d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -244,7 +244,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { { if (!(ud->skill_id == NPC_SELFDESTRUCTION && ud->skilltimer != INVALID_TIMER)) { //Skill used, abort walking - clif->fixpos(bl); //Fix position as walk has been cancelled. + clif->fixpos(bl); //Fix position as walk has been canceled. return 0; } //Resend walk packet for proper Self Destruction display. @@ -869,7 +869,7 @@ int unit_stop_walking(struct block_list *bl,int type) return 0; //NOTE: We are using timer data after deleting it because we know the //timer->delete function does not messes with it. If the function's - //behaviour changes in the future, this code could break! + //behavior changes in the future, this code could break! td = timer->get(ud->walktimer); timer->delete(ud->walktimer, unit->walktoxy_timer); ud->walktimer = INVALID_TIMER; @@ -892,7 +892,7 @@ int unit_stop_walking(struct block_list *bl,int type) if(bl->type == BL_PET && type&~0xff) ud->canmove_tick = timer->gettick() + (type>>8); - //Readded, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] + //Read, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] if (ud->state.running) { status_change_end(bl, SC_RUN, INVALID_TIMER); status_change_end(bl, SC_WUGDASH, INVALID_TIMER); @@ -1250,7 +1250,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if (!temp) //Stop attack on non-combo skills [Skotlex] unit->stop_attack(src); - else if(ud->attacktimer != INVALID_TIMER) //Elsewise, delay current attack sequence + else if(ud->attacktimer != INVALID_TIMER) //Else-wise, delay current attack sequence ud->attackabletime = tick + status_get_adelay(src); ud->state.skillcastcancel = castcancel; @@ -1366,7 +1366,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } if(!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026 - unit->stop_walking(src,1);// eventhough this is not how official works but this will do the trick. bugreport:6829 + unit->stop_walking(src,1);// even though this is not how official works but this will do the trick. bugreport:6829 // in official this is triggered even if no cast time. clif->skillcasting(src, src->id, target_id, 0,0, skill_id, skill->get_ele(skill_id, skill_lv), casttime); @@ -1375,7 +1375,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if (sd && target->type == BL_MOB) { TBL_MOB *md = (TBL_MOB*)target; - mob->skill_event(md, src, tick, -1); //Cast targetted skill event. + mob->skill_event(md, src, tick, -1); //Cast targeted skill event. if (tstatus->mode&(MD_CASTSENSOR_IDLE|MD_CASTSENSOR_CHASE) && battle->check_target(target, src, BCT_ENEMY) > 0) { @@ -1470,7 +1470,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui if( skill->not_ok(skill_id, sd) || !skill->check_condition_castbegin(sd, skill_id, skill_lv) ) return 0; /** - * "WHY IS IT HEREE": pneuma cannot be cancelled past this point, the client displays the animation even, + * "WHY IS IT HEREE": pneuma cannot be canceled past this point, the client displays the animation even, * if we cancel it from nodamage_id, so it has to be here for it to not display the animation. **/ if( skill_id == AL_PNEUMA && map->getcell(src->m, skill_x, skill_y, CELL_CHKLANDPROTECTOR) ) { @@ -1648,7 +1648,7 @@ int unit_attack(struct block_list *src,int target_id,int continuous) { ud->state.attack_continue = continuous; unit->set_target(ud, target_id); - if (continuous) //If you're to attack continously, set to auto-case character + if (continuous) //If you're to attack continuously, set to auto-case character ud->chaserange = status_get_range(src); //Just change target/type. [Skotlex] @@ -1938,7 +1938,7 @@ int unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { /*========================================== * Cancels an ongoing skill cast. * flag&1: Cast-Cancel invoked. - * flag&2: Cancel only if skill is cancellable. + * flag&2: Cancel only if skill is can be cancel. *------------------------------------------*/ int unit_skillcastcancel(struct block_list *bl,int type) { @@ -1954,7 +1954,7 @@ int unit_skillcastcancel(struct block_list *bl,int type) sd = BL_CAST(BL_PC, bl); if (type&2) { - //See if it can be cancelled. + //See if it can be canceled. if (!ud->state.skillcastcancel) return 0; @@ -2057,7 +2057,7 @@ int unit_changeviewsize(struct block_list *bl,short size) /*========================================== * Removes a bl/ud from the map. * Returns 1 on success. 0 if it couldn't be removed or the bl was free'd - * if clrtype is 1 (death), appropiate cleanup is performed. + * if clrtype is 1 (death), appropriate cleanup is performed. * Otherwise it is assumed bl is being warped. * On-Kill specific stuff is not performed here, look at status->damage for that. *------------------------------------------*/ diff --git a/src/map/vending.h b/src/map/vending.h index a70726374..b65e888e3 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -13,8 +13,8 @@ struct s_search_store_search; struct s_vending { short index; //cart index (return item data) - short amount; //amout of the item for vending - unsigned int value; //at wich price + short amount; //amount of the item for vending + unsigned int value; //at which price }; struct vending_interface { -- cgit v1.2.3-70-g09d2 From f17ca2000630fd77f2cf3e2bff5cc74431730461 Mon Sep 17 00:00:00 2001 From: Potte <the.keikun@gmail.com> Date: Mon, 23 Jun 2014 19:37:18 +0800 Subject: Removed Unused Include. Signed-off-by: Shido <the.keikun@gmail.com> --- src/map/storage.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/map/storage.c') diff --git a/src/map/storage.c b/src/map/storage.c index fad23d770..f2f0d8986 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -24,7 +24,6 @@ #include "../common/db.h" #include "../common/malloc.h" #include "../common/nullpo.h" -#include "../common/showmsg.h" struct storage_interface storage_s; struct guild_storage_interface gstorage_s; -- cgit v1.2.3-70-g09d2 From 68e7f53f05dd80e8b4ab9d84c9931df22a6b060c Mon Sep 17 00:00:00 2001 From: Haru <haru@dotalux.com> Date: Thu, 10 Jul 2014 16:59:55 +0200 Subject: Fixed reserved __identifier violations - Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com> --- src/char/char.h | 6 +- src/char/int_auction.h | 6 +- src/char/int_elemental.h | 6 +- src/char/int_guild.h | 6 +- src/char/int_homun.h | 6 +- src/char/int_mail.h | 6 +- src/char/int_mercenary.h | 6 +- src/char/int_party.h | 6 +- src/char/int_pet.h | 6 +- src/char/int_quest.h | 6 +- src/char/int_storage.h | 6 +- src/char/inter.h | 6 +- src/char/pincode.h | 6 +- src/common/HPM.h | 6 +- src/common/HPMDataCheck.h | 144 ++++++++++++++++++------------------ src/common/HPMi.h | 6 +- src/common/atomic.h | 6 +- src/common/cbasetypes.h | 10 +-- src/common/conf.h | 6 +- src/common/console.h | 6 +- src/common/core.h | 6 +- src/common/db.h | 6 +- src/common/des.h | 6 +- src/common/ers.h | 6 +- src/common/grfio.c | 2 +- src/common/grfio.h | 6 +- src/common/malloc.c | 33 ++++----- src/common/malloc.h | 6 +- src/common/mapindex.h | 6 +- src/common/md5calc.h | 6 +- src/common/mmo.h | 6 +- src/common/mutex.h | 6 +- src/common/nullpo.h | 6 +- src/common/random.h | 6 +- src/common/showmsg.c | 30 ++++---- src/common/showmsg.h | 8 +- src/common/socket.c | 12 +-- src/common/socket.h | 10 +-- src/common/spinlock.h | 6 +- src/common/sql.h | 6 +- src/common/strlib.c | 6 +- src/common/strlib.h | 14 ++-- src/common/sysinfo.h | 6 +- src/common/thread.c | 10 +-- src/common/thread.h | 6 +- src/common/timer.c | 10 +-- src/common/timer.h | 6 +- src/common/utils.h | 6 +- src/config/classes/general.h | 6 +- src/config/const.h | 6 +- src/config/core.h | 6 +- src/config/renewal.h | 6 +- src/config/secure.h | 6 +- src/login/account.h | 6 +- src/login/ipban.h | 6 +- src/login/login.h | 6 +- src/login/loginlog.h | 6 +- src/map/HPMmap.h | 6 +- src/map/atcommand.c | 2 +- src/map/atcommand.h | 6 +- src/map/battle.c | 2 +- src/map/battle.h | 6 +- src/map/battleground.h | 6 +- src/map/buyingstore.h | 6 +- src/map/chat.h | 6 +- src/map/chrif.h | 6 +- src/map/clif.c | 2 +- src/map/clif.h | 6 +- src/map/date.h | 6 +- src/map/duel.h | 6 +- src/map/elemental.h | 6 +- src/map/guild.c | 6 +- src/map/guild.h | 6 +- src/map/homunculus.h | 6 +- src/map/instance.h | 6 +- src/map/intif.c | 2 +- src/map/intif.h | 6 +- src/map/irc-bot.h | 6 +- src/map/itemdb.h | 6 +- src/map/log.h | 6 +- src/map/mail.h | 6 +- src/map/map.h | 10 +-- src/map/mapreg.h | 6 +- src/map/mercenary.h | 6 +- src/map/mob.h | 6 +- src/map/npc.c | 2 +- src/map/npc.h | 6 +- src/map/packets.h | 6 +- src/map/packets_struct.h | 6 +- src/map/party.h | 6 +- src/map/path.h | 6 +- src/map/pc.c | 4 +- src/map/pc.h | 6 +- src/map/pc_groups.h | 6 +- src/map/pet.h | 6 +- src/map/quest.h | 6 +- src/map/script.c | 48 ++++++------ src/map/script.h | 6 +- src/map/searchstore.h | 6 +- src/map/skill.h | 6 +- src/map/status.h | 6 +- src/map/storage.c | 6 +- src/map/storage.h | 8 +- src/map/trade.h | 6 +- src/map/unit.h | 6 +- src/map/vending.h | 6 +- tools/HPMHookGen/HPMDataCheckGen.pl | 8 +- 107 files changed, 441 insertions(+), 446 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/char/char.h b/src/char/char.h index 09a78f6b9..5a70d2ca7 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_CHAR_H_ -#define _COMMON_CHAR_H_ +#ifndef COMMON_CHAR_H +#define COMMON_CHAR_H #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" @@ -123,4 +123,4 @@ void global_accreg_to_login_start (int account_id, int char_id); void global_accreg_to_login_send (void); void global_accreg_to_login_add (const char *key, unsigned int index, intptr_t val, bool is_string); -#endif /* _COMMON_CHAR_H_ */ +#endif /* COMMON_CHAR_H */ diff --git a/src/char/int_auction.h b/src/char/int_auction.h index f10794f73..17fd75a58 100644 --- a/src/char/int_auction.h +++ b/src/char/int_auction.h @@ -1,12 +1,12 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_AUCTION_H_ -#define _CHAR_INT_AUCTION_H_ +#ifndef CHAR_INT_AUCTION_H +#define CHAR_INT_AUCTION_H int inter_auction_parse_frommap(int fd); int inter_auction_sql_init(void); void inter_auction_sql_final(void); -#endif /* _CHAR_INT_AUCTION_H_ */ +#endif /* CHAR_INT_AUCTION_H */ diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c869e6fc2..e28cfedea 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_ELEMENTAL_H_ -#define _CHAR_INT_ELEMENTAL_H_ +#ifndef CHAR_INT_ELEMENTAL_H +#define CHAR_INT_ELEMENTAL_H #include "../common/cbasetypes.h" @@ -12,4 +12,4 @@ int inter_elemental_parse_frommap(int fd); bool mapif_elemental_delete(int ele_id); -#endif /* _CHAR_INT_ELEMENTAL_H_ */ +#endif /* CHAR_INT_ELEMENTAL_H */ diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 5e657ff06..bc457d86b 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_GUILD_H_ -#define _CHAR_INT_GUILD_H_ +#ifndef CHAR_INT_GUILD_H +#define CHAR_INT_GUILD_H enum { GS_BASIC = 0x0001, @@ -31,4 +31,4 @@ int inter_guild_charname_changed(int guild_id,int account_id, int char_id, char int inter_guild_CharOnline(int char_id, int guild_id); int inter_guild_CharOffline(int char_id, int guild_id); -#endif /* _CHAR_INT_GUILD_H_ */ +#endif /* CHAR_INT_GUILD_H */ diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 9477f4f03..6fa4f9dc7 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_HOMUN_H_ -#define _CHAR_INT_HOMUN_H_ +#ifndef CHAR_INT_HOMUN_H +#define CHAR_INT_HOMUN_H #include "../common/cbasetypes.h" @@ -17,4 +17,4 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd); bool mapif_homunculus_delete(int homun_id); bool mapif_homunculus_rename(char *name); -#endif /* _CHAR_INT_HOMUN_H_ */ +#endif /* CHAR_INT_HOMUN_H */ diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 824ba48a3..8800061d7 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_MAIL_H_ -#define _CHAR_INT_MAIL_H_ +#ifndef CHAR_INT_MAIL_H +#define CHAR_INT_MAIL_H struct item; struct mail_message; @@ -16,4 +16,4 @@ void inter_mail_sql_final(void); int mail_savemessage(struct mail_message* msg); void mapif_Mail_new(struct mail_message *msg); -#endif /* _CHAR_INT_MAIL_H_ */ +#endif /* CHAR_INT_MAIL_H */ diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 195a83b34..b03c20de3 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_MERCENARY_H_ -#define _CHAR_INT_MERCENARY_H_ +#ifndef CHAR_INT_MERCENARY_H +#define CHAR_INT_MERCENARY_H #include "../common/cbasetypes.h" @@ -19,4 +19,4 @@ bool mercenary_owner_delete(int char_id); bool mapif_mercenary_delete(int merc_id); -#endif /* _CHAR_INT_MERCENARY_H_ */ +#endif /* CHAR_INT_MERCENARY_H */ diff --git a/src/char/int_party.h b/src/char/int_party.h index 33325b46b..2b24b1d1a 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_PARTY_H_ -#define _CHAR_INT_PARTY_H_ +#ifndef CHAR_INT_PARTY_H +#define CHAR_INT_PARTY_H //Party Flags on what to save/delete. enum { @@ -21,4 +21,4 @@ int inter_party_leave(int party_id,int account_id, int char_id); int inter_party_CharOnline(int char_id, int party_id); int inter_party_CharOffline(int char_id, int party_id); -#endif /* _CHAR_INT_PARTY_H_ */ +#endif /* CHAR_INT_PARTY_H */ diff --git a/src/char/int_pet.h b/src/char/int_pet.h index a16cb7a37..52642fc54 100644 --- a/src/char/int_pet.h +++ b/src/char/int_pet.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_PET_H_ -#define _CHAR_INT_PET_H_ +#ifndef CHAR_INT_PET_H +#define CHAR_INT_PET_H struct s_pet; @@ -18,4 +18,4 @@ int inter_pet_sql_init(void); //Exported for use in the TXT-SQL converter. int inter_pet_tosql(int pet_id, struct s_pet *p); -#endif /* _CHAR_INT_PET_H_ */ +#endif /* CHAR_INT_PET_H */ diff --git a/src/char/int_quest.h b/src/char/int_quest.h index 6267c74ad..f0dd370ea 100644 --- a/src/char/int_quest.h +++ b/src/char/int_quest.h @@ -1,10 +1,10 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_QUEST_H_ -#define _CHAR_QUEST_H_ +#ifndef CHAR_QUEST_H +#define CHAR_QUEST_H int inter_quest_parse_frommap(int fd); -#endif /* _CHAR_QUEST_H_ */ +#endif /* CHAR_QUEST_H */ diff --git a/src/char/int_storage.h b/src/char/int_storage.h index 1693499a5..1cef94d98 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _CHAR_INT_STORAGE_H_ -#define _CHAR_INT_STORAGE_H_ +#ifndef CHAR_INT_STORAGE_H +#define CHAR_INT_STORAGE_H struct storage_data; struct guild_storage; @@ -19,4 +19,4 @@ int storage_fromsql(int account_id, struct storage_data* p); int storage_tosql(int account_id,struct storage_data *p); int guild_storage_tosql(int guild_id, struct guild_storage *p); -#endif /* _CHAR_INT_STORAGE_H_ */ +#endif /* CHAR_INT_STORAGE_H */ diff --git a/src/char/inter.h b/src/char/inter.h index 5e655237e..ab2478ae6 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CHAR_INTER_H_ -#define _CHAR_INTER_H_ +#ifndef CHAR_INTER_H +#define CHAR_INTER_H #include "char.h" #include "../common/sql.h" @@ -30,4 +30,4 @@ extern Sql* lsql_handle; int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type); -#endif /* _CHAR_INTER_H_ */ +#endif /* CHAR_INTER_H */ diff --git a/src/char/pincode.h b/src/char/pincode.h index 3b71eec7c..1ed05095e 100644 --- a/src/char/pincode.h +++ b/src/char/pincode.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CHAR_PINCODE_H_ -#define _CHAR_PINCODE_H_ +#ifndef CHAR_PINCODE_H +#define CHAR_PINCODE_H #include "char.h" @@ -40,4 +40,4 @@ struct pincode_interface *pincode; void pincode_defaults(void); -#endif /* _CHAR_PINCODE_H_ */ +#endif /* CHAR_PINCODE_H */ diff --git a/src/common/HPM.h b/src/common/HPM.h index 5667f605a..fe8d45066 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _COMMON_HPM_H_ -#define _COMMON_HPM_H_ +#ifndef COMMON_HPM_H +#define COMMON_HPM_H #ifndef HERCULES_CORE #error You should never include HPM.h from a plugin. @@ -158,4 +158,4 @@ struct HPM_interface *HPM; void hpm_defaults(void); -#endif /* _COMMON_HPM_H_ */ +#endif /* COMMON_HPM_H */ diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index c5ec3771d..79ec36472 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -3,140 +3,140 @@ // // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -#ifndef _HPM_DATA_CHECK_H_ -#define _HPM_DATA_CHECK_H_ +#ifndef HPM_DATA_CHECK_H +#define HPM_DATA_CHECK_H HPExport const struct s_HPMDataCheck HPMDataCheck[] = { - #ifdef _COMMON_CONF_H_ + #ifdef COMMON_CONF_H { "libconfig_interface", sizeof(struct libconfig_interface) }, #else - #define _COMMON_CONF_H_ - #endif // _COMMON_CONF_H_ - #ifdef _COMMON_DB_H_ + #define COMMON_CONF_H + #endif // COMMON_CONF_H + #ifdef COMMON_DB_H { "DBData", sizeof(struct DBData) }, { "DBIterator", sizeof(struct DBIterator) }, { "DBMap", sizeof(struct DBMap) }, #else - #define _COMMON_DB_H_ - #endif // _COMMON_DB_H_ - #ifdef _COMMON_DES_H_ + #define COMMON_DB_H + #endif // COMMON_DB_H + #ifdef COMMON_DES_H { "BIT64", sizeof(struct BIT64) }, #else - #define _COMMON_DES_H_ - #endif // _COMMON_DES_H_ - #ifdef _COMMON_ERS_H_ + #define COMMON_DES_H + #endif // COMMON_DES_H + #ifdef COMMON_ERS_H { "eri", sizeof(struct eri) }, #else - #define _COMMON_ERS_H_ - #endif // _COMMON_ERS_H_ - #ifdef _COMMON_MAPINDEX_H_ + #define COMMON_ERS_H + #endif // COMMON_ERS_H + #ifdef COMMON_MAPINDEX_H { "mapindex_interface", sizeof(struct mapindex_interface) }, #else - #define _COMMON_MAPINDEX_H_ - #endif // _COMMON_MAPINDEX_H_ - #ifdef _COMMON_MMO_H_ + #define COMMON_MAPINDEX_H + #endif // COMMON_MAPINDEX_H + #ifdef COMMON_MMO_H { "quest", sizeof(struct quest) }, #else - #define _COMMON_MMO_H_ - #endif // _COMMON_MMO_H_ - #ifdef _COMMON_SOCKET_H_ + #define COMMON_MMO_H + #endif // COMMON_MMO_H + #ifdef COMMON_SOCKET_H { "socket_interface", sizeof(struct socket_interface) }, #else - #define _COMMON_SOCKET_H_ - #endif // _COMMON_SOCKET_H_ - #ifdef _COMMON_STRLIB_H_ + #define COMMON_SOCKET_H + #endif // COMMON_SOCKET_H + #ifdef COMMON_STRLIB_H { "StringBuf", sizeof(struct StringBuf) }, { "s_svstate", sizeof(struct s_svstate) }, #else - #define _COMMON_STRLIB_H_ - #endif // _COMMON_STRLIB_H_ - #ifdef _COMMON_SYSINFO_H_ + #define COMMON_STRLIB_H + #endif // COMMON_STRLIB_H + #ifdef COMMON_SYSINFO_H { "sysinfo_interface", sizeof(struct sysinfo_interface) }, #else - #define _COMMON_SYSINFO_H_ - #endif // _COMMON_SYSINFO_H_ - #ifdef _MAP_ATCOMMAND_H_ + #define COMMON_SYSINFO_H + #endif // COMMON_SYSINFO_H + #ifdef MAP_ATCOMMAND_H { "AliasInfo", sizeof(struct AliasInfo) }, { "atcommand_interface", sizeof(struct atcommand_interface) }, #else - #define _MAP_ATCOMMAND_H_ - #endif // _MAP_ATCOMMAND_H_ - #ifdef _MAP_BATTLE_H_ + #define MAP_ATCOMMAND_H + #endif // MAP_ATCOMMAND_H + #ifdef MAP_BATTLE_H { "Damage", sizeof(struct Damage) }, { "battle_interface", sizeof(struct battle_interface) }, #else - #define _MAP_BATTLE_H_ - #endif // _MAP_BATTLE_H_ - #ifdef _MAP_BUYINGSTORE_H_ + #define MAP_BATTLE_H + #endif // MAP_BATTLE_H + #ifdef MAP_BUYINGSTORE_H { "buyingstore_interface", sizeof(struct buyingstore_interface) }, { "s_buyingstore_item", sizeof(struct s_buyingstore_item) }, #else - #define _MAP_BUYINGSTORE_H_ - #endif // _MAP_BUYINGSTORE_H_ - #ifdef _MAP_CHRIF_H_ + #define MAP_BUYINGSTORE_H + #endif // MAP_BUYINGSTORE_H + #ifdef MAP_CHRIF_H { "auth_node", sizeof(struct auth_node) }, #else - #define _MAP_CHRIF_H_ - #endif // _MAP_CHRIF_H_ - #ifdef _MAP_CLIF_H_ + #define MAP_CHRIF_H + #endif // MAP_CHRIF_H + #ifdef MAP_CLIF_H { "clif_interface", sizeof(struct clif_interface) }, #else - #define _MAP_CLIF_H_ - #endif // _MAP_CLIF_H_ - #ifdef _MAP_ELEMENTAL_H_ + #define MAP_CLIF_H + #endif // MAP_CLIF_H + #ifdef MAP_ELEMENTAL_H { "elemental_skill", sizeof(struct elemental_skill) }, #else - #define _MAP_ELEMENTAL_H_ - #endif // _MAP_ELEMENTAL_H_ - #ifdef _MAP_GUILD_H_ + #define MAP_ELEMENTAL_H + #endif // MAP_ELEMENTAL_H + #ifdef MAP_GUILD_H { "eventlist", sizeof(struct eventlist) }, { "guardian_data", sizeof(struct guardian_data) }, #else - #define _MAP_GUILD_H_ - #endif // _MAP_GUILD_H_ - #ifdef _MAP_MAPREG_H_ + #define MAP_GUILD_H + #endif // MAP_GUILD_H + #ifdef MAP_MAPREG_H { "mapreg_save", sizeof(struct mapreg_save) }, #else - #define _MAP_MAPREG_H_ - #endif // _MAP_MAPREG_H_ - #ifdef _MAP_MAP_H_ + #define MAP_MAPREG_H + #endif // MAP_MAPREG_H + #ifdef MAP_MAP_H { "map_data_other_server", sizeof(struct map_data_other_server) }, #else - #define _MAP_MAP_H_ - #endif // _MAP_MAP_H_ - #ifdef _MAP_PACKETS_STRUCT_H_ + #define MAP_MAP_H + #endif // MAP_MAP_H + #ifdef MAP_PACKETS_STRUCT_H { "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO) }, #else - #define _MAP_PACKETS_STRUCT_H_ - #endif // _MAP_PACKETS_STRUCT_H_ - #ifdef _MAP_PC_H_ + #define MAP_PACKETS_STRUCT_H + #endif // MAP_PACKETS_STRUCT_H + #ifdef MAP_PC_H { "autotrade_vending", sizeof(struct autotrade_vending) }, { "item_cd", sizeof(struct item_cd) }, #else - #define _MAP_PC_H_ - #endif // _MAP_PC_H_ - #ifdef _MAP_SCRIPT_H_ + #define MAP_PC_H + #endif // MAP_PC_H + #ifdef MAP_SCRIPT_H { "Script_Config", sizeof(struct Script_Config) }, { "reg_db", sizeof(struct reg_db) }, { "script_interface", sizeof(struct script_interface) }, #else - #define _MAP_SCRIPT_H_ - #endif // _MAP_SCRIPT_H_ - #ifdef _MAP_SEARCHSTORE_H_ + #define MAP_SCRIPT_H + #endif // MAP_SCRIPT_H + #ifdef MAP_SEARCHSTORE_H { "searchstore_interface", sizeof(struct searchstore_interface) }, #else - #define _MAP_SEARCHSTORE_H_ - #endif // _MAP_SEARCHSTORE_H_ - #ifdef _MAP_SKILL_H_ + #define MAP_SEARCHSTORE_H + #endif // MAP_SEARCHSTORE_H + #ifdef MAP_SKILL_H { "skill_cd", sizeof(struct skill_cd) }, { "skill_condition", sizeof(struct skill_condition) }, { "skill_interface", sizeof(struct skill_interface) }, { "skill_unit_save", sizeof(struct skill_unit_save) }, #else - #define _MAP_SKILL_H_ - #endif // _MAP_SKILL_H_ + #define MAP_SKILL_H + #endif // MAP_SKILL_H }; HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck); -#endif /* _HPM_DATA_CHECK_H_ */ +#endif /* HPM_DATA_CHECK_H */ diff --git a/src/common/HPMi.h b/src/common/HPMi.h index b98e87d90..478cfbdd9 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _COMMON_HPMI_H_ -#define _COMMON_HPMI_H_ +#ifndef COMMON_HPMI_H +#define COMMON_HPMI_H #include "../common/cbasetypes.h" #include "../common/console.h" @@ -184,4 +184,4 @@ HPExport struct HPMi_interface { HPExport struct HPMi_interface *HPMi; #endif -#endif /* _COMMON_HPMI_H_ */ +#endif /* COMMON_HPMI_H */ diff --git a/src/common/atomic.h b/src/common/atomic.h index 526811a09..e73b1c464 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -1,8 +1,8 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_ATOMIC_H_ -#define _COMMON_ATOMIC_H_ +#ifndef COMMON_ATOMIC_H +#define COMMON_ATOMIC_H // Atomic Operations // (Interlocked CompareExchange, Add .. and so on ..) @@ -146,4 +146,4 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){ #endif //endif compiler decision -#endif /* _COMMON_ATOMIC_H_ */ +#endif /* COMMON_ATOMIC_H */ diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index ac65b08a8..42075de8e 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -1,5 +1,5 @@ -#ifndef _COMMON_CBASETYPES_H_ -#define _COMMON_CBASETYPES_H_ +#ifndef COMMON_CBASETYPES_H +#define COMMON_CBASETYPES_H /* +--------+-----------+--------+---------+ * | ILP32 | LP64 | ILP64 | (LL)P64 | @@ -444,9 +444,9 @@ void SET_FUNCPOINTER(T1& var, T2 p) /* pointer size fix which fixes several gcc warnings */ #ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) + #define h64BPTRSIZE(y) ((intptr)(y)) #else - #define __64BPTRSIZE(y) (y) + #define h64BPTRSIZE(y) (y) #endif -#endif /* _COMMON_CBASETYPES_H_ */ +#endif /* COMMON_CBASETYPES_H */ diff --git a/src/common/conf.h b/src/common/conf.h index 7c275bec2..c232a035c 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_CONF_H_ -#define _COMMON_CONF_H_ +#ifndef COMMON_CONF_H +#define COMMON_CONF_H #include "../common/cbasetypes.h" @@ -95,4 +95,4 @@ struct libconfig_interface *libconfig; void libconfig_defaults(void); -#endif // _COMMON_CONF_H_ +#endif // COMMON_CONF_H diff --git a/src/common/console.h b/src/common/console.h index 55a9a767c..062d48bbe 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _COMMON_CONSOLE_H_ -#define _COMMON_CONSOLE_H_ +#ifndef COMMON_CONSOLE_H +#define COMMON_CONSOLE_H #include "../config/core.h" // MAX_CONSOLE_INPUT @@ -93,4 +93,4 @@ struct console_interface *console; void console_defaults(void); -#endif /* _COMMON_CONSOLE_H_ */ +#endif /* COMMON_CONSOLE_H */ diff --git a/src/common/core.h b/src/common/core.h index ba75e6b01..a8337e1b9 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_CORE_H_ -#define _COMMON_CORE_H_ +#ifndef COMMON_CORE_H +#define COMMON_CORE_H #include "../common/db.h" #include "../common/mmo.h" @@ -47,4 +47,4 @@ enum E_CORE_ST { /// If NULL, runflag is set to CORE_ST_STOP instead. extern void (*shutdown_callback)(void); -#endif /* _COMMON_CORE_H_ */ +#endif /* COMMON_CORE_H */ diff --git a/src/common/db.h b/src/common/db.h index 4f8d6be79..ed87e474b 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -39,8 +39,8 @@ * @encoding US-ASCII * * @see common#db.c * \*****************************************************************************/ -#ifndef _COMMON_DB_H_ -#define _COMMON_DB_H_ +#ifndef COMMON_DB_H +#define COMMON_DB_H #include <stdarg.h> @@ -1549,4 +1549,4 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...); -#endif /* _COMMON_DB_H_ */ +#endif /* COMMON_DB_H */ diff --git a/src/common/des.h b/src/common/des.h index 0f908a15b..2c7190f23 100644 --- a/src/common/des.h +++ b/src/common/des.h @@ -1,7 +1,7 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_DES_H_ -#define _COMMON_DES_H_ +#ifndef COMMON_DES_H +#define COMMON_DES_H #include "../common/cbasetypes.h" @@ -13,4 +13,4 @@ void des_decrypt_block(BIT64* block); void des_decrypt(unsigned char* data, size_t size); -#endif // _COMMON_DES_H_ +#endif // COMMON_DES_H diff --git a/src/common/ers.h b/src/common/ers.h index e11f7f37e..904f7fb81 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -37,8 +37,8 @@ * @author Flavio @ Amazon Project * * @encoding US-ASCII * \*****************************************************************************/ -#ifndef _COMMON_ERS_H_ -#define _COMMON_ERS_H_ +#ifndef COMMON_ERS_H +#define COMMON_ERS_H #include "../common/cbasetypes.h" @@ -175,4 +175,4 @@ void ers_report(void); void ers_final(void); #endif /* DISABLE_ERS / not DISABLE_ERS */ -#endif /* _COMMON_ERS_H_ */ +#endif /* COMMON_ERS_H */ diff --git a/src/common/grfio.c b/src/common/grfio.c index f592812f6..6e628a512 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -23,7 +23,7 @@ //---------------------------- // file entry table struct //---------------------------- -typedef struct _FILELIST { +typedef struct FILELIST { int srclen; ///< compressed size int srclen_aligned; int declen; ///< original size diff --git a/src/common/grfio.h b/src/common/grfio.h index 930ed7e36..15659c17c 100644 --- a/src/common/grfio.h +++ b/src/common/grfio.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_GRFIO_H_ -#define _COMMON_GRFIO_H_ +#ifndef COMMON_GRFIO_H +#define COMMON_GRFIO_H void grfio_init(const char* fname); void grfio_final(void); @@ -14,4 +14,4 @@ unsigned long grfio_crc32(const unsigned char *buf, unsigned int len); int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen); int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen); -#endif /* _COMMON_GRFIO_H_ */ +#endif /* COMMON_GRFIO_H */ diff --git a/src/common/malloc.c b/src/common/malloc.c index fbe8e2d9d..3c9fa9c54 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -235,14 +235,13 @@ static size_t hash2size( unsigned short hash ) } } -void* _mmalloc(size_t size, const char *file, int line, const char *func ) -{ +void *mmalloc_(size_t size, const char *file, int line, const char *func) { struct block *block; short size_hash = size2hash( size ); struct unit_head *head; if (((long) size) < 0) { - ShowError("_mmalloc: %d\n", size); + ShowError("mmalloc_: %d\n", size); return NULL; } @@ -341,15 +340,13 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) return (char *)head + sizeof(struct unit_head) - sizeof(long); } -void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func ) -{ +void *mcalloc_(size_t num, size_t size, const char *file, int line, const char *func) { void *p = iMalloc->malloc(num * size,file,line,func); memset(p,0,num * size); return p; } -void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func ) -{ +void *mrealloc_(void *memblock, size_t size, const char *file, int line, const char *func) { size_t old_size; if(memblock == NULL) { return iMalloc->malloc(size,file,line,func); @@ -373,8 +370,8 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c } } -/* a _mrealloc clone with the difference it 'z'eroes the newly created memory */ -void* _mreallocz(void *memblock, size_t size, const char *file, int line, const char *func ) { +/* a mrealloc_ clone with the difference it 'z'eroes the newly created memory */ +void *mreallocz_(void *memblock, size_t size, const char *file, int line, const char *func) { size_t old_size; void *p = NULL; @@ -404,8 +401,7 @@ void* _mreallocz(void *memblock, size_t size, const char *file, int line, const } -char* _mstrdup(const char *p, const char *file, int line, const char *func ) -{ +char *mstrdup_(const char *p, const char *file, int line, const char *func) { if(p == NULL) { return NULL; } else { @@ -416,8 +412,7 @@ char* _mstrdup(const char *p, const char *file, int line, const char *func ) } } -void _mfree(void *ptr, const char *file, int line, const char *func ) -{ +void mfree_(void *ptr, const char *file, int line, const char *func) { struct unit_head *head; if (ptr == NULL) @@ -852,12 +847,12 @@ void malloc_defaults(void) { // Athena's built-in Memory Manager #ifdef USE_MEMMGR - iMalloc->malloc = _mmalloc; - iMalloc->calloc = _mcalloc; - iMalloc->realloc = _mrealloc; - iMalloc->reallocz= _mreallocz; - iMalloc->astrdup = _mstrdup; - iMalloc->free = _mfree; + iMalloc->malloc = mmalloc_; + iMalloc->calloc = mcalloc_; + iMalloc->realloc = mrealloc_; + iMalloc->reallocz= mreallocz_; + iMalloc->astrdup = mstrdup_; + iMalloc->free = mfree_; #else iMalloc->malloc = aMalloc_; iMalloc->calloc = aCalloc_; diff --git a/src/common/malloc.h b/src/common/malloc.h index 7309bb0f7..8dace2d68 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_MALLOC_H_ -#define _COMMON_MALLOC_H_ +#ifndef COMMON_MALLOC_H +#define COMMON_MALLOC_H #include "../common/cbasetypes.h" @@ -88,4 +88,4 @@ struct malloc_interface { void memmgr_report (int extra); struct malloc_interface *iMalloc; -#endif /* _COMMON_MALLOC_H_ */ +#endif /* COMMON_MALLOC_H */ diff --git a/src/common/mapindex.h b/src/common/mapindex.h index fa9b9e920..446a2422d 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_MAPINDEX_H_ -#define _COMMON_MAPINDEX_H_ +#ifndef COMMON_MAPINDEX_H +#define COMMON_MAPINDEX_H #include "../common/db.h" #include "../common/mmo.h" @@ -90,4 +90,4 @@ struct mapindex_interface *mapindex; void mapindex_defaults(void); -#endif /* _COMMON_MAPINDEX_H_ */ +#endif /* COMMON_MAPINDEX_H */ diff --git a/src/common/md5calc.h b/src/common/md5calc.h index d0caf6787..740e2edcc 100644 --- a/src/common/md5calc.h +++ b/src/common/md5calc.h @@ -1,8 +1,8 @@ -#ifndef _COMMON_MD5CALC_H_ -#define _COMMON_MD5CALC_H_ +#ifndef COMMON_MD5CALC_H +#define COMMON_MD5CALC_H void MD5_String(const char * string, char * output); void MD5_Binary(const char * string, unsigned char * output); void MD5_Salt(unsigned int len, char * output); -#endif /* _COMMON_MD5CALC_H_ */ +#endif /* COMMON_MD5CALC_H */ diff --git a/src/common/mmo.h b/src/common/mmo.h index 8e57eee85..feeb06524 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_MMO_H_ -#define _COMMON_MMO_H_ +#ifndef COMMON_MMO_H +#define COMMON_MMO_H #include <time.h> @@ -932,4 +932,4 @@ enum e_pc_reg_loading { #error MAX_ZENY is too big #endif -#endif /* _COMMON_MMO_H_ */ +#endif /* COMMON_MMO_H */ diff --git a/src/common/mutex.h b/src/common/mutex.h index ced91ab8e..d298c05af 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -1,8 +1,8 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_MUTEX_H_ -#define _COMMON_MUTEX_H_ +#ifndef COMMON_MUTEX_H +#define COMMON_MUTEX_H #include "../common/cbasetypes.h" @@ -90,4 +90,4 @@ void racond_signal(racond *c); void racond_broadcast(racond *c); -#endif /* _COMMON_MUTEX_H_ */ +#endif /* COMMON_MUTEX_H */ diff --git a/src/common/nullpo.h b/src/common/nullpo.h index fb1cf0feb..581252cca 100644 --- a/src/common/nullpo.h +++ b/src/common/nullpo.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_NULLPO_H_ -#define _COMMON_NULLPO_H_ +#ifndef COMMON_NULLPO_H +#define COMMON_NULLPO_H #include "../common/cbasetypes.h" @@ -125,4 +125,4 @@ void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title); -#endif /* _COMMON_NULLPO_H_ */ +#endif /* COMMON_NULLPO_H */ diff --git a/src/common/random.h b/src/common/random.h index ab83fb4d4..15d7f8ab1 100644 --- a/src/common/random.h +++ b/src/common/random.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_RANDOM_H_ -#define _COMMON_RANDOM_H_ +#ifndef COMMON_RANDOM_H +#define COMMON_RANDOM_H #include "../common/cbasetypes.h" @@ -15,4 +15,4 @@ int32 rnd_value(int32 min, int32 max);// [min, max] double rnd_uniform(void);// [0.0, 1.0) double rnd_uniform53(void);// [0.0, 1.0) -#endif /* _COMMON_RANDOM_H_ */ +#endif /* COMMON_RANDOM_H */ diff --git a/src/common/showmsg.c b/src/common/showmsg.c index ece10c1a8..b9bcef9b2 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -654,7 +654,7 @@ int FPRINTF(FILE *file, const char *fmt, ...) char timestamp_format[20] = ""; //For displaying Timestamps -int _vShowMessage(enum msg_type flag, const char *string, va_list ap) +int vShowMessage_(enum msg_type flag, const char *string, va_list ap) { va_list apcopy; char prefix[100]; @@ -663,7 +663,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap) #endif if (!string || *string == '\0') { - ShowError("Empty string passed to _vShowMessage().\n"); + ShowError("Empty string passed to vShowMessage_().\n"); return 1; } if( @@ -734,7 +734,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap) strcat(prefix,CL_RED"[Fatal Error]"CL_RESET":"); break; default: - ShowError("In function _vShowMessage() -> Invalid flag passed.\n"); + ShowError("In function vShowMessage_() -> Invalid flag passed.\n"); return 1; } @@ -782,12 +782,12 @@ void ClearScreen(void) ShowMessage(CL_CLS); // to prevent empty string passed messages #endif } -int _ShowMessage(enum msg_type flag, const char *string, ...) +int ShowMessage_(enum msg_type flag, const char *string, ...) { int ret; va_list ap; va_start(ap, string); - ret = _vShowMessage(flag, string, ap); + ret = vShowMessage_(flag, string, ap); va_end(ap); return ret; } @@ -796,37 +796,37 @@ int _ShowMessage(enum msg_type flag, const char *string, ...) void ShowMessage(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_NONE, string, ap); + vShowMessage_(MSG_NONE, string, ap); va_end(ap); } void ShowStatus(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_STATUS, string, ap); + vShowMessage_(MSG_STATUS, string, ap); va_end(ap); } void ShowSQL(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_SQL, string, ap); + vShowMessage_(MSG_SQL, string, ap); va_end(ap); } void ShowInfo(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_INFORMATION, string, ap); + vShowMessage_(MSG_INFORMATION, string, ap); va_end(ap); } void ShowNotice(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_NOTICE, string, ap); + vShowMessage_(MSG_NOTICE, string, ap); va_end(ap); } void ShowWarning(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_WARNING, string, ap); + vShowMessage_(MSG_WARNING, string, ap); va_end(ap); } void ShowConfigWarning(config_setting_t *config, const char *string, ...) @@ -837,25 +837,25 @@ void ShowConfigWarning(config_setting_t *config, const char *string, ...) StrBuf->AppendStr(&buf, string); StrBuf->Printf(&buf, " (%s:%d)\n", config_setting_source_file(config), config_setting_source_line(config)); va_start(ap, string); - _vShowMessage(MSG_WARNING, StrBuf->Value(&buf), ap); + vShowMessage_(MSG_WARNING, StrBuf->Value(&buf), ap); va_end(ap); StrBuf->Destroy(&buf); } void ShowDebug(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_DEBUG, string, ap); + vShowMessage_(MSG_DEBUG, string, ap); va_end(ap); } void ShowError(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_ERROR, string, ap); + vShowMessage_(MSG_ERROR, string, ap); va_end(ap); } void ShowFatalError(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_FATALERROR, string, ap); + vShowMessage_(MSG_FATALERROR, string, ap); va_end(ap); } diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 8008acf5a..83eb0ad89 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_SHOWMSG_H_ -#define _COMMON_SHOWMSG_H_ +#ifndef COMMON_SHOWMSG_H +#define COMMON_SHOWMSG_H #include <stdarg.h> @@ -115,6 +115,6 @@ extern void ClearScreen(void); HPExport void (*ShowFatalError) (const char *, ...); #endif -extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); +extern int vShowMessage_(enum msg_type flag, const char *string, va_list ap); -#endif /* _COMMON_SHOWMSG_H_ */ +#endif /* COMMON_SHOWMSG_H */ diff --git a/src/common/socket.c b/src/common/socket.c index 58c2d5bf9..85f0aa0ce 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -5,9 +5,9 @@ #define HERCULES_CORE #include "../config/core.h" // SHOW_SERVER_STATS -#define _H_SOCKET_C_ +#define H_SOCKET_C #include "socket.h" -#undef _H_SOCKET_C_ +#undef H_SOCKET_C #include <stdio.h> #include <stdlib.h> @@ -909,20 +909,20 @@ int do_sockets(int next) ////////////////////////////// // IP rules and DDoS protection -typedef struct _connect_history { - struct _connect_history* next; +typedef struct connect_history { + struct connect_history* next; uint32 ip; int64 tick; int count; unsigned ddos : 1; } ConnectHistory; -typedef struct _access_control { +typedef struct access_control { uint32 ip; uint32 mask; } AccessControl; -enum _aco { +enum aco { ACO_DENY_ALLOW, ACO_ALLOW_DENY, ACO_MUTUAL_FAILURE diff --git a/src/common/socket.h b/src/common/socket.h index 804b9284f..42b0efe3b 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_SOCKET_H_ -#define _COMMON_SOCKET_H_ +#ifndef COMMON_SOCKET_H +#define COMMON_SOCKET_H #include <time.h> @@ -174,7 +174,7 @@ struct socket_interface *sockt; void socket_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef _H_SOCKET_C_ +#ifndef H_SOCKET_C #define make_listen_bind(ip, port) ( sockt->make_listen_bind(ip, port) ) #define make_connection(ip, port, opt) ( sockt->make_connection(ip, port, opt) ) #define realloc_fifo(fd, rfifo_size, wfifo_size) ( sockt->realloc_fifo(fd, rfifo_size, wfifo_size) ) @@ -194,6 +194,6 @@ void socket_defaults(void); #define ntows(netshort) ( sockt->ntows(netshort) ) #define getips(ips, max) ( sockt->getips(ips, max) ) #define set_eof(fd) ( sockt->set_eof(fd) ) -#endif /* _H_SOCKET_C_ */ +#endif /* H_SOCKET_C */ -#endif /* _COMMON_SOCKET_H_ */ +#endif /* COMMON_SOCKET_H */ diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 5d57c6462..bde36b8e5 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,5 +1,5 @@ -#ifndef _COMMON_SPINLOCK_H_ -#define _COMMON_SPINLOCK_H_ +#ifndef COMMON_SPINLOCK_H +#define COMMON_SPINLOCK_H // // CAS based Spinlock Implementation @@ -100,4 +100,4 @@ static forceinline void LeaveSpinLock(SPIN_LOCK *lck){ -#endif /* _COMMON_SPINLOCK_H_ */ +#endif /* COMMON_SPINLOCK_H */ diff --git a/src/common/sql.h b/src/common/sql.h index 3bdb76c74..f9593978c 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_SQL_H_ -#define _COMMON_SQL_H_ +#ifndef COMMON_SQL_H +#define COMMON_SQL_H #include <stdarg.h>// va_list @@ -291,4 +291,4 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename); void Sql_Init(void); -#endif /* _COMMON_SQL_H_ */ +#endif /* COMMON_SQL_H */ diff --git a/src/common/strlib.c b/src/common/strlib.c index 2ce8fd347..e2382e6fc 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -4,9 +4,9 @@ #define HERCULES_CORE -#define _H_STRLIB_C_ +#define H_STRLIB_C #include "strlib.h" -#undef _H_STRLIB_C_ +#undef H_STRLIB_C #include <errno.h> #include <stdio.h> @@ -224,7 +224,7 @@ const char* stristr(const char* haystack, const char* needle) } #ifdef __WIN32 -char* _strtok_r(char *s1, const char *s2, char **lasts) { +char* strtok_r_(char *s1, const char *s2, char **lasts) { char *ret; if (s1 == NULL) diff --git a/src/common/strlib.h b/src/common/strlib.h index f39f27789..7f84d2893 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_STRLIB_H_ -#define _COMMON_STRLIB_H_ +#ifndef COMMON_STRLIB_H +#define COMMON_STRLIB_H #include <stdarg.h> #include <string.h> @@ -12,8 +12,8 @@ #ifdef WIN32 #define HAVE_STRTOK_R - #define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr)) - char *_strtok_r(char* s1, const char* s2, char** lasts); + #define strtok_r(s,delim,save_ptr) strtok_r_((s),(delim),(save_ptr)) + char *strtok_r_(char* s1, const char* s2, char** lasts); #endif /// Bitfield determining the behavior of sv_parse and sv_split. @@ -159,7 +159,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef _H_STRLIB_C_ +#ifndef H_STRLIB_C #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -183,6 +183,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* _H_STRLIB_C_ */ +#endif /* H_STRLIB_C */ -#endif /* _COMMON_STRLIB_H_ */ +#endif /* COMMON_STRLIB_H */ diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index 24f794cb4..600206a21 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -2,8 +2,8 @@ // See the LICENSE file // Base Author: Haru @ http://hercules.ws -#ifndef _COMMON_SYSINFO_H_ -#define _COMMON_SYSINFO_H_ +#ifndef COMMON_SYSINFO_H +#define COMMON_SYSINFO_H /** * Provides various bits of information about the system Hercules is running on @@ -48,4 +48,4 @@ struct sysinfo_interface *sysinfo; void sysinfo_defaults(void); -#endif /* _COMMON_SYSINFO_H_ */ +#endif /* COMMON_SYSINFO_H */ diff --git a/src/common/thread.c b/src/common/thread.c index d8e0dbf0a..d680d0347 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -106,9 +106,9 @@ static void rat_thread_terminated(rAthread *handle) { }//end: rat_thread_terminated() #ifdef WIN32 -DWORD WINAPI _raThreadMainRedirector(LPVOID p){ +DWORD WINAPI raThreadMainRedirector(LPVOID p){ #else -static void *_raThreadMainRedirector( void *p ){ +static void *raThreadMainRedirector( void *p ){ sigset_t set; // on Posix Thread platforms #endif void *ret; @@ -145,7 +145,7 @@ static void *_raThreadMainRedirector( void *p ){ #else return ret; #endif -}//end: _raThreadMainRedirector() +}//end: raThreadMainRedirector() @@ -193,12 +193,12 @@ rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack handle->param = param; #ifdef WIN32 - handle->hThread = CreateThread(NULL, szStack, _raThreadMainRedirector, (void*)handle, 0, NULL); + handle->hThread = CreateThread(NULL, szStack, raThreadMainRedirector, (void*)handle, 0, NULL); #else pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, szStack); - if(pthread_create(&handle->hThread, &attr, _raThreadMainRedirector, (void*)handle) != 0){ + if(pthread_create(&handle->hThread, &attr, raThreadMainRedirector, (void*)handle) != 0){ handle->proc = NULL; handle->param = NULL; return NULL; diff --git a/src/common/thread.h b/src/common/thread.h index 3b5ce7476..f781cfbd0 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,8 +1,8 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _COMMON_THREAD_H_ -#define _COMMON_THREAD_H_ +#ifndef COMMON_THREAD_H +#define COMMON_THREAD_H #include "../common/cbasetypes.h" @@ -115,4 +115,4 @@ void rathread_init(); void rathread_final(); -#endif /* _COMMON_THREAD_H_ */ +#endif /* COMMON_THREAD_H */ diff --git a/src/common/timer.c b/src/common/timer.c index ab0471d51..128fc4daf 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -107,7 +107,7 @@ char* search_timer_func_list(TimerFunc func) #if defined(ENABLE_RDTSC) static uint64 RDTSC_BEGINTICK = 0, RDTSC_CLOCK = 0; -static __inline uint64 _rdtsc(){ +static __inline uint64 rdtsc_() { register union{ uint64 qw; uint32 dw[2]; @@ -127,14 +127,14 @@ static void rdtsc_calibrate(){ RDTSC_CLOCK = 0; for(i = 0; i < 5; i++){ - t1 = _rdtsc(); + t1 = rdtsc_(); usleep(1000000); //1000 MS - t2 = _rdtsc(); + t2 = rdtsc_(); RDTSC_CLOCK += (t2 - t1) / 1000; } RDTSC_CLOCK /= 5; - RDTSC_BEGINTICK = _rdtsc(); + RDTSC_BEGINTICK = rdtsc_(); ShowMessage(" done. (Frequency: %u Mhz)\n", (uint32)(RDTSC_CLOCK/1000) ); } @@ -175,7 +175,7 @@ static int64 sys_tick(void) { #elif defined(ENABLE_RDTSC) // RDTSC: Returns the number of CPU cycles since reset. Unreliable if // the CPU frequency is variable. - return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK); + return (int64)((rdtsc_() - RDTSC_BEGINTICK) / RDTSC_CLOCK); #elif defined(HAVE_MONOTONIC_CLOCK) // Monotonic clock: Implementation-defined. // Clock that cannot be set and represents monotonic time since some diff --git a/src/common/timer.h b/src/common/timer.h index a07f81612..d0927adde 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_TIMER_H_ -#define _COMMON_TIMER_H_ +#ifndef COMMON_TIMER_H +#define COMMON_TIMER_H #include "../common/cbasetypes.h" @@ -67,4 +67,4 @@ struct timer_interface *timer; void timer_defaults(void); -#endif /* _COMMON_TIMER_H_ */ +#endif /* COMMON_TIMER_H */ diff --git a/src/common/utils.h b/src/common/utils.h index 823651163..421698d95 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _COMMON_UTILS_H_ -#define _COMMON_UTILS_H_ +#ifndef COMMON_UTILS_H +#define COMMON_UTILS_H #include <stdio.h> // FILE* #include <time.h> @@ -65,4 +65,4 @@ struct HCache_interface *HCache; void HCache_defaults(void); -#endif /* _COMMON_UTILS_H_ */ +#endif /* COMMON_UTILS_H */ diff --git a/src/config/classes/general.h b/src/config/classes/general.h index 147fddb55..b3da4a475 100644 --- a/src/config/classes/general.h +++ b/src/config/classes/general.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONFIG_GENERAL_H_ -#define _CONFIG_GENERAL_H_ +#ifndef CONFIG_GENERAL_H +#define CONFIG_GENERAL_H /** * Hercules configuration file (http://hercules.ws) @@ -31,4 +31,4 @@ * No settings past this point **/ -#endif // _CONFIG_GENERAL_H_ +#endif // CONFIG_GENERAL_H diff --git a/src/config/const.h b/src/config/const.h index 23467bfa6..2b5b180c4 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONFIG_CONSTANTS_H_ -#define _CONFIG_CONSTANTS_H_ +#ifndef CONFIG_CONSTANTS_H +#define CONFIG_CONSTANTS_H /** * Hercules configuration file (http://hercules.ws) @@ -103,4 +103,4 @@ /** * End of File **/ -#endif /* _CONFIG_CONSTANTS_H_ */ +#endif /* CONFIG_CONSTANTS_H */ diff --git a/src/config/core.h b/src/config/core.h index 24e9de710..ac59563b5 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONFIG_CORE_H_ -#define _CONFIG_CORE_H_ +#ifndef CONFIG_CORE_H +#define CONFIG_CORE_H /// Max number of items on @autolootid list #define AUTOLOOTITEM_SIZE 10 @@ -79,4 +79,4 @@ **/ #include "./const.h" -#endif // _CONFIG_CORE_H_ +#endif // CONFIG_CORE_H diff --git a/src/config/renewal.h b/src/config/renewal.h index 1c48b9f8a..939ad9b73 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONFIG_RENEWAL_H_ -#define _CONFIG_RENEWAL_H_ +#ifndef CONFIG_RENEWAL_H +#define CONFIG_RENEWAL_H /** * Hercules configuration file (http://hercules.ws) @@ -86,4 +86,4 @@ #endif // DISABLE_RENEWAL #undef DISABLE_RENEWAL -#endif // _CONFIG_RENEWAL_H_ +#endif // CONFIG_RENEWAL_H diff --git a/src/config/secure.h b/src/config/secure.h index 1a89e36cf..418d24751 100644 --- a/src/config/secure.h +++ b/src/config/secure.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONFIG_SECURE_H_ -#define _CONFIG_SECURE_H_ +#ifndef CONFIG_SECURE_H +#define CONFIG_SECURE_H /** * Hercules configuration file (http://hercules.ws) @@ -58,4 +58,4 @@ **/ #define ANTI_MAYAP_CHEAT -#endif // _CONFIG_SECURE_H_ +#endif // CONFIG_SECURE_H diff --git a/src/login/account.h b/src/login/account.h index a14595519..e15143ce9 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _LOGIN_ACCOUNT_H_ -#define _LOGIN_ACCOUNT_H_ +#ifndef LOGIN_ACCOUNT_H +#define LOGIN_ACCOUNT_H #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM @@ -140,4 +140,4 @@ Sql *account_db_sql_up(AccountDB* self); void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id); void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id); -#endif /* _LOGIN_ACCOUNT_H_ */ +#endif /* LOGIN_ACCOUNT_H */ diff --git a/src/login/ipban.h b/src/login/ipban.h index e6851d8dd..b4f3ac51b 100644 --- a/src/login/ipban.h +++ b/src/login/ipban.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _LOGIN_IPBAN_H_ -#define _LOGIN_IPBAN_H_ +#ifndef LOGIN_IPBAN_H +#define LOGIN_IPBAN_H #include "../common/cbasetypes.h" @@ -22,4 +22,4 @@ void ipban_log(uint32 ip); bool ipban_config_read(const char* key, const char* value); -#endif /* _LOGIN_IPBAN_H_ */ +#endif /* LOGIN_IPBAN_H */ diff --git a/src/login/login.h b/src/login/login.h index 447301ea4..9b9d1e82c 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _LOGIN_LOGIN_H_ -#define _LOGIN_LOGIN_H_ +#ifndef LOGIN_LOGIN_H +#define LOGIN_LOGIN_H #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" // NAME_LENGTH,SEX_* @@ -100,4 +100,4 @@ extern struct mmo_char_server server[MAX_SERVERS]; extern struct Login_Config login_config; -#endif /* _LOGIN_LOGIN_H_ */ +#endif /* LOGIN_LOGIN_H */ diff --git a/src/login/loginlog.h b/src/login/loginlog.h index a86ad431c..52e18f3d1 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _LOGIN_LOGINLOG_H_ -#define _LOGIN_LOGINLOG_H_ +#ifndef LOGIN_LOGINLOG_H +#define LOGIN_LOGINLOG_H #include "../common/cbasetypes.h" @@ -12,4 +12,4 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); -#endif /* _LOGIN_LOGINLOG_H_ */ +#endif /* LOGIN_LOGINLOG_H */ diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index f291575fb..99c4224ff 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _MAP_HPMMAP_H_ -#define _MAP_HPMMAP_H_ +#ifndef MAP_HPMMAP_H +#define MAP_HPMMAP_H #include "../common/cbasetypes.h" #include "../map/atcommand.h" @@ -26,4 +26,4 @@ bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name void HPM_map_do_init(void); -#endif /* _MAP_HPMMAP_H_ */ +#endif /* MAP_HPMMAP_H */ diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d36e98c41..e22e2101c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8434,7 +8434,7 @@ ACMD(set) { if( is_str ) script->set_var(sd, reg, (void*) val); else - script->set_var(sd, reg, (void*)__64BPTRSIZE((atoi(val)))); + script->set_var(sd, reg, (void*)h64BPTRSIZE((atoi(val)))); } diff --git a/src/map/atcommand.h b/src/map/atcommand.h index c8a1863af..356487bd1 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ATCOMMAND_H_ -#define _MAP_ATCOMMAND_H_ +#ifndef MAP_ATCOMMAND_H +#define MAP_ATCOMMAND_H #include "pc_groups.h" #include "../common/conf.h" @@ -121,4 +121,4 @@ void atcommand_defaults(void); /* stay here */ #define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) -#endif /* _MAP_ATCOMMAND_H_ */ +#endif /* MAP_ATCOMMAND_H */ diff --git a/src/map/battle.c b/src/map/battle.c index e40d44549..7610d97b2 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6357,7 +6357,7 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL); } -static const struct _battle_data { +static const struct battle_data { const char* str; int* val; int defval; diff --git a/src/map/battle.h b/src/map/battle.h index fc916597d..aab94420a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BATTLE_H_ -#define _MAP_BATTLE_H_ +#ifndef MAP_BATTLE_H +#define MAP_BATTLE_H #include "map.h" //ELE_MAX #include "../common/cbasetypes.h" @@ -603,4 +603,4 @@ struct battle_interface { struct battle_interface *battle; void battle_defaults(void); -#endif /* _MAP_BATTLE_H_ */ +#endif /* MAP_BATTLE_H */ diff --git a/src/map/battleground.h b/src/map/battleground.h index ec0a86f14..c1d3be054 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BATTLEGROUND_H_ -#define _MAP_BATTLEGROUND_H_ +#ifndef MAP_BATTLEGROUND_H +#define MAP_BATTLEGROUND_H #include "clif.h" #include "guild.h" @@ -122,4 +122,4 @@ struct battleground_interface *bg; void battleground_defaults(void); -#endif /* _MAP_BATTLEGROUND_H_ */ +#endif /* MAP_BATTLEGROUND_H */ diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 914631872..c981cc444 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BUYINGSTORE_H_ -#define _MAP_BUYINGSTORE_H_ +#ifndef MAP_BUYINGSTORE_H +#define MAP_BUYINGSTORE_H #include "../common/cbasetypes.h" #include "../common/mmo.h" // MAX_SLOTS @@ -75,4 +75,4 @@ struct buyingstore_interface *buyingstore; void buyingstore_defaults (void); -#endif // _MAP_BUYINGSTORE_H_ +#endif // MAP_BUYINGSTORE_H diff --git a/src/map/chat.h b/src/map/chat.h index 6e4fae1c0..e055c04ed 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CHAT_H_ -#define _MAP_CHAT_H_ +#ifndef MAP_CHAT_H +#define MAP_CHAT_H #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE #include "../common/cbasetypes.h" @@ -60,4 +60,4 @@ struct chat_interface *chat; void chat_defaults(void); -#endif /* _MAP_CHAT_H_ */ +#endif /* MAP_CHAT_H */ diff --git a/src/map/chrif.h b/src/map/chrif.h index 51ab0e9b9..11baaf5ff 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CHRIF_H_ -#define _MAP_CHRIF_H_ +#ifndef MAP_CHRIF_H +#define MAP_CHRIF_H #include <time.h> @@ -154,4 +154,4 @@ void chrif_defaults(void); // There's no need for another function when a simple macro can do exactly the same effect #define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id) -#endif /* _MAP_CHRIF_H_ */ +#endif /* MAP_CHRIF_H */ diff --git a/src/map/clif.c b/src/map/clif.c index 750689816..9e105e4a9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5651,7 +5651,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) { if( map->cpsd_active && fd == 0 ) { ShowInfo("HCP: "); va_start(ap,mes); - _vShowMessage(MSG_NONE,mes,ap); + vShowMessage_(MSG_NONE,mes,ap); va_end(ap); ShowMessage("\n"); } else if ( fd > 0 ) { diff --git a/src/map/clif.h b/src/map/clif.h index e1af44881..48316427f 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CLIF_H_ -#define _MAP_CLIF_H_ +#ifndef MAP_CLIF_H +#define MAP_CLIF_H #include <stdarg.h> @@ -1290,4 +1290,4 @@ struct clif_interface *clif; void clif_defaults(void); -#endif /* _MAP_CLIF_H_ */ +#endif /* MAP_CLIF_H */ diff --git a/src/map/date.h b/src/map/date.h index b3ed59b2f..c3f353f64 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _MAP_DATE_H_ -#define _MAP_DATE_H_ +#ifndef MAP_DATE_H +#define MAP_DATE_H #include "../common/cbasetypes.h" @@ -17,4 +17,4 @@ bool is_day_of_sun(void); bool is_day_of_moon(void); bool is_day_of_star(void); -#endif /* _MAP_DATE_H_ */ +#endif /* MAP_DATE_H */ diff --git a/src/map/duel.h b/src/map/duel.h index 91dfa8f83..de2bd1bf6 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_DUEL_H_ -#define _MAP_DUEL_H_ +#ifndef MAP_DUEL_H +#define MAP_DUEL_H #include "../common/cbasetypes.h" @@ -46,4 +46,4 @@ struct duel_interface *duel; void duel_defaults(void); -#endif /* _MAP_DUEL_H_ */ +#endif /* MAP_DUEL_H */ diff --git a/src/map/elemental.h b/src/map/elemental.h index beddd3ea1..0c8fff8b3 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ELEMENTAL_H_ -#define _MAP_ELEMENTAL_H_ +#ifndef MAP_ELEMENTAL_H +#define MAP_ELEMENTAL_H #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -121,4 +121,4 @@ struct elemental_interface *elemental; void elemental_defaults(void); -#endif /* _MAP_ELEMENTAL_H_ */ +#endif /* MAP_ELEMENTAL_H */ diff --git a/src/map/guild.c b/src/map/guild.c index 642c8993c..af29dc64e 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2015,8 +2015,8 @@ int guild_castledatasave(int castle_id, int index, int value) void guild_castle_reconnect_sub(void *key, void *data, va_list ap) { - int castle_id = GetWord((int)__64BPTRSIZE(key), 0); - int index = GetWord((int)__64BPTRSIZE(key), 1); + int castle_id = GetWord((int)h64BPTRSIZE(key), 0); + int index = GetWord((int)h64BPTRSIZE(key), 1); intif->guild_castle_datasave(castle_id, index, *(int *)data); aFree(data); } @@ -2037,7 +2037,7 @@ void guild_castle_reconnect(int castle_id, int index, int value) int *data; CREATE(data, int, 1); *data = value; - linkdb_replace(&gc_save_pending, (void*)__64BPTRSIZE((MakeDWord(castle_id, index))), data); + linkdb_replace(&gc_save_pending, (void*)h64BPTRSIZE((MakeDWord(castle_id, index))), data); } } diff --git a/src/map/guild.h b/src/map/guild.h index f9d97241d..126325eef 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_GUILD_H_ -#define _MAP_GUILD_H_ +#ifndef MAP_GUILD_H +#define MAP_GUILD_H #include "map.h" // EVENT_NAME_LENGTH, TBL_PC #include "../common/cbasetypes.h" @@ -167,4 +167,4 @@ struct guild_interface *guild; void guild_defaults(void); -#endif /* _MAP_GUILD_H_ */ +#endif /* MAP_GUILD_H */ diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9eef6af5b..25ccabf48 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_HOMUNCULUS_H_ -#define _MAP_HOMUNCULUS_H_ +#ifndef MAP_HOMUNCULUS_H +#define MAP_HOMUNCULUS_H #include "pc.h" #include "status.h" // struct status_data, struct status_change @@ -148,4 +148,4 @@ struct homunculus_interface *homun; void homunculus_defaults(void); -#endif /* _MAP_HOMUNCULUS_H_ */ +#endif /* MAP_HOMUNCULUS_H */ diff --git a/src/map/instance.h b/src/map/instance.h index ae649eda7..2ee77d3e3 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_INSTANCE_H_ -#define _MAP_INSTANCE_H_ +#ifndef MAP_INSTANCE_H +#define MAP_INSTANCE_H #include "script.h" // struct reg_db #include "../common/cbasetypes.h" @@ -88,4 +88,4 @@ struct instance_interface *instance; void instance_defaults(void); -#endif /* _MAP_INSTANCE_H_ */ +#endif /* MAP_INSTANCE_H */ diff --git a/src/map/intif.c b/src/map/intif.c index 4dd0fa448..432154f04 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1067,7 +1067,7 @@ void intif_parse_Registers(int fd) ival = RFIFOL(fd, cursor); cursor += 4; - script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)__64BPTRSIZE(ival), NULL); + script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)h64BPTRSIZE(ival), NULL); } } diff --git a/src/map/intif.h b/src/map/intif.h index 42a38ad41..fe47d6537 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_INTIF_H_ -#define _MAP_INTIF_H_ +#ifndef MAP_INTIF_H +#define MAP_INTIF_H #include "../common/cbasetypes.h" @@ -186,4 +186,4 @@ struct intif_interface *intif; void intif_defaults(void); -#endif /* _MAP_INTIF_H_ */ +#endif /* MAP_INTIF_H */ diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 60f03fca5..0c26c3cd8 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -3,8 +3,8 @@ // Base Author: shennetsind @ http://hercules.ws -#ifndef _MAP_IRC_BOT_H_ -#define _MAP_IRC_BOT_H_ +#ifndef MAP_IRC_BOT_H +#define MAP_IRC_BOT_H #include "../common/cbasetypes.h" @@ -63,4 +63,4 @@ struct irc_bot_interface *ircbot; void ircbot_defaults(void); -#endif /* _MAP_IRC_BOT_H_ */ +#endif /* MAP_IRC_BOT_H */ diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 246ca1f54..2ad596ce1 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ITEMDB_H_ -#define _MAP_ITEMDB_H_ +#ifndef MAP_ITEMDB_H +#define MAP_ITEMDB_H #include "map.h" #include "../common/cbasetypes.h" @@ -609,4 +609,4 @@ struct itemdb_interface *itemdb; void itemdb_defaults(void); -#endif /* _MAP_ITEMDB_H_ */ +#endif /* MAP_ITEMDB_H */ diff --git a/src/map/log.h b/src/map/log.h index ecfedeac2..6ab142f87 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_LOG_H_ -#define _MAP_LOG_H_ +#ifndef MAP_LOG_H +#define MAP_LOG_H #include "../common/cbasetypes.h" #include "../common/sql.h" @@ -133,4 +133,4 @@ struct log_interface *logs; void log_defaults(void); -#endif /* _MAP_LOG_H_ */ +#endif /* MAP_LOG_H */ diff --git a/src/map/mail.h b/src/map/mail.h index 30b032ef4..64b0f9779 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAIL_H_ -#define _MAP_MAIL_H_ +#ifndef MAP_MAIL_H +#define MAP_MAIL_H #include "../common/cbasetypes.h" @@ -27,4 +27,4 @@ struct mail_interface *mail; void mail_defaults(void); -#endif /* _MAP_MAIL_H_ */ +#endif /* MAP_MAIL_H */ diff --git a/src/map/map.h b/src/map/map.h index 38167597a..35fe0d7e1 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAP_H_ -#define _MAP_MAP_H_ +#ifndef MAP_MAP_H +#define MAP_MAP_H #include <stdarg.h> @@ -342,7 +342,7 @@ struct flooritem_data { struct item item_data; }; -enum _sp { +enum status_point_types { SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7 SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15 SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23 @@ -415,7 +415,7 @@ enum _sp { SP_LAST_KNOWN, }; -enum _look { +enum look { LOOK_BASE, LOOK_HAIR, LOOK_WEAPON, @@ -1071,4 +1071,4 @@ struct map_interface *map; void map_defaults(void); -#endif /* _MAP_MAP_H_ */ +#endif /* MAP_MAP_H */ diff --git a/src/map/mapreg.h b/src/map/mapreg.h index 2aa2943a2..59d226cda 100644 --- a/src/map/mapreg.h +++ b/src/map/mapreg.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAPREG_H_ -#define _MAP_MAPREG_H_ +#ifndef MAP_MAPREG_H +#define MAP_MAPREG_H #include "script.h" // struct reg_db #include "../common/cbasetypes.h" @@ -50,4 +50,4 @@ struct mapreg_interface *mapreg; void mapreg_defaults(void); -#endif /* _MAP_MAPREG_H_ */ +#endif /* MAP_MAPREG_H */ diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 22399e289..270245e96 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MERCENARY_H_ -#define _MAP_MERCENARY_H_ +#ifndef MAP_MERCENARY_H +#define MAP_MERCENARY_H #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -99,4 +99,4 @@ struct mercenary_interface *mercenary; void mercenary_defaults(void); -#endif /* _MAP_MERCENARY_H_ */ +#endif /* MAP_MERCENARY_H */ diff --git a/src/map/mob.h b/src/map/mob.h index 7e222fa74..c8d43dbb2 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MOB_H_ -#define _MAP_MOB_H_ +#ifndef MAP_MOB_H +#define MAP_MOB_H #include "map.h" // struct status_data, struct view_data, struct mob_skill #include "status.h" // struct status_data, struct status_change @@ -363,4 +363,4 @@ struct mob_interface *mob; void mob_defaults(void); -#endif /* _MAP_MOB_H_ */ +#endif /* MAP_MOB_H */ diff --git a/src/map/npc.c b/src/map/npc.c index bfac2b9d5..417aa6c61 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3368,7 +3368,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c } } - script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPTRSIZE(j), NULL); + script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(j), NULL); aFree(temp); script->run_main(st); diff --git a/src/map/npc.h b/src/map/npc.h index 06a9312b5..4c904e1ac 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_NPC_H_ -#define _MAP_NPC_H_ +#ifndef MAP_NPC_H +#define MAP_NPC_H #include "map.h" // struct block_list #include "status.h" // struct status_change @@ -347,4 +347,4 @@ struct pcre_interface *libpcre; void npc_chat_defaults(void); #endif -#endif /* _MAP_NPC_H_ */ +#endif /* MAP_NPC_H */ diff --git a/src/map/packets.h b/src/map/packets.h index e995643d4..810f341d4 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -3,8 +3,8 @@ //Included directly by clif.h in packet_loaddb() -#ifndef _MAP_PACKETS_H_ -#define _MAP_PACKETS_H_ +#ifndef MAP_PACKETS_H +#define MAP_PACKETS_H #ifndef packet #define packet(a,b,...) @@ -3002,4 +3002,4 @@ packet(0x020d,-1); packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); #endif -#endif /* _MAP_PACKETS_H_ */ +#endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 403ab6fa3..55ab0c66a 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3,8 +3,8 @@ /* Hercules Renewal: Phase Two http://hercules.ws/board/topic/383-hercules-renewal-phase-two/ */ -#ifndef _MAP_PACKETS_STRUCT_H_ -#define _MAP_PACKETS_STRUCT_H_ +#ifndef MAP_PACKETS_STRUCT_H +#define MAP_PACKETS_STRUCT_H #include "../common/mmo.h" @@ -962,4 +962,4 @@ struct packet_wis_end { #pragma pack(pop) #endif // not NetBSD < 6 / Solaris -#endif /* _MAP_PACKETS_STRUCT_H_ */ +#endif /* MAP_PACKETS_STRUCT_H */ diff --git a/src/map/party.h b/src/map/party.h index 1c58301d1..d62db23a7 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PARTY_H_ -#define _MAP_PARTY_H_ +#ifndef MAP_PARTY_H +#define MAP_PARTY_H #include <stdarg.h> @@ -143,4 +143,4 @@ struct party_interface *party; void party_defaults(void); -#endif /* _MAP_PARTY_H_ */ +#endif /* MAP_PARTY_H */ diff --git a/src/map/path.h b/src/map/path.h index b48ff05fb..8d02e6558 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PATH_H_ -#define _MAP_PATH_H_ +#ifndef MAP_PATH_H +#define MAP_PATH_H #include "map.h" // enum cell_chk #include "../common/cbasetypes.h" @@ -47,4 +47,4 @@ struct path_interface *path; void path_defaults(void); -#endif /* _MAP_PATH_H_ */ +#endif /* MAP_PATH_H */ diff --git a/src/map/pc.c b/src/map/pc.c index b8b6cda46..104a3cde0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6230,7 +6230,7 @@ int pc_maxparameterincrease(struct map_session_data* sd, int type) { * Subtracts status points according to the cost of the increased stat points. * * @param sd The target character. - * @param type The stat to change (see enum _sp) + * @param type The stat to change (see enum status_point_types) * @param increase The stat increase (strictly positive) amount. * @retval true if the stat was increased by any amount. * @retval false if there were no changes. @@ -6289,7 +6289,7 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) { * Does not subtract status points for the cost of the modified stat points. * * @param sd The target character. - * @param type The stat to change (see enum _sp) + * @param type The stat to change (see enum status_point_types) * @param val The stat increase (or decrease) amount. * @return the stat increase amount. * @retval 0 if no changes were made. diff --git a/src/map/pc.h b/src/map/pc.h index 1789a8a7b..f33127036 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PC_H_ -#define _MAP_PC_H_ +#ifndef MAP_PC_H +#define MAP_PC_H #include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT @@ -1026,4 +1026,4 @@ struct pc_interface *pc; void pc_defaults(void); -#endif /* _MAP_PC_H_ */ +#endif /* MAP_PC_H */ diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 7c8cdd82a..f52e2ba22 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PC_GROUPS_H_ -#define _MAP_PC_GROUPS_H_ +#ifndef MAP_PC_GROUPS_H +#define MAP_PC_GROUPS_H #include "../common/cbasetypes.h" #include "../common/conf.h" @@ -96,4 +96,4 @@ struct pc_groups_interface *pcg; void pc_groups_defaults(void); -#endif /* _MAP_PC_GROUPS_H_ */ +#endif /* MAP_PC_GROUPS_H */ diff --git a/src/map/pet.h b/src/map/pet.h index 8dde0fac2..5c890ef85 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PET_H_ -#define _MAP_PET_H_ +#ifndef MAP_PET_H +#define MAP_PET_H #include "map.h" // struct block_list #include "status.h" // enum sc_type @@ -158,4 +158,4 @@ struct pet_interface *pet; void pet_defaults(void); -#endif /* _MAP_PET_H_ */ +#endif /* MAP_PET_H */ diff --git a/src/map/quest.h b/src/map/quest.h index 87894d639..9d617e369 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_QUEST_H_ -#define _MAP_QUEST_H_ +#ifndef MAP_QUEST_H +#define MAP_QUEST_H #include "map.h" // TBL_PC #include "../common/cbasetypes.h" @@ -52,4 +52,4 @@ struct quest_interface *quest; void quest_defaults(void); -#endif /* _MAP_QUEST_H_ */ +#endif /* MAP_QUEST_H */ diff --git a/src/map/script.c b/src/map/script.c index c7e1dc1d2..8fb3975f8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1502,9 +1502,9 @@ const char* parse_syntax(const char* p) script->set_label(l,script->pos,p); } // check duplication of case label [Rayce] - if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL) + if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v)) != NULL) disp_error_message("parse_syntax: dup 'case'",p); - linkdb_insert(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1); + linkdb_insert(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v), (void*)1); sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index); script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL; @@ -2627,7 +2627,7 @@ void* get_val2(struct script_state* st, int64 uid, struct reg_db *ref) { script->push_val(st->stack, C_NAME, uid, ref); data = script_getdatatop(st, -1); script->get_val(st, data); - return (data->type == C_INT ? (void*)__64BPTRSIZE((int32)data->u.num) : (void*)__64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val + return (data->type == C_INT ? (void*)h64BPTRSIZE((int32)data->u.num) : (void*)h64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val } /** * Because, currently, array members with key 0 are indifferenciable from normal variables, we should ensure its actually in @@ -2648,7 +2648,7 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data * insert = true; script_removetop(st, -1, 0); } else { - int32 num = (int32)__64BPTRSIZE(script->get_val2(st, uid, ref)); + int32 num = (int32)h64BPTRSIZE(script->get_val2(st, uid, ref)); if( num ) insert = true; script_removetop(st, -1, 0); @@ -2917,7 +2917,7 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co } else {// integer variable // FIXME: This isn't safe, in 32bits systems we're converting a 64bit pointer // to a 32bit int, this will lead to overflows! [Panikon] - int val = (int)__64BPTRSIZE(value); + int val = (int)h64BPTRSIZE(value); if(script->str_data[script_getvarid(num)].type == C_PARAM) { if( pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0 ) { @@ -5665,7 +5665,7 @@ BUILDIN(input) else { int amount = sd->npc_amount; - script->set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2)); + script->set_reg(st, sd, uid, name, (void*)h64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2)); script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0)); } st->state = RUN; @@ -5753,7 +5753,7 @@ BUILDIN(setr) { if( is_string_variable(name) ) script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2)); else - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(script_getnum(st,3)),script_getref(st,2)); return true; } @@ -5808,7 +5808,7 @@ BUILDIN(setarray) else {// int array for( i = 3; start < end; ++start, ++i ) - script->set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data)); + script->set_reg(st, sd, reference_uid(id, start), name, (void*)h64BPTRSIZE(script_getnum(st,i)), reference_getref(data)); } return true; } @@ -5850,7 +5850,7 @@ BUILDIN(cleararray) if( is_string_variable(name) ) v = (void*)script_getstr(st, 3); else - v = (void*)__64BPTRSIZE(script_getnum(st, 3)); + v = (void*)h64BPTRSIZE(script_getnum(st, 3)); end = start + script_getnum(st, 4); if( end > SCRIPT_MAX_ARRAYSIZE ) @@ -6425,9 +6425,9 @@ BUILDIN(checkweight2) slots = pc->inventoryblank(sd); for(i=0; i<nb_it; i++) { - nameid = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it))); + nameid = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it))); script_removetop(st, -1, 0); - amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb))); + amount = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb))); script_removetop(st, -1, 0); if(fail) continue; //cpntonie to depop rest @@ -12412,18 +12412,18 @@ BUILDIN(undisguise) } /*========================================== - * Transform a bl to another _class, + * Transform a bl to another class, * @type unused *------------------------------------------*/ BUILDIN(classchange) { - int _class,type; + int class_,type; struct block_list *bl=map->id2bl(st->oid); if(bl==NULL) return true; - _class=script_getnum(st,2); + class_=script_getnum(st,2); type=script_getnum(st,3); - clif->class_change(bl,_class,type); + clif->class_change(bl,class_,type); return true; } @@ -13439,7 +13439,7 @@ BUILDIN(getmapxy) sd=script->rid2sd(st); else sd=NULL; - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(x),script_getref(st,3)); //Set MapY num=st->stack->stack_data[st->start+4].u.num; @@ -13450,7 +13450,7 @@ BUILDIN(getmapxy) sd=script->rid2sd(st); else sd=NULL; - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(y),script_getref(st,4)); //Return Success value script_pushint(st,0); @@ -13476,7 +13476,7 @@ BUILDIN(logmes) BUILDIN(summon) { - int _class, timeout=0; + int class_, timeout=0; const char *str,*event=""; TBL_PC *sd; struct mob_data *md; @@ -13486,7 +13486,7 @@ BUILDIN(summon) if (!sd) return true; str = script_getstr(st,2); - _class = script_getnum(st,3); + class_ = script_getnum(st,3); if( script_hasdata(st,4) ) timeout=script_getnum(st,4); if( script_hasdata(st,5) ) { @@ -13496,7 +13496,7 @@ BUILDIN(summon) clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick); - md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE); + md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_MEDIUM, AI_NONE); if (md) { md->master_id=sd->bl.id; md->special_state.ai = AI_ATTACK; @@ -14400,7 +14400,7 @@ BUILDIN(sscanf) { if(sscanf(str, buf, &ref_int)==0) { break; } - script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data)); + script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)h64BPTRSIZE(ref_int), reference_getref(data)); } arg++; @@ -14767,7 +14767,7 @@ BUILDIN(setd) if( is_string_variable(varname) ) { script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL); } else { - script->setd_sub(st, sd, varname, elem, (void *)__64BPTRSIZE(script_getnum(st, 3)), NULL); + script->setd_sub(st, sd, varname, elem, (void *)h64BPTRSIZE(script_getnum(st, 3)), NULL); } return true; @@ -14841,7 +14841,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle) if( is_string_variable(name) ) script->setd_sub(st, sd, name, i, (void *)(str?str:""), reference_getref(data)); else - script->setd_sub(st, sd, name, i, (void *)__64BPTRSIZE((str?atoi(str):0)), reference_getref(data)); + script->setd_sub(st, sd, name, i, (void *)h64BPTRSIZE((str?atoi(str):0)), reference_getref(data)); } } if( i == max_rows && max_rows < SQL->NumRows(handle) ) { @@ -15395,7 +15395,7 @@ BUILDIN(searchitem) for( i = 0; i < count; ++start, ++i ) {// Set array - void* v = (void*)__64BPTRSIZE((int)items[i]->nameid); + void* v = (void*)h64BPTRSIZE((int)items[i]->nameid); script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data)); } diff --git a/src/map/script.h b/src/map/script.h index bb6cd6e11..48abf1487 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SCRIPT_H_ -#define _MAP_SCRIPT_H_ +#ifndef MAP_SCRIPT_H +#define MAP_SCRIPT_H #include <errno.h> #include <setjmp.h> @@ -715,4 +715,4 @@ struct script_interface *script; void script_defaults(void); -#endif /* _MAP_SCRIPT_H_ */ +#endif /* MAP_SCRIPT_H */ diff --git a/src/map/searchstore.h b/src/map/searchstore.h index c9b93ba54..d8abde615 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SEARCHSTORE_H_ -#define _MAP_SEARCHSTORE_H_ +#ifndef MAP_SEARCHSTORE_H +#define MAP_SEARCHSTORE_H #include <time.h> @@ -99,4 +99,4 @@ struct searchstore_interface *searchstore; void searchstore_defaults (void); -#endif /* _MAP_SEARCHSTORE_H_ */ +#endif /* MAP_SEARCHSTORE_H */ diff --git a/src/map/skill.h b/src/map/skill.h index 6666fbbf2..70e5f4911 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SKILL_H_ -#define _MAP_SKILL_H_ +#ifndef MAP_SKILL_H +#define MAP_SKILL_H #include "../config/core.h" // RENEWAL_CAST @@ -2021,4 +2021,4 @@ struct skill_interface *skill; void skill_defaults(void); -#endif /* _MAP_SKILL_H_ */ +#endif /* MAP_SKILL_H */ diff --git a/src/map/status.h b/src/map/status.h index 13d0a7841..bed0d9fbf 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_STATUS_H_ -#define _MAP_STATUS_H_ +#ifndef MAP_STATUS_H +#define MAP_STATUS_H #include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD @@ -2047,4 +2047,4 @@ struct status_interface *status; void status_defaults(void); -#endif /* _MAP_STATUS_H_ */ +#endif /* MAP_STATUS_H */ diff --git a/src/map/storage.c b/src/map/storage.c index f2f0d8986..217f14a3a 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -31,10 +31,10 @@ struct guild_storage_interface gstorage_s; /*========================================== * Sort items in the warehouse *------------------------------------------*/ -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; + struct item *i1 = (struct item *)i1_; + struct item *i2 = (struct item *)i2_; if (i1->nameid == i2->nameid) return 0; diff --git a/src/map/storage.h b/src/map/storage.h index 5edb68cfc..186f21263 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_STORAGE_H_ -#define _MAP_STORAGE_H_ +#ifndef MAP_STORAGE_H +#define MAP_STORAGE_H #include "../common/cbasetypes.h" #include "../common/db.h" @@ -25,7 +25,7 @@ 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); + 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); }; @@ -60,4 +60,4 @@ struct guild_storage_interface *gstorage; void storage_defaults(void); void gstorage_defaults(void); -#endif /* _MAP_STORAGE_H_ */ +#endif /* MAP_STORAGE_H */ diff --git a/src/map/trade.h b/src/map/trade.h index 143f26d74..f91ccd4a2 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_TRADE_H_ -#define _MAP_TRADE_H_ +#ifndef MAP_TRADE_H +#define MAP_TRADE_H //Max distance from traders to enable a trade to take place. //TODO: battle_config candidate? @@ -27,4 +27,4 @@ struct trade_interface *trade; void trade_defaults(void); -#endif /* _MAP_TRADE_H_ */ +#endif /* MAP_TRADE_H */ diff --git a/src/map/unit.h b/src/map/unit.h index f29a6903a..9b95bae41 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_UNIT_H_ -#define _MAP_UNIT_H_ +#ifndef MAP_UNIT_H +#define MAP_UNIT_H #include "clif.h" // clr_type #include "path.h" // struct walkpath_data @@ -124,4 +124,4 @@ struct unit_interface *unit; void unit_defaults(void); -#endif /* _MAP_UNIT_H_ */ +#endif /* MAP_UNIT_H */ diff --git a/src/map/vending.h b/src/map/vending.h index b65e888e3..63cb632a9 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_VENDING_H_ -#define _MAP_VENDING_H_ +#ifndef MAP_VENDING_H +#define MAP_VENDING_H #include "../common/cbasetypes.h" #include "../common/db.h" @@ -36,4 +36,4 @@ struct vending_interface *vending; void vending_defaults(void); -#endif /* _MAP_VENDING_H_ */ +#endif /* MAP_VENDING_H */ diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl index a79811c47..7ec1ba7e4 100644 --- a/tools/HPMHookGen/HPMDataCheckGen.pl +++ b/tools/HPMHookGen/HPMDataCheckGen.pl @@ -24,7 +24,7 @@ foreach my $file (@files) { my @filepath = split(/[\/\\]/, $data->{compounddef}->{location}->{file}); my $foldername = uc($filepath[-2]); my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//; - my $name = "_${foldername}_${filename}_H_"; + my $name = "${foldername}_${filename}_H"; push @{ $out{$name} }, $data->{compounddef}->{compoundname}; } @@ -37,8 +37,8 @@ print FH <<"EOF"; // // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -#ifndef _HPM_DATA_CHECK_H_ -#define _HPM_DATA_CHECK_H_ +#ifndef HPM_DATA_CHECK_H +#define HPM_DATA_CHECK_H HPExport const struct s_HPMDataCheck HPMDataCheck[] = { @@ -63,6 +63,6 @@ print FH <<"EOF"; }; HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck); -#endif /* _HPM_DATA_CHECK_H_ */ +#endif /* HPM_DATA_CHECK_H */ EOF close(FH); -- cgit v1.2.3-70-g09d2