summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/battle.conf10
-rw-r--r--conf/battle/drops.conf2
-rw-r--r--conf/battle/exp.conf6
-rw-r--r--conf/battle/gm.conf4
-rw-r--r--conf/battle/items.conf6
-rw-r--r--conf/battle/misc.conf20
-rw-r--r--conf/battle/party.conf3
-rw-r--r--conf/battle/pet.conf6
-rw-r--r--conf/battle/player.conf4
-rw-r--r--conf/battle/skill.conf29
-rw-r--r--conf/channels.conf14
-rw-r--r--conf/char-server.conf6
-rw-r--r--conf/inter-server.conf4
-rw-r--r--conf/login-server.conf8
-rw-r--r--conf/map-server.conf6
-rw-r--r--conf/maps.conf6
-rw-r--r--conf/messages.conf2
-rw-r--r--conf/plugins.conf18
-rw-r--r--db/cashshop_db.conf24
-rw-r--r--db/const.txt2
-rw-r--r--db/pet_db2.txt1
-rw-r--r--db/pre-re/exp.txt2
-rw-r--r--db/pre-re/exp_homun.txt2
-rw-r--r--db/pre-re/item_group.conf12
-rw-r--r--db/pre-re/skill_require_db.txt6
-rw-r--r--db/pre-re/skill_tree.conf142
-rw-r--r--db/pre-re/skill_unit_db.txt10
-rw-r--r--db/produce_db.txt6
-rw-r--r--db/re/exp_homun.txt2
-rw-r--r--db/re/item_db.conf60
-rw-r--r--db/re/item_group.conf12
-rw-r--r--db/re/item_packages.conf10
-rw-r--r--db/re/level_penalty.txt2
-rw-r--r--db/re/mob_skill_db.txt6
-rw-r--r--db/re/pet_db.txt2
-rw-r--r--db/re/skill_require_db.txt6
-rw-r--r--db/re/skill_tree.conf142
-rw-r--r--db/re/skill_unit_db.txt10
-rw-r--r--db/skill_changematerial_db.txt32
-rw-r--r--db/translations.conf12
-rw-r--r--npc/airports/airships.txt4
-rw-r--r--npc/battleground/kvm/kvm01.txt2
-rw-r--r--npc/battleground/kvm/kvm02.txt2
-rw-r--r--npc/battleground/kvm/kvm03.txt2
-rw-r--r--npc/cities/amatsu.txt18
-rw-r--r--npc/cities/ayothaya.txt10
-rw-r--r--npc/cities/einbech.txt6
-rw-r--r--npc/cities/einbroch.txt4
-rw-r--r--npc/cities/geffen.txt6
-rw-r--r--npc/cities/hugel.txt2
-rw-r--r--npc/cities/jawaii.txt8
-rw-r--r--npc/cities/morocc.txt1
-rw-r--r--npc/cities/moscovia.txt2
-rw-r--r--npc/cities/yuno.txt4
-rw-r--r--npc/custom/battleground/bg_common.txt24
-rw-r--r--npc/custom/battleground/bg_flavius_01.txt2
-rw-r--r--npc/custom/battleground/bg_flavius_02.txt2
-rw-r--r--npc/custom/battleground/bg_kvm01.txt6
-rw-r--r--npc/custom/battleground/bg_kvm02.txt6
-rw-r--r--npc/custom/battleground/bg_kvm03.txt6
-rw-r--r--npc/custom/battleground/bg_tierra_01.txt8
-rw-r--r--npc/custom/battleground/bg_tierra_02.txt8
-rw-r--r--npc/custom/bgqueue/flavius.txt26
-rw-r--r--npc/custom/card_remover.txt4
-rw-r--r--npc/custom/etc/floating_rates.txt2
-rw-r--r--npc/custom/etc/marriage.txt38
-rw-r--r--npc/custom/etc/monster_arena.txt4
-rw-r--r--npc/custom/etc/penal_servitude.txt3
-rw-r--r--npc/custom/etc/quest_warper.txt21
-rw-r--r--npc/custom/etc/stock_market.txt3
-rw-r--r--npc/custom/events/valentinesdayexp.txt2
-rw-r--r--npc/custom/item_signer.txt1
-rw-r--r--npc/custom/quests/kaho_balmung.txt3
-rw-r--r--npc/custom/quests/questboard.txt230
-rw-r--r--npc/custom/quests/tha_statues.txt1
-rw-r--r--npc/custom/quests/thq/THQS_QuestNPC.txt2
-rw-r--r--npc/events/MemorialDay_2008.txt172
-rw-r--r--npc/events/RWC_2012.txt4
-rw-r--r--npc/events/christmas_2008.txt151
-rw-r--r--npc/events/dumplingfestival.txt4
-rw-r--r--npc/events/god_se_festival.txt2
-rw-r--r--npc/events/halloween_2009.txt6
-rw-r--r--npc/events/nguild/nguild_flags.txt8
-rw-r--r--npc/events/valentinesday_2009.txt17
-rw-r--r--npc/events/xmas.txt2
-rw-r--r--npc/instances/SealedShrine.txt3
-rw-r--r--npc/jobs/1-1e/taekwon.txt1
-rw-r--r--npc/jobs/2-1/assassin.txt2
-rw-r--r--npc/jobs/2-1/priest.txt1
-rw-r--r--npc/jobs/2-1e/StarGladiator.txt2
-rw-r--r--npc/jobs/2-2/crusader.txt3
-rw-r--r--npc/jobs/2-2a/Professor.txt1
-rw-r--r--npc/jobs/valkyrie.txt1
-rw-r--r--npc/merchants/dye_maker.txt2
-rw-r--r--npc/merchants/old_pharmacist.txt2
-rw-r--r--npc/other/Global_Functions.txt25
-rw-r--r--npc/other/books.txt3
-rw-r--r--npc/other/comodo_gambling.txt4
-rw-r--r--npc/other/fortune.txt2
-rw-r--r--npc/other/hugel_bingo.txt2
-rw-r--r--npc/other/monster_museum.txt56
-rw-r--r--npc/other/poring_war.txt2
-rw-r--r--npc/other/pvp.txt2
-rw-r--r--npc/other/turbo_track.txt55
-rw-r--r--npc/pre-re/guides/guides_alberta.txt2
-rw-r--r--npc/pre-re/guides/guides_amatsu.txt2
-rw-r--r--npc/pre-re/guides/guides_izlude.txt2
-rw-r--r--npc/pre-re/guides/guides_morroc.txt2
-rw-r--r--npc/pre-re/guides/guides_moscovia.txt1
-rw-r--r--npc/pre-re/jobs/1-1/acolyte.txt1
-rw-r--r--npc/pre-re/jobs/1-1/archer.txt1
-rw-r--r--npc/pre-re/quests/collection/quest_demonpungus.txt2
-rw-r--r--npc/pre-re/quests/collection/quest_dokebi.txt2
-rw-r--r--npc/pre-re/quests/collection/quest_fabre.txt2
-rw-r--r--npc/pre-re/quests/collection/quest_frilldora.txt2
-rw-r--r--npc/pre-re/quests/collection/quest_goat.txt1
-rw-r--r--npc/pre-re/quests/collection/quest_golem.txt2
-rw-r--r--npc/pre-re/scripts_jobs.conf2
-rw-r--r--npc/quests/newgears/2010_headgears.txt16
-rw-r--r--npc/quests/quests_lighthalzen.txt3
-rw-r--r--npc/quests/quests_nameless.txt2
-rw-r--r--npc/quests/skills/hunter_skills.txt1
-rw-r--r--npc/re/cities/dewata.txt2
-rw-r--r--npc/re/cities/eclage.txt13
-rw-r--r--npc/re/cities/izlude.txt2
-rw-r--r--npc/re/events/halloween_2014.txt7
-rw-r--r--npc/re/instances/BuwayaCave.txt2
-rw-r--r--npc/re/instances/EclageInterior.txt42
-rw-r--r--npc/re/instances/MalangdoCulvert.txt2
-rw-r--r--npc/re/instances/OctopusCave.txt2
-rw-r--r--npc/re/jobs/1-1/acolyte.txt1
-rw-r--r--npc/re/jobs/2e/kagerou_oboro.txt12
-rw-r--r--npc/re/jobs/novice/novice.txt2
-rw-r--r--npc/re/merchants/coin_exchange.txt7
-rw-r--r--npc/re/merchants/diamond.txt27
-rw-r--r--npc/re/merchants/ninja_craftsman.txt22
-rw-r--r--npc/re/merchants/shadow_refiner.txt14
-rw-r--r--npc/re/mobs/champion.txt2
-rw-r--r--npc/re/mobs/fields/niflheim.txt2
-rw-r--r--npc/re/mobs/fields/umbala.txt8
-rw-r--r--npc/re/quests/cupet.txt36
-rw-r--r--npc/re/quests/eden/100-110.txt2
-rw-r--r--npc/re/quests/eden/111-120.txt1
-rw-r--r--npc/re/quests/eden/131-140.txt4
-rw-r--r--npc/re/quests/eden/eden_quests.txt2
-rw-r--r--npc/re/quests/quests_dewata.txt1
-rw-r--r--npc/re/quests/quests_dicastes.txt11
-rw-r--r--npc/re/quests/quests_eclage.txt158
-rw-r--r--npc/re/quests/quests_malangdo.txt2
-rw-r--r--npc/re/quests/quests_malaya.txt8
-rw-r--r--npc/re/warps/dungeons/ecl_dun.txt2
-rw-r--r--npc/warps/cities/einbroch.txt9
-rw-r--r--npc/warps/cities/gonryun.txt2
-rw-r--r--npc/warps/cities/mid_camp.txt1
-rw-r--r--npc/warps/cities/prontera.txt2
-rw-r--r--npc/warps/dungeons/lhz_dun.txt2
-rw-r--r--npc/warps/dungeons/mosk_dun.txt7
-rw-r--r--npc/warps/pvp.txt1
-rw-r--r--npc/woe-fe/agit_main.txt4
-rw-r--r--src/char/HPMchar.h1
-rw-r--r--src/char/char.c8
-rw-r--r--src/char/int_quest.h1
-rw-r--r--src/char/inter.c2
-rw-r--r--src/common/atomic.h14
-rw-r--r--src/common/core.c6
-rw-r--r--src/common/db.h111
-rw-r--r--src/common/grfio.c24
-rw-r--r--src/common/mmo.h4
-rw-r--r--src/common/mutex.c17
-rw-r--r--src/common/nullpo.c1
-rw-r--r--src/common/socket.c14
-rw-r--r--src/common/sql.c88
-rw-r--r--src/common/sql.h25
-rw-r--r--src/common/strlib.c5
-rw-r--r--src/common/thread.c20
-rw-r--r--src/common/utils.c6
-rw-r--r--src/map/HPMmap.c17
-rw-r--r--src/map/atcommand.c39
-rw-r--r--src/map/battle.c22
-rw-r--r--src/map/battleground.c1
-rw-r--r--src/map/chrif.c8
-rw-r--r--src/map/clif.c620
-rw-r--r--src/map/duel.c37
-rw-r--r--src/map/elemental.c21
-rw-r--r--src/map/guild.c95
-rw-r--r--src/map/homunculus.c27
-rw-r--r--src/map/instance.c99
-rw-r--r--src/map/intif.c98
-rw-r--r--src/map/irc-bot.c69
-rw-r--r--src/map/itemdb.c309
-rw-r--r--src/map/log.c32
-rw-r--r--src/map/mail.c2
-rw-r--r--src/map/map.c179
-rw-r--r--src/map/mercenary.c21
-rw-r--r--src/map/mob.c31
-rw-r--r--src/map/npc.c261
-rw-r--r--src/map/npc_chat.c70
-rw-r--r--src/map/packets.h3
-rw-r--r--src/map/party.c42
-rw-r--r--src/map/path.c5
-rw-r--r--src/map/pc.c430
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/pc_groups.c38
-rw-r--r--src/map/pet.c76
-rw-r--r--src/map/script.c377
-rw-r--r--src/map/skill.c29
-rw-r--r--src/map/status.c35
-rw-r--r--src/plugins/HPMHooking.c2
-rw-r--r--src/plugins/db2sql.c4
-rw-r--r--src/test/test_spinlock.c11
-rw-r--r--src/tool/mapcache.c1
211 files changed, 2135 insertions, 3460 deletions
diff --git a/conf/battle/battle.conf b/conf/battle/battle.conf
index 42d9a7262..8c9447ccb 100644
--- a/conf/battle/battle.conf
+++ b/conf/battle/battle.conf
@@ -37,7 +37,7 @@ pc_damage_walk_delay_rate: 20
damage_walk_delay_rate: 100
// Move-delay adjustment for multi-hitting attacks.
-// When hit by a multi-hitting skill like Lord of Vermillion or Jupitel Thunder, characters will be
+// When hit by a multi-hitting skill like Lord of Vermillion or Jupitel Thunder, characters will be
// unable to move for an additional "(number of hits -1) * multihit_delay" milliseconds.
// 80 is the setting that feels like Aegis (vs Sonic Blows)
// 230 is the setting that makes walkdelay last until the last hit (vs Jupitel thunder)
@@ -57,7 +57,7 @@ undead_detect_type: 0
// (Will not work in Renewal)
attribute_recover: no
-// What is the minimum and maximum hitrate of normal attacks?
+// What is the minimum and maximum hitrate of normal attacks?
min_hitrate: 5
max_hitrate: 100
@@ -121,7 +121,7 @@ attack_attr_none: 14
equip_natural_break_rate: 0
// Overall rate of which your own equipment can break. (Note 2)
-// This rate affects penalty breaking rate of skills such as power-thrust and your natural breaking rate
+// This rate affects penalty breaking rate of skills such as power-thrust and your natural breaking rate
// (from equip_natural_break_rate). If a Sage's endow skill fails and this is above 0, the selected char's
// weapon will be broken.
equip_self_break_rate: 100
@@ -137,8 +137,8 @@ delay_battle_damage: yes
// Are arrows/ammo consumed when used on a bow/gun?
// 0 = No
// 1 = Yes
-// 2 = Yes even for skills that do not specify arrow consumption when said
-// skill is weapon-based and used with ranged weapons (auto-guesses which
+// 2 = Yes even for skills that do not specify arrow consumption when said
+// skill is weapon-based and used with ranged weapons (auto-guesses which
// skills should consume ammo when it's acquired via a card or plagiarize)
arrow_decrement: 1
diff --git a/conf/battle/drops.conf b/conf/battle/drops.conf
index 424c46f5b..ec122002a 100644
--- a/conf/battle/drops.conf
+++ b/conf/battle/drops.conf
@@ -83,7 +83,7 @@ item_drop_treasure_min: 1
item_drop_treasure_max: 10000
// Use logarithmic drops? (Note 1)
-// Logarithmic drops scale drop rates in a non-linear fashion using the equation
+// Logarithmic drops scale drop rates in a non-linear fashion using the equation
// Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5))
// Where x is the original drop rate and y is the drop_rate modifier (the previously mentioned item_rate* variables)
// Use the following table for an idea of how the rate will affect drop rates when logarithmic drops are used:
diff --git a/conf/battle/exp.conf b/conf/battle/exp.conf
index 7c781d3a3..88c5d9c7a 100644
--- a/conf/battle/exp.conf
+++ b/conf/battle/exp.conf
@@ -20,14 +20,14 @@ multi_level_up: no
// Setting this can cap the max experience one can get per kill specified as a
// % of the current exp bar. (Every 10 = 1.0%)
-// For example, set it to 500 and no matter how much exp the mob gives,
+// For example, set it to 500 and no matter how much exp the mob gives,
// it can never give you above half of your current exp bar.
max_exp_gain_rate: 0
// Method of calculating earned experience when defeating a monster:
// 0 = uses damage given / total damage as damage ratio
// 1 = uses damage given / max_hp as damage ratio
-// NOTE: Using type 1 disables the bonus where the first attacker gets
+// NOTE: Using type 1 disables the bonus where the first attacker gets
// his share of the exp doubled when multiple people attack the mob.
exp_calc_type: 0
@@ -86,6 +86,6 @@ disp_experience: no
disp_zeny: no
// Use the contents of db/statpoint.txt when doing a stats reset and leveling up? (Note 1)
-// If no, an equation will be used which preserves statpoints earned/lost
+// If no, an equation will be used which preserves statpoints earned/lost
// through external means (ie: stat point buyers/sellers)
use_statpoint_table: yes
diff --git a/conf/battle/gm.conf b/conf/battle/gm.conf
index 7370da6c5..83882ae1c 100644
--- a/conf/battle/gm.conf
+++ b/conf/battle/gm.conf
@@ -13,8 +13,8 @@ atcommand_spawn_quantity_limit: 100
// Maximum number of slave-clones that can be have by using the @slaveclone at command. (0 denotes unlimited quantity)
atcommand_slave_clone_limit: 25
-// If 'no', commands require exact player name. If 'yes', entering a partial
-// name will work, as long as there's only one match from all players in the
+// If 'no', commands require exact player name. If 'yes', entering a partial
+// name will work, as long as there's only one match from all players in the
// current map server.
partial_name_scan: yes
diff --git a/conf/battle/items.conf b/conf/battle/items.conf
index 09210a3ea..e2358b6d6 100644
--- a/conf/battle/items.conf
+++ b/conf/battle/items.conf
@@ -52,9 +52,9 @@ random_monster_checklv: no
ignore_items_gender: yes
// Item check? (Note 1)
-// On map change it will check for items not tagged as "available" and
+// On map change it will check for items not tagged as "available" and
// auto-delete them from inventory/cart.
-// NOTE: An item is not available if it was not loaded from the item_db or you
+// NOTE: An item is not available if it was not loaded from the item_db or you
// specify it as unavailable in db/item_avail.txt
item_check: no
@@ -72,7 +72,7 @@ cashfood_use_interval: 60000
gtb_sc_immunity: 50
// Enable autospell card effects to stack?
-// NOTE: Different cards that grant the same skill will both
+// NOTE: Different cards that grant the same skill will both
// always work independently of each other regardless of setting.
autospell_stacking: no
diff --git a/conf/battle/misc.conf b/conf/battle/misc.conf
index 7d797d2eb..a3c6ed26a 100644
--- a/conf/battle/misc.conf
+++ b/conf/battle/misc.conf
@@ -9,12 +9,16 @@
// assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun)
//--------------------------------------------------------------
-// PK Server Mode. Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player.
-// When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items.
-// There is a nopvp.txt for setting up maps not to have pk on in this mode. Novices cannot be attacked and cannot attack.
-// Normal pvp counter and rank display are disabled as well.
-// Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a
-// manner penalty of 5 each time they kill another player (see manner_system
+// PK Server Mode.
+// Turns entire server pvp(excluding towns).
+// Experience loss is doubled if killed by another player.
+// When players hunt monsters over 20 levels higher, they will receive 15%
+// additional exp., and 25% chance of receiving more items.
+// There is a nopvp.txt for setting up maps not to have pk on in this mode.
+// Novices cannot be attacked and cannot attack.
+// Normal pvp counter and rank display are disabled as well.
+// Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a
+// manner penalty of 5 each time they kill another player (see manner_system
// config to adjust how this will affect players)
pk_mode: 0
@@ -45,7 +49,7 @@ battle_log: off
etc_log: off
// Do you want to debug warp points? If set to yes, warp points will appear as flags.(Note 1)
-// It will also run on start-up a warp-check to print out which warp points lead directly on
+// It will also run on start-up a warp-check to print out which warp points lead directly on
// top of on-touch npcs (which can lead to infinite loopback warping situations)
warp_point_debug: no
@@ -80,7 +84,7 @@ duel_time_interval: 60
// Restrict duel usage to same map
duel_only_on_same_map: no
-// Determines max number of characters that can stack within a single cell.
+// Determines max number of characters that can stack within a single cell.
// Official - Only affects the walking routines of characters, including monsters.
// If a unit stops walking and is on a cell with more than stack limit
// characters on it, it will walk to the closest free cell.
diff --git a/conf/battle/party.conf b/conf/battle/party.conf
index 14d5f47c8..72a22b94a 100644
--- a/conf/battle/party.conf
+++ b/conf/battle/party.conf
@@ -18,7 +18,7 @@ party_update_interval: 1000
// 1: Athena - bar is updated with the party map dots (up to 1 second delay)
party_hp_mode: 0
-// When 'Party Share' item sharing is enabled in a party,
+// When 'Party Share' item sharing is enabled in a party,
// announce in the party which party-member received the item and what's he received? (Note 1)
show_party_share_picker: yes
@@ -30,7 +30,6 @@ show_party_share_picker: yes
show_picker.item_type: 112
// Method of distribution when item party share is enabled in a party:
-//
// 0: Normal (item goes to a random party member)
// 1: Item Share is disabled for non-mob drops (player/pet drops)
// 2: Round Robin (items are distributed evenly and in order among members)
diff --git a/conf/battle/pet.conf b/conf/battle/pet.conf
index e80826ce8..594184b35 100644
--- a/conf/battle/pet.conf
+++ b/conf/battle/pet.conf
@@ -34,7 +34,7 @@ pet_attack_support: no
// When the master receives damage from the monster, whether or not the pet attacks back. (Note 1)
pet_damage_support: no
-// Minimum intimacy necessary for a pet to support their master. Default is 900
+// Minimum intimacy necessary for a pet to support their master. Default is 900
// (intimacy goes from 0 to 1000). At this minimum, support rate is 50% of pet's normal value.
// At max (1000) support rate is 150%.
pet_support_min_friendly: 900
@@ -43,7 +43,7 @@ pet_support_min_friendly: 900
pet_equip_min_friendly: 900
// Whether or not the pet's will use skills. (Note 1)
-// Note: Offensive pet skills need at least pet_attack_support or
+// Note: Offensive pet skills need at least pet_attack_support or
// pet_damage_support to work (they trigger while the pet is attacking).
pet_status_support: no
@@ -66,7 +66,7 @@ pet_lv_rate: 0
pet_max_stats: 99
// When pet leveling is enabled, these are the imposed caps on
-// min/max damage. Note that these only cap atk1 and atk2, if you
+// min/max damage. Note that these only cap atk1 and atk2, if you
// enable pet_str, their max damage is then their base_atk + pet_max_atk2
pet_max_atk1: 500
pet_max_atk2: 1000
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index cdfcece8d..babd6cfc3 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -94,7 +94,7 @@ max_baby_parameter: 80
max_baby_third_parameter: 117
// Max armor def/mdef
-// NOTE: This setting have no effect if server is run on Renewal Mode (RENEWAL)
+// NOTE: This setting have no effect if server is run on Renewal Mode (RENEWAL)
// NOTE: does not affects skills and status effects like Mental Strength
// If weapon_defense_type is non-zero, it won't apply to max def.
// If magic_defense_type is non-zero, it won't apply to max mdef.
@@ -117,7 +117,7 @@ show_hp_sp_drain: no
// Display the gained hp/sp values from killing mobs? (Ie: Sky Deleter Card)
show_hp_sp_gain: yes
-// If set, when A accepts B as a friend, B will also be added to A's friend
+// If set, when A accepts B as a friend, B will also be added to A's friend
// list, otherwise, only A appears in B's friend list.
// NOTE: this setting only enables friend auto-adding; auto-deletion does not work yet
friend_auto_add: yes
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index f3da0e209..7622968f8 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -25,8 +25,8 @@ delay_dependon_agi: no
min_skill_delay_limit: 100
// This delay is the min 'can't walk delay' of all skills.
-// NOTE: Do not set this too low, if a character starts moving too soon after
-// doing a skill, the client will not update this, and the player/mob will
+// NOTE: Do not set this too low, if a character starts moving too soon after
+// doing a skill, the client will not update this, and the player/mob will
// appear to "teleport" afterwards.
default_walk_delay: 300
@@ -74,7 +74,7 @@ skillrange_by_distance: 14
skillrange_from_weapon: 0
// Should a check on the caster's status be performed in all skill attacks?
-// When set to yes, meteors, storm gust and any other ground skills will have
+// When set to yes, meteors, storm gust and any other ground skills will have
// no effect while the caster is unable to fight (eg: stunned).
skill_caster_check: yes
@@ -103,7 +103,7 @@ combo_delay_rate: 100
auto_counter_type: 15
// Can ground skills be placed on top of each other? (Note 3)
-// By default, skills with UF_NOREITERATION set cannot be stacked on top of
+// By default, skills with UF_NOREITERATION set cannot be stacked on top of
// other skills, this setting will override that. (skill_unit_db)
skill_reiteration: 0
@@ -123,7 +123,7 @@ traps_setting: 0
// Restrictions applied to the Alchemist's Summon Flora skill (add as necessary)
// 1: Enable players to damage the floras outside of versus grounds.
// 2: Disable having different types out at the same time
-// (eg: forbid summoning anything except hydras when there's already
+// (eg: forbid summoning anything except hydras when there's already
// one hydra out)
summon_flora_setting: 3
@@ -135,14 +135,13 @@ summon_flora_setting: 3
song_timer_reset: 0
// Whether placed down skills will check walls (Note 1)
-// (Makes it so that Storm Gust/Lord of Vermillion/etc when cast next to a wall, won't hit on the other side)
+// (Makes it so that Storm Gust/Lord of Vermillion/etc when cast next to a wall, won't hit on the other side)
skill_wall_check: yes
// When cloaking, Whether the wall is checked or not. (Note 1)
// Note: When the skill does not checks for walls, you will always be considered
-// as if you had a wall-next to you (you always get the wall-based speed).
+// as if you had a wall-next to you (you always get the wall-based speed).
// Add the settings as required, being hit always uncloaks you.
-//
// 0 = doesn't check for walls
// 1 = Check for walls
// 2 = Cloaking is not canceled when attacking.
@@ -168,7 +167,7 @@ chat_warpportal: no
// 0: Do not show defense
// 1: Base defense [RE default]
// 2: Vit/Int defense
-// 3: Both (the addition of both)
+// 3: Both (the addition of both)
sense_type: 1
// Which finger offensive style will be used?
@@ -205,10 +204,10 @@ backstab_bow_penalty: yes
// Use 0 to disable (max allowed value is 255)
skill_steal_max_tries: 0
-// Can Rogues plagiarize advanced job skills
+// Can Rogues plagiarize advanced job skills
// 0 = no restriction
-// 1 = only stalker may plagiarize advanced skills
-// 2 = advanced skills cannot be plagiarized by anyone
+// 1 = only stalker may plagiarize advanced skills
+// 2 = advanced skills cannot be plagiarized by anyone
// Official servers setting: 2
copyskill_restrict: 2
@@ -221,7 +220,7 @@ max_heal: 9999
max_heal_lv: 11
// Emergency Recall Guild Skill setting (add as appropriate).
-// Note that for the skill to be usable at all,
+// Note that for the skill to be usable at all,
// you need at least one of 1/2 and 4/8
// 1: Skill is usable outside of woe.
// 2: Skill is usable during woe.
@@ -233,7 +232,7 @@ emergency_call: 11
// Guild Aura Skills setting (add as appropriate).
// (This affects GD_LEADERSHIP, GD_GLORYWOUNDS, GD_SOULCOLD and GD_HAWKEYES)
-// Note that for the skill to be usable at all,
+// Note that for the skill to be usable at all,
// you need at least one of 1/2 and 4/8
// 1: Skill works outside of woe.
// 2: Skill works during woe.
@@ -266,7 +265,7 @@ sg_angel_skill_ratio: 10
skill_add_heal_rate: 7
// Whether the damage of EarthQuake with a single target on screen is able to be reflected.
-// Note: On official server, EQ is reflectable when there is only one target on the screen,
+// Note: On official server, EQ is reflectable when there is only one target on the screen,
// which might be an exploit to hunt the MVPs.
eq_single_target_reflectable: yes
diff --git a/conf/channels.conf b/conf/channels.conf
index 19021a64d..bd1dcaf4a 100644
--- a/conf/channels.conf
+++ b/conf/channels.conf
@@ -1,12 +1,12 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//====================================================
//================= More Information =================
// http://herc.ws/board/topic/316-introducing-hercules-channel-system/
@@ -16,7 +16,7 @@ chsys: (
/* Default Channels (available on boot) */
default_channels: {
/* channel_name : channel_messages_color */
- main: "Orange" /* Available as #main */
+ main: "Orange" /* Available as #main */
support: "Blue" /* Available as #support */
trade: "Red" /* Available as #trade */
offtopic: "Cyan" /* Available as #offtopic */
@@ -38,7 +38,7 @@ chsys: (
/* Allow users to create their own (private) channels through @channels command? */
/* (must also allow players to use @channels in groups.conf) */
allow_user_channel_creation: true
-
+
/* "map_local_channel" is a instanced channel unique to each map. */
map_local_channel: true
map_local_channel_name: "map" /* Available as #map */
diff --git a/conf/char-server.conf b/conf/char-server.conf
index 1fee6df06..37631ddae 100644
--- a/conf/char-server.conf
+++ b/conf/char-server.conf
@@ -9,7 +9,7 @@ userid: s1
passwd: p1
// Server name, use alternative character such as ASCII 160 for spaces.
-// NOTE: Do not use spaces or any of these characters which are not allowed in
+// NOTE: Do not use spaces or any of these characters which are not allowed in
// Windows filenames \/:*?"<>|
// ... or else guild emblems won't work client-side!
server_name: Hercules
@@ -91,7 +91,7 @@ gm_allow_group: -1
// On SQL servers, it applies to guilds (character save interval is defined on the map config)
autosave_time: 60
-// Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
+// Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
save_log: yes
// Start point, Map name followed by coordinates (x,y)
@@ -114,7 +114,7 @@ fame_list_blacksmith: 10
fame_list_taekwon: 10
// Guild earned exp modifier.
-// Adjusts taxed exp before adding it to the guild's exp. For example, if set
+// Adjusts taxed exp before adding it to the guild's exp. For example, if set
// to 200, the guild receives double the player's taxed exp.
guild_exp_rate: 100
diff --git a/conf/inter-server.conf b/conf/inter-server.conf
index 85acdc4df..c3ad8d676 100644
--- a/conf/inter-server.conf
+++ b/conf/inter-server.conf
@@ -15,10 +15,10 @@ party_share_level: 15
// You can specify the codepage to use in your mySQL tables here.
// (Note that this feature requires MySQL 4.1+)
-//default_codepage:
+//default_codepage:
-// For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1
+// For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1
// Under windows, you want to use 127.0.0.1. If you see a message like
// "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
// and you have localhost, switch it to 127.0.0.1
diff --git a/conf/login-server.conf b/conf/login-server.conf
index 06e0eb18b..620fae327 100644
--- a/conf/login-server.conf
+++ b/conf/login-server.conf
@@ -9,7 +9,7 @@
// NOTE: This allows you to run multiple servers on multiple interfaces
// while using the same ports for each server.
//bind_ip: 127.0.0.1
-
+
// Login Server Port
login_port: 6900
@@ -87,7 +87,7 @@ ipban.enable: yes
//ipban.sql.db_username: ragnarok
//ipban.sql.db_password: ragnarok
//ipban.sql.db_database: ragnarok
-//ipban.sql.codepage:
+//ipban.sql.codepage:
//ipban.sql.ipban_table: ipbanlist
// Dynamic password failure ipban system
ipban.dynamic_pass_failure_ban: yes
@@ -105,7 +105,7 @@ ipban_cleanup_interval: 60
//ip_sync_interval: 10
// DNS Blacklist Blocking
-// If enabled, each incoming connection will be tested against the blacklists
+// If enabled, each incoming connection will be tested against the blacklists
// on the specified dnsbl_servers (comma-separated list)
use_dnsbl: no
dnsbl_servers: bl.blocklist.de, socks.dnsbl.sorbs.net
@@ -128,7 +128,7 @@ dnsbl_servers: bl.blocklist.de, socks.dnsbl.sorbs.net
//account.sql.db_username: ragnarok
//account.sql.db_password: ragnarok
//account.sql.db_database: ragnarok
-//account.sql.codepage:
+//account.sql.codepage:
//account.sql.case_sensitive: no
//account.sql.account_db: login
//account.sql.accreg_db: global_reg_value
diff --git a/conf/map-server.conf b/conf/map-server.conf
index 7f37a05da..d0749e85e 100644
--- a/conf/map-server.conf
+++ b/conf/map-server.conf
@@ -78,12 +78,12 @@ use_grf: no
// Database autosave time
// All characters are saved on this time in seconds (example:
-// autosave of 60 secs with 60 characters online -> one char is saved every
+// autosave of 60 secs with 60 characters online -> one char is saved every
// second)
autosave_time: 300
// Min database save intervals (in ms)
-// Prevent saving characters faster than at this rate (prevents char-server
+// Prevent saving characters faster than at this rate (prevents char-server
// save-load getting too high as character-count increases)
minsave_time: 100
@@ -99,7 +99,7 @@ minsave_time: 100
// 128: After every buying store transaction
// 256: After every bank transaction (deposit/withdraw)
// NOTE: These settings decrease the chance of dupes/lost items when there's a
-// server crash at the expense of increasing the map/char server lag. If your
+// server crash at the expense of increasing the map/char server lag. If your
// server rarely crashes, but experiences interserver lag, you may want to set
// these off.
save_settings: 511
diff --git a/conf/maps.conf b/conf/maps.conf
index 458c9feff..404eb7f3e 100644
--- a/conf/maps.conf
+++ b/conf/maps.conf
@@ -665,14 +665,14 @@ map: tha_t06
map: tha_t08
// --- Thanatos Tower ---
-// -- 2005-09-21sdata_k.gpf --
+// -- 2005-09-21sdata_k.gpf --
map: tha_t09
map: tha_t10
map: tha_t11
map: tha_t12
// --- Auction Market ---
-// -- 2005-11-29sdata_k.gpf --
+// -- 2005-11-29sdata_k.gpf --
map: auction_01
map: auction_02
@@ -681,7 +681,7 @@ map: auction_02
map: alde_tt03
// --- Garden City Hugel / Kiehl ---
-// -- 2005-12-20sdata_k.gpf --
+// -- 2005-12-20sdata_k.gpf --
map: hugel
map: hu_in01
map: que_bingo
diff --git a/conf/messages.conf b/conf/messages.conf
index 3ec46eb92..2b5f8eb63 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -4,7 +4,7 @@
//= This file handles all messages set throughout the server.
//============================================================
// For translation, just change msg here (second line),
-// no need to modify source code or alternatively,
+// no need to modify source code or alternatively,
// use conf/import/msg_conf.txt.
//============================================================
// Format:
diff --git a/conf/plugins.conf b/conf/plugins.conf
index 367fc81f2..bdde28492 100644
--- a/conf/plugins.conf
+++ b/conf/plugins.conf
@@ -1,24 +1,24 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//====================================================
//== Topic Discussion ================================
//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager/
//====================================================
//== Description =====================================
-//The plugin system allows you to create customized scripts
-//outside of the source. These scripts won't conflict with any
-//future source updates - think of it as a /conf/import/ for the source.
+//The plugin system allows you to create customized scripts
+//outside of the source. These scripts won't conflict with any
+//future source updates - think of it as a /conf/import/ for the source.
//====================================================
/* --------------- Format ---------------
-After you have listed your plugin(s) in "quotations",
+After you have listed your plugin(s) in "quotations",
you need to put in a comma, to separate the plugins.
-----------------------------------------
plugins_list: [
diff --git a/db/cashshop_db.conf b/db/cashshop_db.conf
index ecd17daf8..e610a5aa3 100644
--- a/db/cashshop_db.conf
+++ b/db/cashshop_db.conf
@@ -1,12 +1,12 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
//= http://herc.ws/board/topic/367-introducing-cash-shop-support/
//====================================================
@@ -26,37 +26,37 @@ cash_shop: (
Apple:100
ID531:250
}
-
+
cat_1: { //Popular
ID513:100
Banana_Juice:250
}
-
+
cat_2: { //Limited
Grape:100
ID533:250
}
-
+
cat_3: { //Rental
ID515:100
Carrot_Juice:250
}
-
+
cat_4: { //Permanent
Green_Herb:100
ID510:250
}
-
+
cat_5: { //Scroll
ID501:100
ID502:250
}
-
+
cat_6: { //Usable
White_Potion:150
Blue_Potion:500
}
-
+
cat_7: { //Other
ID909:400
ID907:500
diff --git a/db/const.txt b/db/const.txt
index 47192a04e..78d64345e 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -642,7 +642,7 @@ Eff_Confusion 7
Eff_Blind 8
Eff_Bleeding 9
Eff_DPoison 10
-Eff_Fear 11
+Eff_Fear 11
Eff_Cold 12
Eff_Burning 13
Eff_Deepsleep 14
diff --git a/db/pet_db2.txt b/db/pet_db2.txt
index cf2248dc4..c690248a9 100644
--- a/db/pet_db2.txt
+++ b/db/pet_db2.txt
@@ -50,4 +50,3 @@
//A single pet can have petloot, petskillbonus, petskillattack and
//petskillsupport at the same time, but only one of each.
-
diff --git a/db/pre-re/exp.txt b/db/pre-re/exp.txt
index 7fff53932..840a216eb 100644
--- a/db/pre-re/exp.txt
+++ b/db/pre-re/exp.txt
@@ -45,8 +45,6 @@
//Job - Super Novice & Baby Super Novice
99,23:4045,1,30,43,58,76,116,180,220,272,336,520,604,699,802,948,1125,1668,1937,2226,3040,3988,5564,6272,7021,9114,11473,15290,16891,18570,23229,28359,36478,39716,43088,52417,62495,78160,84175,90404,107611,125915,153941,191781,204351,248352,286212,386371,409795,482092,509596,982092,992092,1002092,1012092,1022092,1032092,1042092,1052092,1062092,1072092,1082092,1092092,1102092,1112092,1122092,1132092,1142092,1152092,1162092,1172092,1182092,1192092,1202092,1212092,1222092,1232092,1242092,1252092,1262092,1272092,1282092,1292092,1302092,1312092,1322092,1332092,1342092,1352092,1362092,1372092,1382092,1392092,1402092,1412092,1422092,1432092,1442092,1452092,1462092,1491333,1521159,1551582,1582613,1614265,1646550,1679480,1713069,1747330,1782276,1817921,1854279,1891364,1929191,1967774,2007129,2047271,2088216,2129980,2172579,2216030,2260350,2305556,2351667,2398700,2446673,2495606,2545518,2596428,2648356,2701323,2755349,2810455,2866664,2923997,2982476,3042125,3102967,3165026,3228326,3292892,3358749,3425923,3494441,3564329,3635615,3708327,3782493,3858142,3935304,4014010,4094290,4176175,4259698,4344891,4431788,4520423,4610831,4703047,4797107,4893049,4990909,5090727,5192541,5296391,5402318,5510364,5620571,5732982,5847641,5964593,6083884,6205561,6329672,6456265,6585390,6717097,6851438,6988466,7128235,7270799,7416214,7564538,7715828,7870144,8027546,8188096,8351857,8518893,8689270,8863055,9040315,9221121,9405543,9593653,9785525,9981235,10180859,10384475,10592164,10804007,11020086,11240487,11465296,11694601,11928492,12167061,12410401,12658608,12911779,13170014,13433414,13702082,13976123,14255645,14540757,14831571,15128202,15430765,15739380,16054167,16375250,16702754,17036808,17377543,17725094,18079595,18441187,18810011,19186211,19569935,19961334,20360560,20767770,21183125,21606786,22038921,22479697,22929289,23387873,23855628,24332740,24819394,25315781,25822095,26338537,26865306,27402611,27950663,28509676,29079868,29661464,30254692,30859785,31476979,32106518
-
-
//================================
// Renewal content (required for some core features)
//================================
diff --git a/db/pre-re/exp_homun.txt b/db/pre-re/exp_homun.txt
index 9b48412dd..f8b443526 100644
--- a/db/pre-re/exp_homun.txt
+++ b/db/pre-re/exp_homun.txt
@@ -97,4 +97,4 @@
9165840
9553880
9945920
-0
+0
diff --git a/db/pre-re/item_group.conf b/db/pre-re/item_group.conf
index f03762790..54d71d1c8 100644
--- a/db/pre-re/item_group.conf
+++ b/db/pre-re/item_group.conf
@@ -1,19 +1,19 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
// http://herc.ws/board/topic/1244-official-item-grouppackagechain
//====================================================
// Structure of file:
/*
<Container_Item_Name>: (
- "Item_Name" or
+ "Item_Name" or
("Item_Name",Repeat_Count)
)
*/
diff --git a/db/pre-re/skill_require_db.txt b/db/pre-re/skill_require_db.txt
index d70d9175d..8b09f085e 100644
--- a/db/pre-re/skill_require_db.txt
+++ b/db/pre-re/skill_require_db.txt
@@ -711,7 +711,7 @@
2347,0,0,40:50:60:70:80,-2:-4:-6:-8:-10,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_GENTLETOUCH_CHANGE#Gentle Touch - Change#
2348,0,0,40:50:60:70:80,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_GENTLETOUCH_REVITALIZE#Gentle Touch - Revitalize#
//More from SR Sura (but not following ID order)
-2517,0,0,40:45:50:55:60,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_HOWLINGOFLION#Howling of Lion#
+2517,0,0,40:45:50:55:60,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_HOWLINGOFLION#Howling of Lion#
2518,0,0,40:50:60:70:80,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_RIDEINLIGHTNING#Ride In Lightening#
//****
@@ -730,8 +730,8 @@
// WM Wanderer/Minstrel
2413,0,0,64:68:72:76:80,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_METALICSOUND#Metallic Sound#
2414,0,0,28:32:38:42:48,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION#Reverberation#
-2415,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MELEE#Reverberation Melee#
-2416,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MAGIC#Reverberation Magic#
+2415,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MELEE#Reverberation Melee#
+2416,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MAGIC#Reverberation Magic#
2417,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_DOMINION_IMPULSE#Dominion Impulse#
2418,0,0,80:90:100:110:120,0,0,0,11,1,20,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_SEVERE_RAINSTORM#Severe Rainstorm#
2419,0,0,12:16:20:24:28,0,0,0,13:14,0,0,none,0,11513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_POEMOFNETHERWORLD#Poem of Netherworld#
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index 1b9ad25a5..b5fcd5aca 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -1,24 +1,24 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
// http://herc.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
- inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
+ inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
- skills: { // SKILL_NAMEs come from the Name (16th column) value in db/pre-re/skill_db.txt
- SKILL_NAME1: Max_Level // Use this for skills that don't have other skill prerequisite; Max_Level is a numeric value that should match your client side files
- SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
- MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
- SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
+ skills: { // SKILL_NAMEs come from the Name (16th column) value in db/pre-re/skill_db.txt
+ SKILL_NAME1: Max_Level // Use this for skills that don't have other skill prerequisite; Max_Level is a numeric value that should match your client side files
+ SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
+ MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
+ SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
}
}
@@ -26,7 +26,7 @@ Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so
//====================================================
Novice: {
- skills: {
+ skills: {
NV_BASIC: 9
NV_FIRSTAID: 1
NV_TRICKDEAD: 1
@@ -39,7 +39,7 @@ Novice: {
Swordsman: {
inherit: ( "Novice" );
- skills: {
+ skills: {
SM_SWORD: 10
SM_TWOHAND: {
MaxLevel: 10
@@ -64,7 +64,7 @@ Swordsman: {
Magician: {
inherit: ( "Novice" );
- skills: {
+ skills: {
MG_SRECOVERY: 10
MG_SIGHT: 1
MG_NAPALMBEAT: 10
@@ -104,7 +104,7 @@ Magician: {
Archer: {
inherit: ( "Novice" );
- skills: {
+ skills: {
AC_OWL: 10
AC_VULTURE: {
MaxLevel: 10
@@ -126,7 +126,7 @@ Archer: {
Acolyte: {
inherit: ( "Novice" );
- skills: {
+ skills: {
AL_DP: 10
AL_DEMONBANE: {
MaxLevel: 10
@@ -177,7 +177,7 @@ Acolyte: {
Merchant: {
inherit: ( "Novice" );
- skills: {
+ skills: {
MC_INCCARRY: 10
MC_DISCOUNT: {
MaxLevel: 10
@@ -209,7 +209,7 @@ Merchant: {
Thief: {
inherit: ( "Novice" );
- skills: {
+ skills: {
TF_DOUBLE: 10
TF_MISS: 10
TF_STEAL: 10
@@ -231,7 +231,7 @@ Thief: {
Knight: {
inherit: ( "Swordsman" );
- skills: {
+ skills: {
KN_SPEARMASTERY: 10
KN_PIERCE: {
MaxLevel: 10
@@ -284,7 +284,7 @@ Knight: {
Priest: {
inherit: ( "Acolyte" );
- skills: {
+ skills: {
MG_SRECOVERY: 10
MG_SAFETYWALL: {
MaxLevel: 10
@@ -353,7 +353,7 @@ Priest: {
Wizard: {
inherit: ( "Magician" );
- skills: {
+ skills: {
WZ_FIREPILLAR: {
MaxLevel: 10
MG_FIREWALL: 1
@@ -416,7 +416,7 @@ Wizard: {
Blacksmith: {
inherit: ( "Merchant" );
- skills: {
+ skills: {
BS_IRON: 5
BS_STEEL: {
MaxLevel: 5
@@ -500,7 +500,7 @@ Blacksmith: {
Hunter: {
inherit: ( "Archer" );
- skills: {
+ skills: {
HT_SKIDTRAP: 5
HT_LANDMINE: 5
HT_ANKLESNARE: {
@@ -576,7 +576,7 @@ Hunter: {
Assassin: {
inherit: ( "Thief" );
- skills: {
+ skills: {
AS_RIGHT: 5
AS_LEFT: {
MaxLevel: 5
@@ -620,7 +620,7 @@ Assassin: {
Crusader: {
inherit: ( "Swordsman" );
- skills: {
+ skills: {
KN_RIDING: {
MaxLevel: 1
SM_ENDURE: 1
@@ -694,7 +694,7 @@ Crusader: {
Monk: {
inherit: ( "Acolyte" );
- skills: {
+ skills: {
MO_IRONHAND: {
MaxLevel: 10
AL_DEMONBANE: 10
@@ -767,7 +767,7 @@ Monk: {
Sage: {
inherit: ( "Magician" );
- skills: {
+ skills: {
WZ_ESTIMATION: 1
WZ_EARTHSPIKE: {
MaxLevel: 5
@@ -860,7 +860,7 @@ Sage: {
Rogue: {
inherit: ( "Thief" );
- skills: {
+ skills: {
SM_SWORD: 10
AC_VULTURE: 10
AC_DOUBLE: {
@@ -943,7 +943,7 @@ Rogue: {
Alchemist: {
inherit: ( "Merchant" );
- skills: {
+ skills: {
AM_AXEMASTERY: 10
AM_LEARNINGPOTION: 10
AM_PHARMACY: {
@@ -1017,7 +1017,7 @@ Alchemist: {
Bard: {
inherit: ( "Archer" );
- skills: {
+ skills: {
BA_MUSICALLESSON: 10
BA_MUSICALSTRIKE: {
MaxLevel: 5
@@ -1091,7 +1091,7 @@ Bard: {
Dancer: {
inherit: ( "Archer" );
- skills: {
+ skills: {
DC_DANCINGLESSON: 10
DC_THROWARROW: {
MaxLevel: 5
@@ -1304,7 +1304,7 @@ Super_Novice: {
Gunslinger: {
inherit: ( "Novice" );
- skills: {
+ skills: {
GS_GLITTERING: 5
GS_FLING: {
MaxLevel: 1
@@ -1395,7 +1395,7 @@ Gunslinger: {
Ninja: {
inherit: ( "Novice" );
- skills: {
+ skills: {
NJ_TOBIDOUGU: 10
NJ_SYURIKEN: {
MaxLevel: 10
@@ -1491,7 +1491,7 @@ Ninja: {
}
}
Novice_High: {
- inherit: ( "Novice" );
+ inherit: ( "Novice" );
}
Swordsman_High: {
inherit: ( "Swordsman" );
@@ -1513,7 +1513,7 @@ Thief_High: {
}
Lord_Knight: {
inherit: ( "Knight" );
- skills: {
+ skills: {
LK_AURABLADE: {
MaxLevel: 5
SM_BASH: 5
@@ -1565,7 +1565,7 @@ Lord_Knight: {
High_Priest: {
inherit: ( "Priest" );
- skills: {
+ skills: {
HP_ASSUMPTIO: {
MaxLevel: 5
AL_ANGELUS: 1
@@ -1594,7 +1594,7 @@ High_Priest: {
High_Wizard: {
inherit: ( "Wizard" );
- skills: {
+ skills: {
HW_SOULDRAIN: {
MaxLevel: 10
MG_SRECOVERY: 5
@@ -1625,7 +1625,7 @@ High_Wizard: {
Whitesmith: {
inherit: ( "Blacksmith" );
- skills: {
+ skills: {
WS_MELTDOWN: {
MaxLevel: 10
BS_SKINTEMPER: 3
@@ -1659,7 +1659,7 @@ Whitesmith: {
Sniper: {
inherit: ( "Hunter" );
- skills: {
+ skills: {
SN_SIGHT: {
MaxLevel: 10
AC_OWL: 10
@@ -1688,7 +1688,7 @@ Sniper: {
Assassin_Cross: {
inherit: ( "Assassin" );
- skills: {
+ skills: {
ASC_KATAR: {
MaxLevel: 5
TF_DOUBLE: 5
@@ -1723,7 +1723,7 @@ Assassin_Cross: {
Paladin: {
inherit: ( "Crusader" );
- skills: {
+ skills: {
PA_PRESSURE: {
MaxLevel: 5
SM_ENDURE: 5
@@ -1751,7 +1751,7 @@ Paladin: {
Champion: {
inherit: ( "Monk" );
- skills: {
+ skills: {
CH_PALMSTRIKE: {
MaxLevel: 5
MO_IRONHAND: 7
@@ -1781,7 +1781,7 @@ Champion: {
Professor: {
inherit: ( "Sage" );
- skills: {
+ skills: {
PF_HPCONVERSION: {
MaxLevel: 5
MG_SRECOVERY: 1
@@ -1827,7 +1827,7 @@ Professor: {
Stalker: {
inherit: ( "Rogue" );
- skills: {
+ skills: {
ST_CHASEWALK: {
MaxLevel: 5
TF_HIDING: 5
@@ -1853,7 +1853,7 @@ Stalker: {
Creator: {
inherit: ( "Alchemist" );
- skills: {
+ skills: {
CR_SLIMPITCHER: {
MaxLevel: 10
AM_POTIONPITCHER: 5
@@ -1876,7 +1876,7 @@ Creator: {
Clown: {
inherit: ( "Bard" );
- skills: {
+ skills: {
CG_ARROWVULCAN: {
MaxLevel: 10
AC_SHOWER: 5
@@ -1912,7 +1912,7 @@ Clown: {
Gypsy: {
inherit: ( "Dancer" );
- skills: {
+ skills: {
CG_ARROWVULCAN: {
MaxLevel: 10
AC_SHOWER: 5
@@ -2011,7 +2011,7 @@ Super_Baby: {
Taekwon: {
inherit: ( "Novice" );
- skills: {
+ skills: {
TK_RUN: 10
TK_READYSTORM: {
MaxLevel: 1
@@ -2057,7 +2057,7 @@ Taekwon: {
Star_Gladiator: {
inherit: ( "Taekwon" );
- skills: {
+ skills: {
SG_FEEL: 3
SG_SUN_WARM: {
MaxLevel: 3
@@ -2123,7 +2123,7 @@ Star_Gladiator: {
Soul_Linker: {
inherit: ( "Taekwon" );
- skills: {
+ skills: {
SL_ALCHEMIST: 5
SL_MONK: 5
SL_STAR: 5
@@ -2224,7 +2224,7 @@ Dark_Collector: {
Rune_Knight: {
inherit: ( "Knight" );
- skills: {
+ skills: {
RK_ENCHANTBLADE: {
MaxLevel: 5
RK_RUNEMASTERY: 2
@@ -2279,7 +2279,7 @@ Rune_Knight: {
Warlock: {
inherit: ( "Wizard" );
- skills: {
+ skills: {
WL_WHITEIMPRISON: {
MaxLevel: 5
WL_SOULEXPANSION: 3
@@ -2375,7 +2375,7 @@ Warlock: {
Ranger: {
inherit: ( "Hunter" );
- skills: {
+ skills: {
RA_ARROWSTORM: {
MaxLevel: 10
RA_AIMEDBOLT: 5
@@ -2470,7 +2470,7 @@ Ranger: {
Arch_Bishop: {
inherit: ( "Priest" );
- skills: {
+ skills: {
AB_JUDEX: {
MaxLevel: 5
PR_TURNUNDEAD: 1
@@ -2563,7 +2563,7 @@ Arch_Bishop: {
Mechanic: {
inherit: ( "Blacksmith" );
- skills: {
+ skills: {
NC_MADOLICENCE: 5
NC_BOOSTKNUCKLE: {
MaxLevel: 5
@@ -2680,7 +2680,7 @@ Mechanic: {
Guillotine_Cross: {
inherit: ( "Assassin" );
- skills: {
+ skills: {
GC_VENOMIMPRESS: {
MaxLevel: 5
AS_ENCHANTPOISON: 3
@@ -2763,7 +2763,7 @@ Warlock_Trans: {
inherit: ( "High_Wizard", "Warlock" );
}
Ranger_Trans: {
- inherit: ( "Sniper", "Ranger" );
+ inherit: ( "Sniper", "Ranger" );
}
Arch_Bishop_Trans: {
inherit: ( "High_Priest", "Arch_Bishop" );
@@ -2777,7 +2777,7 @@ Guillotine_Cross_Trans: {
Royal_Guard: {
inherit: ( "Crusader" );
- skills: {
+ skills: {
LG_CANNONSPEAR: {
MaxLevel: 5
LG_PINPOINTATTACK: 1
@@ -2864,7 +2864,7 @@ Royal_Guard: {
Sorcerer: {
inherit: ( "Sage" );
- skills: {
+ skills: {
SO_FIREWALK: {
MaxLevel: 5
SA_VOLCANO: 1
@@ -2991,7 +2991,7 @@ Sorcerer: {
Minstrel: {
inherit: ( "Bard" );
- skills: {
+ skills: {
MI_RUSH_WINDMILL: {
MaxLevel: 5
WM_LULLABY_DEEPSLEEP: 1
@@ -3103,7 +3103,7 @@ Minstrel: {
Wanderer: {
inherit: ( "Dancer" );
- skills: {
+ skills: {
WA_SWING_DANCE: {
MaxLevel: 5
WM_LULLABY_DEEPSLEEP: 1
@@ -3215,7 +3215,7 @@ Wanderer: {
Sura: {
inherit: ( "Monk" );
- skills: {
+ skills: {
SR_DRAGONCOMBO: {
MaxLevel: 10
MO_TRIPLEATTACK: 5
@@ -3324,7 +3324,7 @@ Sura: {
Genetic: {
inherit: ( "Alchemist" );
- skills: {
+ skills: {
GN_TRAINING_SWORD: 5
GN_REMODELING_CART: 5
GN_CART_TORNADO: {
@@ -3399,7 +3399,7 @@ Genetic: {
Shadow_Chaser: {
inherit: ( "Rogue" );
- skills: {
+ skills: {
SC_FATALMENACE: {
MaxLevel: 5
RG_INTIMIDATE: 5
@@ -3560,7 +3560,7 @@ Baby_Shadow_Chaser: {
Expanded_Super_Novice: {
inherit: ( "Super_Novice" );
- skills: {
+ skills: {
PR_IMPOSITIO: 5
PR_SANCTUARY: {
MaxLevel: 10
@@ -3668,12 +3668,12 @@ Expanded_Super_Novice: {
}
}
Expanded_Super_Baby: {
- inherit: ( "Expanded_Super_Novice" );
+ inherit: ( "Expanded_Super_Novice" );
}
Kagerou: {
- inherit: ( "Ninja" );
+ inherit: ( "Ninja" );
- skills: {
+ skills: {
KO_YAMIKUMO: {
MaxLevel: 1
NJ_KIRIKAGE: 5
@@ -3763,9 +3763,9 @@ Kagerou: {
}
}
Oboro: {
- inherit: ( "Ninja" );
+ inherit: ( "Ninja" );
- skills: {
+ skills: {
KO_YAMIKUMO: {
MaxLevel: 1
NJ_KIRIKAGE: 5
@@ -3855,7 +3855,7 @@ Oboro: {
}
}
Rebellion: {
- inherit: ( "Gunslinger" );
+ inherit: ( "Gunslinger" );
skills: {
RL_RICHS_COIN: {
diff --git a/db/pre-re/skill_unit_db.txt b/db/pre-re/skill_unit_db.txt
index f91ccf2b9..406152b27 100644
--- a/db/pre-re/skill_unit_db.txt
+++ b/db/pre-re/skill_unit_db.txt
@@ -165,7 +165,7 @@
5010,0xfe, , 0, 2, -1,enemy, 0x000 //SC_ESCAPE
8020,0xf5, , 0, 3,2300:2100:1900:1700:1500,enemy, 0x018 //MH_POISON_MIST
-8033,0x7e, , 0, 0, -1,all, 0x003 //MH_STEINWAND
+8033,0x7e, , 0, 0, -1,all, 0x003 //MH_STEINWAND
8025,0x86, , 0, 2:2:3:3:4,1000,enemy, 0x018 //MH_XENO_SLASHER
8041,0xf6, , 1:1:2:2:3, 0,2000,enemy, 0x01A //MH_LAVA_SLIDE
8043,0xf7, , 1, 0,-1,enemy, 0x2018 //MH_VOLCANIC_ASH
@@ -181,7 +181,7 @@
8409,0xef, , 0, 1, -1,friend,0x2018 //EL_ZEPHYR
8412,0xf0, , 0, 1, -1,friend,0x2018 //EL_POWER_OF_GAIA
-10006,0xc1, , 2, 0, -1,sameguild, 0x040 //GD_LEADERSHIP
-10007,0xc2, , 2, 0, -1,sameguild, 0x040 //GD_GLORYWOUNDS
-10008,0xc3, , 2, 0, -1,sameguild, 0x040 //GD_SOULCOLD
-10009,0xc4, , 2, 0, -1,sameguild, 0x040 //GD_HAWKEYES
+10006,0xc1, , 2, 0, -1,sameguild, 0x040 //GD_LEADERSHIP
+10007,0xc2, , 2, 0, -1,sameguild, 0x040 //GD_GLORYWOUNDS
+10008,0xc3, , 2, 0, -1,sameguild, 0x040 //GD_SOULCOLD
+10009,0xc4, , 2, 0, -1,sameguild, 0x040 //GD_HAWKEYES
diff --git a/db/produce_db.txt b/db/produce_db.txt
index 83499bb53..4d8b1a2ca 100644
--- a/db/produce_db.txt
+++ b/db/produce_db.txt
@@ -186,7 +186,7 @@
12053,13,0,0,7474,0,966,20,961,10,518,1,7453,1
//-- Tentacle and Cheese Gratin <-- 10 Tentacle, 10 Cheese, 5 Yam, 1 Sweet Sauce
12058,13,0,0,7474,0,962,10,548,10,549,5,7453,1
-//-- Fried Sweet Potato with Syrup <-- 10 Potato, 10 Yam, 1 Sweet Potato, 1 Sweet Sauce
+//-- Fried Sweet Potato with Syrup <-- 10 Potato, 10 Yam, 1 Sweet Potato, 1 Sweet Sauce
12068,13,0,0,7474,0,516,10,549,10,633,1,7453,1
//--------------------LEVEL 4-----------
@@ -197,7 +197,7 @@
12054,14,0,0,7475,0,962,30,509,10,7194,10,7031,1,1024,20
//-- Rib with Herbs and Spices <-- 5 Meat, 3 Red Herb, 2 Yellow Herb, 3 Green Herb, 1 Sweet Sauce, 1 Lemon
12044,14,0,0,7475,0,517,5,507,3,508,2,511,3,7453,1,568,1
-//-- Cream Sandwich <-- 5 Bread, 15 Milk, 10 Cheese, 10 Yellow Herb, 1 Meat, 1 Sweet Sauce
+//-- Cream Sandwich <-- 5 Bread, 15 Milk, 10 Cheese, 10 Yellow Herb, 1 Meat, 1 Sweet Sauce
12064,14,0,0,7475,0,580,5,519,15,548,10,508,10,517,1,7453,1
//-- Lutie Mixed Cold Noodles <-- 3 Grain, 1 Hot Sauce, 10 Ice Cubic, 10 Carrot, 10 Jack o' Pumpkin
12059,14,0,0,7475,0,577,3,7455,1,7066,10,515,10,1062,10
@@ -471,7 +471,7 @@
1046,26,2494,1,955,40,753,5
//-- Petite DiablOfs Horn <-- GN_CHANGEMATERIAL Lv1, 5 Stone Heart, 10 Resin
1038,26,2494,1,953,5,907,10
-//-- Root Of Maneater <-- GN_CHANGEMATERIAL Lv1, 25 Talon, 20 Tooth Of
+//-- Root Of Maneater <-- GN_CHANGEMATERIAL Lv1, 25 Talon, 20 Tooth Of
1033,26,2494,1,917,25,1044,20
//-- Conch <-- GN_CHANGEMATERIAL Lv1, 5 Gill, 25 Immortal Heart
961,26,2494,1,956,5,929,25
diff --git a/db/re/exp_homun.txt b/db/re/exp_homun.txt
index 3c479cfa4..f74c5016c 100644
--- a/db/re/exp_homun.txt
+++ b/db/re/exp_homun.txt
@@ -148,4 +148,4 @@
8922000
8966000
9094000
-0
+0
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 1f5c9d9ec..c00cc9d9b 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -21094,9 +21094,9 @@ item_db: (
bonus2 bAddRaceTolerance,RC_NonBoss,30;
bonus2 bAddRaceTolerance,RC_Boss,30;
bonus bUnbreakableShield,0;
-/* When you receive Melee Physical damage, chance of casting Protective Light for 60 seconds. */
-/* Cancels Stun, Sleep, Curse, Stone Curse, Poison, Blind, Silence, Bleeding, Chaos, and Frozen. */
-/* Protects the user against such effects for a set duration. */
+/* When you receive Melee Physical damage, chance of casting Protective Light for 60 seconds. */
+/* Cancels Stun, Sleep, Curse, Stone Curse, Poison, Blind, Silence, Bleeding, Chaos, and Frozen. */
+/* Protects the user against such effects for a set duration. */
">
},
{
@@ -40704,7 +40704,7 @@ item_db: (
bonus bInt,1;
bonus bIgnoreMdefRate,2;
bonus bIgnoreMdefRate,getrefine()/4;
- }
+ }
">
},
{
@@ -41726,7 +41726,7 @@ item_db: (
Loc: 16
Script: <"
bonus bAtk,30;
- /* When attacked by enemy, drain 5 SP from user. */
+ /* When attacked by enemy, drain 5 SP from user. */
">
},
{
@@ -48393,8 +48393,7 @@ item_db: (
Loc: 256
View: 341
Script: <"
-
- bonus bLuk,3;
+ bonus bLuk,3;
bonus2 bAddRaceTolerance,RC_Angel, 5;
bonus2 bAddRace,RC_Angel, 5;
bonus2 bMagicAddRace,RC_Angel,5;
@@ -57747,7 +57746,7 @@ item_db: (
bonus2 bSubEle,Ele_Neutral,5;
bonus2 bAddRaceTolerance,RC_Dragon,5;
bonus2 bHPLossRate,600,4000;
- bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,5,20; /* Custom - IRO */
+ bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,5,20; /* Custom - IRO */
bonus bUnbreakableHelm,0;
">
},
@@ -57852,7 +57851,7 @@ item_db: (
EquipLv: 10
View: 1105
Script: <"
- bonus5 bAutoSpell,DC_SCREAM,5,50,BF_WEAPON|BF_MAGIC,0; /* Custom - TWRO */
+ bonus5 bAutoSpell,DC_SCREAM,5,50,BF_WEAPON|BF_MAGIC,0; /* Custom - TWRO */
">
},
{
@@ -112227,7 +112226,7 @@ item_db: (
Loc: 16
EquipLv: 105
Script: <"
- bonus3 bAutoSpell,DC_WINKCHARM,1,20; /* Custom - IDRO */
+ bonus3 bAutoSpell,DC_WINKCHARM,1,20; /* Custom - IDRO */
if(getrefine()>4) { bonus bCritAtkRate,4; }
if(getrefine()>6) { bonus bCritAtkRate,6; }
">
@@ -117820,7 +117819,7 @@ item_db: (
bonus bMdef,3;
bonus bHit,10;
bonus bDelayrate,-5;
- if(getrefine()>6) { bonus2 bAddMonsterDropItem,522,(getrefine()*100)-600; } /* Custom - KRO */
+ if(getrefine()>6) { bonus2 bAddMonsterDropItem,522,(getrefine()*100)-600; } /* Custom - KRO */
">
},
{
@@ -118554,7 +118553,6 @@ item_db: (
EquipLv: 10
View: 729
Script: <"
-
bonus bMdef,3;
bonus2 bAddRaceTolerance,RC_Dragon,5;
bonus2 bAddRace,RC_Dragon,5;
@@ -119348,9 +119346,9 @@ item_db: (
EquipLv: 10
View: 766
Script: <"
- bonus bMdef,3;
- autobonus "{ bonus bAtkEle,Ele_Dark; }",30,60000;
- bonus2 bSubEle,Ele_Holy,-10;
+ bonus bMdef,3;
+ autobonus "{ bonus bAtkEle,Ele_Dark; }",30,60000;
+ bonus2 bSubEle,Ele_Holy,-10;
bonus2 bSubRace,RC_Angel,-10;
">
},
@@ -120063,7 +120061,7 @@ item_db: (
EquipLv: 80
View: 804
Script: <"
- bonus2 bHPDrainRate,10*(5+1*(getrefine()>7)+2*(getrefine()>8)+2*(getrefine()>9)),1+2*(getrefine()>5)+2*(getrefine()>7)+3*(getrefine()>9);
+ bonus2 bHPDrainRate,10*(5+1*(getrefine()>7)+2*(getrefine()>8)+2*(getrefine()>9)),1+2*(getrefine()>5)+2*(getrefine()>7)+3*(getrefine()>9);
bonus2 bSPDrainRate,10*(5+1*(getrefine()>8)+2*(getrefine()>9)),1+(getrefine()>7)+2*(getrefine()>9);
">
},
@@ -120403,9 +120401,9 @@ item_db: (
Loc: 256
View: 11
Script: <"
- bonus bAgi,3;
- bonus bAspdRate,1;
- bonus2 bSPLossRate,5,10000;
+ bonus bAgi,3;
+ bonus bAspdRate,1;
+ bonus2 bSPLossRate,5,10000;
">
},
{
@@ -120785,7 +120783,7 @@ item_db: (
Refine: false
View: 844
Script: <"
- bonus2 bSubRace,RC_Fish,15;
+ bonus2 bSubRace,RC_Fish,15;
bonus3 bAddMonsterDropItem,579,RC_Fish,5;
">
},
@@ -121444,7 +121442,6 @@ item_db: (
Loc: 256
View: 888
Script: <"
-
bonus bStr,2;
bonus bMaxHP,100;
">
@@ -122106,7 +122103,7 @@ item_db: (
EquipLv: 20
View: 899
Script: <"
- bonus2 bAddMonsterDropItem,921,100+((getrefine()/2)*20); /* Custom - JRO */
+ bonus2 bAddMonsterDropItem,921,100+((getrefine()/2)*20); /* Custom - JRO */
bonus2 bAddMonsterDropItem,7033,100+((getrefine()/2)*20);
">
},
@@ -122207,7 +122204,7 @@ item_db: (
bonus2 bSkillAtk,WL_CHAINLIGHTNING,5;
bonus2 bIgnoreMdefRate,RC_NonBoss,10;
bonus2 bIgnoreMdefRate,RC_NonBoss,getrefine()*2;
- if(getrefine()>6) {
+ if(getrefine()>6) {
bonus2 bSkillAtk,WL_CRIMSONROCK,5;
bonus2 bSkillAtk,WL_JACKFROST,5;
bonus2 bSkillAtk,WL_EARTHSTRAIN,5;
@@ -123703,7 +123700,7 @@ item_db: (
View: 1034
Script: <"
bonus bAllStats,1;
- bonus5 bAutoSpellWhenHit,AL_RUWACH,1,50,BF_WEAPON,0; /* Custom - PRO */
+ bonus5 bAutoSpellWhenHit,AL_RUWACH,1,50,BF_WEAPON,0; /* Custom - PRO */
">
},
{
@@ -123719,7 +123716,7 @@ item_db: (
View: 1035
Script: <"
bonus bAllStats,1;
- bonus5 bAutoSpellWhenHit,AL_RUWACH,1,50,BF_WEAPON,0; /* Custom - PRO */
+ bonus5 bAutoSpellWhenHit,AL_RUWACH,1,50,BF_WEAPON,0; /* Custom - PRO */
">
},
{
@@ -123825,7 +123822,7 @@ item_db: (
View: 1065
Script: <"
bonus bDex,2;
- bonus5 bAutoSpellWhenHit,WZ_STORMGUST,5,50,BF_WEAPON,0; /* Custom - IRO */
+ bonus5 bAutoSpellWhenHit,WZ_STORMGUST,5,50,BF_WEAPON,0; /* Custom - IRO */
if(getrefine()>=8) { bonus bDex,1+((getrefine()/2)-4); }
">
},
@@ -124037,8 +124034,8 @@ item_db: (
bonus bStr,3;
bonus bAtkRate,4;
if(BaseLevel<100) { bonus bStr,getrefine()/2; } else { bonus bStr,getrefine(); }
- /* +Giant Lance, when using Joint Beat, auto cast Lv.1 Spiral pierce, */
- /* every refine of lance increase the chance of trigger and increase damage of spiral pierce by 5%. */
+ /* +Giant Lance, when using Joint Beat, auto cast Lv.1 Spiral pierce, */
+ /* every refine of lance increase the chance of trigger and increase damage of spiral pierce by 5%. */
">
},
{
@@ -124055,7 +124052,7 @@ item_db: (
bonus bDefRate,-50;
bonus bMdefRate,-50;
bonus2 bSubRace,RC_Insect,getrefine();
- bonus3 bAutoSpell,NPC_WIDECONFUSE,2,100+(getrefine()*10); /* Custom - JRO */
+ bonus3 bAutoSpell,NPC_WIDECONFUSE,2,100+(getrefine()*10); /* Custom - JRO */
">
},
{
@@ -125005,8 +125002,7 @@ item_db: (
Refine: false
View: 712
Script: <"
-
- bonus bUnbreakableHelm,0;
+ bonus bUnbreakableHelm,0;
bonus2 bAddRaceTolerance,RC_Angel,1;
bonus2 bAddRaceTolerance,RC_Demon,1;
bonus3 bAddMonsterDropItem,523,RC_Angel,400;
@@ -132041,7 +132037,7 @@ item_db: (
View: 3
Script: <"
bonus bCritAtkRate,getrefine()*2;
- bonus3 bAutoSpell,NPC_CRITICALWOUND,1,50; /* Custom - JRO */
+ bonus3 bAutoSpell,NPC_CRITICALWOUND,1,50; /* Custom - JRO */
">
},
{
diff --git a/db/re/item_group.conf b/db/re/item_group.conf
index 699be4048..82a17a339 100644
--- a/db/re/item_group.conf
+++ b/db/re/item_group.conf
@@ -1,19 +1,19 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
// http://herc.ws/board/topic/1244-official-item-grouppackagechain
//====================================================
// Structure of file:
/*
<Container_Item_Name>: (
- "Item_Name" or
+ "Item_Name" or
("Item_Name",Repeat_Count)
)
*/
diff --git a/db/re/item_packages.conf b/db/re/item_packages.conf
index 8fc9a2e17..0c90d737c 100644
--- a/db/re/item_packages.conf
+++ b/db/re/item_packages.conf
@@ -1,12 +1,12 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
// http://herc.ws/board/topic/1244-official-item-grouppackagechain
//====================================================
diff --git a/db/re/level_penalty.txt b/db/re/level_penalty.txt
index 81b33c141..882aca91b 100644
--- a/db/re/level_penalty.txt
+++ b/db/re/level_penalty.txt
@@ -7,7 +7,7 @@
// 1=experience, 2=item drop
// RACE:
// 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
-// 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
+// 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
// 10=Boss monsters, 11=Normal monsters
//
// Note: RENEWAL_DROP and/or RENEWAL_EXP must be enabled.
diff --git a/db/re/mob_skill_db.txt b/db/re/mob_skill_db.txt
index 04c870045..a521a348a 100644
--- a/db/re/mob_skill_db.txt
+++ b/db/re/mob_skill_db.txt
@@ -1,4 +1,4 @@
-// Mob Skill Database
+// Mob Skill Database
// Based on Aegis Episode 14.2
//
// Structure of Database:
@@ -4202,7 +4202,7 @@
1794,Roween@NPC_COMBOATTACK,attack,171,4,500,500,5000,no,target,always,,,,,,,6,
1794,Roween@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,0x308D,,,,,
1794,Roween@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,,,,,,,,
-// Guild Dungeon SE (13.1)
+// Guild Dungeon SE (13.1)
1796,Aunoe@AL_HEAL,attack,28,5,3000,0,5000,yes,friend,friendhpltmaxrate,50,,,,,,3,
1796,Aunoe@AL_HEAL,idle,28,5,3000,0,5000,yes,friend,friendhpltmaxrate,50,,,,,,3,
1796,Aunoe@AL_HEAL,chase,28,5,3000,0,5000,yes,friend,friendhpltmaxrate,50,,,,,,3,
@@ -9960,4 +9960,4 @@
//3074,Timeholder@NPC_HELLJUDGEMENT,attack,662,10,10000,1000,10000,no,self,always,0,,,,,,,
//3074,Timeholder@NPC_PULSESTRIKE,attack,661,5,2000,0,30000,yes,self,always,0,,,,,,,
//3074,Timeholder@NPC_SUMMONSLAVE,attack,196,5,10000,700,10000,no,self,slavele,0,2917,,,,,,
-//3074,Timeholder@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,0,2917,,,,,, \ No newline at end of file
+//3074,Timeholder@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,0,2917,,,,,,
diff --git a/db/re/pet_db.txt b/db/re/pet_db.txt
index 22f7d553f..f8495c784 100644
--- a/db/re/pet_db.txt
+++ b/db/re/pet_db.txt
@@ -118,4 +118,4 @@
2081,E_HYDRA,Strange Hydra,12408,6221,0,0,0,0,0,0,0,0,50,0,0,0,350,400,800,{},{} // iRO/cRO version
// 14.2 Academy
-2398,LITTLE_PORING,Little Poring,12846,9062,10013,531,80,60,50,100,250,20,2000,150,1,0,350,400,800,{ petloot 10; },{ bonus bLuk,2; bonus bCritical,1; } \ No newline at end of file
+2398,LITTLE_PORING,Little Poring,12846,9062,10013,531,80,60,50,100,250,20,2000,150,1,0,350,400,800,{ petloot 10; },{ bonus bLuk,2; bonus bCritical,1; }
diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt
index 0b9f86efe..ed9f94b47 100644
--- a/db/re/skill_require_db.txt
+++ b/db/re/skill_require_db.txt
@@ -715,7 +715,7 @@
2347,0,0,40:50:60:70:80,-2:-4:-6:-8:-10,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_GENTLETOUCH_CHANGE#Gentle Touch - Change#
2348,0,0,40:50:60:70:80,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_GENTLETOUCH_REVITALIZE#Gentle Touch - Revitalize#
//More from SR Sura (but not following ID order)
-2517,0,0,40:45:50:55:60,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_HOWLINGOFLION#Howling of Lion#
+2517,0,0,40:45:50:55:60,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_HOWLINGOFLION#Howling of Lion#
2518,0,0,40:50:60:70:80,0,0,0,99,0,0,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_RIDEINLIGHTNING#Ride In Lightening#
//****
@@ -734,8 +734,8 @@
// WM Wanderer/Minstrel
2413,0,0,64:68:72:76:80,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_METALICSOUND#Metallic Sound#
2414,0,0,28:32:38:42:48,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION#Reverberation#
-2415,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MELEE#Reverberation Melee#
-2416,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MAGIC#Reverberation Magic#
+2415,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MELEE#Reverberation Melee#
+2416,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_REVERBERATION_MAGIC#Reverberation Magic#
2417,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_DOMINION_IMPULSE#Dominion Impulse#
2418,0,0,80:90:100:110:120,0,0,0,11,1,20,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_SEVERE_RAINSTORM#Severe Rainstorm#
2419,0,0,12:16:20:24:28,0,0,0,13:14,0,0,none,0,11513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_POEMOFNETHERWORLD#Poem of Netherworld#
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index 0da4479d4..a29b924aa 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -1,24 +1,24 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
// http://herc.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
- inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
+ inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
- skills: { // SKILL_NAMEs come from the Name (16th column) value in db/re/skill_db.txt
- SKILL_NAME1: Max_Level // Use this for skills that don't have other skill prerequisite; Max_Level is a numeric value that should match your client side files
- SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
- MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
- SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
+ skills: { // SKILL_NAMEs come from the Name (16th column) value in db/re/skill_db.txt
+ SKILL_NAME1: Max_Level // Use this for skills that don't have other skill prerequisite; Max_Level is a numeric value that should match your client side files
+ SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
+ MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
+ SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
}
}
@@ -26,7 +26,7 @@ Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so
//====================================================
Novice: {
- skills: {
+ skills: {
NV_BASIC: 9
NV_FIRSTAID: 1
NV_TRICKDEAD: 1
@@ -39,7 +39,7 @@ Novice: {
Swordsman: {
inherit: ( "Novice" );
- skills: {
+ skills: {
SM_SWORD: 10
SM_TWOHAND: {
MaxLevel: 10
@@ -64,7 +64,7 @@ Swordsman: {
Magician: {
inherit: ( "Novice" );
- skills: {
+ skills: {
MG_SRECOVERY: 10
MG_SIGHT: 1
MG_NAPALMBEAT: 10
@@ -104,7 +104,7 @@ Magician: {
Archer: {
inherit: ( "Novice" );
- skills: {
+ skills: {
AC_OWL: 10
AC_VULTURE: {
MaxLevel: 10
@@ -126,7 +126,7 @@ Archer: {
Acolyte: {
inherit: ( "Novice" );
- skills: {
+ skills: {
AL_DP: 10
AL_DEMONBANE: {
MaxLevel: 10
@@ -177,7 +177,7 @@ Acolyte: {
Merchant: {
inherit: ( "Novice" );
- skills: {
+ skills: {
MC_INCCARRY: 10
MC_DISCOUNT: {
MaxLevel: 10
@@ -209,7 +209,7 @@ Merchant: {
Thief: {
inherit: ( "Novice" );
- skills: {
+ skills: {
TF_DOUBLE: 10
TF_MISS: 10
TF_STEAL: 10
@@ -231,7 +231,7 @@ Thief: {
Knight: {
inherit: ( "Swordsman" );
- skills: {
+ skills: {
KN_SPEARMASTERY: 10
KN_PIERCE: {
MaxLevel: 10
@@ -284,7 +284,7 @@ Knight: {
Priest: {
inherit: ( "Acolyte" );
- skills: {
+ skills: {
MG_SRECOVERY: 10
MG_SAFETYWALL: {
MaxLevel: 10
@@ -353,7 +353,7 @@ Priest: {
Wizard: {
inherit: ( "Magician" );
- skills: {
+ skills: {
WZ_FIREPILLAR: {
MaxLevel: 10
MG_FIREWALL: 1
@@ -416,7 +416,7 @@ Wizard: {
Blacksmith: {
inherit: ( "Merchant" );
- skills: {
+ skills: {
BS_IRON: 5
BS_STEEL: {
MaxLevel: 5
@@ -500,7 +500,7 @@ Blacksmith: {
Hunter: {
inherit: ( "Archer" );
- skills: {
+ skills: {
HT_SKIDTRAP: 5
HT_LANDMINE: 5
HT_ANKLESNARE: {
@@ -576,7 +576,7 @@ Hunter: {
Assassin: {
inherit: ( "Thief" );
- skills: {
+ skills: {
AS_RIGHT: 5
AS_LEFT: {
MaxLevel: 5
@@ -620,7 +620,7 @@ Assassin: {
Crusader: {
inherit: ( "Swordsman" );
- skills: {
+ skills: {
KN_RIDING: {
MaxLevel: 1
SM_ENDURE: 1
@@ -694,7 +694,7 @@ Crusader: {
Monk: {
inherit: ( "Acolyte" );
- skills: {
+ skills: {
MO_IRONHAND: {
MaxLevel: 10
AL_DEMONBANE: 10
@@ -767,7 +767,7 @@ Monk: {
Sage: {
inherit: ( "Magician" );
- skills: {
+ skills: {
WZ_ESTIMATION: 1
WZ_EARTHSPIKE: {
MaxLevel: 5
@@ -860,7 +860,7 @@ Sage: {
Rogue: {
inherit: ( "Thief" );
- skills: {
+ skills: {
SM_SWORD: 10
AC_VULTURE: 10
AC_DOUBLE: {
@@ -943,7 +943,7 @@ Rogue: {
Alchemist: {
inherit: ( "Merchant" );
- skills: {
+ skills: {
AM_AXEMASTERY: 10
AM_LEARNINGPOTION: 10
AM_PHARMACY: {
@@ -1017,7 +1017,7 @@ Alchemist: {
Bard: {
inherit: ( "Archer" );
- skills: {
+ skills: {
BA_MUSICALLESSON: 10
BA_MUSICALSTRIKE: {
MaxLevel: 5
@@ -1091,7 +1091,7 @@ Bard: {
Dancer: {
inherit: ( "Archer" );
- skills: {
+ skills: {
DC_DANCINGLESSON: 10
DC_THROWARROW: {
MaxLevel: 5
@@ -1304,7 +1304,7 @@ Super_Novice: {
Gunslinger: {
inherit: ( "Novice" );
- skills: {
+ skills: {
GS_GLITTERING: 5
GS_FLING: {
MaxLevel: 1
@@ -1395,7 +1395,7 @@ Gunslinger: {
Ninja: {
inherit: ( "Novice" );
- skills: {
+ skills: {
NJ_TOBIDOUGU: 10
NJ_SYURIKEN: {
MaxLevel: 10
@@ -1491,7 +1491,7 @@ Ninja: {
}
}
Novice_High: {
- inherit: ( "Novice" );
+ inherit: ( "Novice" );
}
Swordsman_High: {
inherit: ( "Swordsman" );
@@ -1513,7 +1513,7 @@ Thief_High: {
}
Lord_Knight: {
inherit: ( "Knight" );
- skills: {
+ skills: {
LK_AURABLADE: {
MaxLevel: 5
SM_BASH: 5
@@ -1565,7 +1565,7 @@ Lord_Knight: {
High_Priest: {
inherit: ( "Priest" );
- skills: {
+ skills: {
HP_ASSUMPTIO: {
MaxLevel: 5
AL_ANGELUS: 1
@@ -1594,7 +1594,7 @@ High_Priest: {
High_Wizard: {
inherit: ( "Wizard" );
- skills: {
+ skills: {
HW_SOULDRAIN: {
MaxLevel: 10
MG_SRECOVERY: 5
@@ -1625,7 +1625,7 @@ High_Wizard: {
Whitesmith: {
inherit: ( "Blacksmith" );
- skills: {
+ skills: {
WS_MELTDOWN: {
MaxLevel: 10
BS_SKINTEMPER: 3
@@ -1659,7 +1659,7 @@ Whitesmith: {
Sniper: {
inherit: ( "Hunter" );
- skills: {
+ skills: {
SN_SIGHT: {
MaxLevel: 10
AC_OWL: 10
@@ -1688,7 +1688,7 @@ Sniper: {
Assassin_Cross: {
inherit: ( "Assassin" );
- skills: {
+ skills: {
ASC_KATAR: {
MaxLevel: 5
TF_DOUBLE: 5
@@ -1723,7 +1723,7 @@ Assassin_Cross: {
Paladin: {
inherit: ( "Crusader" );
- skills: {
+ skills: {
PA_PRESSURE: {
MaxLevel: 5
SM_ENDURE: 5
@@ -1751,7 +1751,7 @@ Paladin: {
Champion: {
inherit: ( "Monk" );
- skills: {
+ skills: {
CH_PALMSTRIKE: {
MaxLevel: 5
MO_IRONHAND: 7
@@ -1781,7 +1781,7 @@ Champion: {
Professor: {
inherit: ( "Sage" );
- skills: {
+ skills: {
PF_HPCONVERSION: {
MaxLevel: 5
MG_SRECOVERY: 1
@@ -1827,7 +1827,7 @@ Professor: {
Stalker: {
inherit: ( "Rogue" );
- skills: {
+ skills: {
ST_CHASEWALK: {
MaxLevel: 5
TF_HIDING: 5
@@ -1850,7 +1850,7 @@ Stalker: {
Creator: {
inherit: ( "Alchemist" );
- skills: {
+ skills: {
CR_SLIMPITCHER: {
MaxLevel: 10
AM_POTIONPITCHER: 5
@@ -1873,7 +1873,7 @@ Creator: {
Clown: {
inherit: ( "Bard" );
- skills: {
+ skills: {
CG_ARROWVULCAN: {
MaxLevel: 10
AC_SHOWER: 5
@@ -1909,7 +1909,7 @@ Clown: {
Gypsy: {
inherit: ( "Dancer" );
- skills: {
+ skills: {
CG_ARROWVULCAN: {
MaxLevel: 10
AC_SHOWER: 5
@@ -2008,7 +2008,7 @@ Super_Baby: {
Taekwon: {
inherit: ( "Novice" );
- skills: {
+ skills: {
TK_RUN: 10
TK_READYSTORM: {
MaxLevel: 1
@@ -2054,7 +2054,7 @@ Taekwon: {
Star_Gladiator: {
inherit: ( "Taekwon" );
- skills: {
+ skills: {
SG_FEEL: 3
SG_SUN_WARM: {
MaxLevel: 3
@@ -2120,7 +2120,7 @@ Star_Gladiator: {
Soul_Linker: {
inherit: ( "Taekwon" );
- skills: {
+ skills: {
SL_ALCHEMIST: 5
SL_MONK: 5
SL_STAR: 5
@@ -2221,7 +2221,7 @@ Dark_Collector: {
Rune_Knight: {
inherit: ( "Knight" );
- skills: {
+ skills: {
RK_ENCHANTBLADE: {
MaxLevel: 5
RK_RUNEMASTERY: 2
@@ -2276,7 +2276,7 @@ Rune_Knight: {
Warlock: {
inherit: ( "Wizard" );
- skills: {
+ skills: {
WL_WHITEIMPRISON: {
MaxLevel: 5
WL_SOULEXPANSION: 3
@@ -2372,7 +2372,7 @@ Warlock: {
Ranger: {
inherit: ( "Hunter" );
- skills: {
+ skills: {
RA_ARROWSTORM: {
MaxLevel: 10
RA_AIMEDBOLT: 5
@@ -2467,7 +2467,7 @@ Ranger: {
Arch_Bishop: {
inherit: ( "Priest" );
- skills: {
+ skills: {
AB_JUDEX: {
MaxLevel: 5
PR_TURNUNDEAD: 1
@@ -2560,7 +2560,7 @@ Arch_Bishop: {
Mechanic: {
inherit: ( "Blacksmith" );
- skills: {
+ skills: {
NC_MADOLICENCE: 5
NC_BOOSTKNUCKLE: {
MaxLevel: 5
@@ -2677,7 +2677,7 @@ Mechanic: {
Guillotine_Cross: {
inherit: ( "Assassin" );
- skills: {
+ skills: {
GC_VENOMIMPRESS: {
MaxLevel: 5
AS_ENCHANTPOISON: 3
@@ -2760,7 +2760,7 @@ Warlock_Trans: {
inherit: ( "High_Wizard", "Warlock" );
}
Ranger_Trans: {
- inherit: ( "Sniper", "Ranger" );
+ inherit: ( "Sniper", "Ranger" );
}
Arch_Bishop_Trans: {
inherit: ( "High_Priest", "Arch_Bishop" );
@@ -2774,7 +2774,7 @@ Guillotine_Cross_Trans: {
Royal_Guard: {
inherit: ( "Crusader" );
- skills: {
+ skills: {
LG_CANNONSPEAR: {
MaxLevel: 5
LG_PINPOINTATTACK: 1
@@ -2861,7 +2861,7 @@ Royal_Guard: {
Sorcerer: {
inherit: ( "Sage" );
- skills: {
+ skills: {
SO_FIREWALK: {
MaxLevel: 5
SA_VOLCANO: 1
@@ -2988,7 +2988,7 @@ Sorcerer: {
Minstrel: {
inherit: ( "Bard" );
- skills: {
+ skills: {
MI_RUSH_WINDMILL: {
MaxLevel: 5
WM_LULLABY_DEEPSLEEP: 1
@@ -3100,7 +3100,7 @@ Minstrel: {
Wanderer: {
inherit: ( "Dancer" );
- skills: {
+ skills: {
WA_SWING_DANCE: {
MaxLevel: 5
WM_LULLABY_DEEPSLEEP: 1
@@ -3212,7 +3212,7 @@ Wanderer: {
Sura: {
inherit: ( "Monk" );
- skills: {
+ skills: {
SR_DRAGONCOMBO: {
MaxLevel: 10
MO_TRIPLEATTACK: 5
@@ -3321,7 +3321,7 @@ Sura: {
Genetic: {
inherit: ( "Alchemist" );
- skills: {
+ skills: {
GN_TRAINING_SWORD: 5
GN_REMODELING_CART: 5
GN_CART_TORNADO: {
@@ -3396,7 +3396,7 @@ Genetic: {
Shadow_Chaser: {
inherit: ( "Rogue" );
- skills: {
+ skills: {
SC_FATALMENACE: {
MaxLevel: 5
RG_INTIMIDATE: 5
@@ -3557,7 +3557,7 @@ Baby_Shadow_Chaser: {
Expanded_Super_Novice: {
inherit: ( "Super_Novice" );
- skills: {
+ skills: {
PR_IMPOSITIO: 5
PR_SANCTUARY: {
MaxLevel: 10
@@ -3665,12 +3665,12 @@ Expanded_Super_Novice: {
}
}
Expanded_Super_Baby: {
- inherit: ( "Expanded_Super_Novice" );
+ inherit: ( "Expanded_Super_Novice" );
}
Kagerou: {
- inherit: ( "Ninja" );
+ inherit: ( "Ninja" );
- skills: {
+ skills: {
KO_YAMIKUMO: {
MaxLevel: 1
NJ_KIRIKAGE: 5
@@ -3760,9 +3760,9 @@ Kagerou: {
}
}
Oboro: {
- inherit: ( "Ninja" );
+ inherit: ( "Ninja" );
- skills: {
+ skills: {
KO_YAMIKUMO: {
MaxLevel: 1
NJ_KIRIKAGE: 5
@@ -3852,7 +3852,7 @@ Oboro: {
}
}
Rebellion: {
- inherit: ( "Gunslinger" );
+ inherit: ( "Gunslinger" );
skills: {
RL_RICHS_COIN: {
diff --git a/db/re/skill_unit_db.txt b/db/re/skill_unit_db.txt
index ffc451a0e..fc74dcbce 100644
--- a/db/re/skill_unit_db.txt
+++ b/db/re/skill_unit_db.txt
@@ -168,7 +168,7 @@
5010,0xfe, , 0, 2, -1,enemy, 0x000 //SC_ESCAPE
8020,0xf5, , 0, 3,2300:2100:1900:1700:1500,enemy, 0x018 //MH_POISON_MIST
-8033,0x7e, , 0, 0, -1,all, 0x003 //MH_STEINWAND
+8033,0x7e, , 0, 0, -1,all, 0x003 //MH_STEINWAND
8025,0x86, , 0, 2:2:3:3:4,1000,enemy, 0x018 //MH_XENO_SLASHER
8041,0xf6, , 1:1:2:2:3, 0,2000,enemy, 0x01A //MH_LAVA_SLIDE
8043,0xf7, , 1, 0,-1,enemy, 0x2018 //MH_VOLCANIC_ASH
@@ -184,7 +184,7 @@
8409,0xef, , 0, 1, -1,friend,0x2018 //EL_ZEPHYR
8412,0xf0, , 0, 1, -1,friend,0x2018 //EL_POWER_OF_GAIA
-10006,0xc1, , 2, 0, -1,sameguild, 0x040 //GD_LEADERSHIP
-10007,0xc2, , 2, 0, -1,sameguild, 0x040 //GD_GLORYWOUNDS
-10008,0xc3, , 2, 0, -1,sameguild, 0x040 //GD_SOULCOLD
-10009,0xc4, , 2, 0, -1,sameguild, 0x040 //GD_HAWKEYES
+10006,0xc1, , 2, 0, -1,sameguild, 0x040 //GD_LEADERSHIP
+10007,0xc2, , 2, 0, -1,sameguild, 0x040 //GD_GLORYWOUNDS
+10008,0xc3, , 2, 0, -1,sameguild, 0x040 //GD_SOULCOLD
+10009,0xc4, , 2, 0, -1,sameguild, 0x040 //GD_HAWKEYES
diff --git a/db/skill_changematerial_db.txt b/db/skill_changematerial_db.txt
index 78920cd66..3fb92139e 100644
--- a/db/skill_changematerial_db.txt
+++ b/db/skill_changematerial_db.txt
@@ -4,17 +4,17 @@
// ProductID,BaseRate,MakeAmount1,MakeAmountRate1,MakeAmount2,MakeAmountRate2
// MakeAmount3,MakeAmountRate3,MakeAmount4,MakeAmountRate4,MakeAmount5,MakeAmountRate5
//====================================================
-// NOTE:
+// NOTE:
// Up to 5 ID/Amount pairs can be specified.
// Rate = n/10%
//====================================================
-703,4,800,2,200 // Hinalle
+703,4,800,2,200 // Hinalle
958,800,9,1000 // Horrendous_Mouth
959,800,7,1000 // Rotten_Scale
-960,1000,6,800,9,200 // Nipper
+960,1000,6,800,9,200 // Nipper
961,800,3,1000 // Conch
-962,1000,4,800,6,200 // Tentacle
+962,1000,4,800,6,200 // Tentacle
963,800,3,1000 // Sharp_Scale
964,800,8,1000 // Crap_Shell
967,800,4,1000 // Turtle_Shell
@@ -22,9 +22,9 @@
970,800,9,1000 // Alchol
971,800,5,1000 // Detrimindexta
973,800,4,1000 // Counteragent
-974,1000,4,800,6,200 // Mixture
-991,1000,1,500,1,500 // Crystal_Blue
-992,1000,1,500,1,500 // Wind_Of_Verdure
+974,1000,4,800,6,200 // Mixture
+991,1000,1,500,1,500 // Crystal_Blue
+992,1000,1,500,1,500 // Wind_Of_Verdure
999,1000,10,1000 // Steel
1003,500,1,1000 // Coal
1008,800,6,1000 // Frozen_Heart
@@ -34,21 +34,21 @@
1012,800,3,1000 // Lizard_Scruff
1013,9,800,13,200 // Colorful_Shell
1014,4,800,6,200 // Jaws_Of_Ant
-1016,1000,7,800,10,200 // Rat_Tail
+1016,1000,7,800,10,200 // Rat_Tail
1019,800,2,1000 // Wooden_Block
-1020,1000,4,800,6,200 // Long_Hair
+1020,1000,4,800,6,200 // Long_Hair
1021,800,4,1000 // Dokkaebi_Horn
-1022,1000,2,800,3,200 // Fox_Tail
+1022,1000,2,800,3,200 // Fox_Tail
1024,800,4,1000 // Chinese_Ink
1025,800,8,1000 // Spiderweb
1026,800,4,1000 // Acorn
1030,800,2,1000 // Tiger_Footskin
-1033,1000,4,800,6,200 // Root_Of_Maneater
-1034,1000,6,800,9,200 // Cobold_Hair
-1035,1000,8,800,12,200 // Dragon_Canine
+1033,1000,4,800,6,200 // Root_Of_Maneater
+1034,1000,6,800,9,200 // Cobold_Hair
+1035,1000,8,800,12,200 // Dragon_Canine
1037,800,6,1000 // Dragon_Train
-1038,1000,1,1000 // Petite_Dablofs_Horn
-1040,1000,8,800,12,200 // Elder_Pixie's_Beard
+1038,1000,1,1000 // Petite_Dablofs_Horn
+1040,1000,8,800,12,200 // Elder_Pixie's_Beard
1041,800,3,1000 // Lantern
1042,800,6,1000 // Short_Leg
1043,800,6,1000 // Nail_Of_Orc
@@ -57,7 +57,7 @@
1049,800,6,1000 // Skirt_Of_Virgin
1050,800,3,1000 // Tendon
1051,800,7,1000 // Detonator
-1053,1000,6,800,9,200 // Tooth_Of_Ancient_Fish
+1053,1000,6,800,9,200 // Tooth_Of_Ancient_Fish
1056,800,8,1000 // Grit
1058,800,5,1000 // Wing_Of_Moth
1059,1000,5,1000 // Transparent_Cloth
diff --git a/db/translations.conf b/db/translations.conf
index fc8144636..a93e86384 100644
--- a/db/translations.conf
+++ b/db/translations.conf
@@ -1,12 +1,12 @@
//====================================================
-//= _ _ _
-//= | | | | | |
-//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
-//=
-//= http://herc.ws/board/
+//=
+//= http://herc.ws/board/
//================= More Information =================
//= http://herc.ws/board/topic/8687-hercules-ultimate-localization-design/
//====================================================
@@ -17,4 +17,4 @@
translations: (
//"path/to/my/Language.po",
//"db/Spanish.po", //(Example)
-) \ No newline at end of file
+)
diff --git a/npc/airports/airships.txt b/npc/airports/airships.txt
index eaf042978..9a9941e25 100644
--- a/npc/airports/airships.txt
+++ b/npc/airports/airships.txt
@@ -650,7 +650,7 @@ airplane,50,66,5 script Apple Merchant#airplane 4_M_04,{
airplane_01,243,73,0 script #AirshipWarp-3 WARPNPC,1,1,{
end;
-
+
OnTouch:
switch ($@airplanelocation2) {
case 0: warp "ra_fild12",292,204; end;
@@ -668,7 +668,7 @@ OnHide:
specialeffect EF_BASH;
disablenpc strnpcinfo(0);
end;
-
+
OnUnhide:
enablenpc strnpcinfo(0);
specialeffect EF_SUMMONSLAVE;
diff --git a/npc/battleground/kvm/kvm01.txt b/npc/battleground/kvm/kvm01.txt
index d5ecdfa31..951d9ef2b 100644
--- a/npc/battleground/kvm/kvm01.txt
+++ b/npc/battleground/kvm/kvm01.txt
@@ -25,7 +25,7 @@ bat_room,169,226,5 script KVM Waiting Room#a::KvM01R_Guillaume 4_M_KY_KNT,{
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
$@KvM01BG_id1 = waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
diff --git a/npc/battleground/kvm/kvm02.txt b/npc/battleground/kvm/kvm02.txt
index bf41528cc..ea2a32bbc 100644
--- a/npc/battleground/kvm/kvm02.txt
+++ b/npc/battleground/kvm/kvm02.txt
@@ -27,7 +27,7 @@ bat_room,197,226,5 script KVM Waiting Room#a2::KvM02R_Guillaume 4_M_KY_KNT,{
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
$@KvM02BG_id1 = waitingroom2bg("bat_c02",52,129,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie");
end;
diff --git a/npc/battleground/kvm/kvm03.txt b/npc/battleground/kvm/kvm03.txt
index f4bd49d4f..279a0b5fe 100644
--- a/npc/battleground/kvm/kvm03.txt
+++ b/npc/battleground/kvm/kvm03.txt
@@ -26,7 +26,7 @@ bat_room,225,226,5 script KVM Waiting Room#a3::KvM03R_Guillaume 4_M_KY_KNT,{
OnInit:
waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
$@KvM03BG_id1 = waitingroom2bg("bat_c03",52,129,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie");
end;
diff --git a/npc/cities/amatsu.txt b/npc/cities/amatsu.txt
index 54f23c853..3db68617e 100644
--- a/npc/cities/amatsu.txt
+++ b/npc/cities/amatsu.txt
@@ -165,7 +165,7 @@ amatsu,230,160,3 script Well-side Maiden#ama 4_F_JPN2,{
mes "It really gives me the creeps.";
close;
}
-
+
amatsu,179,107,4 script John#ama 4_M_04,{
mes "[John]";
mes "Yo~";
@@ -222,7 +222,7 @@ amatsu,179,107,4 script John#ama 4_M_04,{
mes "I guess it's over...";
close;
}
-
+
amatsu,205,163,3 script Mimi#ama 4_F_JPNCHIBI,{
mes "[Mimi]";
mes "Puhuhu~!";
@@ -240,7 +240,7 @@ amatsu,205,163,3 script Mimi#ama 4_F_JPNCHIBI,{
mes "A lady can always use a little more makeup.";
close;
}
-
+
amatsu,185,115,3 script Drunken Man#ama 4_M_JPNOJI2,{
mes "[Kosake]";
mes "*Hiccup*...My wife is just like,";
@@ -280,7 +280,7 @@ amatsu,185,115,3 script Drunken Man#ama 4_M_JPNOJI2,{
mes "If you buy me a drink, I will think about it...Hehehe...*Hiccup*..";
close;
}
-
+
amatsu,217,179,1 script Grandma#ama 4_F_JPNOBA2,{
mes "[Hatsue]";
mes "I'm worried about my husband.";
@@ -292,7 +292,7 @@ amatsu,217,179,1 script Grandma#ama 4_F_JPNOBA2,{
mes "went to the bar and starts drinking again? The man just doesn't have any backbone. *Phew*";
close;
}
-
+
amatsu,287,266,3 script Jyaburo#ama 4_M_JPNOJI,{
mes "[Jyaburo]";
mes "This place is special to me.";
@@ -372,7 +372,7 @@ amatsu,269,221,1 script Propose Girl#ama 4_F_JPN,{
mes "happy things will happen, if you do.";
close;
}
-
+
amatsu,243,202,3 script Drama Teacher#ama 4_F_JPNOBA2,{
jap_tree = 2;
mes "[Garakame sensei]";
@@ -417,7 +417,7 @@ amatsu,243,202,3 script Drama Teacher#ama 4_F_JPNOBA2,{
mes "someday when you are ready.";
close;
}
-
+
amatsu,283,203,1 script Bonubonu#ama1 SEE_OTTER,{
end;
}
@@ -451,7 +451,7 @@ amatsu,283,203,1 script Bonubonu#ama2 HIDDEN_NPC,{
mes "It is really a miraculous and gracious tree...";
close;
}
-
+
amatsu,274,178,7 script Veterinarian#ama 4_M_JOB_WIZARD,{
jap_tree = 4;
mes "[Sakura Seiichi]";
@@ -504,7 +504,7 @@ amatsu,274,178,7 script Veterinarian#ama 4_M_JOB_WIZARD,{
mes "Finally, I couldn't even hear anything. I can't even recall what he was trying to tell me...^000000";
close;
}
-
+
amatsu,262,197,1 script Legendary Tree HIDDEN_NPC,{
if (jap_tree == 1) {
mes "^3355FFAs she mentioned, this tree";
diff --git a/npc/cities/ayothaya.txt b/npc/cities/ayothaya.txt
index db1a47a31..4eba67b7f 100644
--- a/npc/cities/ayothaya.txt
+++ b/npc/cities/ayothaya.txt
@@ -120,7 +120,7 @@ ayothaya,189,120,3 script Young Man#Thang 4_M_THAIONGBAK,{
mes "I think.";
close;
}
-
+
ayothaya,171,152,5 script Girl#Lalitha 4_F_THAIAYO,{
.@sit = rand(1,5);
if (.@sit > 0 && .@sit < 3) {
@@ -191,7 +191,7 @@ ayothaya,171,152,5 script Girl#Lalitha 4_F_THAIAYO,{
mes "What's up?";
close;
}
-
+
ayothaya,143,102,5 script Old Man#ayothaya 4_M_THAIOLD,{
mes "[Villager]";
mes "Ummm.";
@@ -236,7 +236,7 @@ ayothaya,143,102,5 script Old Man#ayothaya 4_M_THAIOLD,{
mes "at least once.";
close;
}
-
+
ayothaya,197,189,5 script Young Man#1ayothaya 4_M_THAIAYO,{
mes "[Kwan]";
mes "Phew, isn't it";
@@ -262,7 +262,7 @@ ayothaya,197,189,5 script Young Man#1ayothaya 4_M_THAIAYO,{
mes "Well, anyway, it's still a really good idea to stay away from that place. I hope you enjoy visiting Ayotaya, and that you keep safe~";
close;
}
-
+
ayothaya,214,142,5 script Young Man#5ayothaya 4_M_THAIONGBAK,{
mes "[Detzi]";
mes "In Ayotaya, we have our own traditional martial arts. We, the young men of the village, practice our traditional martial arts in order to become strong.";
@@ -271,7 +271,7 @@ ayothaya,214,142,5 script Young Man#5ayothaya 4_M_THAIONGBAK,{
mes "Why don't you learn our martial arts? I guarantee that it will help you greatly in your travels.";
close;
}
-
+
ayothaya,241,264,5 script Young Man#5ayothaya2 4_M_THAIONGBAK,{
mes "[Eik]";
mes "Hey...";
diff --git a/npc/cities/einbech.txt b/npc/cities/einbech.txt
index d3d853846..428b680e0 100644
--- a/npc/cities/einbech.txt
+++ b/npc/cities/einbech.txt
@@ -429,7 +429,7 @@ ein_in01,279,92,3 script Tavern Lady#ein 4_M_EINMAN2,{
mes "freshly knit doilies?";
close;
}
-
+
ein_in01,277,95,7 script Ryan Danger#air#einbech 4_M_EINMAN,{
mes "[R.D. Kim]";
mes "Oooh...";
@@ -481,7 +481,7 @@ ein_in01,277,95,7 script Ryan Danger#air#einbech 4_M_EINMAN,{
mes "of his freakin' mind!)";
close;
}
-
+
ein_in01,281,85,3 script Drunken Man#einbech 4_M_DIEMAN,{
mes "[Drunken Man]";
mes "...^333333*Hiccup*^000000...";
@@ -740,7 +740,7 @@ einbech,46,107,6 script Shena#ein::EinMonsters 4_F_EINOLD,{
close;
}
}
-
+
einbech,48,107,4 duplicate(EinMonsters) Luda#ein 4_F_EINWOMAN,{
einbech,148,242,5 script Jung#ein 4_M_EINMAN,{
diff --git a/npc/cities/einbroch.txt b/npc/cities/einbroch.txt
index 714b0bde6..b84a1d897 100644
--- a/npc/cities/einbroch.txt
+++ b/npc/cities/einbroch.txt
@@ -237,7 +237,7 @@ einbroch,232,272,3 script Train Station Staff#ein1::EinbrochTrain 4_M_EIN_SOLDIE
close;
}
}
-
+
einbroch,252,301,3 duplicate(EinbrochTrain) Train Station Staff#ein2 4_M_EIN_SOLDIER
einbroch,259,326,3 script Leslie#ein_1 4_F_EINOLD,{
@@ -285,7 +285,7 @@ einbroch,236,191,3 script Tan#ein 4_M_EINMAN,{
mes "you should carry one with you.";
close;
}
-
+
einbroch,228,121,5 script Little Toby#ein-1 4_M_EINMAN,{
mes "[Little Toby]";
mes "Excuse me...";
diff --git a/npc/cities/geffen.txt b/npc/cities/geffen.txt
index a5d3e8354..58742ae48 100644
--- a/npc/cities/geffen.txt
+++ b/npc/cities/geffen.txt
@@ -181,7 +181,7 @@ geffen,111,48,0 script Stacey 4W_F_01,{
close;
}
}
-
+
geffen_in,34,170,0 script Theodore 1_M_01,{
mes "[Theodore]";
mes "Hello!";
@@ -872,7 +872,7 @@ geffen_in,79,76,2 script Merchant Daven 2_M_PHARMACIST,{
}
close;
}
-
+
geffen_in,114,73,5 script Hadenheim 4_M_SEAMAN,{
mes "[Hans Hadenheim]";
mes "Man, the Rune-Midgard continent sure is big! How's it going, youngster?";
@@ -1335,7 +1335,7 @@ geffen_in,39,127,2 script Psychic Advisor 4_M_BIBI,{
close;
}
}
-
+
geffen_in,109,72,2 script Monster Scholar 4_F_01,{
mes "[Estheres]";
mes "Hello, I'm the resident expert of Monsterology here in Geffen. Is there anything in particular that you're curious about?";
diff --git a/npc/cities/hugel.txt b/npc/cities/hugel.txt
index aae031ebd..5d3458799 100644
--- a/npc/cities/hugel.txt
+++ b/npc/cities/hugel.txt
@@ -55,7 +55,7 @@ hugel,126,151,3 script Emily 4_F_01,{
mes "Don't you think that sounds weird?";
close;
}
-
+
hugel,86,165,5 script Kayplas 4_M_HUBOY,{
mes "[Kayplas]";
mes "Ooh, I really want to";
diff --git a/npc/cities/jawaii.txt b/npc/cities/jawaii.txt
index 85a993c89..a8cc57ee2 100644
--- a/npc/cities/jawaii.txt
+++ b/npc/cities/jawaii.txt
@@ -624,7 +624,7 @@ jawaii_in,30,96,4 script Employee#jaw6 4_F_07,{
}
mes "I hope you will have a good time.";
close;
-
+
OnWelcome:
emotion e_kis;
end;
@@ -714,7 +714,7 @@ OnTouch:
donpcevent "Employee#jaw1::OnSolo";
end;
}
-
+
jawaii_in,15,104,0 script Waitress#jawaii 1_F_PUBGIRL,{
if (checkweight(1201,1) == 0) {
mes "^3355FF * Wait a minute! *";
@@ -1113,7 +1113,7 @@ S_KillChar:
mes "[Bartender]";
return;
}
-
+
jawaii_in,43,115,0 script Customer#jaw_1 4W_M_01,{
if (!getpartnerid()) {
if (Zeny > 99) {
@@ -1388,7 +1388,7 @@ prt_in,173,13,4 script Customer#SoloHan 4_M_04,{
mes "Is this the third time this week I've gotten plastered? Bachewcca, help me count!";
close;
}
-
+
prt_in,170,14,0 script Customer#Bachewcca 4_M_ORIENT02,{
mes "[Bachewcca]";
mes "..............";
diff --git a/npc/cities/morocc.txt b/npc/cities/morocc.txt
index e2ca328df..70b652508 100644
--- a/npc/cities/morocc.txt
+++ b/npc/cities/morocc.txt
@@ -777,4 +777,3 @@ moc_fild16,200,231,4 duplicate(SinGuard) Assassin Guardian#5 4_M_MOC_SOLDIER
moc_fild16,211,231,4 duplicate(SinGuard) Assassin Guardian#6 4_M_MOC_SOLDIER
moc_fild16,200,257,4 duplicate(SinGuard) Assassin Guardian#7 4_M_MOC_SOLDIER
moc_fild16,211,257,4 duplicate(SinGuard) Assassin Guardian#8 4_M_MOC_SOLDIER
-
diff --git a/npc/cities/moscovia.txt b/npc/cities/moscovia.txt
index 74c121836..e6653fef0 100644
--- a/npc/cities/moscovia.txt
+++ b/npc/cities/moscovia.txt
@@ -46,7 +46,6 @@
mes "I'll help you to have a nice trip";
mes "to Moscovia!";
close;
-
case 2:
mes "[Moscovia P.R. Officer]";
mes "Ok then, let us start now.";
@@ -114,7 +113,6 @@ moscovia,166,53,4 script Moscovia P.R. Officer#2 4_F_RUSWOMAN2,{
end;
}
-
// Moscovia Palace :: mos_swan
//============================================================
moscovia,253,166,4 script Soldier#mosk1 4_M_RUSKNIGHT,{
diff --git a/npc/cities/yuno.txt b/npc/cities/yuno.txt
index cda19d322..526a91551 100644
--- a/npc/cities/yuno.txt
+++ b/npc/cities/yuno.txt
@@ -56,7 +56,7 @@ yuno,184,173,4 script Freidrich#juno 4_F_NOVICE,{
close;
}
}
-
+
yuno,337,227,4 script Juno Granny#juno 8_F_GRANDMOTHER,{
mes "[Granny]";
if (rand(1,50) == 1) {
@@ -195,7 +195,7 @@ yuno,165,111,4 script Juno Sage#juno 2_F_MAGICMASTER,,{
close;
}
}
-
+
yuno,157,205,4 script Juno Artisan#juno 1_M_JOBGUIDER,{
mes "[Artisan]";
mes "*Mumble mumble...*";
diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt
index 8b99deb39..54b13bb28 100644
--- a/npc/custom/battleground/bg_common.txt
+++ b/npc/custom/battleground/bg_common.txt
@@ -137,14 +137,14 @@ bat_room,160,140,3 script Prince Croix 4_M_CRU_CRUA,{
// *********************************************************************
function script Time2Str {
set .@time_left, getarg(0) - gettimetick(2);
-
+
set .@Days, .@time_left / 86400;
set .@time_left, .@time_left - (.@Days * 86400);
set .@Hours, .@time_left / 3600;
set .@time_left, .@time_left - (.@Hours * 3600);
set .@Minutes, .@time_left / 60;
set .@time_left, .@time_left - (.@Minutes * 60);
-
+
set .@Time$, "";
if( .@Days > 1 )
set .@Time$, .@Time$ + .@Days + " days, ";
@@ -165,7 +165,7 @@ function script Time2Str {
set .@Time$, .@Time$ + .@time_left + " seconds.";
else if( .@time_left == 1 )
set .@Time$, .@Time$ + .@time_left + " second.";
-
+
return .@Time$;
}
@@ -203,7 +203,7 @@ bat_room,156,178,5 script Tierra Valley Officer#1 4_M_KY_KNT,{
mes "Please sign up for an army with Prince Croix or General Guillaume!";
close;
}
-
+
mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
next;
if( select("I want to join your army!:End Conversation") == 2 )
@@ -226,7 +226,7 @@ bat_room,156,178,5 script Tierra Valley Officer#1 4_M_KY_KNT,{
mes "Stand-by for Tierra Gorge Battle until the time limit passes.";
close;
}
-
+
if( BaseLevel < 80 )
{
mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
@@ -343,7 +343,7 @@ bat_room,164,178,5 script Tierra Valley Officer#3 4_M_KY_KNT,{
mes "Please sign up for an army with Prince Croix or General Guillaume!";
close;
}
-
+
mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
next;
if( select("I want to join your army!:End Conversation") == 2 )
@@ -1260,7 +1260,7 @@ bat_room,160,150,3 script Erundek 4_M_MANAGER,{
case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break;
case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break;
}
-
+
break;
case 3: // Valor Badges
mes "[Erundek]";
@@ -1278,7 +1278,7 @@ bat_room,160,150,3 script Erundek 4_M_MANAGER,{
case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break;
case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break;
}
-
+
break;
case 4: // Heroism Badge
mes "[Erundek]";
@@ -1286,7 +1286,7 @@ bat_room,160,150,3 script Erundek 4_M_MANAGER,{
mes "This shop is not available at the moment.";
close;
}
-
+
mes "[Erundek]";
mes "What item do you want to exchange?";
mes "If you are not sure, check the catalog.";
@@ -1305,21 +1305,21 @@ bat_room,160,150,3 script Erundek 4_M_MANAGER,{
mes "Remember, Battleground Reward Items are ^FF0000Character Bound^000000.";
mes "Are you sure you want this item?";
next;
-
+
if( select("Yes:No") == 2 )
{
mes "[Erundek]";
mes "Do you need more time to check the items?";
close;
}
-
+
if( countitem(.@Badge) < .@Value )
{
mes "[Erundek]";
mes "I'm sorry, but you don't have enough badges to exchange.";
close;
}
-
+
delitem .@Badge,.@Value;
getitem .@Item_ID,1;
mes "[Erundek]";
diff --git a/npc/custom/battleground/bg_flavius_01.txt b/npc/custom/battleground/bg_flavius_01.txt
index fd0cf9112..30693da21 100644
--- a/npc/custom/battleground/bg_flavius_01.txt
+++ b/npc/custom/battleground/bg_flavius_01.txt
@@ -54,7 +54,7 @@ OnReadyCheck:
end;
set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");
set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");
-
+
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x006400;
diff --git a/npc/custom/battleground/bg_flavius_02.txt b/npc/custom/battleground/bg_flavius_02.txt
index f7b7756f4..c735614c1 100644
--- a/npc/custom/battleground/bg_flavius_02.txt
+++ b/npc/custom/battleground/bg_flavius_02.txt
@@ -54,7 +54,7 @@ OnReadyCheck:
end;
set .@Guillaume, getwaitingroomstate(0,"Fl2R_Guillaume");
set .@Croix, getwaitingroomstate(0,"Fl2R_Croix");
-
+
if( .@Guillaume < 10 || .@Croix < 10 )
{
mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x808000;
diff --git a/npc/custom/battleground/bg_kvm01.txt b/npc/custom/battleground/bg_kvm01.txt
index aa12759b9..be826215e 100644
--- a/npc/custom/battleground/bg_kvm01.txt
+++ b/npc/custom/battleground/bg_kvm01.txt
@@ -11,7 +11,7 @@ bat_room,253,227,4 script Registration::KvM01R_Guillaume 4_M_KY_KNT,{ // KvM Gui
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
@@ -150,7 +150,7 @@ OnTimer27000:
OnTimer28000:
donpcevent "::OnKvM01LightB";
end;
-
+
OnTimer29000:
donpcevent "::OnKvM01LightC";
end;
@@ -205,7 +205,7 @@ OnTimer330000:
OnGuillaumeWin:
set $@KvM01BG, 3;
set $@KvM01BG_Victory, 1;
-
+
stopnpctimer;
sleep 2000;
mapannounce "bat_c01","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
diff --git a/npc/custom/battleground/bg_kvm02.txt b/npc/custom/battleground/bg_kvm02.txt
index f2f5f7ca1..91e594a90 100644
--- a/npc/custom/battleground/bg_kvm02.txt
+++ b/npc/custom/battleground/bg_kvm02.txt
@@ -11,7 +11,7 @@ bat_room,225,227,4 script Registration::KvM02R_Guillaume 4_M_KY_KNT,{ // KvM Gui
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie");
end;
@@ -150,7 +150,7 @@ OnTimer27000:
OnTimer28000:
donpcevent "::OnKvM02LightB";
end;
-
+
OnTimer29000:
donpcevent "::OnKvM02LightC";
end;
@@ -205,7 +205,7 @@ OnTimer330000:
OnGuillaumeWin:
set $@KvM02BG, 3;
set $@KvM02BG_Victory, 1;
-
+
stopnpctimer;
sleep 2000;
mapannounce "bat_c02","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
diff --git a/npc/custom/battleground/bg_kvm03.txt b/npc/custom/battleground/bg_kvm03.txt
index f38e81bd1..33edb0be7 100644
--- a/npc/custom/battleground/bg_kvm03.txt
+++ b/npc/custom/battleground/bg_kvm03.txt
@@ -11,7 +11,7 @@ bat_room,197,227,4 script Registration::KvM03R_Guillaume 4_M_KY_KNT,{ // KvM Gui
OnInit:
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1;
end;
-
+
OnEnterBG:
set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie");
end;
@@ -150,7 +150,7 @@ OnTimer27000:
OnTimer28000:
donpcevent "::OnKvM03LightB";
end;
-
+
OnTimer29000:
donpcevent "::OnKvM03LightC";
end;
@@ -205,7 +205,7 @@ OnTimer330000:
OnGuillaumeWin:
set $@KvM03BG, 3;
set $@KvM03BG_Victory, 1;
-
+
stopnpctimer;
sleep 2000;
mapannounce "bat_c03","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF;
diff --git a/npc/custom/battleground/bg_tierra_01.txt b/npc/custom/battleground/bg_tierra_01.txt
index 671c2d929..797b3a389 100644
--- a/npc/custom/battleground/bg_tierra_01.txt
+++ b/npc/custom/battleground/bg_tierra_01.txt
@@ -69,7 +69,7 @@ OnReadyCheck:
bg_monster $@TierraBG1_id1,"bat_a01",176,345,"Food Depot",1909,"Tierra_BG1::OnGuillaumeBreak";
bg_monster $@TierraBG1_id2,"bat_a01",167,50,"Food Storage",1910,"Tierra_BG1::OnCroixBreak";
bg_monster 0,"bat_a01",273,204,"Neutrality Flag",1911,"Tierra_BG1::OnNeutralBreak";
-
+
set .Neutral_Base, 0;
set $@TierraBG1_Victory, 0;
@@ -94,7 +94,7 @@ OnReadyCheck:
mapannounce "bat_a01","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF;
sleep 2000;
mapannounce "bat_a01","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000;
-
+
initnpctimer;
end;
@@ -120,7 +120,7 @@ OnNeutralBreak:
set .Guardian_1, bg_monster(.Neutral_Base,"bat_a01",280,233,"Guardian",1949,"Tierra_BG1::OnGuardian1");
else
bg_monster_set_team .Guardian_1, .Neutral_Base;
-
+
if( .Guardian_2 == 0 )
set .Guardian_2, bg_monster(.Neutral_Base,"bat_a01",287,203,"Guardian",1950,"Tierra_BG1::OnGuardian2");
else
@@ -294,7 +294,7 @@ OnWall:
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a01",186+.@i,266,"Barricade",1906,"Croix_TV1B::OnWall";
-
+
setwall "bat_a01",186,266,16,6,1,"bat_a01_c1";
set .MyMobCount,16;
end;
diff --git a/npc/custom/battleground/bg_tierra_02.txt b/npc/custom/battleground/bg_tierra_02.txt
index c6cebf581..f18d60769 100644
--- a/npc/custom/battleground/bg_tierra_02.txt
+++ b/npc/custom/battleground/bg_tierra_02.txt
@@ -69,7 +69,7 @@ OnReadyCheck:
bg_monster $@TierraBG2_id1,"bat_a02",176,345,"Food Depot",1909,"Tierra_BG2::OnGuillaumeBreak";
bg_monster $@TierraBG2_id2,"bat_a02",167,50,"Food Storage",1910,"Tierra_BG2::OnCroixBreak";
bg_monster 0,"bat_a02",273,204,"Neutrality Flag",1911,"Tierra_BG2::OnNeutralBreak";
-
+
set .Neutral_Base, 0;
set $@TierraBG2_Victory, 0;
@@ -94,7 +94,7 @@ OnReadyCheck:
mapannounce "bat_a02","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF;
sleep 2000;
mapannounce "bat_a02","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000;
-
+
initnpctimer;
end;
@@ -120,7 +120,7 @@ OnNeutralBreak:
set .Guardian_1, bg_monster(.Neutral_Base,"bat_a02",280,233,"Guardian",1949,"Tierra_BG2::OnGuardian1");
else
bg_monster_set_team .Guardian_1, .Neutral_Base;
-
+
if( .Guardian_2 == 0 )
set .Guardian_2, bg_monster(.Neutral_Base,"bat_a02",287,203,"Guardian",1950,"Tierra_BG2::OnGuardian2");
else
@@ -294,7 +294,7 @@ OnWall:
OnBuild:
for( set .@i, 0; .@i < 16; set .@i, .@i + 1 )
bg_monster 0,"bat_a02",186+.@i,266,"Barricade",1906,"Croix_TV2B::OnWall";
-
+
setwall "bat_a02",186,266,16,6,1,"bat_a02_c1";
set .MyMobCount,16;
end;
diff --git a/npc/custom/bgqueue/flavius.txt b/npc/custom/bgqueue/flavius.txt
index 8112be12e..f93821264 100644
--- a/npc/custom/bgqueue/flavius.txt
+++ b/npc/custom/bgqueue/flavius.txt
@@ -19,7 +19,6 @@
//= 1.5b Adjustments to the team-splitting algorithm [Haruna]
//============================================================
-
//Tacham, while the script is under testings the original will remain, meaning if you wanna test this you need to disable the other, or they'll conflict.
bat_b01,15,15,3 script start#bat_b01 CLEAR_NPC,{
OnInit:
@@ -28,22 +27,21 @@ OnInit:
//$@bg_queue_id is cleared after this event ends
OnPlayerListReady:
-
- set $@FlaviusBG1_id1, bg_create_team("bat_b01",10,290);
+ set $@FlaviusBG1_id1, bg_create_team("bat_b01",10,290);
set $@FlaviusBG1_id2, bg_create_team("bat_b01",390,10);
set $@Croix_QueueBG1, queue();
set $@Guill_QueueBG1, queue();
-
+
queueopt($@Guill_QueueBG1,HQO_OnLogout,"start#bat_b01::OnGuillaumeQuit");
queueopt($@Croix_QueueBG1,HQO_OnLogout,"start#bat_b01::OnCroixQuit");
-
+
set .@i, 0;
-
+
copyarray .@bg_member[0],$@bg_member[0],$@bg_member_size;
copyarray .@bg_member_group[0],$@bg_member_group[0],$@bg_member_size;
copyarray .@bg_member_type[0],$@bg_member_type[0],$@bg_member_size;
-
+
freeloop(1);
// Counting all participants and determining sizes, condensing .@bg_member_group
set .@nogroupcount, 0;
@@ -66,7 +64,7 @@ OnPlayerListReady:
set .@bg_count[.@j], 1;
}
}
-
+
// Now, sorting the group arrays from amount of population descending! Bubble sort powers, I call upon thee!
// Type doesn't matter here for precedence checks, but also needs to be sorted the same way along with groups
for (set .@i, 0; .@i < getarraysize(.@bg_groups); set .@i, .@i + 1) {
@@ -84,7 +82,7 @@ OnPlayerListReady:
}
}
}
-
+
// Add the groups to the queues! :D
for (set .@i, 0; .@i < getarraysize(.@bg_groups); set .@i, .@i + 1){
if (queuesize($@Croix_QueueBG1) <= queuesize($@Guill_QueueBG1)){ // Catch'em all and add to the queue!
@@ -123,7 +121,7 @@ OnPlayerListReady:
set $@FlaviusBG1_Victory, 0;
set $@Croix_ScoreBG1, 0;
set $@Guill_ScoreBG1, 0;
-
+
bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
donpcevent "OBJ#bat_b01_a::OnKill";
@@ -143,11 +141,11 @@ OnPlayerListReady:
disablenpc "Vintenar#bat_b01_bover";
bg_warp $@FlaviusBG1_id1,"bat_b01",87,75;
bg_warp $@FlaviusBG1_id2,"bat_b01",311,224;
-
+
/* after warp */
queueopt($@Guill_QueueBG1,HQO_OnMapChange,"start#bat_b01::OnGuillaumeQuit");
queueopt($@Croix_QueueBG1,HQO_OnMapChange,"start#bat_b01::OnCroixQuit");
-
+
donpcevent "countdown#bat_b01::OnEnable";
end;
@@ -180,14 +178,14 @@ OnGuillaumeQuit:
queueremove($@Guill_QueueBG1,getcharid(3));
callsub L_OnPlayerQuit;
end;
-
+
L_OnPlayerQuit:
bg_leave;
setd $@bg_delay_var$,gettimetick(2);
if( queuesize($@Guill_QueueBG1) == 0 || queuesize($@Croix_QueueBG1) == 0 ) /* todo check score and decide a winner if anyone left */
callsub OnMatchOver;
end;
-
+
OnMatchOver:
if( $@FlaviusBG1_id1 || $@FlaviusBG1_id2 ) {
queuedel($@Croix_QueueBG1);
diff --git a/npc/custom/card_remover.txt b/npc/custom/card_remover.txt
index e3aa2bb5b..dace8cac0 100644
--- a/npc/custom/card_remover.txt
+++ b/npc/custom/card_remover.txt
@@ -49,7 +49,7 @@ prt_in,28,73,4 script Wise Old Woman#eAcustom 1_F_ORIENT_04,{
close;
}
set .@cardcount,getequipcardcnt(.@part);
-
+
if (!checkweight(1202,(.@cardcount+1))) {
mes "^3355FFJust a minute!";
mes "I can't offer any of my";
@@ -91,7 +91,7 @@ prt_in,28,73,4 script Wise Old Woman#eAcustom 1_F_ORIENT_04,{
Zeny -= (.zenycost+(.@cardcount * .percardcost));
delitem 1000,1;
delitem 715,1;
-
+
// Replace the constants in the next 3 lines with failure chance values defined in refine_db.txt
// First value = Total failure chance (item and cards destroyed)
// Second value = Partial failure chance (one or the other is destroyed, player decides which one is safe)
diff --git a/npc/custom/etc/floating_rates.txt b/npc/custom/etc/floating_rates.txt
index ff3b6e8fa..c207c6275 100644
--- a/npc/custom/etc/floating_rates.txt
+++ b/npc/custom/etc/floating_rates.txt
@@ -35,7 +35,7 @@ OnHour18:
setbattleflag("item_rate_equip",$@drate);
//we don't change card drops rate, because these values won't change them anyway
atcommand "@reloadmobdb";
-
+
announce "Current Rune-Midgard rates are: 1."+($@brate-100)+"x 1."+($@jrate-100)+"x 1."+($@drate-100)+"x",bc_all,0xFF6060;
end;
}
diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt
index 0d25be9d5..ab1b48c30 100644
--- a/npc/custom/etc/marriage.txt
+++ b/npc/custom/etc/marriage.txt
@@ -65,7 +65,7 @@ prt_church,100,123,4 script Vomars 1_M_PASTOR,{
function SF_RetrieveRingF;
function SF_RingsAccepted;
function SF_StartCeremony;
-
+
if (getpartnerid() > 0) {
mes "["+@name$+"]";
mes "You have my blessings, have a wonderful married life.";
@@ -81,7 +81,7 @@ prt_church,100,123,4 script Vomars 1_M_PASTOR,{
mes "to prepare for marriage";
close;
} // End official iRO dialog
-
+
if (strcharinfo(0) == $wed_groom$) {
SF_Groom();
end;
@@ -278,7 +278,7 @@ function SF_RetrieveRingM {
mes "Here's the wedding ring for your bride.";
if ($@wed_ring) delitem $@wed_ring,1;
set $wed_groom_progress,4;
-
+
if ($wed_bride_progress == 4)
SF_StartCeremony();
else {
@@ -336,7 +336,7 @@ function SF_StartCeremony {
OnTimer1000:
npctalk "Ladies and Gentlemen, We will now join in holy matrimony these two lovers.";
end;
-
+
OnTimer5000:
npctalk "Now more than ever, will both of your lives be entwined together as so will be your souls.";
end;
@@ -344,31 +344,31 @@ OnTimer5000:
OnTimer10000:
npctalk "You will both honor and cherish each other through the best and worst of times.";
end;
-
+
OnTimer15000:
npctalk "The safety and well being of your other will now also be your responsibility.";
end;
-
+
OnTimer20000:
npctalk "May in sickness or good health, your love burn bright like no force can extinguish it.";
end;
-
+
OnTimer25000:
npctalk "Those here stand witness to these vows bestowed upon you, you must act accordingly to them.";
end;
-
+
OnTimer30000:
npctalk "Understanding that, we are nothing more but mortals on this earth, but this is our triumph.";
end;
-
+
OnTimer35000:
npctalk "We here will now join these two mortal entities, and create an immortal love.";
end;
-
+
OnTimer40000:
npctalk $wed_groom$+", you have accepted to take "+$wed_bride$+" as your lawfully wedded wife,";
end;
-
+
OnTimer45000:
npctalk "and you, "+$wed_bride$+", have accepted take "+$wed_groom$+" as your lawfully wedded husband.";
end;
@@ -440,7 +440,7 @@ prt_church,106,99,3 script Happy Marry 1_F_02,{
mes "Isn't marriage beautiful?";
close;
}
-
+
function SF_WedProgress;
function SF_Principles;
function SF_Procedure;
@@ -451,7 +451,7 @@ prt_church,106,99,3 script Happy Marry 1_F_02,{
SF_WedProgress();
end;
}
-
+
do {
mes "["+@name$+"]";
mes "Marriage... is such a beautiful thing.";
@@ -529,7 +529,7 @@ function SF_Register {
close;
}
}
-
+
function SF_WedProgress {
if (strcharinfo(0) == $wed_groom$) {
mes "["+@name$+"]";
@@ -658,7 +658,7 @@ OnTimer60000:
npctalk "Registration timed out. Is it that noone wants to marry "+$@msg$+"..?";
emotion e_hmm;
-
+
set $wed_groom$,"";
set $wed_groom_sex, 0;
set $wed_bride$,"";
@@ -675,7 +675,7 @@ function SF_TryRegister {
set @type$, "groom";
if (@bride)
set @type$, "bride";
-
+
mes "["+@name$+"]";
mes "Before registering as "+@type$+", let me check if you meet all the requirements...";
next;
@@ -689,7 +689,7 @@ function SF_TryRegister {
set @item, 7170;
else
set @item, 2338;
-
+
if (getequipid(2) != @item) {
mes "["+@name$+"]";
mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
@@ -814,12 +814,12 @@ prt_church,94,99,4 script Sister Lisa 1_F_PRIEST,{
function SF_DivorceEnd;
function SF_InProgress;
-
+
if ($@divorce_progress==1) {
goto SF_InProgress;
end;
}
-
+
do {
mes "["+@name$+"]";
mes "Divorcing can be such a sad event...";
diff --git a/npc/custom/etc/monster_arena.txt b/npc/custom/etc/monster_arena.txt
index 82f764977..9c00b67a5 100644
--- a/npc/custom/etc/monster_arena.txt
+++ b/npc/custom/etc/monster_arena.txt
@@ -195,7 +195,6 @@ L_Exit:
}
gon_test,56,91,6 duplicate(monsterreferee) Referee#01 1_M_PUBMASTER
-
// Usher //
gon_test,58,94,6 script Usher 4_M_04,{
set @marena,1;
@@ -332,7 +331,6 @@ L_Sell:
mes "You earned ^0000FF" + @sellearn + "^000000z.";
close;
-
L_NoExp:
mes "[Monster Trainer]";
mes "You do not have enough experience.";
@@ -761,8 +759,6 @@ OnTouch:
gon_test,43,87,5 duplicate(SummonPad) Summon Pad 2 HIDDEN_NPC,2,2
gon_test,72,87,5 duplicate(SummonPad) Summon Pad 3 HIDDEN_NPC,2,2
-
-
// Skill Disabler //
gon_test mapflag noskill
diff --git a/npc/custom/etc/penal_servitude.txt b/npc/custom/etc/penal_servitude.txt
index b83bf3f83..30aaf17e2 100644
--- a/npc/custom/etc/penal_servitude.txt
+++ b/npc/custom/etc/penal_servitude.txt
@@ -134,7 +134,7 @@ sec_in02,137,57,1 script Overseer 4_M_PAY_SOLDIER,{
delitem 4009,countitem(4009);//Items: Chonchon_Card,
delitem 4022,countitem(4022);//Items: Spore_Card,
delitem 4048,countitem(4048);//Items: Poison_Spore_Card,
-
+
if (PRISON_Q <= 0 ) goto L_GET_Q;
mes "I want you to gather ^FF0000"+PRISON_Q+" Orange Net Mushroom^000000.";
@@ -170,7 +170,6 @@ L_GET_Q:
close;
}
-
sec_in02 mapflag nomemo
sec_in02 mapflag nosave SavePoint
sec_in02 mapflag noteleport
diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt
index 3526cde5c..fd6865a54 100644
--- a/npc/custom/etc/quest_warper.txt
+++ b/npc/custom/etc/quest_warper.txt
@@ -71,10 +71,10 @@ function script Q_Warpra {
mes "Hello,";
mes "I can warp you to any town or dungeon, but you need to unlock them first by visiting us.";
mes "What do you need?";
-
+
if(getarg(0) == 0) callfunc "QWS_MMarray",0;
if(getarg(0) == 1) callfunc "QWS_MMarray",1;
-
+
set @MMenu,select(@Mmenulist$[0],@Mmenulist$[1],@Mmenulist$[2],@Mmenulist$[3],@Mmenulist$[4],@Mmenulist$[5],@Mmenulist$[6],@Mmenulist$[7],@Mmenulist$[8],@Mmenulist$[9],@Mmenulist$[10],@Mmenulist$[11]);
switch(@Mmenuref[@MMenu-1]+1){
@@ -167,7 +167,7 @@ Setprice:
if (!$QW_S_PRICE) mes "Storage = ^FF0000 Free ^000000";
if ($QW_S_PRICE == 60) mes "Storage = ^0000FF Kafra Mode ^000000";
mes "Guild Storage = "+(($QW_GS_PRICE)?"^00FF00"+$QW_GS_PRICE:"^FF0000Free")+"^000000";
-
+
switch(select("Basic - Warps","Advanced - Warps","Overseas - Warps","Basic Dungeon warp fee","Advanced Dungeon warp fee","Overseas Dungeon warp fee","Full Healing","Part Healing","Storage","Guild Storage","Back","Exit")) {
case 1:
next;
@@ -388,7 +388,7 @@ L_heal_Part:
if (@healchoice == 2) callsub PHeal,1,0;
if (@healchoice == 3) callsub PHeal,0,1;
goto L_End;
-
+
PHeal:
next;
set @Hp, MaxHp-Hp;
@@ -499,7 +499,7 @@ L_GStorage:
close2;
guildopenstorage;
end;
-
+
L_End:
close;
end;
@@ -523,7 +523,7 @@ L_NoUnlock:
mes "I don't unlock this location, my assistant deeper in the dungeon will unlock this place.";
close;
end;
-
+
//=========================Short=On=Zeny===========================
L_Short_on_zeny:
next;
@@ -536,7 +536,7 @@ L_Short_on_zeny:
}
close;
end;
-
+
//===========================Stamp=Card============================
stampcard:
// Counting of the ammount of places you have unlocked
@@ -978,7 +978,6 @@ function script QWS_Tarray {
set @Tmenuref[@Tj],57005; // 57005='dead' in hex
return;
-
//----------------Make Town Menu Function
function QWS_Make_Town_Menu {
@@ -1450,7 +1449,6 @@ function script QWS_Darray {
set @Dmenuref[@Dj],57005; // 57005='dead' in hex
return;
-
//----------------Make Dungeon Menu Function
function QWS_Make_Dungeon_Menu {
@@ -1525,7 +1523,7 @@ function script QWS_DLarray {
function script QWS_Dungeon_Warpra {
function QWS_D_getbin;
function QWS_D_setbin;
-
+
if ((QWS_D_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
mes "[Warpra]";
mes getarg(1)+" unlocked!";
@@ -1538,7 +1536,6 @@ function script QWS_Dungeon_Warpra {
debugmes "QWS_Dungeon_Warpra error, improper syntax?";
return;
-
function QWS_D_setbin {
set @tempsetbindata,1;
if (getarg(0) == 0) goto binset;
@@ -1571,7 +1568,7 @@ binget:
function script QWS_Town_Warpra {
function QWS_T_getbin;
function QWS_T_setbin;
-
+
if ((QWS_T_getbin(getarg(0)) == 0) && (getarg(1) != "")) {
mes "[Warpra]";
mes getarg(1)+" unlocked!";
diff --git a/npc/custom/etc/stock_market.txt b/npc/custom/etc/stock_market.txt
index 060228317..078ce5137 100644
--- a/npc/custom/etc/stock_market.txt
+++ b/npc/custom/etc/stock_market.txt
@@ -431,7 +431,7 @@ S_Buy:
mes $S10N$;
next;
menu "Continue",-,"Cancel",S_Start;
-
+
mes "Enter the name of the share company";
mes "Transaction fee of ^FF0000" + $S_Trans + "z^000000 will apply.";
set @buyname$,"0";
@@ -645,7 +645,6 @@ ACCS11:
next;
goto S_Start;
-
// GM MENU //
GM_Menu:
mes "[Stock Market]";
diff --git a/npc/custom/events/valentinesdayexp.txt b/npc/custom/events/valentinesdayexp.txt
index 5a94bc913..4ed24012d 100644
--- a/npc/custom/events/valentinesdayexp.txt
+++ b/npc/custom/events/valentinesdayexp.txt
@@ -200,7 +200,7 @@ prt_castle,54,34,4 script Carl Orleans#val1 1_M_01,{
mes "Yes? What can I cook for you?";
next;
menu "Black handmade Chocolate, please",-,"I want a White handmade Chocolate...",M_WHITE,"I'm lost, sorry to bother you.",M_End;
-
+
mes "[Carl Orleans]";
mes "Well, I just might be able to fulfill your needs...";
next;
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index 243ca29c2..ee03c16eb 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -12,7 +12,6 @@
//============================================================
prt_in,24,61,7 script Perchik 1_M_01,{
-
setarray .@item[0],644,3; // Item requirements: <ID>,<Count>{,...} (0 to disable)
setarray .@cost[0],0,5000; // Zeny requirements: <base price>,<price per refine>
diff --git a/npc/custom/quests/kaho_balmung.txt b/npc/custom/quests/kaho_balmung.txt
index 4e598922d..ff581825b 100644
--- a/npc/custom/quests/kaho_balmung.txt
+++ b/npc/custom/quests/kaho_balmung.txt
@@ -12,10 +12,9 @@
//============================================================
prontera,158,356,4 script Royal Messenger 8W_SOLDIER,{
-
setarray .@Req1[0],1161,999,120,984,10,996,10,994,10,995,10,997,10;
setarray .@Req2[0],5013,2298,1,1001,10,996,10,994,10,995,10,997,10;
-
+
mes "[Royal Messenger]";
mes "Welcome to Prontera.";
mes "I am the messenger in charge of the Royal Quests.";
diff --git a/npc/custom/quests/questboard.txt b/npc/custom/quests/questboard.txt
index 3e7a90d9d..e4336a67a 100644
--- a/npc/custom/quests/questboard.txt
+++ b/npc/custom/quests/questboard.txt
@@ -16,7 +16,6 @@
//============================================================
prontera,129,215,5 script Questboard 4_BOARD3,{
-
if(c_run==1){
mes "[^FF7700Questboard^000000]";
mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
@@ -40,7 +39,7 @@ prontera,129,215,5 script Questboard 4_BOARD3,{
}
goto L_checkitems;
}
-
+
if(h_run==1){
mes "[^FF7700Questboard^000000]";
mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
@@ -69,114 +68,112 @@ prontera,129,215,5 script Questboard 4_BOARD3,{
}
goto L_checkmobs;
}
-
+
L_questmenu:
mes "[^FF7700Questboard^000000]";
mes "Select category:";
next;
-
+
switch(select((.collection)?"Collection Quests":"",
- (.hunting)?"Hunting Quests":"",
- "Exit")) {
-
-case 1:
- set .@collectmenu$, "";
- for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1) {
- if (.@i) set .@collectmenu$,.@collectmenu$+":";
- set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
- }
- set .@selection,select(.@collectmenu$);
- if(gettimetick(2) < getd(.@selection + "_collection_delay")){
- set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
- mes "[^FF7700Questboard^000000]";
- if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
- if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
- mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
- close;
- }
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2) {
- mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
- next;
- if(select("Accept:Decline") == 2){
- close;
- }
- if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax"))
- {
- mes "[^FF7700Questboard^000000]";
- mes "Quest accepted.";
- set c_run, 1;
- set currentquest$, .@selection;
- close;
- }
- else
- {
- mes "[^FF7700Questboard^000000]";
- mes "You don't have the required";
- mes "level to do this quest.";
- close;
- }
-
-case 2:
- set .@huntmenu$, "";
- for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1) {
- if (.@i) set .@huntmenu$,.@huntmenu$+":";
- set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
- }
- set .@selection,select(.@huntmenu$);
- if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
- set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
- mes "[^FF7700Questboard^000000]";
- if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
- if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
- mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
- close;
- }
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2) {
- mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
- next;
- if(select("Accept:Decline") == 2){
- close;
- }
- if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax"))
- {
+ (.hunting)?"Hunting Quests":"",
+ "Exit")) {
+ case 1:
+ set .@collectmenu$, "";
+ for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1) {
+ if (.@i) set .@collectmenu$,.@collectmenu$+":";
+ set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
+ }
+ set .@selection,select(.@collectmenu$);
+ if(gettimetick(2) < getd(.@selection + "_collection_delay")){
+ set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
+ mes "[^FF7700Questboard^000000]";
+ if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
+ if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
+ mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
+ close;
+ }
mes "[^FF7700Questboard^000000]";
- mes "Quest accepted.";
- set h_run, 1;
- set currentquest$, .@selection;
- close;
- }
- else
- {
+ mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2) {
+ mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
+ next;
+ if(select("Accept:Decline") == 2){
+ close;
+ }
+ if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax"))
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest accepted.";
+ set c_run, 1;
+ set currentquest$, .@selection;
+ close;
+ }
+ else
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "You don't have the required";
+ mes "level to do this quest.";
+ close;
+ }
+
+ case 2:
+ set .@huntmenu$, "";
+ for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1) {
+ if (.@i) set .@huntmenu$,.@huntmenu$+":";
+ set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
+ }
+ set .@selection,select(.@huntmenu$);
+ if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
+ set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
+ mes "[^FF7700Questboard^000000]";
+ if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
+ if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
+ mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
+ close;
+ }
mes "[^FF7700Questboard^000000]";
- mes "You don't have the required";
- mes "level to do this quest.";
+ mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2) {
+ mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
+ next;
+ if(select("Accept:Decline") == 2){
+ close;
+ }
+ if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax"))
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest accepted.";
+ set h_run, 1;
+ set currentquest$, .@selection;
+ close;
+ }
+ else
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "You don't have the required";
+ mes "level to do this quest.";
+ close;
+ }
+ case 3:
close;
}
-
-case 3:
- close;
- }
-
+
L_checkitems:
for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2) {
if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
@@ -200,7 +197,7 @@ L_checkitems:
set currentquest$, "";
set c_run, 0;
close;
-
+
L_checkmobs:
set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2);
for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
@@ -214,7 +211,7 @@ L_checkmobs:
}
goto L_checkmobs2;
}
-
+
L_checkmobs2:
if(.@checkmonster<.@goal){
mes "[^FF7700Questboard^000000]";
@@ -248,33 +245,30 @@ OnNPCKillEvent:
continue;
}
end;
-
-OnInit:
+OnInit:
function AddCollection;
function AddHunting;
//Activate/Deactive quest categories here
set .collection, 1;
set .hunting, 1;
-
+
//Quest Delay (seconds)
//24 hours = 86400 seconds
set .quest_delay, 0;
-
+
//Checks if quests are loaded (prevents out of index)
if(.questsloaded==1) end;
- set .questsloaded, 1;
-
- //Add Collection Quests here
- //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
-
-
- //Add Hunting Quests here
- //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
-
- end;
-
+ set .questsloaded, 1;
+
+ //Add Collection Quests here
+ //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
+
+ //Add Hunting Quests here
+ //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
+
+ end;
function AddCollection {
set .collectionquestcount,.collectionquestcount+1;
diff --git a/npc/custom/quests/tha_statues.txt b/npc/custom/quests/tha_statues.txt
index c4787fcd3..00a7c9a8f 100644
--- a/npc/custom/quests/tha_statues.txt
+++ b/npc/custom/quests/tha_statues.txt
@@ -38,7 +38,6 @@ done:
mes "[Thalos]";
mes "Go search the 2nd Statue!";
close;
-
}
tha_t09,84,99,4 script Mediane HIDDEN_NPC,{
diff --git a/npc/custom/quests/thq/THQS_QuestNPC.txt b/npc/custom/quests/thq/THQS_QuestNPC.txt
index 76790221b..d4e058fb4 100644
--- a/npc/custom/quests/thq/THQS_QuestNPC.txt
+++ b/npc/custom/quests/thq/THQS_QuestNPC.txt
@@ -66,7 +66,7 @@ N_NewQuest:
mes "Would you like me to asign you a Quest?";
next;
menu "Yes I would like a Quest Please.",-,"Sorry Guy no time today.",N_NoTime;
-
+
mes "[Guy]";
mes "Ok lets see what quest we can give you today.";
mes "The quest names in ^FF0000This Colour^000000 mean that they are more challanging then the rest, but have better rewards.";
diff --git a/npc/events/MemorialDay_2008.txt b/npc/events/MemorialDay_2008.txt
index a6c09fe80..c6628ef12 100644
--- a/npc/events/MemorialDay_2008.txt
+++ b/npc/events/MemorialDay_2008.txt
@@ -65,9 +65,7 @@ prontera,182,214,4 script Lauds#Memorial 1_M_MERCHANT,{
mes "Bring me ^FF000030 Fabric and 20 Fluffs^000000.";
Memorial08 = 1;
close;
- }
-
- else if (Memorial08 == 1) {
+ } else if (Memorial08 == 1) {
if (countitem(1059) < 30 || countitem(914) < 20) {
mes "[Mad Sago Lauds]";
mes "What are these? They aren't enough?!";
@@ -94,9 +92,7 @@ prontera,182,214,4 script Lauds#Memorial 1_M_MERCHANT,{
Memorial08 = 2;
close;
}
- }
-
- else if (Memorial08 == 2) {
+ } else if (Memorial08 == 2) {
mes "[Mad Sago Lauds]";
mes "Ah, you have fluffy new towel now I even put your name on it";
next;
@@ -116,22 +112,16 @@ prontera,182,214,4 script Lauds#Memorial 1_M_MERCHANT,{
mes "What a shame! You should go speak to ^FF0000Grast in Prontera^000000.";
Memorial08 = 3;
close;
- }
-
- else if (Memorial08 == 3) {
+ } else if (Memorial08 == 3) {
mes "[Mad Sago Lauds]";
mes "What are you still doing here?";
mes "I told you to go speak to Grast in Prontera!";
close;
- }
-
- else if (Memorial08 == 4 || Memorial08 == 5 || Memorial08 == 6) {
+ } else if (Memorial08 == 4 || Memorial08 == 5 || Memorial08 == 6) {
mes "[Mad Sago Lauds]";
mes "Go help Grast, and then come back.";
close;
- }
-
- else if (Memorial08 == 7) {
+ } else if (Memorial08 == 7) {
mes "[Mad Sago Lauds]";
mes "Oh, you've brought them all.";
mes "Hahaha!";
@@ -151,16 +141,12 @@ prontera,182,214,4 script Lauds#Memorial 1_M_MERCHANT,{
mes "You should be going to the plaque!";
Memorial08 = 8;
close;
- }
-
- else if (Memorial08 == 8) {
+ } else if (Memorial08 == 8) {
mes "[Mad Sago Lauds]";
mes "Stop trying to give me your garbage!";
mes "Go to the plaque at 12 o'clock direction in Prontera for your journey!";
close;
- }
-
- else if (Memorial08 >= 9) {
+ } else if (Memorial08 >= 9) {
.@RandomMsg = rand(1,5);
if (.@RandomMsg == 1) {
mes "[Mad Sago Lauds]";
@@ -191,7 +177,7 @@ prontera,182,214,4 script Lauds#Memorial 1_M_MERCHANT,{
}
}
}
-
+
// Memorial Plaque
//============================================================
prontera,153,286,4 script Memorial Plaque#Memorial 4_BOARD3,{
@@ -199,9 +185,7 @@ prontera,153,286,4 script Memorial Plaque#Memorial 4_BOARD3,{
mes "[" + strcharinfo(0) + "]";
mes "- It's a dusty old plaque.-";
close;
- }
-
- else if (Memorial08 == 8) {
+ } else if (Memorial08 == 8) {
mes "[" + strcharinfo(0) + "]";
mes "- It's a dusty old plaque.-";
mes "'This must be what Lauds was talking about.'";
@@ -210,43 +194,41 @@ prontera,153,286,4 script Memorial Plaque#Memorial 4_BOARD3,{
Memorial08 = 9;
getexp 93750,43750;
goto L_CleanPlaque;
- }
-
- else if (Memorial08 >= 9) {
+ } else if (Memorial08 >= 9) {
goto L_CleanPlaque;
}
-
- L_CleanPlaque:
- mes "- You see a message from the cleaned plaque.-";
- next;
- mes "-Although no sculptured marble should rise to their memory,-";
- mes "-nor engraved stone bear record of their deeds,-";
- mes "-yet will their remembrance be as lasting as the land they honored.-";
- mes "-Daniel Webster-";
- if (Memorial08 == 9) {
- getexp 93750,43750;
- }
- next;
- mes "-There's another message.-";
- next;
- mes "-I may not have gone where I intended to go,-";
- mes "-but I think I have ended up where I needed to be.-";
- mes "- Douglas Adams.-";
- if (Memorial08 == 9) {
- getexp 93750,43750;
- }
- next;
- mes "-This is the last message.-";
- next;
- mes "-True heroism is remarkably sober, very undramatic.-";
- mes "-It is not the urge to surpass all others at whatever cost,-";
- mes "- but the urge to serve others at whatever cost. -";
- mes "- Arthur Ashe -";
- if (Memorial08 == 9) {
- getexp 93750,43750;
- Memorial08 = 10;
- }
- close;
+
+L_CleanPlaque:
+ mes "- You see a message from the cleaned plaque.-";
+ next;
+ mes "-Although no sculptured marble should rise to their memory,-";
+ mes "-nor engraved stone bear record of their deeds,-";
+ mes "-yet will their remembrance be as lasting as the land they honored.-";
+ mes "-Daniel Webster-";
+ if (Memorial08 == 9) {
+ getexp 93750,43750;
+ }
+ next;
+ mes "-There's another message.-";
+ next;
+ mes "-I may not have gone where I intended to go,-";
+ mes "-but I think I have ended up where I needed to be.-";
+ mes "- Douglas Adams.-";
+ if (Memorial08 == 9) {
+ getexp 93750,43750;
+ }
+ next;
+ mes "-This is the last message.-";
+ next;
+ mes "-True heroism is remarkably sober, very undramatic.-";
+ mes "-It is not the urge to surpass all others at whatever cost,-";
+ mes "- but the urge to serve others at whatever cost. -";
+ mes "- Arthur Ashe -";
+ if (Memorial08 == 9) {
+ getexp 93750,43750;
+ Memorial08 = 10;
+ }
+ close;
}
// Grast
@@ -257,9 +239,7 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{
mes "Memorial Day is a sad and yet glorious day.";
mes "I wonder how many people remember them...";
close;
- }
-
- else if (Memorial08 == 3) {
+ } else if (Memorial08 == 3) {
mes "[Grast]";
mes "Oh, isn't that a Towel of Memory?";
mes "I'm so glad to meet someone who understands the meaning of Memorial Day.";
@@ -275,9 +255,7 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{
mes "I'll be waiting for your return.";
Memorial08 = 4;
close;
- }
-
- else if (Memorial08 == 4) {
+ } else if (Memorial08 == 4) {
if (countitem(501) < 1 || countitem(506) < 1 || countitem(656) < 1 || countitem(602) < 1) {
mes "[Grast]";
mes "Oops, you haven't brought all materials.";
@@ -306,9 +284,7 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{
Memorial08 = 5;
close;
}
- }
-
- else if (Memorial08 == 5) {
+ } else if (Memorial08 == 5) {
if (countitem(1065) < 1 || countitem(610) < 1 || countitem(717) < 1 || countitem(747) < 1 || countitem(517) < 1 || countitem(515) < 1) {
mes "[Grast]";
mes "Oops, you haven't brought all materials.";
@@ -333,9 +309,7 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{
Memorial08 = 6;
close;
}
- }
-
- else if (Memorial08 == 6) {
+ } else if (Memorial08 == 6) {
if (countitem(643) < 1 || countitem(12018) < 1 || countitem(741) < 1 || countitem(745) < 1) {
mes "[Grast]";
mes "Oops, you haven't brought all materials.";
@@ -388,42 +362,38 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{
getitem 12109,1;
close;
}
- }
-
- else if (Memorial08 == 7) {
+ } else if (Memorial08 == 7) {
mes "[Grast]";
mes "Have you met Lauds?";
mes "I hope you'll remember your freedom and happiness are built on thousands of lives sacrificed in war.";
close;
- }
-
- else if (Memorial08 >= 8) {
+ } else if (Memorial08 >= 8) {
mes "[Grast]";
mes "A towel is about the most massively useful thing an adventurer can have.";
close;
}
- L_GiveUp:
- mes "[Grast]";
- mes "Oh, I see. I guess you're quite busy nowadays, huh?";
- mes "No problem; I'll give you all the supplies...";
- next;
- mes "[Grast]";
- mes "There you go.";
- mes "I crushed all the items together into a more compact form for you.";
- mes "You can thank me later for that extra service.";
- mes "Please bring them to Lauds.";
- Memorial08 = 7;
- getitem 7126,1;
- next;
- mes "[Grast]";
- mes "By the way, he had an unfortunate accident, and has kind of lost his mind.";
- mes "Please don't be alarmed even if he starts babbling.";
- close;
-
- L_Continue:
- mes "[Grast]";
- mes "That's a good idea.";
- mes "Then I'll be waiting for your return.";
- close;
+L_GiveUp:
+ mes "[Grast]";
+ mes "Oh, I see. I guess you're quite busy nowadays, huh?";
+ mes "No problem; I'll give you all the supplies...";
+ next;
+ mes "[Grast]";
+ mes "There you go.";
+ mes "I crushed all the items together into a more compact form for you.";
+ mes "You can thank me later for that extra service.";
+ mes "Please bring them to Lauds.";
+ Memorial08 = 7;
+ getitem 7126,1;
+ next;
+ mes "[Grast]";
+ mes "By the way, he had an unfortunate accident, and has kind of lost his mind.";
+ mes "Please don't be alarmed even if he starts babbling.";
+ close;
+
+L_Continue:
+ mes "[Grast]";
+ mes "That's a good idea.";
+ mes "Then I'll be waiting for your return.";
+ close;
}
diff --git a/npc/events/RWC_2012.txt b/npc/events/RWC_2012.txt
index 43b884a0d..faefaa16a 100644
--- a/npc/events/RWC_2012.txt
+++ b/npc/events/RWC_2012.txt
@@ -313,14 +313,14 @@ prontera,147,59,3 script Goldberg#pron 4_M_OILMAN,{
mes "The enchant option in your item will be initialized.";
delitem 6665,1; //RWC_Inicializer
delequip .@part;
-
+
// GetNonSlotItemSock2 .@equip_refine .@equip_id .@equip_card[0] .@equip_card[1] .@equip_card[2] .@equip_card[3]
for(.@i = 0; .@i < 4; ++.@i) {
if (.@equip_card[.@i] >= 4700) // Armor Enchant System
.@equip_card[.@i] = 0;
}
getitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
-
+
close;
}
}
diff --git a/npc/events/christmas_2008.txt b/npc/events/christmas_2008.txt
index 2b6d67eca..c412541cc 100644
--- a/npc/events/christmas_2008.txt
+++ b/npc/events/christmas_2008.txt
@@ -163,81 +163,81 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
}
}
}
+ mes "[Caroller]";
+ mes "You know about Christmas!";
+ mes "Talking about Christmas...";
+ mes "...it's carols!!!";
+ mes "I've been waiting for this for when";
+ mes "Christmas comes around!";
+ next;
+ mes "[Caroller]";
+ mes "But there's been no caroling here and there like before, so we can't feel the Christmas spirit.";
+ next;
+ mes "[Caroller]";
+ mes "So, I installed a Singing Crystal in Prontera...";
+ next;
+ mes "[Caroller]";
+ mes "but that jerk Antonio broke the crystal!";
+ next;
+ mes "[Caroller]";
+ mes "The gift boxes have been changing into monsters since Antonio placed some magic on them, so the monsters ate up the crystal fragments!";
+ next;
+ mes "[Caroller]";
+ mes "I am so devastated, since the Singing Crystal has been the hope of many children around the villages.";
+ next;
+ if (select("There's no other way to carol?:You can hear carols in Lutie.") == 2) {
mes "[Caroller]";
- mes "You know about Christmas!";
- mes "Talking about Christmas...";
- mes "...it's carols!!!";
- mes "I've been waiting for this for when";
- mes "Christmas comes around!";
- next;
- mes "[Caroller]";
- mes "But there's been no caroling here and there like before, so we can't feel the Christmas spirit.";
- next;
- mes "[Caroller]";
- mes "So, I installed a Singing Crystal in Prontera...";
- next;
- mes "[Caroller]";
- mes "but that jerk Antonio broke the crystal!";
- next;
- mes "[Caroller]";
- mes "The gift boxes have been changing into monsters since Antonio placed some magic on them, so the monsters ate up the crystal fragments!";
- next;
- mes "[Caroller]";
- mes "I am so devastated, since the Singing Crystal has been the hope of many children around the villages.";
- next;
- if (select("There's no other way to carol?:You can hear carols in Lutie.") == 2) {
- mes "[Caroller]";
- mes "And just stay there, every Christmas, for your whole life?";
- next;
- mes "["+strcharinfo(0)+"]";
- mes "What? What do you mean?";
- next;
- mes "[Caroller]";
- mes "Oh, nevermind.";
- mes "Ah...";
- close;
- }
- mes "[Caroller]";
- mes "Maybe, it's quite hard to make a jukebox for the villages, but a music box might be possible.";
- next;
- mes "[Caroller]";
- mes "We need the ^0000FFSinging Crystal Pieces^000000 that the monsters ate up.";
- next;
- mes "[Caroller]";
- mes "Please bring me ^0000FF6 Singing Crystal Pieces^000000, and you will be rewarded with presents!";
- next;
- mes "[Caroller]";
- mes "Sounds cool, huh!!";
- next;
- select("........................");
- mes "[Caroller]";
- mes "...Why are you staring at me like that?";
- next;
- mes "[Caroller]";
- mes "You're thinking that we are always getting our plans spoiled, aren't you?";
- next;
- mes "[Caroller]";
- mes "I know that we are not good at controlling stuff, but our rewards are good, right?";
- next;
- select("........................");
- mes "[Caroller]";
- mes "Hey, we treat you good...";
- next;
- select("........................");
- mes "[Caroller]";
- mes "You are so cruel to me!";
- mes "Bad! Bad!";
+ mes "And just stay there, every Christmas, for your whole life?";
next;
- mes "[Caroller]";
- mes "Please, for our children's hope!!!?";
- mes "Please bring me 6 Singing Crystal Pieces from ^0000FFViolent Gift Boxes^000000!";
+ mes "["+strcharinfo(0)+"]";
+ mes "What? What do you mean?";
next;
- emotion e_ok;
mes "[Caroller]";
- mes "They're definitely as harsh as their name.";
- mes "Go on please!";
- iROxmas08carol = 1;
+ mes "Oh, nevermind.";
+ mes "Ah...";
close;
+ }
+ mes "[Caroller]";
+ mes "Maybe, it's quite hard to make a jukebox for the villages, but a music box might be possible.";
+ next;
+ mes "[Caroller]";
+ mes "We need the ^0000FFSinging Crystal Pieces^000000 that the monsters ate up.";
+ next;
+ mes "[Caroller]";
+ mes "Please bring me ^0000FF6 Singing Crystal Pieces^000000, and you will be rewarded with presents!";
+ next;
+ mes "[Caroller]";
+ mes "Sounds cool, huh!!";
+ next;
+ select("........................");
+ mes "[Caroller]";
+ mes "...Why are you staring at me like that?";
+ next;
+ mes "[Caroller]";
+ mes "You're thinking that we are always getting our plans spoiled, aren't you?";
+ next;
+ mes "[Caroller]";
+ mes "I know that we are not good at controlling stuff, but our rewards are good, right?";
+ next;
+ select("........................");
+ mes "[Caroller]";
+ mes "Hey, we treat you good...";
+ next;
+ select("........................");
+ mes "[Caroller]";
+ mes "You are so cruel to me!";
+ mes "Bad! Bad!";
+ next;
+ mes "[Caroller]";
+ mes "Please, for our children's hope!!!?";
+ mes "Please bring me 6 Singing Crystal Pieces from ^0000FFViolent Gift Boxes^000000!";
+ next;
+ emotion e_ok;
+ mes "[Caroller]";
+ mes "They're definitely as harsh as their name.";
+ mes "Go on please!";
+ iROxmas08carol = 1;
+ close;
case 4:
mes "[Caroller]";
@@ -260,7 +260,6 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
mes "It's hot, huh?";
close;
-
case 5:
mes "[Caroller]";
mes "A-N-T-O-N-I-O!!!";
@@ -279,7 +278,7 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
close;
}
}
-
+
if (iROxmas08carol == 1) {
if (countitem(6092) < 6) {
mes "[Caroller]";
@@ -345,7 +344,7 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
close;
}
}
-
+
if (iROxmas08carol == 2) {
if (countitem(1019) < 10 || countitem(1005) < 1 || countitem(7312) < 1 || countitem(938) < 10 || countitem(732) < 1) {
mes "[Caroller]";
@@ -442,7 +441,7 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
mes "All right, what comes to your mind when you think about Christmas?";
next;
switch(select("Carolling:Santa Claus:Gift Boxes:Santa Costume:Not much really...")) {
-
+
case 1:
mes "[Santa Claus]";
mes "Carolling! That's good!";
@@ -471,7 +470,7 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
mes "A bad Santa ruins us good Santa's reputations!";
mes "The World Santa Organization is considering this a grave situation.";
close;
-
+
case 3:
mes "[Santa Claus]";
mes "A gift box! That sounds good!";
@@ -680,7 +679,7 @@ prontera,226,306,4 script Caroller#iROxmas08 1_F_PRIEST,{
mes "There used to be designer who visited my house to make my Santa costumes.";
mes "Do you have any ideas?";
close;
-
+
case 5:
mes "[Santa Claus]";
mes "........................";
diff --git a/npc/events/dumplingfestival.txt b/npc/events/dumplingfestival.txt
index 23a085eb8..e20e4dd2a 100644
--- a/npc/events/dumplingfestival.txt
+++ b/npc/events/dumplingfestival.txt
@@ -10,7 +10,7 @@
//= Ver 1.0- Duplicate of MRO's Dumpling Event
//= 1.01 fixed bugs [Lupus]
//============================================================
-
+
payon,93,81,4 script Exorcist Master Fahae 4_M_BUDDHIST,{
mes "[Exorcist Master Fahae]";
@@ -64,7 +64,7 @@ payon,93,81,4 script Exorcist Master Fahae 4_M_BUDDHIST,{
mes "Here you go, I hope you may succeed in my quest.";
close;
}
-
+
// Monsters
//============================================================
gef_fild00,0,0,0,0 monster Dumpling 1520,20,60000,66000
diff --git a/npc/events/god_se_festival.txt b/npc/events/god_se_festival.txt
index 3b7dd50e8..aed725db5 100644
--- a/npc/events/god_se_festival.txt
+++ b/npc/events/god_se_festival.txt
@@ -120,7 +120,6 @@ yuno,118,192,5 script Rmimi Ravies#gq_fes01 4_F_HUGIRL,{
mes "[Rmimi Ravies]";
mes "Have a good time.";
donpcevent "Rmimi Ravies#gq_fes01::OnStart";
-
announce "["+ strcharinfo(0) +"] member of ["+ getguildname(.@GID) +"] is summoning a 'Valkyrie's Present' in 'Juno'.",bc_all,"0x70dbdb";
close;
}
@@ -390,7 +389,6 @@ OnTimer3900000:
end;
}
-
// Original name: "Festival Manager#god_se_fes02"
rachel,1,1,0 script Festival Manager#gq_fes2 4_F_HUGIRL,{
callfunc "F_GM_NPC";
diff --git a/npc/events/halloween_2009.txt b/npc/events/halloween_2009.txt
index f67841c15..2f3a978e3 100644
--- a/npc/events/halloween_2009.txt
+++ b/npc/events/halloween_2009.txt
@@ -193,17 +193,17 @@ OnInit:
hideonnpc "Trick or Treater#iRO7";
hideonnpc "Trick or Treater#iRO8";
end;
-
+
OnEnableTreat:
enablenpc strnpcinfo(3);
hideonnpc strnpcinfo(3);
end;
-
+
OnTimer15000:
hideonnpc strnpcinfo(3);
disablenpc strnpcinfo(3);
end;
-
+
OnTimer300000:
donpcevent strnpcinfo(3)+"::OnEnableTreat";
stopnpctimer;
diff --git a/npc/events/nguild/nguild_flags.txt b/npc/events/nguild/nguild_flags.txt
index dcd3dbc14..830ded7f9 100644
--- a/npc/events/nguild/nguild_flags.txt
+++ b/npc/events/nguild/nguild_flags.txt
@@ -94,9 +94,6 @@ nguild_alde,74,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-18 GUILD_FLAG
nguild_alde,203,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-19 GUILD_FLAG
nguild_alde,210,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-20 GUILD_FLAG
-
-
-
//============================================================================//
// Castle 2
//============================================================================//
@@ -125,8 +122,6 @@ nguild_gef,17,171,5 duplicate(NGuildGef) NGuild Geffen#g1-10 GUILD_FLAG
nguild_gef,59,16,4 duplicate(NGuildGef) NGuild Geffen#g1-11 GUILD_FLAG
nguild_gef,64,16,4 duplicate(NGuildGef) NGuild Geffen#g1-12 GUILD_FLAG
-
-
//============================================================================//
// Castle 3
//============================================================================//
@@ -155,9 +150,6 @@ nguild_pay,221,116,4 duplicate(NGuildPay) NGuild Payon#f1-9 GUILD_FLAG
nguild_pay,206,108,4 duplicate(NGuildPay) NGuild Payon#f1-10 GUILD_FLAG
nguild_pay,212,108,4 duplicate(NGuildPay) NGuild Payon#f1-11 GUILD_FLAG
-
-
-
//=============================================================================//
// Castle 4
//=============================================================================//
diff --git a/npc/events/valentinesday_2009.txt b/npc/events/valentinesday_2009.txt
index 56195d06a..aaaf74a85 100644
--- a/npc/events/valentinesday_2009.txt
+++ b/npc/events/valentinesday_2009.txt
@@ -314,7 +314,7 @@ prontera,154,185,5 script Event Ring Maker#Val09 4_F_KAFRA7,{
mes "Come back when you're experienced enough to handle the quests.";
close;
}
-
+
if (iROval09ring >= 1) {
mes "[Event Ring Maker]";
mes "The box with the ring, carved with your name, is for the one you love.";
@@ -328,7 +328,7 @@ prontera,154,185,5 script Event Ring Maker#Val09 4_F_KAFRA7,{
mes "Be aware, and always try to stay popular!";
close;
}
-
+
mes "[Event Ring Maker]";
mes "Hi, there, how are ya?";
mes "Come to me if you're interested in the event, 'Who's Valentine's Hottest?'";
@@ -435,7 +435,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
next;
break;
}
-
+
if (Sex) {
if (countitem(7947) > .@input) {
mes "[Valentine Vote Manager]";
@@ -444,7 +444,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
next;
break;
}
-
+
if (countitem(7947) < .@input) {
mes "[Valentine Vote Manager]";
mes "Seems like the value you entered is too large.";
@@ -452,7 +452,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
next;
break;
}
-
+
mes "[Valentine Vote Manager]";
mes "I'll take those silver rings, and count the votes for you.";
mes "Thank you for participating.";
@@ -472,7 +472,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
next;
break;
}
-
+
if (countitem(7946) < .@input) {
mes "[Valentine Vote Manager]";
mes "Seems like the value you entered is too large.";
@@ -480,7 +480,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
next;
break;
}
-
+
mes "[Valentine Vote Manager]";
mes "I'll take those gold rings, and count the votes for you.";
mes "Thank you for participating.";
@@ -533,7 +533,7 @@ prt_castle,42,35,3 script Dessert Manager#Val09 1_M_01,{
mes "Annoying, annoying, annoying~~!";
close;
}
-
+
mes "[Charles Orleans]";
mes "Oh, Mademoiselle!";
mes "This little trifling space felt like heaven the minute you walked in!";
@@ -629,5 +629,4 @@ prt_castle,42,35,3 script Dessert Manager#Val09 1_M_01,{
mes "I hope this is just what you wanted, for it bears your beautiful heart inside.";
close;
}
-
}
diff --git a/npc/events/xmas.txt b/npc/events/xmas.txt
index e420f9e6d..be43b3752 100644
--- a/npc/events/xmas.txt
+++ b/npc/events/xmas.txt
@@ -90,7 +90,7 @@ L_Start:
mes "If you get 3 more, I'll give you another.";
mes "Hope you get a good item.";
close;
-
+
L_NotEnuf:
mes "You don't have enough socks as proof.";
mes "Go take down those evil Santas";
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index a9bc499c5..da2244323 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -130,7 +130,7 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
instance_set_timeout 7200,300,.@instance;
instance_init(.@instance);
-
+
mes "Okay... I'll adjust the shrine's seal so that you and your group can enter.";
next;
mes "[Friar Patrick]";
@@ -1455,7 +1455,6 @@ OnTimer70000:
end;
}
-
1@cata,1,1,0 script ins_1f_spawn_mobs -1,{
OnInstanceInit:
.@map$ = instance_mapname("1@cata");
diff --git a/npc/jobs/1-1e/taekwon.txt b/npc/jobs/1-1e/taekwon.txt
index 5f15305c0..e7d94e567 100644
--- a/npc/jobs/1-1e/taekwon.txt
+++ b/npc/jobs/1-1e/taekwon.txt
@@ -417,4 +417,3 @@ payon,157,141,5 script Phoenix#TKJobChange 4_M_MONK,{
close;
}
}
-
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
index e88f0adc6..c98fca135 100644
--- a/npc/jobs/2-1/assassin.txt
+++ b/npc/jobs/2-1/assassin.txt
@@ -1482,7 +1482,7 @@ OnTimer187000:
OnDisable:
stopnpctimer;
end;
-
+
OnMyMobDead:
mapannounce "in_moc_16","Hey, what the hell was that?! I told you: No killing monsters!",bc_map;
mapannounce "in_moc_16","I'm bringing you back... *Sigh...*",bc_map;
diff --git a/npc/jobs/2-1/priest.txt b/npc/jobs/2-1/priest.txt
index e28106f69..89573956e 100644
--- a/npc/jobs/2-1/priest.txt
+++ b/npc/jobs/2-1/priest.txt
@@ -1860,4 +1860,3 @@ function script F_FatherYos {
mes "...Acolyte, you don't have any business with me here.";
close;
}
-
diff --git a/npc/jobs/2-1e/StarGladiator.txt b/npc/jobs/2-1e/StarGladiator.txt
index 91ac02ea3..e45d7c576 100644
--- a/npc/jobs/2-1e/StarGladiator.txt
+++ b/npc/jobs/2-1e/StarGladiator.txt
@@ -352,7 +352,7 @@ OnTouch:
mes "You're blocking my sun!";
close;
}
-
+
comodo,172,230,3 script Wandering Master#job_sta 4_M_JOB_ASSASSIN,{
if (Class == Job_Taekwon) {
if (STGL_Q == 1) {
diff --git a/npc/jobs/2-2/crusader.txt b/npc/jobs/2-2/crusader.txt
index c713194de..22e9b917d 100644
--- a/npc/jobs/2-2/crusader.txt
+++ b/npc/jobs/2-2/crusader.txt
@@ -969,8 +969,6 @@ prt_castle,35,151,5 script Patron Knight 4_M_CRU,{
close;
}
-
-
// Actual tests
//============================================================
@@ -1201,7 +1199,6 @@ OnDead:
end;
}
-
job_cru,98,105,4 script Summoner#cr5 WARPNPC,3,3,{
OnTouch:
CRUS_Q = 6;
diff --git a/npc/jobs/2-2a/Professor.txt b/npc/jobs/2-2a/Professor.txt
index 68cac14cf..8fee58494 100644
--- a/npc/jobs/2-2a/Professor.txt
+++ b/npc/jobs/2-2a/Professor.txt
@@ -88,4 +88,3 @@ valkyrie,53,47,3 script Scholar#Valkyrie 2_M_SAGE_OLD,{
mes "Honor to the warriors!";
close;
}
-
diff --git a/npc/jobs/valkyrie.txt b/npc/jobs/valkyrie.txt
index c7cef8107..d2a7108b1 100644
--- a/npc/jobs/valkyrie.txt
+++ b/npc/jobs/valkyrie.txt
@@ -398,4 +398,3 @@ S_Warpchar:
//============================================================
valkyrie,48,73,0 warp valk01#1 1,1,valkyrie,48,64
valkyrie,48,66,0 warp valk01#2 1,1,valkyrie,48,75
-
diff --git a/npc/merchants/dye_maker.txt b/npc/merchants/dye_maker.txt
index bca4ef276..bd2440c19 100644
--- a/npc/merchants/dye_maker.txt
+++ b/npc/merchants/dye_maker.txt
@@ -185,7 +185,7 @@ S_MakeDye:
Zeny -= .@cost;
// get dyestuff
getitem .@dyestuff,1;
-
+
mes "[Dye Maker Java Dullihan]";
mes "Hmm... It came out pretty well. A very rich color. Of course I'll be trying harder to make a more charming color...";
next;
diff --git a/npc/merchants/old_pharmacist.txt b/npc/merchants/old_pharmacist.txt
index 1889ea3b9..15a8206b6 100644
--- a/npc/merchants/old_pharmacist.txt
+++ b/npc/merchants/old_pharmacist.txt
@@ -181,7 +181,7 @@ alberta_in,16,28,4 script Pharmacist 1_M_PUBMASTER,{
mes "What a boring person. If you have something to say, why don't you say it?!";
close;
}
-
+
L_Making:
next;
mes "[Old Pharmacist]";
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index b88fa647a..ff5b78b2d 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -42,7 +42,6 @@
//= 2.19 Improved 'F_InsertComma' function. [Emistry]
//============================================================
-
//////////////////////////////////////////////////////////////////////////////////
// Returns a number with commas based on precision of digits and custom separator.
// -- callfunc "F_InsertComma",<number>{,<precision>,<separator>}
@@ -56,10 +55,10 @@ function script F_InsertComma {
.@value = getarg(0);
.@precision = getarg(1,3);
.@separator$ = getarg( 2,"," );
-
+
.@str$ = ""+.@value;
.@is_negative = ( .@value < 0 );
-
+
.@length = getstrlen( .@str$ ) - .@precision - .@is_negative;
while ( .@length > 0 ) {
.@str$ = insertchar( .@str$, .@separator$ , ( .@length + .@is_negative ) );
@@ -68,7 +67,6 @@ function script F_InsertComma {
return .@str$;
}
-
//////////////////////////////////////////////////////////////////////////////////
// Function that clears job quest variables
//////////////////////////////////////////////////////////////////////////////////
@@ -125,10 +123,10 @@ function script F_ClearGarbage {
RES_SKILL = 0;
//Here you put outdated variables from your outdated EVENTS
//e.g. Is XMAS done? Add the EVENT var clearing code here.
-
+
//due to bugs in BS quest:
wizard_m2 = 0;
-
+
// Old Novice Ground Variables.
NEW_MES_FLAG0 = 0;
NEW_MES_FLAG1 = 0;
@@ -139,11 +137,11 @@ function script F_ClearGarbage {
NEW_LVUP0 = 0;
NEW_LVUP1 = 0;
NEW_JOBLVUP = 0;
-
+
// Old DTS variables that are no longer used.
dtseligible = 0;
MISC_QUEST = MISC_QUEST & ~128;
-
+
return;
}
@@ -160,7 +158,6 @@ function script Job_Change {
return;
}
-
//////////////////////////////////////////////////////////////////////////////////
// Functions used to spiff up dialoges [Lupus]
//////////////////////////////////////////////////////////////////////////////////
@@ -177,7 +174,6 @@ function script F_Rand {
return getarg(rand(getargcount()));
}
-
//////////////////////////////////////////////////////////////////////////////////
// *** Function "F_Sex"
//////////////////////////////////////////////////////////////////////////////////
@@ -188,7 +184,6 @@ function script F_SexMes {
return getarg(Sex);
}
-
//////////////////////////////////////////////////////////////////////////////////
// *** Function "F_Hi"
//////////////////////////////////////////////////////////////////////////////////
@@ -198,7 +193,6 @@ function script F_Hi {
return callfunc("F_Rand","Hi!","Hello!","Good day!","How are you?","Hello there.");
}
-
//////////////////////////////////////////////////////////////////////////////////
// *** Function "F_Bye"
//////////////////////////////////////////////////////////////////////////////////
@@ -208,7 +202,6 @@ function script F_Bye {
return callfunc("F_Rand","Bye. See you again.","Later.","Goodbye.","Good luck!","Have a nice day!","Byebye!!!");
}
-
//////////////////////////////////////////////////////////////////////////////////
// *** Function "F_ItemName"
//////////////////////////////////////////////////////////////////////////////////
@@ -337,14 +330,14 @@ function script F_GetArmorType {
// *********************************************************************
function script Time2Str {
.@time_left = getarg(0) - gettimetick(2);
-
+
.@Days = .@time_left / 86400;
.@time_left -= (.@Days * 86400);
.@Hours = .@time_left / 3600;
.@time_left -= (.@Hours * 3600);
.@Minutes = .@time_left / 60;
.@time_left -= (.@Minutes * 60);
-
+
.@Time$ = "";
if( .@Days > 1 )
.@Time$ += .@Days + " days, ";
@@ -365,6 +358,6 @@ function script Time2Str {
.@Time$ += .@time_left + " seconds";
else if( .@time_left == 1 )
.@Time$ += .@time_left + " second";
-
+
return .@Time$;
}
diff --git a/npc/other/books.txt b/npc/other/books.txt
index 6ad8968b2..aef8a4079 100644
--- a/npc/other/books.txt
+++ b/npc/other/books.txt
@@ -391,7 +391,7 @@ prt_in,168,56,4 script Monster Encyclopedia#prt HIDDEN_NPC,{
}
}
}
-
+
prt_in,159,56,4 script Monster Encyclopedia#2pr HIDDEN_NPC,{
mes "^FF0000[Monster Encyclopedia]^000000";
mes "This is a Monster Encyclopedia";
@@ -1720,7 +1720,6 @@ prt_in,172,96,4 script Monster Encyclopedia#4pr HIDDEN_NPC,{
}
}
-
prt_in,164,96,4 script Monster Encyclopedia#5pr HIDDEN_NPC,{
mes "^FF0000[Dungeon Monster Encyclopedia]^000000";
mes "This is an Encyclopedia describing";
diff --git a/npc/other/comodo_gambling.txt b/npc/other/comodo_gambling.txt
index ea354e490..3d0e2b389 100644
--- a/npc/other/comodo_gambling.txt
+++ b/npc/other/comodo_gambling.txt
@@ -71,7 +71,7 @@ comodo,219,158,6 script Kachua 4_F_02,{
mes "you something from one of my";
mes "collections~";
next;
-
+
if (MaxWeight - Weight < 5500) {
cutin "katsua01.bmp",255;
cutin "katsua03.bmp",2;
@@ -379,7 +379,7 @@ comodo,219,158,6 script Kachua 4_F_02,{
close;
break;
}
-
+
getitem .@item,1;
cutin "katsua01.bmp",255;
diff --git a/npc/other/fortune.txt b/npc/other/fortune.txt
index a14f63fc9..dad407482 100644
--- a/npc/other/fortune.txt
+++ b/npc/other/fortune.txt
@@ -3525,7 +3525,7 @@ payon_in03,75,129,5 script Poring Fortune Teller 4_M_BIBI,{
}
close;
}
-
+
payon_in03,118,119,1 script Ascetic 4W_F_01,2,2,{
mes "[Kissy-Kissy]";
mes "NyangNyangNyang~";
diff --git a/npc/other/hugel_bingo.txt b/npc/other/hugel_bingo.txt
index d84c94cd3..a31a8f47a 100644
--- a/npc/other/hugel_bingo.txt
+++ b/npc/other/hugel_bingo.txt
@@ -406,7 +406,7 @@ OnInit:
disablenpc "24e#bingo";
disablenpc "25e#bingo";
end;
-
+
OnTouch:
if(@bingoplate[1] == $bingo[$@bingoresult -1]){ @bingo_a1$ = "^ff0000- -^000000"; setarray @bingoplate[1],99; }
else if(@bingoplate[2] == $bingo[$@bingoresult -1]){ @bingo_a2$ = "^ff0000- -^000000"; setarray @bingoplate[2],99; }
diff --git a/npc/other/monster_museum.txt b/npc/other/monster_museum.txt
index fae93fd3e..d39b034da 100644
--- a/npc/other/monster_museum.txt
+++ b/npc/other/monster_museum.txt
@@ -59,7 +59,7 @@ yuno_in03,32,15,3 script Museum Guide 1_F_02,{
mes "Feel free to talk to me anytime.";
close;
}
-
+
yuno_in03,36,21,3 script Deviace#yuno DEVIACE,{
end;
}
@@ -85,7 +85,7 @@ yuno_in03,33,21,1 script #DEVIACE HIDDEN_NPC,{
mes "it's better to be careful with this monster.";
close;
}
-
+
yuno_in03,36,27,3 script Seal#yuno FUR_SEAL,{
end;
}
@@ -111,7 +111,7 @@ yuno_in03,33,27,1 script #FUR_SEAL HIDDEN_NPC,{
mes "for people to produce winter coats.";
close;
}
-
+
yuno_in03,36,33,3 script Sage Worm#yuno SAGEWORM,{
end;
}
@@ -133,7 +133,7 @@ yuno_in03,33,33,1 script #SAGEWORM HIDDEN_NPC,{
mes "indicates, it's usually seen near books or book shelves.";
close;
}
-
+
yuno_in03,39,39,3 script Penomena#yuno PENOMENA,{
end;
}
@@ -159,7 +159,7 @@ yuno_in03,38,39,1 script #PENOMANA HIDDEN_NPC,{
mes "enough to kill its enemy at once.";
close;
}
-
+
yuno_in03,39,44,3 script Galapago#yuno GALAPAGO,{
end;
}
@@ -180,7 +180,7 @@ yuno_in03,37,44,3 script #GALAPAGO HIDDEN_NPC,{
mes "generally laid back monster.";
close;
}
-
+
yuno_in03,15,21,5 script Raydric#yuno RAYDRIC,{
end;
}
@@ -201,7 +201,7 @@ yuno_in03,19,21,1 script #RAYDRIC HIDDEN_NPC,{
mes "and powerful attack strength.";
close;
}
-
+
yuno_in03,15,27,5 script Chepet#yuno CHEPET,{
end;
}
@@ -220,7 +220,7 @@ yuno_in03,19,27,1 script #CHEPET HIDDEN_NPC,{
mes "only a few places.";
close;
}
-
+
yuno_in03,15,33,5 script Violy#yuno VIOLY,{
end;
}
@@ -237,7 +237,7 @@ yuno_in03,19,33,1 script #VIOLY HIDDEN_NPC,{
mes "Exercise extreme caution upon encountering a Violy. Otherwise, it will snatch your soul in no time with its charming song.";
close;
}
-
+
yuno_in03,10,39,5 script Alice#yuno ALICE,{
end;
}
@@ -259,7 +259,7 @@ yuno_in03,12,39,1 script #ALICE HIDDEN_NPC,{
mes "is still a scientific mystery.";
close;
}
-
+
yuno_in03,10,45,5 script Assulter#yuno ASSULTER,{
end;
}
@@ -284,7 +284,7 @@ yuno_in03,12,45,1 script #ASSULTER HIDDEN_NPC,{
mes "is more threatening.";
close;
}
-
+
yuno_in03,38,50,3 script PecoPeco Egg#yuno PECOPECO_EGG,{
end;
}
@@ -316,7 +316,7 @@ yuno_in03,20,96,1 script #WANDER_MAN HIDDEN_NPC,{
mes "stroke of its sword.";
close;
}
-
+
yuno_in03,16,100,5 script Caterpillar#yuno CATERPILLAR,{
end;
}
@@ -338,7 +338,7 @@ yuno_in03,18,100,1 script #CATERPILLAR HIDDEN_NPC,{
mes "Creamy.";
close;
}
-
+
yuno_in03,16,104,5 script Male Thiefbug#yuno THIEF_BUG__,{
end;
}
@@ -356,7 +356,7 @@ yuno_in03,18,104,1 script #THIEF_BUG__ HIDDEN_NPC,{
mes "However, it is stronger than other Thief Bugs because it's designated to protect the females and babies from danger.";
close;
}
-
+
yuno_in03,16,108,5 script Tri Joint#yuno TRI_JOINT,{
end;
}
@@ -376,7 +376,7 @@ yuno_in03,18,108,1 script #TRI_JOINT HIDDEN_NPC,{
mes "Recently, since many Tri Joints have been discovered inside many caves, Sages are very excited to study them to learn more about the evolution of monsters in Rune-Midgard.";
close;
}
-
+
yuno_in03,16,111,5 script Arclouz#yuno ARCLOUSE,{
end;
}
@@ -399,7 +399,7 @@ yuno_in03,18,111,1 script #ARCLOUSE HIDDEN_NPC,{
mes "compared to PecoPecos.";
close;
}
-
+
yuno_in03,16,117,5 script Dragon Tail#yuno DRAGON_TAIL,{
end;
}
@@ -418,7 +418,7 @@ yuno_in03,18,116,1 script #DRAGON_TAIL HIDDEN_NPC,{
mes "a sleeping poison.";
close;
}
-
+
yuno_in03,46,96,3 script Owl Duke#yuno OWL_DUKE,{
end;
}
@@ -443,7 +443,7 @@ yuno_in03,44,96,1 script #OWL_DUKE HIDDEN_NPC,{
mes "aristocratic pompousness.";
close;
}
-
+
yuno_in03,48,100,3 script Marine Sphere#yuno MARINE_SPHERE,{
end;
}
@@ -467,7 +467,7 @@ yuno_in03,46,101,1 script #MARINE_SPHERE HIDDEN_NPC,{
mes "a dangerous chain reaction.";
close;
}
-
+
yuno_in03,48,104,3 script Mandragora#yuno MANDRAGORA,{
end;
}
@@ -498,7 +498,7 @@ yuno_in03,46,105,1 script #MANDRAGORA HIDDEN_NPC,{
mes "from useful in attracting prey.";
close;
}
-
+
yuno_in03,48,108,3 script Geographer#yuno GEOGRAPHER,{
end;
}
@@ -532,7 +532,7 @@ yuno_in03,46,108,1 script #GEOGRAPHER HIDDEN_NPC,{
mes "never be forgotten...";
close;
}
-
+
yuno_in03,48,112,3 script Rafflesia#yuno RAFFLESIA,{
end;
}
@@ -557,7 +557,7 @@ yuno_in03,46,112,1 script #RAFFLESIA HIDDEN_NPC,{
mes "cultivate and save the Rafflesias.";
close;
}
-
+
yuno_in03,48,116,3 script Stem Worm#yuno STEM_WORM,{
end;
}
@@ -601,7 +601,7 @@ yuno_in03,24,122,1 script #BLAZZER HIDDEN_NPC,{
mes "form of communication.";
close;
}
-
+
yuno_in03,28,124,5 script Ride Word#yuno RIDEWORD,{
end;
}
@@ -616,7 +616,7 @@ yuno_in03,28,122,1 script #RIDEWORD HIDDEN_NPC,{
mes "sharp teeth. It exists to attack any living thing nearby.";
close;
}
-
+
yuno_in03,31,124,3 script Megalodon#yuno MEGALODON,{
end;
}
@@ -634,7 +634,7 @@ yuno_in03,31,122,1 script #MEGALODON HIDDEN_NPC,{
mes "undersea travellers outright.";
close;
}
-
+
yuno_in03,35,124,3 script Sleeper#yuno SLEEPER,{
end;
}
@@ -655,7 +655,7 @@ yuno_in03,35,122,1 script #SLEEPER HIDDEN_NPC,{
mes "cause indirect attacks by causing a sand storm.";
close;
}
-
+
yuno_in03,39,124,3 script Ancient Mummy#yuno ANCIENT_MUMMY,{
end;
}
@@ -684,7 +684,7 @@ yuno_in03,39,122,1 script #ANCIENT_MUMMY HIDDEN_NPC,{
mes "attack any living thing nearby.";
close;
}
-
+
yuno_in03,18,122,5 script Incubus#yuno INCUBUS,{
end;
}
@@ -706,7 +706,7 @@ yuno_in03,19,120,1 script #INCUBUS HIDDEN_NPC,{
mes "it can eventually take them to hell.";
close;
}
-
+
yuno_in03,44,120,3 script Succubus#yuno SUCCUBUS,{
end;
}
diff --git a/npc/other/poring_war.txt b/npc/other/poring_war.txt
index 5e99c97d8..6b52dd870 100644
--- a/npc/other/poring_war.txt
+++ b/npc/other/poring_war.txt
@@ -356,7 +356,7 @@ OnInit:
//============================================================
poring_w01,91,97,3 script Poring#wop_door_all PORING,{
end;
-
+
OnInit:
waitingroom "[Recruiting 10 Battle Participants]",11,"Poring#wop_door_all::OnStartArena",10,500,9;
enablewaitingroomevent;
diff --git a/npc/other/pvp.txt b/npc/other/pvp.txt
index b8d104ce2..70c02d1bc 100644
--- a/npc/other/pvp.txt
+++ b/npc/other/pvp.txt
@@ -314,8 +314,6 @@ function script F_PVP_FSRS {
end;
}
-
-
// Event Contestant Entrance
//============================================================
pvp_room,54,85,4 script Registration Staff#1 8W_SOLDIER,{
diff --git a/npc/other/turbo_track.txt b/npc/other/turbo_track.txt
index e2dd1d661..36a1b4fe1 100644
--- a/npc/other/turbo_track.txt
+++ b/npc/other/turbo_track.txt
@@ -45,7 +45,7 @@ OnStartArena:
donpcevent "Broadcast#"+.@in$+.@in+"::OnEnable";
disablewaitingroomevent strnpcinfo(0);
end;
-
+
OnInit:
if (compare(strnpcinfo(0),"main")) end;
if (compare(strnpcinfo(2),"n1")) {
@@ -66,7 +66,7 @@ turbo_room,77,135,3 duplicate(entrance#tt_main) Normal mode - 4 person 4_F_TELEP
turbo_room,84,135,3 duplicate(entrance#tt_main) Normal mode - 8 person 4_F_TELEPORTER
turbo_room,91,135,3 duplicate(entrance#tt_main) Normal mode - 16 person 4_F_TELEPORTER
turbo_room,72,132,3 duplicate(entrance#tt_main) Solo Mode#n1 4_F_TELEPORTER
-
+
turbo_e_4,298,167,3 script Helper#tt_main 4_F_TELEPORTER,{
mes "[Helper]";
mes "You are now in the";
@@ -96,7 +96,7 @@ OnTouch:
else
warp strnpcinfo(4),59,364;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "Point Give-Away Guy#"+.@w$;
@@ -391,12 +391,12 @@ OnTimer927000:
disablenpc "Flasher_Exit_1#"+.@w$;
disablenpc "Flasher_Exit_2#"+.@w$;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "Master#"+.@w$;
end;
-
+
function RName {
.@s = (getstrlen(getarg(0)) > 2)?(substr(getarg(0),1,2)):(charat(getarg(0),getstrlen(getarg(0))-1));
.@rn$ = ((compare(strnpcinfo(4),"_e_"+.@s))?"Expert mode":"Normal mode")+" - "+.@s+" person";
@@ -1641,7 +1641,6 @@ turbo_n_8,332,279,0 duplicate(snake02#tt_main) snake02#n8 WARPNPC,1,1
turbo_n_16,332,279,0 duplicate(snake02#tt_main) snake02#n16 WARPNPC,1,1
turbo_n_1,332,279,0 duplicate(snake02#tt_main) snake02#n1 WARPNPC,1,1
-
- script snake03#tt_main WARPNPC,1,1,{
OnTouch:
.@turbo2 = rand(1,8);
@@ -1659,7 +1658,6 @@ turbo_n_8,324,270,0 duplicate(snake03#tt_main) snake03#n8 WARPNPC,1,1
turbo_n_16,324,270,0 duplicate(snake03#tt_main) snake03#n16 WARPNPC,1,1
turbo_n_1,324,270,0 duplicate(snake03#tt_main) snake03#n1 WARPNPC,1,1
-
- script snake04#tt_main WARPNPC,1,1,{
OnTouch:
.@turbo2 = rand(1,7);
@@ -1679,7 +1677,7 @@ turbo_n_1,332,270,0 duplicate(snake04#tt_main) snake04#n1 WARPNPC,1,1
- script SnakeHunt#tt_main -1,{
end;
-
+
OnReset:
killmonsterall strnpcinfo(4);
end;
@@ -1947,7 +1945,7 @@ OnTouch:
}
disablenpc "#cos_"+.@w$+"_end";
end;
-
+
function GetNumber {
setarray .@w_n$[1], "n4","n8","n16","e4","e8","e16";
for (.@i = 1; .@i <= getarraysize(.@w_n$); ++.@i) {
@@ -1955,7 +1953,7 @@ OnTouch:
return .@i;
}
}
-
+
OnInit:
.@w$ = callfunc("F_tt");
enablenpc "#cos_"+.@w$+"_end";
@@ -1980,7 +1978,7 @@ OnTouch:
disablenpc "#cos_"+.@w$+"_end2";
enablenpc "#cos_"+.@w$+"_end3";
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "#cos_"+.@w$+"_end2";
@@ -2038,7 +2036,7 @@ OnTouch:
mapannounce strnpcinfo(4),strcharinfo(0) +" has just passed the Flasher Maze!",bc_map,"0x70DBDB";
warp strnpcinfo(4),185,227;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc strnpcinfo(0);
@@ -2361,7 +2359,7 @@ turbo_n_1,114,190,0 duplicate(Flasher#tt_main) Flasher_Exit_2#n1 WARPNPC,1,1
end;
}
}
-
+
OnEnable:
.@w$ = callfunc("F_tt");
enablenpc "Winner Helper#TBT_"+.@w$;
@@ -2403,12 +2401,12 @@ OnTimer25000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"In the meantime, winners must procceed to receive their rewards as soon as possible.",bc_map,"0x33FF66";
end;
-
+
OnTimer28000:
.@w$ = callfunc("F_tt");
if (compare(.@w$,"4")) mapannounce strnpcinfo(4),"Al De Baran Turbo Track is brought to you by...",bc_map,"0x33FF66";
end;
-
+
OnTimer30000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"Thank you for visiting Al De Baran Turbo Track.",bc_map,"0x33FF66";
@@ -2422,7 +2420,7 @@ OnTimer35000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"Al De Baran Turbo Track is brought to you by...",bc_map,"0x33FF66";
end;
-
+
OnTimer36000:
.@w$ = callfunc("F_tt");
if (compare(.@w$,"4")) mapannounce strnpcinfo(4),"[Al De Baran Guild Castle Management Luina]",bc_map,"0x33FF66";
@@ -2450,7 +2448,7 @@ OnTimer48000:
.@w$ = callfunc("F_tt");
if (compare(.@w$,"4")) mapannounce strnpcinfo(4),"Once again, we'd like to thank our sponsors.",bc_map,"0x33FF66";
end;
-
+
OnTimer50000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"[Blacksmith Union]",bc_map,"0x33FF66";
@@ -2460,7 +2458,7 @@ OnTimer52000:
.@w$ = callfunc("F_tt");
if (compare(.@w$,"4")) mapannounce strnpcinfo(4),"Have a good day.",bc_map,"0x33FF66";
end;
-
+
OnTimer55000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"And [Comodo Casino].",bc_map,"0x33FF66";
@@ -2492,17 +2490,17 @@ OnTimer60000:
mapannounce strnpcinfo(4),"Once again, we'd like to thank our sponsors.",bc_map,"0x33FF66";
}
end;
-
+
OnTimer65000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapannounce strnpcinfo(4),"Have a good day.",bc_map,"0x33FF66";
end;
-
+
OnTimer70000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) mapwarp strnpcinfo(4),"turbo_room",72,89;
end;
-
+
OnTimer71000:
.@w$ = callfunc("F_tt");
if (!compare(.@w$,"4")) {
@@ -2525,13 +2523,13 @@ OnTimer71000:
stopnpctimer;
}
end;
-
+
function RName {
.@s = (getstrlen(getarg(0)) > 2)?(substr(getarg(0),1,2)):(charat(getarg(0),getstrlen(getarg(0))-1));
.@rn$ = ((compare(strnpcinfo(4),"_e_"+.@s))?"Expert mode":"Normal mode")+" - "+.@s+" person";
return .@rn$;
}
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "Winner Helper#TBT_"+.@w$;
@@ -2672,7 +2670,7 @@ turbo_n_1,384,167,1 script Guide#TBT_n1 1_M_01,{
end;
}
}
-
+
OnEnable:
.@w$ = callfunc("F_tt");
enablenpc "Guide#TBT_"+.@w$;
@@ -2752,7 +2750,7 @@ OnTimer60000:
donpcevent "Solo Mode#"+.@w$+"::OnEnable";
stopnpctimer;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "Guide#TBT_"+.@w$;
@@ -2766,7 +2764,7 @@ OnTouch:
donpcevent "Turbo Track Guide::OnEnd_"+.@w$;
disablenpc "Notice_Maker1#TBT_"+.@w$;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
enablenpc "Notice_Maker1#TBT_"+.@w$;
@@ -2786,7 +2784,7 @@ OnTouch:
mapannounce strnpcinfo(4),strcharinfo(0) +" is now entering the Single Snail! " + strcharinfo(0) +" is now in the lead!",bc_map,"0xFFFF00";
disablenpc "Notice_Maker3#TBT_"+.@w$;
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
enablenpc "Notice_Maker3#TBT_"+.@w$;
@@ -3625,7 +3623,7 @@ OnTouch:
default: break;
}
end;
-
+
OnInit:
.@w$ = callfunc("F_tt");
disablenpc "bing2#"+.@w$;
@@ -4251,7 +4249,6 @@ turbo_room,93,117,5 script Point Exchange Helper 4_M_TELEPORTER,{
mes "Points you have earned before";
mes "redeeming your points again.";
close;
-
}
tt_point -= 40;
if (BaseLevel < 70) getexp 3000,0;
diff --git a/npc/pre-re/guides/guides_alberta.txt b/npc/pre-re/guides/guides_alberta.txt
index 164aa528b..26a4bc6f1 100644
--- a/npc/pre-re/guides/guides_alberta.txt
+++ b/npc/pre-re/guides/guides_alberta.txt
@@ -48,7 +48,7 @@ alberta,23,238,4 script Guide#alb::AlbGuide 8W_SOLDIER,{
while (.@loop2) {
if (.@wait_button_chk == 0) .@wait_button_chk = 1;
else next;
-
+
switch(select("^FF0000Merchant Guild^000000:Weapon Shop:Tool Shop:Inn:Forge:Cancel")) {
case 1:
mes "[Alberta Guide]";
diff --git a/npc/pre-re/guides/guides_amatsu.txt b/npc/pre-re/guides/guides_amatsu.txt
index 85bd79047..fc27425af 100644
--- a/npc/pre-re/guides/guides_amatsu.txt
+++ b/npc/pre-re/guides/guides_amatsu.txt
@@ -66,7 +66,7 @@ amatsu,207,89,3 script Amatsu Guide#ama 4_F_JPN,{
close;
}
}
-
+
amatsu,251,283,4 script Guide Man#2ama 8_M_JPNSOLDIER,{
mes "[Guide Man]";
mes "Welcome, tourist from Rune-Midgard.";
diff --git a/npc/pre-re/guides/guides_izlude.txt b/npc/pre-re/guides/guides_izlude.txt
index 7961f46da..16bcf2146 100644
--- a/npc/pre-re/guides/guides_izlude.txt
+++ b/npc/pre-re/guides/guides_izlude.txt
@@ -45,7 +45,7 @@ izlude,121,87,6 script Guide#iz 8W_SOLDIER,{
while(.@loop2) {
if (.@wait_button_chk == 0) .@wait_button_chk = 1;
else next;
-
+
switch(select("^FF0000Swordman Association^000000:Swordman Hall:Arena:Izlude Marina:Weapon Shop:Tool Shop:Cancel")) {
case 1:
mes "[Izlude Guide]";
diff --git a/npc/pre-re/guides/guides_morroc.txt b/npc/pre-re/guides/guides_morroc.txt
index 47777fa17..82e233173 100644
--- a/npc/pre-re/guides/guides_morroc.txt
+++ b/npc/pre-re/guides/guides_morroc.txt
@@ -45,7 +45,7 @@ morocc,153,286,6 script Guide#moc::MocGuide 4_M_MOC_SOLDIER,{
while(.@loop2) {
if (.@wait_button_chk == 0) .@wait_button_chk = 1;
else next;
-
+
switch(select("^FF0000Thief Guild^000000:Weapon Shop:Inn:Pub:Mercenary Guild:Forge:Cancel")) {
case 1:
mes "[Morroc Guide]";
diff --git a/npc/pre-re/guides/guides_moscovia.txt b/npc/pre-re/guides/guides_moscovia.txt
index 49975358f..32abb90f6 100644
--- a/npc/pre-re/guides/guides_moscovia.txt
+++ b/npc/pre-re/guides/guides_moscovia.txt
@@ -80,7 +80,6 @@ moscovia,161,76,4 script Moscovia Guide#mosk 4_F_RUSWOMAN1,{
viewpoint 2,223,174,3,0x00FF00;
viewpoint 2,229,208,4,0x3355FF;
close;
-
case 3:
mes "[Moscovia Guide]";
mes "It'd be great to walk about alone.";
diff --git a/npc/pre-re/jobs/1-1/acolyte.txt b/npc/pre-re/jobs/1-1/acolyte.txt
index 9e138d9c6..1f9411f53 100644
--- a/npc/pre-re/jobs/1-1/acolyte.txt
+++ b/npc/pre-re/jobs/1-1/acolyte.txt
@@ -465,4 +465,3 @@ prt_fild00,208,218,6 script Ascetic#3aco 4W_M_02,{
}
}
}
-
diff --git a/npc/pre-re/jobs/1-1/archer.txt b/npc/pre-re/jobs/1-1/archer.txt
index 97ea540c1..d1ba4bf99 100644
--- a/npc/pre-re/jobs/1-1/archer.txt
+++ b/npc/pre-re/jobs/1-1/archer.txt
@@ -241,4 +241,3 @@ payon_in02,64,71,4 script Archer Guildsman#archer 4_M_03,{
close;
}
}
-
diff --git a/npc/pre-re/quests/collection/quest_demonpungus.txt b/npc/pre-re/quests/collection/quest_demonpungus.txt
index d72e3f816..b255e26b5 100644
--- a/npc/pre-re/quests/collection/quest_demonpungus.txt
+++ b/npc/pre-re/quests/collection/quest_demonpungus.txt
@@ -238,5 +238,3 @@ ein_fild01,43,249,0 script Local Villager#hunt 4_M_HUMAN_01,{
close;
}
}
-
-
diff --git a/npc/pre-re/quests/collection/quest_dokebi.txt b/npc/pre-re/quests/collection/quest_dokebi.txt
index 898c353cb..4e9aabd2e 100644
--- a/npc/pre-re/quests/collection/quest_dokebi.txt
+++ b/npc/pre-re/quests/collection/quest_dokebi.txt
@@ -228,5 +228,3 @@ pay_fild10,108,357,5 script Li#Dokebi_Hunt 4_F_01,{
close;
}
}
-
-
diff --git a/npc/pre-re/quests/collection/quest_fabre.txt b/npc/pre-re/quests/collection/quest_fabre.txt
index 5de7e74fd..f5cd2bf19 100644
--- a/npc/pre-re/quests/collection/quest_fabre.txt
+++ b/npc/pre-re/quests/collection/quest_fabre.txt
@@ -225,5 +225,3 @@ gef_fild07,321,193,4 script Langry#Fabre_Hunt 4_M_SAGE_A,{
close;
}
}
-
-
diff --git a/npc/pre-re/quests/collection/quest_frilldora.txt b/npc/pre-re/quests/collection/quest_frilldora.txt
index 95ee22d3c..2b6b9139d 100644
--- a/npc/pre-re/quests/collection/quest_frilldora.txt
+++ b/npc/pre-re/quests/collection/quest_frilldora.txt
@@ -234,5 +234,3 @@ moc_fild17,66,273,5 script Lemly#Frilldora_Hunt 4_F_JOB_ASSASSIN,{
close;
}
}
-
-
diff --git a/npc/pre-re/quests/collection/quest_goat.txt b/npc/pre-re/quests/collection/quest_goat.txt
index ee5c33f54..4f6ae56e3 100644
--- a/npc/pre-re/quests/collection/quest_goat.txt
+++ b/npc/pre-re/quests/collection/quest_goat.txt
@@ -240,4 +240,3 @@ ein_fild06,82,171,0 script Vegetable Farmer#Goat 4_F_SHABBY,{
close;
}
}
-
diff --git a/npc/pre-re/quests/collection/quest_golem.txt b/npc/pre-re/quests/collection/quest_golem.txt
index 8ad2d47b2..0f0ca8e5d 100644
--- a/npc/pre-re/quests/collection/quest_golem.txt
+++ b/npc/pre-re/quests/collection/quest_golem.txt
@@ -226,5 +226,3 @@ moc_fild11,57,138,0 script Private Jeremy#hunt 4_M_MOC_SOLDIER,{
close;
}
}
-
-
diff --git a/npc/pre-re/scripts_jobs.conf b/npc/pre-re/scripts_jobs.conf
index 6dd259148..491fba8dd 100644
--- a/npc/pre-re/scripts_jobs.conf
+++ b/npc/pre-re/scripts_jobs.conf
@@ -15,4 +15,4 @@ npc: npc/pre-re/jobs/novice/novice.txt
// ------------------------ Skill Quests ------------------------
// - Novice
-npc: npc/pre-re/quests/skills/novice_skills.txt \ No newline at end of file
+npc: npc/pre-re/quests/skills/novice_skills.txt
diff --git a/npc/quests/newgears/2010_headgears.txt b/npc/quests/newgears/2010_headgears.txt
index c2a44eacb..844cf5d23 100644
--- a/npc/quests/newgears/2010_headgears.txt
+++ b/npc/quests/newgears/2010_headgears.txt
@@ -1,16 +1,16 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= 2010 Headgear Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= Quests For Headgears:
//= Flower Of Fairy, NeckTie, Hair Brush
//= Status Of Baby Angel, Frog Cap, Solo Play Box
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 Converted from the official Aegis script. [Dastgir]
-//============================================================
+//============================================================
gonryun,149,189,0 script Yotang#Flower_Of_Fairy 1_M_04,{
mes "[Yotang]";
@@ -709,7 +709,6 @@ gef_fild07,108,161,4 script Roda Frog#Frog_Cap RODA_FROG,1,1,{
close2;
donpcevent "Roda Frog#Frog_Cap::OnDisable";
end;
-
}
else if (2009_hat == 5) {
if (questprogress(5004,HUNTING) == 1) {
@@ -827,7 +826,6 @@ OnTouch:
close;
}
-
// 6. Making the new headgear Solo Playing Box 1,2 ()5448,5449)
alberta,120,206,3 script Alonie#Solo_Play_Box 4_M_UMKID,{
if (2009_1_hat == 0) {
@@ -948,7 +946,6 @@ alberta,120,206,3 script Alonie#Solo_Play_Box 4_M_UMKID,{
mes "Go and kill";
mes "^FF000040 Arclouses and 30 High Orcs^000000!";
close;
-
}
else if (2009_1_hat == 3) {
if ((questprogress(1108,HUNTING) == 2) && (questprogress(1105,HUNTING) == 2)) {
@@ -1109,5 +1106,4 @@ alberta,120,206,3 script Alonie#Solo_Play_Box 4_M_UMKID,{
close;
}
end;
-
}
diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt
index 7e34a9729..6cadc346a 100644
--- a/npc/quests/quests_lighthalzen.txt
+++ b/npc/quests/quests_lighthalzen.txt
@@ -3082,7 +3082,6 @@ lighthalzen,337,232,3 script Maku 4_M_LGTPOOR,{
end;
}
-
yuno_in04,107,14,5 script Student 4_M_SAGE_A,{
if (friendship == 7 || friendship == 8) {
mes "[Joey Choryee]";
@@ -9787,8 +9786,6 @@ OnTimer190000:
end;
}
-
-
lhz_in01,182,35,0 script File Search Engine HIDDEN_NPC,{
if((lhz_boss > 28) && (lhz_boss < 35))
diff --git a/npc/quests/quests_nameless.txt b/npc/quests/quests_nameless.txt
index e43318e8a..d14ddaa8e 100644
--- a/npc/quests/quests_nameless.txt
+++ b/npc/quests/quests_nameless.txt
@@ -1147,8 +1147,6 @@ OnInit:
end;
}
-
-
nameless_i,168,257,0 script outtoin_01#mo WARPNPC,1,1,{
end;
diff --git a/npc/quests/skills/hunter_skills.txt b/npc/quests/skills/hunter_skills.txt
index b85aa3d42..b0b4f7bf7 100644
--- a/npc/quests/skills/hunter_skills.txt
+++ b/npc/quests/skills/hunter_skills.txt
@@ -373,4 +373,3 @@ pay_arche,109,169,3 script Arpesto 4_M_05,{
close;
}
}
-
diff --git a/npc/re/cities/dewata.txt b/npc/re/cities/dewata.txt
index fe6b661a3..4e96f7b33 100644
--- a/npc/re/cities/dewata.txt
+++ b/npc/re/cities/dewata.txt
@@ -496,7 +496,7 @@ dewata,89,191,6 script Small Shrine#dew1 CLEAR_NPC,{
"Lover","Girl friend","Boy friend"; //128
setarray .@index[0],
1,1,2,2,2,2,4,4,8,8,8,16,16,16,16,16,32,32,32,32,32,32,64,64,64,128,128,128;
-
+
if (.@good_luck == 7 || .@good_luck == 77 || .@good_luck == 777 || .@good_luck == 7777)
.@bonus = 1;
for(.@i = 0; .@i<getarraysize(.@wishes$); ++.@i) {
diff --git a/npc/re/cities/eclage.txt b/npc/re/cities/eclage.txt
index 35984cd64..51b7ae764 100644
--- a/npc/re/cities/eclage.txt
+++ b/npc/re/cities/eclage.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= General Eclage NPC.
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= Eclage Town NPC
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 Converted from the official Aegis script. [Dastgir]
-//============================================================
+//============================================================
ecl_in02,96,22,3 script sign#prison_inn 2_BOARD1,{
mes "[North] Prison";
@@ -51,7 +51,6 @@ ecl_in02,164,56,3 script Receptionist#Laphine 4_F_FAIRYKID2,{
percentheal 100,100;
warp "ecl_in02",167,49;
end;
-
case 2:
if (Zeny < 5000) {
mes "[Receptionist]";
diff --git a/npc/re/cities/izlude.txt b/npc/re/cities/izlude.txt
index 4417fb9fd..875a2039f 100644
--- a/npc/re/cities/izlude.txt
+++ b/npc/re/cities/izlude.txt
@@ -281,4 +281,4 @@ prt_fild08,338,217,7 script Resting Adventurer#iz 4_F_SITDOWN,{
prt_fild08a,338,217,7 duplicate(Resting Adventurer#iz) Resting Adventurer#iza 4_F_SITDOWN
prt_fild08b,338,217,7 duplicate(Resting Adventurer#iz) Resting Adventurer#izb 4_F_SITDOWN
prt_fild08c,338,217,7 duplicate(Resting Adventurer#iz) Resting Adventurer#izc 4_F_SITDOWN
-prt_fild08d,338,217,7 duplicate(Resting Adventurer#iz) Resting Adventurer#izd 4_F_SITDOWN \ No newline at end of file
+prt_fild08d,338,217,7 duplicate(Resting Adventurer#iz) Resting Adventurer#izd 4_F_SITDOWN
diff --git a/npc/re/events/halloween_2014.txt b/npc/re/events/halloween_2014.txt
index 5b81a2777..69eeab721 100644
--- a/npc/re/events/halloween_2014.txt
+++ b/npc/re/events/halloween_2014.txt
@@ -45,7 +45,6 @@
mes "Let's take a look at it.";
next;
if (countitem("Captured_Soul") > 4 && countitem("Black_Soul") > 0) {
-
mes "[Mighty Priest]";
mes "Wow, this is so strong!";
mes "You may be better than our priests!";
@@ -994,7 +993,7 @@ niflheim,194,189,3 script Loru#14hal 4_LOLI_RURI,{
getitem Trans_Candy_Yellow, 10;
getitem Trans_Candy_Green, 10;
erasequest 14461;
- setquest 14464;
+ setquest 14464;
close;
} else {
mes "[Loru]";
@@ -1380,7 +1379,7 @@ niflheim,193,186,6 script Bonfire Spirit#14hal 4_TRACE,{
OnTimer27000:
donpcevent "Bonfire Spirit#14hal::OnEnable";
- end;
+ end;
}
//= Sister / Nun
@@ -1558,7 +1557,7 @@ prt_church,96,91,4 script Spiritual Sister#14hal 1_F_PRIEST,5,5,{
delitem Holy_Water, 6;
getitem Sacred_Rosary, 1;
erasequest 14452;
- setquest 14453;
+ setquest 14453;
close;
} else {
mes "[Sister Haley]";
diff --git a/npc/re/instances/BuwayaCave.txt b/npc/re/instances/BuwayaCave.txt
index 2333a2428..908c15e2f 100644
--- a/npc/re/instances/BuwayaCave.txt
+++ b/npc/re/instances/BuwayaCave.txt
@@ -89,7 +89,7 @@ ma_fild02,312,317,5 script Guard#buwaya_cave 4_MAL_SOLDIER,{
}
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
-
+
mes "[Guard]";
mes "I will open up the tunnel to ^0000ff"+.@md_name$+"^000000.";
mes "I wish you good luck.";
diff --git a/npc/re/instances/EclageInterior.txt b/npc/re/instances/EclageInterior.txt
index 88fc414ba..d28d7cf64 100644
--- a/npc/re/instances/EclageInterior.txt
+++ b/npc/re/instances/EclageInterior.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= Eclage Instance Script
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= Eclage Interior Instance
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 Converted from the official Aegis script. [Dastgir]
-//============================================================
+//============================================================
ecl_hub01,132,12,3 script Chief of Staff#tl01::EclInstance 4_F_FAIRY,{
.@party_id = getcharid(1);
@@ -19,7 +19,7 @@ ecl_hub01,132,12,3 script Chief of Staff#tl01::EclInstance 4_F_FAIRY,{
mes "Only the party leader will enter. Please create your party.";
close;
}
-
+
if (getpartyleader(.@party_id,2) != getcharid(0)) {
mes "-! Warning !-";
mes "This current quest will be held at Memorial dungeon.";
@@ -52,7 +52,6 @@ ecl_hub01,132,12,3 script Chief of Staff#tl01::EclInstance 4_F_FAIRY,{
mes "Given the tight internal security, you should prepare yourself.";
mes "Wait here for a minute.";
close;
-
case 2:
mes "[Shenime]";
mes "It's not an easy task.";
@@ -73,7 +72,7 @@ ecl_hub01,130,15,0 script It is closed shut. CLEAR_NPC,{
switch (select("Enter it.:Forget it.")) {
case 1:
.@party_id = getcharid(1);
-
+
if (has_instance("1@ecl") == "") {
mes "It is closed shut.";
close;
@@ -101,7 +100,6 @@ ecl_hub01,130,15,0 script It is closed shut. CLEAR_NPC,{
mes "This current quest will be held at Memorial dungeon.";
mes "Only the party leader will enter. Please create your party.";
close;
-
case 2:
close;
}
@@ -110,10 +108,8 @@ ecl_hub01,130,15,0 script It is closed shut. CLEAR_NPC,{
mes "It's also a place where the lighting is set up to make Orb seem more beautiful.";
mes "It is closed shut.";
close;
- end;
}
-
1@ecl,58,69,3 script Shenime#ecl01 4_F_FAIRY,{
mes "[Shenime]";
mes "Oh, what's going on here?";
@@ -167,16 +163,16 @@ OnInstanceInit:
1@ecl,53,83,0 script #sndmaster HIDDEN_WARP_NPC,10,10,{
end;
-
+
OnInstanceInit:
.mob_summoned = 0;
disablenpc instance_npcname(strnpcinfo(0));
end;
-
+
OnEnable:
initnpctimer;
end;
-
+
OnReset:
killmonster instance_mapname("1@ecl"),instance_npcname("#sndmaster")+"::OnMyMobDead";
stopnpctimer;
@@ -191,19 +187,19 @@ OnTimer2000:
hideoffnpc instance_npcname("Suspicious Creature#7");
hideoffnpc instance_npcname("Suspicious Creature#8");
end;
-
+
OnTimer3000:
hideonnpc instance_npcname("#sndmaster");
stopnpctimer;
end;
-
+
OnMyMobDead:
if (mobcount(instance_mapname("1@ecl"),instance_npcname("#sndmaster")+"::OnMyMobDead") == 0) {
donpcevent instance_npcname("Shenime#ecl01")+"::OnEnable";
mapannounce instance_mapname("1@ecl"),"Shenime: Good, I got here just in time.",bc_map,"0xffff00"; //FW_NORMAL 12 0 0
}
end;
-
+
OnTouch:
if (.mob_summoned) end;
mes "Upon eliminating the intruders near the Orb, another strange-looking creatures appeared.";
@@ -368,20 +364,20 @@ OnInstanceInit:
warp "1@ecl",146,29;
end;
}
-
+
1@ecl,148,29,3 script Loki#ecl01 4_M_ROKI2,{
mes "[Loki]";
mes "It seems like this guy next to me has a lot more to say than I do.";
mes "Why don't you explain to him first?";
close;
-}
-
+}
+
1@ecl,147,30,3 script Nydhog#ecl01 4_F_NYDHOG,{
mes "[Guardian Nydhog]";
mes "I think you should talk to Hisie first.";
close;
}
-
+
1@ecl,144,27,5 script Hisie#ecl01 4_M_FARIY_HISIE,{
cutin "hisie01",0;
mes "[Hisie]";
@@ -495,4 +491,4 @@ OnInstanceInit:
cutin "",255;
warp "ecl_in03",57,76;
end;
-} \ No newline at end of file
+}
diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt
index 0751b46a2..6f23195cc 100644
--- a/npc/re/instances/MalangdoCulvert.txt
+++ b/npc/re/instances/MalangdoCulvert.txt
@@ -418,7 +418,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
}
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
-
+
mes "^3333FF"+.@md_name$+"^000000 - Reserving";
mes "After making the reservation, you";
mes "have to select Enter the Culvert.";
diff --git a/npc/re/instances/OctopusCave.txt b/npc/re/instances/OctopusCave.txt
index c55d5e2bf..6c3be5199 100644
--- a/npc/re/instances/OctopusCave.txt
+++ b/npc/re/instances/OctopusCave.txt
@@ -101,7 +101,7 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{
}
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
-
+
mes "[Starfish]";
mes "I will open the gate for a while to ^0000ff"+.@md_name$+"^000000.";
mes "Please catch that pervert octopus,";
diff --git a/npc/re/jobs/1-1/acolyte.txt b/npc/re/jobs/1-1/acolyte.txt
index 3ba4bcce9..91817e071 100644
--- a/npc/re/jobs/1-1/acolyte.txt
+++ b/npc/re/jobs/1-1/acolyte.txt
@@ -330,4 +330,3 @@ prt_fild00,208,218,6 script Ascetic#3aco 4W_M_02,{
}
}
}
-
diff --git a/npc/re/jobs/2e/kagerou_oboro.txt b/npc/re/jobs/2e/kagerou_oboro.txt
index c9f639d67..b60dcc85b 100644
--- a/npc/re/jobs/2e/kagerou_oboro.txt
+++ b/npc/re/jobs/2e/kagerou_oboro.txt
@@ -1,17 +1,17 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Kagerou / Oboro Job Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= (1.0) Dastgir, M45T3R
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1.1
//===== Description: =========================================
-//= [Official Conversion]
+//= [Official Conversion]
//= Job change Quest from Ninja -> Kagerou / Oboro.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0.0 Initial Release. [Dastgir, M45T3R]
//= 1.1.0 Structure Clean-Up. [Euphy]
//= 1.1.1 Updated questlog commands. [Kisuka]
-//============================================================
+//============================================================
// Starting the Quest
//============================================================
diff --git a/npc/re/jobs/novice/novice.txt b/npc/re/jobs/novice/novice.txt
index aa991e8c3..bc7bf572c 100644
--- a/npc/re/jobs/novice/novice.txt
+++ b/npc/re/jobs/novice/novice.txt
@@ -2267,7 +2267,7 @@ S_Warp:
savepoint getarg(0),getarg(1),getarg(2);
warp getarg(0),getarg(3),getarg(4);
end;
-
+
OnTouch:
emotion e_gasp;
end;
diff --git a/npc/re/merchants/coin_exchange.txt b/npc/re/merchants/coin_exchange.txt
index cabd9753b..7b553e0bd 100644
--- a/npc/re/merchants/coin_exchange.txt
+++ b/npc/re/merchants/coin_exchange.txt
@@ -1006,7 +1006,7 @@ ecl_in01,33,98,5 script Herb Merchant Plafina#e 4_M_FAIRYKID2,{
delitem Splendide_Coin,.cost[.@item]*.@buy; //Splendide_Coin
getitem .items[.@item],.@buy;
close;
-
+
OnInit:
setarray .items[0],Snow_Flip,Peony_Mommy,Slapping_Herb,Yggdrasil_Dust;
setarray .cost[0],5,5,1,1; //Splendide Coins
@@ -1028,7 +1028,6 @@ ecl_in01,67,39,4 script Replication Expert Paltu 4_M_FAIRYKID4,{
mes "[Paltu]";
mes "Really? Hmm?";
close;
-
case 2:
mes "[Paltu]";
mes "One can say that there's no one better in Eclage than I at utilizing magic resistance.";
@@ -1124,7 +1123,7 @@ ecl_in01,67,39,4 script Replication Expert Paltu 4_M_FAIRYKID4,{
C_Boy's_Cap;
if ((countitem(Splendide_Coin) >= 50) && (countitem(Crystal_Mirror) >= 4) && countitem(Angel_Magic_Power) && (countitem(Azure_Jewel) >= 10) && (countitem(Cardinal_Jewel) >= 10) && (countitem(Blue_Jewel) >= 10) && (countitem(Golden_Jewel) >= 10) && (countitem(Bluish_Green_Jewel) >= 10))
.@item_check =1;
-
+
for(.@i = 0; .@i<getarraysize(.@items); .@i++) {
if (.@item_check && countitem(.@items[.@i]))
.@menu$ = .@menu$+getitemname(.@items[.@i])+" (^2502FDAble to Replicate^000000):";
@@ -1213,4 +1212,4 @@ ecl_in01,67,39,4 script Replication Expert Paltu 4_M_FAIRYKID4,{
mes "Good. This is a satisfying result.";
mes "I'll do even a better job next time. Please tell others about my work. Have a good day~";
close;
-} \ No newline at end of file
+}
diff --git a/npc/re/merchants/diamond.txt b/npc/re/merchants/diamond.txt
index 80fcb88de..73b09802a 100644
--- a/npc/re/merchants/diamond.txt
+++ b/npc/re/merchants/diamond.txt
@@ -27,21 +27,21 @@
mes "The ^FF82FF'17 Carat Diamond'^000000 is currently on sale for a cheap price!!";
mes "If valuable diamonds interest you then listen up!";
next;
-
+
mes .@npc$;
mes "You can give the diamond as a gift to your lover.";
mes "The receiver of the ^FF82FF'17 Carat Diamond'^000000 will cherish it";
mes "and treasure you in their heart.";
emotion e_loud;
next;
-
+
mes .@npc$;
mes "What? You don't have a lover?";
mes "You can still just hang on to it for yourself.";
mes "The enchanting aura of the ^FF82FF'17 Carat Diamond'^000000 is likely";
mes "to bring love into your life.";
next;
-
+
mes .@npc$;
mes "Known as the captivating diamond of diamonds...";
mes "It is the ^FF82FF'17 Carat Diamond'^000000!";
@@ -61,33 +61,28 @@
mes "dug up from Morroc is unspeakable!";
emotion e_omg;
next;
-
mes .@npc$;
mes "Some claim that this is the very same diamond";
mes "that was seen by Kachua in Comodo!";
next;
-
if (select("End Conversation:How much is it?") == 1) {
mes .@npc$;
mes "It's rather inexpensive!";
mes "If you're interested, talk to me any time!";
close;
}
-
mes .@npc$;
mes "Of course! The most important thing is price!";
mes "As I've said earlier, the ^FF82FF'17 Carat Diamond'^000000 has been";
mes "appraised as a 17 carat diamond.";
mes "There aren't many like it in the world.";
next;
-
mes .@npc$;
mes "The price is a mere 500 million zeny!";
mes "There is also a 1,000,000z service fee.";
mes "Compared to the quality of the diamond";
mes "this is a small price to pay.";
next;
-
if (select("^828282It's too expensive.^000000:I'll buy it.") == 1) {
mes .@npc$;
mes "To say that a diamond such as the";
@@ -95,7 +90,6 @@
mes "you leave me speechless.";
close;
}
-
mes .@npc$;
mes "OOOH! I knew from the moment I saw you that you were the rightful";
mes "owner of this wonderful diamond.";
@@ -103,38 +97,31 @@
mes "I believe this diamond will suit you quite well.";
mes "All I need from you is to complete this contract.";
next;
-
while(1) {
if (select("^B9062FI will sign the contract.^000000:^828282Nevermind, I changed my mind.^000000") == 2) {
mes .@npc$;
mes "I see, that's too bad..";
close;
}
-
mes .@npc$;
mes "What is your name?";
next;
-
mes "[" + strcharinfo(0) + "]";
mes "My name is " + strcharinfo(0) + ".";
next;
-
mes .@npc$;
mes "Alright then, please sign here.";
next;
-
input .@charname$;
if (.@charname$ == strcharinfo(0)) {
mes .@npc$;
mes "Okay, good.";
mes "All that is left now is payment.";
next;
-
if (Zeny >= 501000000) {
mes .@npc$;
mes ". . . . . .";
next;
-
mes .@npc$;
mes "Calculating the price and service fee..";
mes "501,000,000 zeny.";
@@ -143,7 +130,6 @@
Zeny -= 501000000;
getitem 6024, 1;
next;
-
mes .@npc$;
mes "You may exchange the diamond back for zeny at any time.";
mes "However, there will be a 1,000,000z service fee.";
@@ -180,32 +166,26 @@
emotion e_dots;
close;
}
-
mes .@npc$;
mes "I see. After I receive your signature, ";
mes "You must offer your ^FF82FF'17 Carat Diamond'^000000.";
mes "Also don't forget there is a 1,000,000z service fee!";
next;
-
mes .@npc$;
mes "What is your name?";
next;
-
mes "[" + strcharinfo(0) + "]";
mes "My name is " + strcharinfo(0) + ".";
next;
-
mes .@npc$;
mes "Alright then, please sign here.";
next;
-
while (1) {
if (select("Sign:Don't Sign") == 2) {
mes .@npc$;
mes "The trade cannot be completed without your signature.";
close;
}
-
input .@charname$;
if (.@charname$ == strcharinfo(0)) {
mes .@npc$;
@@ -213,7 +193,6 @@
mes "I will now take your ^FF82FF'17 Carat Diamond'^000000..";
mes "You will receive ^0000FF499,000,000z^000000 afterwards.";
next;
-
mes .@npc$;
mes "Thank you for your business.";
mes "Whenever you need a ^FF82FF'17 Carat Diamond'^000000,";
diff --git a/npc/re/merchants/ninja_craftsman.txt b/npc/re/merchants/ninja_craftsman.txt
index a88069e99..cb6d47cd9 100644
--- a/npc/re/merchants/ninja_craftsman.txt
+++ b/npc/re/merchants/ninja_craftsman.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= Ninja Weapon and Armor
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= Ninja Armor and Weapon Craftsman
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 Official Conversion. [Dastgir]
-//============================================================
+//============================================================
que_ng,21,72,6 script Master Craftsman Gyo#arm 4_M_RASWORD,{
mes "[Gyo]";
mes "How would you define victory?";
@@ -55,7 +55,7 @@ que_ng,21,72,6 script Master Craftsman Gyo#arm 4_M_RASWORD,{
mes "Looks like you need more time to decide.";
close;
}
-
+
L_Menu:
.@item_make = getarg(0);
while(1){
@@ -177,7 +177,7 @@ L_Menu:
}
next;
}
-
+
L_Ingredients:
switch(getarg(0)){
case 2172: //Wolf_Armguard
@@ -190,7 +190,6 @@ L_Ingredients:
return "you'll need a Special Ninja Suit with a slot and 10 Dark Pieces";
}
end;
-
}
que_ng,23,70,6 script Master Craftsman Ki#weap 4_DST_SOLDIER,{
@@ -231,7 +230,7 @@ que_ng,23,70,6 script Master Craftsman Ki#weap 4_DST_SOLDIER,{
mes "Think carefully~~";
close;
}
-
+
L_Menu:
.@item_make = getarg(0);
while(1){
@@ -336,7 +335,7 @@ L_Menu:
}
next;
}
-
+
L_Ingredients:
switch(getarg(0)){
case 13076: //Raksasa_Dagger
@@ -347,5 +346,4 @@ L_Ingredients:
return "you need one Huuma Calm Mind Shuriken and 100 Broken Shurikens";
}
end;
-
}
diff --git a/npc/re/merchants/shadow_refiner.txt b/npc/re/merchants/shadow_refiner.txt
index 33d23450c..d184af61d 100644
--- a/npc/re/merchants/shadow_refiner.txt
+++ b/npc/re/merchants/shadow_refiner.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= Shadow Refiner
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= [Aegis Conversion]
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version [Dastgir]
-//============================================================
+//============================================================
itemmall,31,76,3 script Shadow Blacksmith#nomal 4_F_JOB_BLACKSMITH,{
disable_items;
@@ -61,7 +61,7 @@ itemmall,31,76,3 script Shadow Blacksmith#nomal 4_F_JOB_BLACKSMITH,{
.@mate$[1] = "^8C8C8C"+ getitemname(.@s_weapon2[.@index]) +"^000000";
.@miss[1] = 1;
}
- if (getequiprefinerycnt(.@SelectedPart) > 6 && countitem(.@s_weapon3[.@index]))
+ if (getequiprefinerycnt(.@SelectedPart) > 6 && countitem(.@s_weapon3[.@index]))
.@mate$[2] = getitemname(.@s_weapon3[.@index]);
else {
.@mate$[2] = "^8C8C8C"+ getitemname(.@s_weapon3[.@index]) +"^000000";
diff --git a/npc/re/mobs/champion.txt b/npc/re/mobs/champion.txt
index d880fb2d4..cbbee88dd 100644
--- a/npc/re/mobs/champion.txt
+++ b/npc/re/mobs/champion.txt
@@ -318,4 +318,4 @@ kh_dun02,0,0,0,0 monster Furious Alicel 2909,2,300000,0
c_tower3,0,0,0,0 monster Elusive Alarm 2910,2,300000,0
ra_san05,0,0,0,0 monster Swift Agav 2911,2,300000,0
abyss_03,0,0,0,0 monster Solid Acidus 2912,2,300000,0
-abyss_02,0,0,0,0 monster Acidus Ringleader 2913,2,300000,0 \ No newline at end of file
+abyss_02,0,0,0,0 monster Acidus Ringleader 2913,2,300000,0
diff --git a/npc/re/mobs/fields/niflheim.txt b/npc/re/mobs/fields/niflheim.txt
index 2446ec0e0..245ce4c7c 100644
--- a/npc/re/mobs/fields/niflheim.txt
+++ b/npc/re/mobs/fields/niflheim.txt
@@ -125,7 +125,7 @@ OnInit:
monster "niflheim",83,216,"Loli Ruri",1505,1,strnpcinfo(3)+"::OnInvasionMonsters";
break;
}
-
+
monster "niflheim",154,95,"Disguise",1506,1,strnpcinfo(3)+"::OnInvasionMonsters";
monster "niflheim",115,65,"Disguise",1506,1,strnpcinfo(3)+"::OnInvasionMonsters";
monster "niflheim",330,195,"Disguise",1506,1,strnpcinfo(3)+"::OnInvasionMonsters";
diff --git a/npc/re/mobs/fields/umbala.txt b/npc/re/mobs/fields/umbala.txt
index f33c07db8..d346dbc3b 100644
--- a/npc/re/mobs/fields/umbala.txt
+++ b/npc/re/mobs/fields/umbala.txt
@@ -11,7 +11,7 @@
//============================================================
//==================================================
-// um_fild01 - Luluka Forest
+// um_fild01 - Luluka Forest
//==================================================
um_fild01,0,0,0,0 monster Dryad 1493,60,5000,0,0
um_fild01,0,0,0,0 monster Stone Shooter 1495,25,5000,0,0
@@ -23,7 +23,7 @@ um_fild01,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
um_fild01,0,0,0,0 monster Shining Plant 1083,5,180000,90000,1
//==================================================
-// um_fild02 - Hoomga Forest
+// um_fild02 - Hoomga Forest
//==================================================
um_fild02,0,0,0,0 monster Wootan Fighter 1499,40,5000,0,0
um_fild02,0,0,0,0 monster Stone Shooter 1495,15,5000,0,0
@@ -33,7 +33,7 @@ um_fild02,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
um_fild02,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
//==================================================
-// um_fild03 - Kalala Swamp
+// um_fild03 - Kalala Swamp
//==================================================
um_fild03,0,0,0,0 monster Parasite 1500,60,5000,0,0
um_fild03,0,0,0,0 monster Stone Shooter 1495,15,5000,0,0
@@ -44,7 +44,7 @@ um_fild03,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
um_fild03,0,0,0,0 monster Shining Plant 1083,2,180000,90000,1
//==================================================
-// um_fild04 - Hoomga Jungle
+// um_fild04 - Hoomga Jungle
//==================================================
um_fild04,0,0,0,0 monster Wild Rose 1261,30,5000,0,0
um_fild04,0,0,0,0 monster Stone Shooter 1495,15,5000,0,0
diff --git a/npc/re/quests/cupet.txt b/npc/re/quests/cupet.txt
index 3e339e168..03f5f69dc 100644
--- a/npc/re/quests/cupet.txt
+++ b/npc/re/quests/cupet.txt
@@ -13,9 +13,8 @@
// 1st NPC
- script CPM1 4_M_ALCHE_C,{
-
.@npc$ = "[Cute Pet Manager]";
-
+
setarray .@tame_id[0],619,620,622,623,624,627,628,629,630;
setarray .@tame_amount[0],3,3,3,3,3,3,3,3,3;
setarray .@hunt_id[0],909,909,705,916,935,919,919,940,921;
@@ -29,7 +28,6 @@
mes .@tame_amount + " times for a taming item.";
mes "You can't exchange anymore.";
next;
-
mes "[Cute Pet Manager]";
mes "Besides me, there are other";
mes "Cute Pet Managers. If you want";
@@ -37,16 +35,14 @@
mes "you go and see them.";
close;
}
-
- callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_one,.@tame_gets,.@hunt_id2,.@hunt_amount2;
+ callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_one,.@tame_gets,.@hunt_id2,.@hunt_amount2;
}
// 2nd NPC
- script CPM2 4_M_ALCHE_C,{
-
.@npc$ = "[Cute Pet Manager]";
-
+
setarray .@tame_id[0],621,625,632,631,633,634,635,636,659,637,639,640;
setarray .@tame_amount[0],2,2,2,2,2,2,2,2,2,2,2,2;
setarray .@hunt_id[0],938,935,925,7033,945,942,931,901,1094,1021,936,1035;
@@ -61,7 +57,6 @@
mes .@tame_amount + " times for a taming item.";
mes "You can't exchange anymore.";
next;
-
mes "[Cute Pet Manager]";
mes "Besides me, there are other";
mes "Cute Pet Managers. If you want";
@@ -69,16 +64,14 @@
mes "you go and see them.";
close;
}
-
- callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_two,.@tame_gets,.@hunt_id2,.@hunt_amount2;
+ callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_two,.@tame_gets,.@hunt_id2,.@hunt_amount2;
}
// 3rd NPC
- script CPM3 4_M_ALCHE_C,{
-
.@npc$ = "[Cute Pet Manager]";
-
+
setarray .@tame_id[0],638,626,641,661,660,642;
setarray .@tame_amount[0],1,1,1,1,1,1;
setarray .@hunt_id[0],1020,943,1038,7047,1970,923;
@@ -94,7 +87,6 @@
mes .@tame_amount + " times for a taming item.";
mes "You can't exchange anymore.";
next;
-
mes "[Cute Pet Manager]";
mes "Besides me, there are other";
mes "Cute Pet Managers. If you want";
@@ -102,9 +94,8 @@
mes "you go and see them.";
close;
}
-
- callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_three,.@tame_gets,.@hunt_id2,.@hunt_amount2;
+ callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_three,.@tame_gets,.@hunt_id2,.@hunt_amount2;
}
function script cute_pet_manager {
@@ -123,7 +114,6 @@ function script cute_pet_manager {
mes "who is in charge of public relations";
mes "for the New Upgraded Cute Pet system.";
next;
-
mes "[Cute Pet Manager]";
mes "If you have any concerns regarding";
mes "the Cute Pet system I am here to guide you.";
@@ -132,18 +122,15 @@ function script cute_pet_manager {
mes "then I will tell you the monster";
mes "that you can tame with the item.";
next;
-
mes "Also I will explain what materials";
mes "you need to bring in order to";
mes "get the taming item.";
next;
-
mes "[Cute Pet Manager]";
mes "If you already brought materials";
mes "to exchange for the taming item,";
mes "I can exchange it for taming items immediately.";
next;
-
mes "[Cute Pet Manager]";
mes "However, there is a limit";
mes "for exchanging taming items.";
@@ -151,17 +138,14 @@ function script cute_pet_manager {
mes getarg(6) + " times. So please make sure";
mes "how many times you have exchanged.";
next;
-
mes "[Cute Pet Manager]";
mes "So, which taming item do you want?";
mes "Please choose one from the list.";
next;
-
// Create Menu System
for (.@a = 0; .@a < getarraysize(getarg(0)); ++.@a) {
.@menu$ += (.@menu$ == "" ? "" : ":") + getitemname(getelementofarray(getarg(0), .@a));
}
-
// Query Player Choice
.@choice = select(.@menu$) - 1;
@@ -173,7 +157,6 @@ function script cute_pet_manager {
.@mob_id = getelementofarray(getarg(4), .@choice);
.@hunt_id2 = getelementofarray(getarg(7), .@choice);
.@hunt_amount2 = getelementofarray(getarg(8), .@choice);
-
dispbottom "Tame ID: " + .@tame_id;
dispbottom "Tame Amount: " + .@tame_amount;
dispbottom "Hunt ID: " + .@hunt_id;
@@ -182,28 +165,23 @@ function script cute_pet_manager {
dispbottom "Mob ID: " + .@mob_id;
dispbottom "Hunt ID2: " + .@hunt_id2;
dispbottom "Hunt Amount2: " + .@hunt_amount2;
-
if (.@hunt_id2) { .@hunt2_count = countitem(.@hunt_id2); }
if (countitem(.@hunt_id) >= .@hunt_amount && countitem(6083) > 0 && .@hunt2_count >= .@hunt_amount2) {
-
mes "[Cute Pet Manager]";
mes "Ah, you have gathered all items";
mes "with your friends. You can now";
mes "exchange for an " + getitemname(.@tame_id) + ".";
mes "Do you want to exchange with me?";
next;
-
- if (select("Exchange:Don't Exchange") == 2) {
+ if (select("Exchange:Don't Exchange") == 2) {
mes "[Cute Pet Manager]";
mes "You don't? You will come back again.";
close;
}
-
delitem .@hunt_id, .@hunt_amount;
delitem 6083, 1;
set getarg(5), getarg(5) + 1;
getitem .@tame_id, .@tame_amount;
-
mes "[Cute Pet Manager]";
mes "Wise choice.";
mes "I hope you and your pet get along.";
diff --git a/npc/re/quests/eden/100-110.txt b/npc/re/quests/eden/100-110.txt
index 486a4b6e6..c0065b293 100644
--- a/npc/re/quests/eden/100-110.txt
+++ b/npc/re/quests/eden/100-110.txt
@@ -782,7 +782,7 @@ moc_para01,37,95,5 script Gelkah#1 4_F_GELKA,{
.@ran = rand(1,1000);
if (.@amount == 1) {
if (.@ran <= 100)
- setarray .@item[0],Blue_Potion,2;
+ setarray .@item[0],Blue_Potion,2;
else if (.@ran <= 200)
setarray .@item[0],White_Slim_Potion,10;
else if (.@ran == 333)
diff --git a/npc/re/quests/eden/111-120.txt b/npc/re/quests/eden/111-120.txt
index b8bd667f1..a8ea81361 100644
--- a/npc/re/quests/eden/111-120.txt
+++ b/npc/re/quests/eden/111-120.txt
@@ -1135,7 +1135,6 @@ S_Hunting:
mes "You finished researching about "+ getarg(.@i+2) +". Thank you.";
getexp 700000,getarg(.@i+1);
break;
-
}
erasequest .@quest_id;
next;
diff --git a/npc/re/quests/eden/131-140.txt b/npc/re/quests/eden/131-140.txt
index b40c4167f..e23b6a83d 100644
--- a/npc/re/quests/eden/131-140.txt
+++ b/npc/re/quests/eden/131-140.txt
@@ -573,7 +573,7 @@ S_Erasequest:
mes "I'll ask someone else to take care of the rest of the Satan Morroc Incarnations, then!";
break;
case 3:
- mes "I'll need to ask another adventurer to help with the Scaraba!";
+ mes "I'll need to ask another adventurer to help with the Scaraba!";
}
break;
case 2:
@@ -584,7 +584,7 @@ S_Erasequest:
getexp 1100000,300000;
break;
case 2:
- mes "Was the story of Satan Morroc worth putting to song? Great work!";
+ mes "Was the story of Satan Morroc worth putting to song? Great work!";
getexp 1100000,200000;
break;
case 3:
diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt
index 1d25e17d3..1ac4f83f1 100644
--- a/npc/re/quests/eden/eden_quests.txt
+++ b/npc/re/quests/eden/eden_quests.txt
@@ -4037,7 +4037,7 @@ S_Enchant:
delitem getarg(0),1;
para_2nd04 = 4;
changequest 7240,7241;
- getitem2 getarg(0),1,1,0,0,0,0,.@1st,.@2nd;
+ getitem2 getarg(0),1,1,0,0,0,0,.@1st,.@2nd;
mes "[Thorn]";
mes "Ok, seems that the enhancement went well.";
mes "If you don't like the result then you can come back again tomorrow.";
diff --git a/npc/re/quests/quests_dewata.txt b/npc/re/quests/quests_dewata.txt
index db78bce54..821ee6d8d 100644
--- a/npc/re/quests/quests_dewata.txt
+++ b/npc/re/quests/quests_dewata.txt
@@ -1285,7 +1285,6 @@ dew_fild01,114,275,4 script Lero#dew_drink 4_M_DEWMAN,{
mes "Once you bring the oil palm nuts, Mr. Memo will exchange them with oil.";
close;
} else if ((.@j & 2) || (.@j & 8) || (.@j & 32)) {
-
// .@i[]: <required amount>,<quest ID>,<reward amount>,<free weight>
if (.@j & 2)
setarray .@i[0],20,5046,10,5000;
diff --git a/npc/re/quests/quests_dicastes.txt b/npc/re/quests/quests_dicastes.txt
index 10bb003e5..f3d16473d 100644
--- a/npc/re/quests/quests_dicastes.txt
+++ b/npc/re/quests/quests_dicastes.txt
@@ -902,7 +902,6 @@ dic_in01,40,270,2 script Transport Dept. 2 Mgr 4_MAN_BENKUNI,{
close;
}
-
dic_in01,40,193,1 script Papyrus#0001 4_MAN_NITT,{
if (!checkweight(1201,1)) {
mes "You have too many items in your inventory.";
@@ -3985,7 +3984,6 @@ dic_in01,245,119,4 script Shay#ep133_13 4_M_ACROSS,{
setarray .@quest, 7194,7195,7196;
setarray .@item, 6306,6305,6307;
setarray .@str$, "bloodstain","frozen piece of skin","strange magical stone fragment";
-
.@size = getarraysize(.@item);
for (.@i = 0; .@i < .@size; ++.@i) {
if (countitem(.@item[.@i])) {
@@ -4800,7 +4798,6 @@ dic_fild01,231,174,5 script BK#ep133_18 4_M_MERCAT2,{
.@size = getarraysize(.@npc$);
for (.@i = 0; .@i < .@size; ++.@i)
if (.@n$ == .@npc$[.@i]) .@type = .@i;
-
if (ep13_3_secret == 10) {
if (.@npc$[.@type] == "Rock Pile") {
mes "There are many piles of rock around because of the unstable crustal movements.";
@@ -7332,7 +7329,7 @@ dic_in01,42,264,3 script Adventurer Clerk#ep133 4_MAN_NITT,{
mes "I'm done. Hehe";
close;
}
-
+
// Enchant Constants
// Ex: .@dex[1]: DEX + 1 | .@cri[5]: CRI + 5 | .@eva[12]: FLEE + 12
.@matk[1] = 4760; .@matk[2] = 4761;
@@ -7342,13 +7339,13 @@ dic_in01,42,264,3 script Adventurer Clerk#ep133 4_MAN_NITT,{
.@dex[1] = 4720; .@dex[2] = 4721; .@dex[3] = 4722;
.@int[1] = 4710; .@int[2] = 4711; .@int[3] = 4712;
.@agi[1] = 4730; .@agi[2] = 4731; .@agi[3] = 4732;
-
+
// Enchant attribute is determined by the digit position of variable value (ep13_3_<type>).
// For example, assume the variable value is 516:
// .@f_<slot>[<index>]
// slot: 2 3 4
- // index: 5 1 6
-
+ // index: 5 1 6
+
// Enchant Format
if (compare(.@v$,"ring")) setarray .@f_2[1],.@agi[1],.@agi[2],.@int[1],.@int[2],.@dex[1],.@dex[2];
else setarray .@f_2[1],.@agi[1],.@agi[2],.@agi[3],.@int[1],.@int[2],.@int[3],.@dex[1],.@dex[2],.@dex[3];
diff --git a/npc/re/quests/quests_eclage.txt b/npc/re/quests/quests_eclage.txt
index 918a8edd3..3b4e7ba0f 100644
--- a/npc/re/quests/quests_eclage.txt
+++ b/npc/re/quests/quests_eclage.txt
@@ -1,15 +1,15 @@
-//===== Hercules Script ======================================
+//===== Hercules Script ======================================
//= Eclage Quests
-//===== By: ==================================================
+//===== By: ==================================================
//= Dastgir
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Description: =========================================
+//===== Description: =========================================
//= Quests of Eclage
//= Contains All Quest of Eclage
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 Converted from the official Aegis script. [Dastgir]
-//============================================================
+//============================================================
// Teleport Cats
//============================================================
@@ -63,7 +63,7 @@ ecl_fild01,118,311,4 script Teleport Cat No.1#1 4_M_BOSSCAT,{
}
warp .maps$[.@mindex[.@i]],.x[.@mindex[.@i]],.y[.@mindex[.@i]];
end;
-
+
OnInit:
setarray .maps$,"bif_fild02","ecl_fild01","spl_fild02","mid_camp","man_fild02","dic_fild01"; //Map Names //2,4,8,16,32,64
setarray .x,291,116,51,180,133,159; //X-Co-ordinate of Maps
@@ -89,7 +89,7 @@ dic_fild01,161,266,4 duplicate(Teleport Cat No.1#1) Teleport Cat No.6#6 4_M_BOSS
//============================================================
ecl_fild01,97,322,0 script #ep14_2Entrance WARPNPC,3,3,{
end;
-
+
OnTouch:
if (ep14_2_oliver < 3) {
mes "[Security Guard]";
@@ -552,7 +552,6 @@ eclage,102,32,4 script Fairy Carpenter#ep14_2 4_M_FAIRYKID2,{
ep14_2_oliver = 4;
setquest 11312;
close;
-
case 3:
mes "[Fairy Carpenter]";
mes "You can't get past here until it's repaired, so please be careful.";
@@ -792,7 +791,6 @@ eclage,102,32,4 script Fairy Carpenter#ep14_2 4_M_FAIRYKID2,{
ep14_2_oliver = 7;
changequest 11314,11315;
close;
-
}
else if (ep14_2_oliver == 7) {
mes "[Carpenter Fon]";
@@ -2312,7 +2310,7 @@ ecl_in01,70,88,4 script Sack Merchant#ep14_2 4_M_MERCAT1,{
eclage,292,265,0 script #ep14_2Yube Entrance WARPNPC,2,2,{
end;
-
+
OnTouch:
if (ep14_2_oliver < 15) {
mes "- Looks like the door is locked. -";
@@ -3326,7 +3324,6 @@ eclage,282,255,4 script Wuhari#eclbig 4_M_FAIRYKID6,{
mes "Oh, no, no. I am sure you are really busy. I'm sorry to have asked such a favor.";
ep14_2_big = 1;
close;
-
case 2:
mes "[" + strcharinfo(PC_NAME) + "]";
mes "Sure. It's not a big deal.";
@@ -4132,10 +4129,9 @@ ecl_in02,149,117,4 script Wuhuru#eclbig 4_M_FAIRYFREAK,{
mes "......";
close;
}
-end;
+ end;
}
-
eclage,200,272,4 script Masione#eclbig 4_F_FAIRYKID2,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight)<2000) {
mes "- Stop Here!! -";
@@ -4285,7 +4281,6 @@ eclage,163,228,4 script Goatie#eclbig 4_F_FAIRYKID3,{
}
}
-
eclage,170,195,4 script Svery#eclbig 4_M_FAIRYKID2,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight) < 2000) {
mes "- Stop Here!! -";
@@ -4412,7 +4407,6 @@ eclage,170,195,4 script Svery#eclbig 4_M_FAIRYKID2,{
close;
}
-
eclage,126,151,4 script Pompe#eclbig 4_M_FAIRYKID3,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight) < 2000) {
mes "- Stop Here!! -";
@@ -4503,7 +4497,6 @@ eclage,126,151,4 script Pompe#eclbig 4_M_FAIRYKID3,{
close;
}
-
ecl_fild01,70,285,4 script Giranni#eclbig 4_F_FAIRY2,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight) < 2000) {
mes "- Stop Here!! -";
@@ -4608,7 +4601,7 @@ ecl_fild01,70,285,4 script Giranni#eclbig 4_F_FAIRY2,{
next;
mes "[" + strcharinfo(PC_NAME) + "]";
mes "Hmm? Where did it go? Did I drop it on the way?";
- close;
+ close;
}
mes "- You describe the corpse that you found in the field and show the piece of wing -";
next;
@@ -4701,7 +4694,6 @@ ecl_fild01,70,285,4 script Giranni#eclbig 4_F_FAIRY2,{
close;
}
-
ecl_fild01,269,165,4 script A Laphine corpse#eclbig 4_FAIRYDEADLEAF,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight) < 2000) {
mes "- Stop Here!! -";
@@ -4996,8 +4988,7 @@ ecl_in01,50,104,4 duplicate(Choir member#eclbig01) Choir member#eclbig03 4_M_FAI
ecl_in01,52,104,4 duplicate(Choir member#eclbig01) Choir member#eclbig04 4_M_FAIRYKID
ecl_in01,54,104,4 duplicate(Choir member#eclbig01) Choir member#eclbig05 4_M_FAIRYKID
-
-// Mystery Burglary Quest
+// Mystery Burglary Quest
//============================================================
eclage,156,51,6 script #hidden_eclage HIDDEN_NPC,3,3,{
end;
@@ -5037,7 +5028,7 @@ OnTouch:
mes "It's probably nothing.";
mes "I should just go on my way~";
close;
- }
+ }
}
}
@@ -7538,7 +7529,7 @@ ecl_in04,208,194,3 script Daughter Luen#eclage2 4_F_FAIRYKID2,{
mes "I'll think about it more and";
mes "figure out who the robber is...";
close;
- }
+ }
case 2:
mes "[" + strcharinfo(PC_NAME) + "]";
mes "I... I guess";
@@ -7882,7 +7873,7 @@ ecl_in04,208,194,3 script Daughter Luen#eclage2 4_F_FAIRYKID2,{
ep14_2_detect = 10;
break;
}
- break;
+ break;
}
break;
case 6:
@@ -9449,7 +9440,6 @@ ecl_in01,82,79,4 script Magazine#02 HIDDEN_NPC,{
close;
}
-
// Light and Darkness
//============================================================
ecl_in02,98,32,3 script Eclage Guard#tl1b 4_M_FAIRYSOLDIER2,{
@@ -9469,7 +9459,7 @@ ecl_in02,98,32,3 script Eclage Guard#tl1b 4_M_FAIRYSOLDIER2,{
ecl_in02,133,115,0 script #pa0829Prison Guard HIDDEN_WARP_NPC,3,3,{
end;
-
+
OnTouch:
if (ep14_2_etran < 2) {
mes "[Clever]";
@@ -10226,7 +10216,6 @@ ecl_in04,109,215,3 script Hiel#pa0829 4_M_FAIRYSCHOLAR,{
mes "Oh... I guess it was too much to ask for. That's too bad then.";
ep14_2_etran = 12;
close;
-
case 2:
mes "[Hiel]";
mes "Wow wow! Thank you so much! I'll return the favor by operating it together when the experiments are complete! In the meantime, I'll start preparing for material combination!";
@@ -10289,7 +10278,6 @@ ecl_in04,109,215,3 script Hiel#pa0829 4_M_FAIRYSCHOLAR,{
mes "[Hiel]";
mes "How ruthless... Saying that he won't give them after showing them to me.";
close;
-
case 2:
if ((countitem(Dark_Debris)) && (countitem(Yellow_Gemstone) > 1) && (countitem(Red_Gemstone) > 1) && (countitem(Blue_Gemstone) > 1)) {
mes "[Hiel]";
@@ -11572,7 +11560,6 @@ OnTouch:
next;
mes "^000099The reactor was activated, but the dimension does not seem to be related to Etran.^000000";
close;
-
case 2:
mes "[????]";
mes "I... I did it. The restricted area!! Absolute zero ductility!!!!!! And they stole it from me. My gravitational pull of 300 grams.";
@@ -11582,7 +11569,6 @@ OnTouch:
next;
mes "^000099The reactor was activated, but the dimension does not seem to be related to Etran.^000000";
close;
-
case 3:
mes "[????]";
mes "Is this-...(Static static) Is this guy really in the right mind?";
@@ -11619,14 +11605,12 @@ OnTouch:
next;
mes "^000099The reactor was activated, but the dimension does not seem to be related to Etran. It's cold somehow.^000000";
close;
-
case 2:
mes "[????]";
mes "Human!! Human Chicken!!!!!!!!";
next;
mes "^000099The reactor was activated, but the dimension does not seem to be related to Etran. It smells delicious somehow.^000000";
close;
-
case 3:
mes "[????]";
mes "You don't know why I'm upset, do you?";
@@ -11641,7 +11625,7 @@ OnTouch:
close;
}
}
-end;
+ end;
}
ecl_fild01,179,179,0 duplicate(#pa0829Reactor3) #pa0829Reactor8 HIDDEN_WARP_NPC,3,3
@@ -11665,14 +11649,12 @@ OnTouch:
next;
mes "^000099The reactor was activated but... For some reason, I'm getting lonely.^000000";
close;
-
case 2:
mes "[???]";
mes "3..8..12..33...31..The last number is erased...";
next;
mes "^000099How intriguing...^000000";
close;
-
case 3:
mes "[???]";
mes "I'm going insane.";
@@ -11710,14 +11692,12 @@ OnTouch:
next;
mes "^000099The reactor was activated. Somehow it felt like I had to do whatever they said in it.^000000";
close;
-
case 2:
mes "[???]";
mes "3..8..12..33...31..The last number is erased...";
next;
mes "^000099How intriguing...^000000";
close;
-
case 3:
mes "[????]";
mes "Baby, you don't know why I'm upset, do you?";
@@ -11953,14 +11933,12 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
next;
mes "^000099It's been a while since I felt that about myself. Yes, indeed... This machine is getting on my nerves.^000000";
close;
-
case 2:
mes "[???]";
mes "CHTTTTSTATIC~~~~ ANG!?~~ CHTTTTT ~ oh my shoulder!!";
next;
mes "^000099Oh, I'm sorry. I'm going to leave this channel.^000000";
close;
-
case 3:
mes "^000099Etran's sad legend^000000";
next;
@@ -12014,7 +11992,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 4:
mes "^000099What if Etran and Robert were the priosoner and the guard?^000000";
next;
@@ -12032,7 +12009,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 5:
mes "^000099Etran and Robert were put to work as cat merchants.^000000";
next;
@@ -12074,7 +12050,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 6:
mes "^000099Etran and Robert were placed in a Flight machine.^000000";
next;
@@ -12127,7 +12102,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 7:
mes "^000099Iron Chef Robert^000000";
next;
@@ -12159,7 +12133,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 8:
mes "^000099Robert actually likes beer.^000000";
next;
@@ -12206,7 +12179,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 9:
mes "^000099Robert the cook^000000";
next;
@@ -12244,7 +12216,6 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 10:
mes "^000099Childhood friends, Etran and Robert^000000";
next;
@@ -12292,19 +12263,16 @@ ecl_in04,105,216,4 script Hiel's Workshop#pa0829 HIDDEN_NPC,{
close2;
cutin "",255;
end;
-
case 11:
mes "^000099In boiling water~ 3 minutes~ ... Static static^000000";
next;
mes "^0000993 minutes in boiling water... What after that. Does it mean it will die 3 minutes in boiling water? Do I pour the boiling water over a monster or something?^000000";
close;
-
case 12:
mes "^000099Houston~ Houston~ This is CHTTTCHTTT~ We see a large tower and a tree. It seems like there are life forms here on this planet as well~ STATIC~ ^000000";
next;
mes "^000099Some desperate voices are heard. Not sure what the words, planets and life forms, are referring to.^000000";
close;
-
default:
mes "^000099There's too much static. Try adjusting the frequency. ^000000";
close;
@@ -12336,18 +12304,15 @@ ecl_fild01,190,93,5 script Fili#1 4_M_FAIRYANG,1,1,{
mes "[Fili]";
mes "What is Eclage like? It's such a nice place.";
close;
-
case 2:
mes "[Fili]";
mes "People wouldn't hate or hold each other at knife point if their hearts are filled with love for flowers and the earth.";
close;
-
case 3:
mes "[Fili]";
mes "You should avoid going into the tower. It's dangerous. We can't do much for the ones who have already entered, though.";
close;
}
-
case 2:
if (questprogress(13059,PLAYTIME) == 2) {
mes "[Fili]";
@@ -12365,7 +12330,7 @@ ecl_fild01,190,93,5 script Fili#1 4_M_FAIRYANG,1,1,{
mes "[Fili]";
mes "There are four in the work group. Don't forget to tell everyone.";
close;
- }
+ }
mes "[Fili]";
mes "Thanks. Can you hear the earth singing? The sound of flowers and trees dancing in the wind. You'll hear it someday.";
emotion e_lv;
@@ -12544,7 +12509,7 @@ ecl_fild01,190,93,5 script Fili#1 4_M_FAIRYANG,1,1,{
mes "[Fili]";
mes "I think their work for the field is finished for the day. By the way, ^FF0000there's another work. Ask about it if you're interested.^000000";
erasequest 13050;
- ep14_2_nines = 2;
+ ep14_2_nines = 2;
getitem Splendide_Coin,1; //Splendide_Coin
getexp 300000,300000;
close;
@@ -12588,7 +12553,7 @@ ecl_fild01,190,93,5 script Fili#1 4_M_FAIRYANG,1,1,{
close2;
}
}
- }
+ }
if (ep14_2_oliver > 4) {
mes "[Fili]";
mes "Look at this beautiful field filled with little blades of grass and twigs breathing!";
@@ -12677,7 +12642,7 @@ ecl_fild01,83,263,5 script Watering Laphine#1 4_M_FAIRYKID3,{
mes "I think this is enough for the day. I have to take a break and draw water, too. Hehe~!";
close;
}
- else if ((questprogress(13050) == 1) && (questprogress(13052) == 1)) {
+ else if ((questprogress(13050) == 1) && (questprogress(13052) == 1)) {
mes "[Watering Laphine]";
mes "I'll water these dying flowers and grasses again. This brings them back to life! Hehe~!";
erasequest 13052;
@@ -12691,7 +12656,6 @@ ecl_fild01,83,263,5 script Watering Laphine#1 4_M_FAIRYKID3,{
mes "[Watering Laphine]";
mes "I'm sure Eclage needs a Laphine like me! Hehe~!";
close;
-
}
else if (ep14_2_nines == 1){
if ((questprogress(13050) == 1) && (questprogress(13052) == 1)) {
@@ -12708,7 +12672,6 @@ ecl_fild01,83,263,5 script Watering Laphine#1 4_M_FAIRYKID3,{
mes "[Watering Laphine]";
mes "Hehe~! Now that I'm done watering, I should wait for the great Fili.";
close;
-
}
mes "[Watering Laphine]";
mes "It's my job to water the earth.";
@@ -12727,7 +12690,7 @@ ecl_fild01,163,196,5 script Dancing Laphine#1 4_F_FAIRYKID3,{
mes "I would love to see the great Fili next time...";
close;
}
- if ((questprogress(13050) == 1) && (questprogress(13053) == 1)) {
+ if ((questprogress(13050) == 1) && (questprogress(13053) == 1)) {
mes "[Dancing Laphine]";
mes "Ah, it's you again! You're so insensitive. Anyway, you're here to tell me to start working, right? I see, I see. You can go now.";
emotion e_pif;
@@ -12860,13 +12823,13 @@ ecl_fild01,237,181,5 script Cute Laphine#1 4_M_FAIRYKID5,{
ecl_tdun02,99,63,5 script Rosi#No.1 4_F_HUWOMAN,1,1,{
end;
-
+
OnInit:
if (atoi( charat( strnpcinfo(0), getstrlen(strnpcinfo(0))-1 ) ) > 1){
disablenpc strnpcinfo(0);
}
end;
-
+
OnTouch:
if (ep14_2_nines < 2) {
mes "[Rosi]";
@@ -12902,7 +12865,6 @@ OnTouch:
mes "[Rosi]";
mes "This tower is very quiet yet mysterious. It's definitely something that adventurers would love, right?";
close;
-
}
else if (ep14_2_nines == 2) {
if ((questprogress(13055) == 1) && (questprogress(13056) == 1)) {
@@ -12952,7 +12914,7 @@ ecl_tdun02,22,36,5 duplicate(Rosi#No.1) Rosi#No.3 4_F_HUWOMAN,1,1
ecl_tdun01,11,62,5 script Euncheong#No.1 4_M_HUBOY,1,1,{
end;
-
+
OnInit:
if (atoi( charat( strnpcinfo(0), getstrlen(strnpcinfo(0))-1 ) ) > 1){
disablenpc strnpcinfo(0);
@@ -13125,7 +13087,6 @@ ecl_tdun03,68,80,3 script New Oz#1 4_M_NEWOZ,1,1,{
close2;
cutin "",255;
end;
-
case 2:
if (questprogress(13062,PLAYTIME) == 1) {
cutin "nines02",2;
@@ -13218,7 +13179,6 @@ ecl_tdun03,68,80,3 script New Oz#1 4_M_NEWOZ,1,1,{
close2;
cutin "",255;
end;
-
case 3:
if (questprogress(13064,PLAYTIME) == 1) {
cutin "nines02",2;
@@ -13285,7 +13245,6 @@ ecl_tdun03,68,80,3 script New Oz#1 4_M_NEWOZ,1,1,{
close2;
cutin "",255;
end;
-
case 4:
if (questprogress(13066,PLAYTIME) == 1) {
cutin "nines03",2;
@@ -13411,7 +13370,7 @@ ecl_tdun03,68,80,3 script New Oz#1 4_M_NEWOZ,1,1,{
close2;
cutin "",255;
end;
- }
+ }
cutin "nines03",2;
mes "[New Oz]";
mes "Don't worry. I'm pretty much done writing a song. I'm almost done with the lyrics as well as the melody.";
@@ -13421,7 +13380,6 @@ ecl_tdun03,68,80,3 script New Oz#1 4_M_NEWOZ,1,1,{
close2;
cutin "",255;
end;
-
}
cutin "nines02",2;
mes "[New Oz]";
@@ -14126,7 +14084,7 @@ ecl_tdun04,26,39,1 script Professor Worm#worm 4_M_PROFESSORWORM,{
ecl_tdun04,21,41,0 script #pf HIDDEN_WARP_NPC,2,2,{
end;
-
+
OnTouch:
.@pro = rand(1,100);
if (ep14_2_profe == 1) {
@@ -14209,7 +14167,6 @@ OnTouch:
mes "But why do I have to remain in a place like this, too?";
close;
}
-
}
ecl_tdun04,35,31,0 script #prf2 HIDDEN_WARP_NPC,2,2,{
@@ -14251,7 +14208,6 @@ OnTouch:
mes "I wonder if I'll forget even my name... How it worries me...";
close;
}
-
}
ecl_tdun04,28,43,0 script #prf3 HIDDEN_WARP_NPC,2,2,{
@@ -14378,7 +14334,7 @@ OnTouch:
next;
mes "[Wall Note 5]";
mes "Monsters, I have to create more monsters to protect me. As many as I could possibly create!";
- close;
+ close;
}
}
@@ -14608,7 +14564,7 @@ ecl_fild01,173,95,7 script Diary Frog No. 30#worm 4_FROG,{
mes "If you come back to late, all you'll hear are my moans and groans.";
changequest 1226,1227;
ep14_2_profe = 10;
- close;
+ close;
}
else if (ep14_2_profe == 10) {
if (countitem(Star_Shape_Mushroom) < 10) {
@@ -14672,7 +14628,7 @@ ecl_fild01,173,95,7 script Diary Frog No. 30#worm 4_FROG,{
mes "I'm so mad, I oughta throw this out!";
next;
mes "It seems that a continued search for diary recordings would be meaningless. I should go back to Professor Worm.";
- close;
+ close;
}
}
@@ -14797,7 +14753,6 @@ ecl_in01,32,52,5 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
mes "Let's talk to other travelers.";
setquest 7411;
break;
-
case 2:
mes "[Fome]";
mes "The main attraction of Eclage?";
@@ -14855,7 +14810,6 @@ ecl_in01,32,52,5 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
hideonnpc "Eclage Guard#tl01";
warp "ecl_in03",244,89;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Oh, is that right?";
@@ -14875,7 +14829,6 @@ ecl_in01,32,52,5 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
cutin "",255;
hideonnpc "Eclage Guard#tl01";
end;
-
}
}
mes "[Fome]";
@@ -14948,7 +14901,6 @@ ecl_in01,32,52,5 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
mes "What Fome said is interesting.";
mes "A distrusted king...should I listen to what other Laphines say about it?";
close;
-
}
mes "[Fome]";
mes "I'm sure there is something.";
@@ -14959,7 +14911,7 @@ ecl_in01,32,52,5 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
mes "I should start planning on moving to the next region. ";
mes "I'm debating whether I should just go back or go to Mora Village...";
close;
-
+
OnTouch:
if (ep14_2_mylord == 0 && BaseLevel > 98) {
mes "A group of travelers of Alpheim are having a conversation.";
@@ -14971,7 +14923,6 @@ OnTouch:
case 1:
mes "They don't seem to care that much.";
close;
-
case 2:
mes "When you approach, they stop talking for a second and make a seat for you.";
mes "Start a conversation.";
@@ -15081,7 +15032,6 @@ ecl_in01,32,51,7 script Traveler Litrip#tl02 4_M_DOGTRAVELER,{
cutin "",255;
warp "ecl_in03",244,89;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Oh, is that right?";
@@ -15101,7 +15051,6 @@ ecl_in01,32,51,7 script Traveler Litrip#tl02 4_M_DOGTRAVELER,{
hideonnpc "Eclage Guard#tl01";
cutin "",255;
end;
-
}
}
mes "[Litrip]";
@@ -15270,7 +15219,6 @@ ecl_in01,35,51,3 script Traveler Chiba#tl03 4_M_DOGTRAVELER2,{
warp "ecl_in03",244,89;
cutin "",255;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Oh, is that right?";
@@ -15290,7 +15238,6 @@ ecl_in01,35,51,3 script Traveler Chiba#tl03 4_M_DOGTRAVELER2,{
hideonnpc "Eclage Guard#tl01";
cutin "",255;
end;
-
}
}
mes "[Chiba]";
@@ -15338,11 +15285,11 @@ ecl_in01,31,49,7 script Eclage Guard#tl01 4_M_FAIRYSOLDIER,{
OnInit:
hideonnpc "Eclage Guard#tl01";
end;
-
+
OnEnable:
hideoffnpc "Eclage Guard#tl01";
end;
-
+
OnDisable:
hideonnpc "Eclage Guard#tl01";
end;
@@ -15375,7 +15322,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
cutin "",255;
warp "ecl_in03",244,89;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Ah...is that right?";
@@ -15404,7 +15350,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
warp "ecl_in03",244,89;
cutin "",255;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Is that right?";
@@ -15439,7 +15384,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
warp "ecl_in03",58,72;
cutin "",255;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Do as you wish although Mayor Jun might be upset if you keep him waiting for too long.";
@@ -15460,7 +15404,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
warp "ecl_in03",58,72;
cutin "",255;
end;
-
case 2:
mes "[Eclage Guard]";
mes "Thank you.";
@@ -15496,7 +15439,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
mes "Well, I understand.";
cutin "minuel01",2;
break;
-
case 2:
mes "[Minuel]";
mes "Actually I don't have any time for myself since I have to be here all the time.";
@@ -15531,7 +15473,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
mes "I'll be counting on you!";
setquest 7418;
break;
-
case 2:
mes "[Minuel]";
mes "Ha, do you really think so?";
@@ -15539,7 +15480,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
mes "Soon, in the near future. Hehehe";
cutin "minuel02",2;
break;
-
}
close2;
cutin "",255;
@@ -15731,7 +15671,6 @@ ecl_in01,82,70,3 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
mes "That's too bad.";
mes "Maybe next time!";
break;
-
case 2:
mes "[Minuel]";
mes "Thank you so much.";
@@ -16041,7 +15980,6 @@ ecl_in03,245,93,3 script Chief of Staff#tl01 4_F_FAIRY,{
mes "A scholar of magics? There's no one with that name among the scholars I know. ";
mes "I don't know.";
close;
-
}
else if ((ep14_2_mylord > 17) && (ep14_2_mylord < 22)) {
mes "[Shenime]";
@@ -16232,7 +16170,6 @@ ecl_in03,245,93,3 script Chief of Staff#tl01 4_F_FAIRY,{
ep14_2_mylord = 26;
changequest 7445,7447;
close;
-
}
else if (ep14_2_mylord == 26) {
mes "[Shenime]";
@@ -16308,7 +16245,6 @@ ecl_in03,245,93,3 script Chief of Staff#tl01 4_F_FAIRY,{
ep14_2_mylord = 28;
changequest 7448,7449;
close;
-
case 2:
mes "When you held Shenime's hand, you felt a sharp pain in your hand.";
mes "You took your hand off quickly and examined it, but nothing was there.";
@@ -16323,7 +16259,6 @@ ecl_in03,245,93,3 script Chief of Staff#tl01 4_F_FAIRY,{
close2;
warp "ecl_hub01",129,12;
end;
-
}
}
else if (ep14_2_mylord == 28) {
@@ -16336,7 +16271,6 @@ ecl_in03,245,93,3 script Chief of Staff#tl01 4_F_FAIRY,{
mes "Shouldn't you, a foreigner, consider it as an honor and receive the offer?";
mes "You're hesitating too much.";
close;
-
case 2:
mes "When you held Shenime's hand, you felt a sharp pain in your hand.";
mes "You took your hand off quickly and examined it, but nothing was there.";
@@ -17993,7 +17927,6 @@ eclage,112,40,3 script Eclage Guard Leo#tl 4_M_FAIRYSOLDIER2,{
mes ".........isn't it depressing.";
close;
}
-
}
ecl_fild01,205,86,3 script Eclage Messenger Roy#tl 4_M_FAIRYSOLDIER2,{
@@ -18825,7 +18758,6 @@ ecl_tdun04,32,35,3 script Hisie#tlord 4_M_FARIY_HISIE,{
mes "I need to see what Avant is researching about.";
mes "Let's hurry.";
close2;
-
}
else if ((ep14_2_mylord == 22) || (ep14_2_mylord == 23)) {
cutin "hisie03",0;
@@ -19119,18 +19051,18 @@ OnTouch:
close2;
cutin "",255;
end;
-
+
OnStop:
stopnpctimer;
end;
OnTimer5000:
- mapannounce "que_avan01","Welcome, Sir Avant. User certification standby for 5 minutes.",bc_map,"0xA8A8A8";
+ mapannounce "que_avan01","Welcome, Sir Avant. User certification standby for 5 minutes.",bc_map,"0xA8A8A8";
end;
OnTimer360000:
- mapannounce "que_avan01","Warning: Long-term use was not certified. Restrictive magic on unauthorized personnel will automatically be executed.",bc_map,"0xA8A8A8";
+ mapannounce "que_avan01","Warning: Long-term use was not certified. Restrictive magic on unauthorized personnel will automatically be executed.",bc_map,"0xA8A8A8";
end;
OnTimer365000:
- mapannounce "que_avan01","Research lab interior space has been distorted. Sweeping in process.",bc_map,"0x7b68ee";
+ mapannounce "que_avan01","Research lab interior space has been distorted. Sweeping in process.",bc_map,"0x7b68ee";
end;
OnTimer368000:
mapwarp "que_avan01","eclage",265,275;
@@ -19383,7 +19315,7 @@ OnEnable:
monster "que_avan01",29,36,"DARK_PRIEST",DARK_PRIEST,1;
monster "que_avan01",29,32,"DARK_PRIEST",DARK_PRIEST,1;
end;
-
+
OnReset:
mapwarp "que_avan01","eclage",265,275;
killmonster "que_avan01","#avtmanager::OnMyMobDead";
@@ -19399,10 +19331,10 @@ OnReset:
hideoffnpc "#tltimer";
$111204_avantlabo = 0;
end;
-
+
OnMyMobDead:
if (mobcount ("que_avan01","#avtmanager::OnMyMobDead") == 0) {
- mapannounce "que_avan01","Hisie: This is it for you! Avant!!",bc_map,"0x7b68ee";
+ mapannounce "que_avan01","Hisie: This is it for you! Avant!!",bc_map,"0x7b68ee";
hideonnpc "Hisie#tlspt";
hideoffnpc "Hisie#tlhunt";
}
@@ -19420,20 +19352,20 @@ que_avan01,26,41,3 script Avant Magic Scholar#tlac 4_M_FAIRYAVANT,{
initnpctimer;
monster "que_avan01",26,38,"HIDDEN_MOB",HIDDEN_MOB,1;
end;
-
+
OnInit:
hideonnpc "Avant Magic Scholar#tlac";
end;
-
+
OnKill:
killmonster "que_avan01","Avant Magic Scholar#tlac::OnMyMobDead";
stopnpctimer;
end;
-
+
OnTimer2000:
- mapannounce "que_avan01","Hisie: Watch out!!!",bc_map,"0x7b68ee";
+ mapannounce "que_avan01","Hisie: Watch out!!!",bc_map,"0x7b68ee";
end;
-
+
OnTimer8000:
killmonster "que_avan01","Avant Magic Scholar#tlac::OnMyMobDead";
stopnpctimer;
diff --git a/npc/re/quests/quests_malangdo.txt b/npc/re/quests/quests_malangdo.txt
index 4cd3ec886..2f13ad618 100644
--- a/npc/re/quests/quests_malangdo.txt
+++ b/npc/re/quests/quests_malangdo.txt
@@ -4612,7 +4612,7 @@ mal_in02,187,58,3 script Chef Nyas 4_CAT_CHEF,{
setquest 7276;
mal_food = 0;
erasequest 7280+.@i;
-
+
// Quantities grouped in 10s repeating.
// [ 3, 3, 6, 6, 9, 9, 12, 12, 15, 18 ]
// Last group [ 61 - 66 ] receives 25 constant.
diff --git a/npc/re/quests/quests_malaya.txt b/npc/re/quests/quests_malaya.txt
index e67a827e9..925f28507 100644
--- a/npc/re/quests/quests_malaya.txt
+++ b/npc/re/quests/quests_malaya.txt
@@ -3165,7 +3165,7 @@ ma_fild01,251,93,3 script Lost Child#malaya01 4_F_BARYO_GIRL,{
}
}
end;
-
+
OnInit:
if (strnpcinfo(0) != "Lost Child#malaya01")
disablenpc strnpcinfo(0);
@@ -3770,7 +3770,7 @@ ma_fild01,158,243,6 script Tribe Blacksmith#malaya 4_M_MALAYA,{
.@newItem = 2492;
break;
}
-
+
if (!(.@item)) {
mes "[Bayani]";
mes "You should wear the equipment to upgrade and not come without it on you.";
@@ -3817,11 +3817,11 @@ ma_fild01,158,243,6 script Tribe Blacksmith#malaya 4_M_MALAYA,{
mes "[Bayani]";
mes "BAM!!";
next;
-
+
delitem 6499,20; //Ancient_Grudge
delequip .@part;
getitem .@newItem, 1;
-
+
mes "[Bayani]";
mes "Ha ha. Perfect.";
mes "Congratulations. Your armor is better than ever.";
diff --git a/npc/re/warps/dungeons/ecl_dun.txt b/npc/re/warps/dungeons/ecl_dun.txt
index e0677c3a9..24f6c6cf0 100644
--- a/npc/re/warps/dungeons/ecl_dun.txt
+++ b/npc/re/warps/dungeons/ecl_dun.txt
@@ -8,7 +8,7 @@
//= Warp Portals for Eclage Dungeon
//===== Additional Comments: =================================
//= 1.0 First Version.
-//= 1.0a Corrected Warp Co-ordinates and
+//= 1.0a Corrected Warp Co-ordinates and
//= name of Warp Portal. [Dastgir]
//============================================================
diff --git a/npc/warps/cities/einbroch.txt b/npc/warps/cities/einbroch.txt
index bbb562a95..c05940360 100644
--- a/npc/warps/cities/einbroch.txt
+++ b/npc/warps/cities/einbroch.txt
@@ -22,7 +22,6 @@ ein_in01,13,213,0 warp ein_fa01a 1,1,einbroch,129,79
ein_in01,81,198,0 warp ein_fa02 1,1,einbroch,179,70
einbroch,179,73,0 warp ein_fa02a 1,1,ein_in01,81,203
-
//==========================================================================
//Einbroch - Near Train station
//==========================================================================
@@ -31,14 +30,12 @@ einbroch,233,312,0 warp ein_to01a 1,1,einbroch,214,260
einbroch,250,263,0 warp ein_to02 1,1,einbroch,269,315
einbroch,269,312,0 warp ein_to02a 1,1,einbroch,250,260
-
//==========================================================================
//Einbroch - Weapon shop
//==========================================================================
einbroch,216,214,0 warp ein_wp01 1,1,ein_in01,108,17
ein_in01,108,13,0 warp ein_wp01a 1,1,einbroch,216,211
-
//=========================================================================
//Einbroch - Hotel
//=========================================================================
@@ -59,7 +56,6 @@ ein_in01,232,176,0 warp ein_h07a 1,1,ein_in01,264,206
ein_in01,284,224,0 warp ein_h08 1,1,ein_in01,177,277
ein_in01,180,277,0 warp ein_h08a 1,1,ein_in01,280,224
-
//==========================================================================
//Einbroch - Building behind the hotel
//==========================================================================
@@ -70,20 +66,17 @@ ein_in01,100,142,0 warp ein_ho02a 1,1,ein_in01,123,85
einbroch,290,222,0 warp ein_ho03 1,1,ein_in01,121,80
ein_in01,121,77,0 warp ein_ho03a 1,1,einbroch,290,219
-
//==========================================================================
//Einbroch - House of Kapetain
//==========================================================================
einbroch,129,229,0 warp ein_kf01 1,1,ein_in01,14,147
ein_in01,11,147,0 warp ein_kf01a 1,1,einbroch,126,229
-
//=========================================================================
//Einbroch - Lab
//=========================================================================
ein_in01,286,25,0 warp ein_lab 1,1,einbroch,54,52
-
//=========================================================================
//Einbroch - Blacksmith guild
//=========================================================================
@@ -92,7 +85,6 @@ ein_in01,14,14,0 warp ein_jb01a 1,1,einbroch,255,110
ein_in01,39,36,0 warp ein_jb02 1,1,ein_in01,35,83
ein_in01,39,85,0 warp ein_jb02a 1,1,ein_in01,36,36
-
//==========================================================================
//Einbroch - Field related
//==========================================================================
@@ -100,4 +92,3 @@ einbroch,157,331,0 warp ein_fd01 1,1,ein_fild04,184,31
ein_fild04,184,26,0 warp ein_fd01a 1,1,einbroch,157,327
einbroch,150,25,0 warp ein_fd02 1,1,ein_fild08,164,377
ein_fild08,164,380,0 warp ein_fd02a 1,1,einbroch,150,28
-
diff --git a/npc/warps/cities/gonryun.txt b/npc/warps/cities/gonryun.txt
index 1f74e02f5..b4e831dda 100644
--- a/npc/warps/cities/gonryun.txt
+++ b/npc/warps/cities/gonryun.txt
@@ -29,5 +29,3 @@ gon_in,42,35,0 warp gon_castle2-1 1,1,gon_in,34,97
gon_in,31,97,0 warp gon_castle2-2 1,1,gon_in,39,35
gonryun,161,8,0 warp gon_fild1-1 1,1,gon_fild01,191,261
gon_fild01,192,265,0 warp gon_fild1-2 1,1,gonryun,161,11
-
-
diff --git a/npc/warps/cities/mid_camp.txt b/npc/warps/cities/mid_camp.txt
index b1e26b0ae..b6da7046a 100644
--- a/npc/warps/cities/mid_camp.txt
+++ b/npc/warps/cities/mid_camp.txt
@@ -42,4 +42,3 @@ mid_camp,266,260,0 warp mid_house1-1 1,1,mid_campin,284,124
mid_campin,282,124,0 warp mid_house1-2 1,1,mid_camp,263,260
mid_camp,163,231,0 warp mid_house2-1 1,1,mid_campin,376,133
mid_campin,376,136,0 warp mid_house2-2 1,1,mid_camp,163,234
-
diff --git a/npc/warps/cities/prontera.txt b/npc/warps/cities/prontera.txt
index 7327b2901..2e446ec97 100644
--- a/npc/warps/cities/prontera.txt
+++ b/npc/warps/cities/prontera.txt
@@ -73,8 +73,6 @@ prt_church,168,19,0 warp prtch01-1 1,2,prt_church,105,81
prt_church,31,19,0 warp prtch02 1,2,prt_church,94,81
prt_church,90,81,0 warp prtch02-1 1,2,prt_church,27,19
-
-
//= Prontera Castle ===========================================
prt_castle,102,129,0 warp prtca01 3,2,prt_castle,102,143
prt_castle,102,140,0 warp prtca01-1 3,2,prt_castle,102,126
diff --git a/npc/warps/dungeons/lhz_dun.txt b/npc/warps/dungeons/lhz_dun.txt
index b77b0d2ef..5ed05bd7c 100644
--- a/npc/warps/dungeons/lhz_dun.txt
+++ b/npc/warps/dungeons/lhz_dun.txt
@@ -201,7 +201,7 @@ lhz_cube,123,26,0 script cubew09-4 WARPNPC,1,1,{
callfunc "randomw";
end;
}
-
+
//----- Function for Random Warps ----------------------------
function script randomw {
switch(rand(3)) {
diff --git a/npc/warps/dungeons/mosk_dun.txt b/npc/warps/dungeons/mosk_dun.txt
index 7543b5a9b..b4b83e1bf 100644
--- a/npc/warps/dungeons/mosk_dun.txt
+++ b/npc/warps/dungeons/mosk_dun.txt
@@ -121,7 +121,7 @@ mosk_dun02,53,215,3 script Soldier1#mos 4_M_RUSKNIGHT,{
mes "We're called out for emergencies,";
mes "don't disturb us anymore.";
close;
-
+
OnInit:
hideonnpc "Soldier1#mos";
end;
@@ -137,7 +137,7 @@ mosk_dun02,50,217,3 script Soldier2#mos 4_M_RUSKNIGHT,{
mes "We're called out for emergencies,";
mes "don't disturb us anymore.";
close;
-
+
OnInit:
hideonnpc "Soldier2#mos";
end;
@@ -147,14 +147,13 @@ OnEnable:
end;
}
-
mosk_dun02,56,217,5 script Soldier3#mos 4_M_RUSKNIGHT,{
mes "[Soldier]";
mes "We're the Csar's soldiers.";
mes "We're called out for emergencies,";
mes "don't disturb us anymore.";
close;
-
+
OnInit:
hideonnpc "Soldier3#mos";
end;
diff --git a/npc/warps/pvp.txt b/npc/warps/pvp.txt
index c8276ce23..61f233910 100644
--- a/npc/warps/pvp.txt
+++ b/npc/warps/pvp.txt
@@ -171,4 +171,3 @@ pvp_n_8-4,150,71,0 warp Link#pt_link_1-41 1,1,pvp_n_8-4,0,0
pvp_n_8-4,144,166,0 warp Link#pt_link_1-42 1,1,pvp_n_8-4,0,0
// Invalid Warp
//pvp_n_8-5,30,30,0 warp a 3,3,pvp_n_8-5,100,100
-
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 6f4130962..36fb453fa 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -1130,9 +1130,9 @@ OnGuardianDied:
OnClock0001:
// Do nothing if this script is the template.
if (strnpcinfo(1) == "Gld_Trea_Spawn") end;
-
+
.@GID = getcastledata(strnpcinfo(2),1);
-
+
// If there is no owner, do nothing.
if (!.@GID) end;
diff --git a/src/char/HPMchar.h b/src/char/HPMchar.h
index 594bb7f00..e3e000ef3 100644
--- a/src/char/HPMchar.h
+++ b/src/char/HPMchar.h
@@ -22,4 +22,3 @@ void HPM_char_do_final(void);
void HPM_char_do_init(void);
#endif /* CHAR_HPMCHAR_H */
-
diff --git a/src/char/char.c b/src/char/char.c
index c54fedb8c..3cc8853a4 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2414,7 +2414,7 @@ void char_changesex(int account_id, int sex)
* Performs the necessary operations when changing a character's sex, such as
* correcting the job class and unequipping items, and propagating the
* information to the guild data.
- *
+ *
* @param sex The new sex (SEX_MALE or SEX_FEMALE).
* @param acc The character's account ID.
* @param char_id The character ID.
@@ -2483,7 +2483,7 @@ int char_parse_fromlogin_changesex_reply(int fd)
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class_, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, 0, NULL, NULL);
-
+
for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) {
char_change_sex_sub(sex, acc, char_id, class_, guild_id);
}
@@ -3455,7 +3455,7 @@ void char_ask_name_ack(int fd, int acc, const char* name, int type, int result)
* Changes a character's sex.
* The information is updated on database, and the character is kicked if it
* currently is online.
- *
+ *
* @param char_id The character's ID.
* @param sex The new sex.
* @retval 0 in case of success.
@@ -3479,7 +3479,7 @@ int char_changecharsex(int char_id, int sex)
SQL->GetData(inter->sql_handle, 1, &data, NULL); class_ = atoi(data);
SQL->GetData(inter->sql_handle, 2, &data, NULL); guild_id = atoi(data);
SQL->FreeResult(inter->sql_handle);
-
+
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `sex` = '%c' WHERE `char_id` = '%d'", char_db, sex == SEX_MALE ? 'M' : 'F', char_id)) {
Sql_ShowDebug(inter->sql_handle);
return 1;
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index c2393d103..442995826 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -20,4 +20,3 @@ void inter_quest_defaults(void);
HPShared struct inter_quest_interface *inter_quest;
#endif /* CHAR_INT_QUEST_H */
-
diff --git a/src/char/inter.c b/src/char/inter.c
index 548b24ee8..65048a9f9 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -953,7 +953,7 @@ int mapif_wis_message(struct WisData *wd)
wd->len = 0;
if (wd->len >= sizeof(wd->msg) - 1)
wd->len = sizeof(wd->msg) - 1;
-
+
WBUFW(buf, 0) = 0x3801;
WBUFW(buf, 2) = 56 +wd->len;
WBUFL(buf, 4) = wd->id;
diff --git a/src/common/atomic.h b/src/common/atomic.h
index c1ea2aa48..1bb859b29 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -40,7 +40,6 @@ forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch,
}
}
-
forceinline volatile int64 InterlockedIncrement64(volatile int64 *addend){
__int64 old;
do{
@@ -50,8 +49,6 @@ forceinline volatile int64 InterlockedIncrement64(volatile int64 *addend){
return (old + 1);
}
-
-
forceinline volatile int64 InterlockedDecrement64(volatile int64 *addend){
__int64 old;
@@ -97,53 +94,42 @@ static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64
return __sync_fetch_and_add(addend, increment);
}//end: InterlockedExchangeAdd64()
-
static forceinline int32 InterlockedExchangeAdd(volatile int32 *addend, int32 increment){
return __sync_fetch_and_add(addend, increment);
}//end: InterlockedExchangeAdd()
-
static forceinline int64 InterlockedIncrement64(volatile int64 *addend){
return __sync_add_and_fetch(addend, 1);
}//end: InterlockedIncrement64()
-
static forceinline int32 InterlockedIncrement(volatile int32 *addend){
return __sync_add_and_fetch(addend, 1);
}//end: InterlockedIncrement()
-
static forceinline int64 InterlockedDecrement64(volatile int64 *addend){
return __sync_sub_and_fetch(addend, 1);
}//end: InterlockedDecrement64()
-
static forceinline int32 InterlockedDecrement(volatile int32 *addend){
return __sync_sub_and_fetch(addend, 1);
}//end: InterlockedDecrement()
-
static forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, int64 cmp){
return __sync_val_compare_and_swap(dest, cmp, exch);
}//end: InterlockedCompareExchange64()
-
static forceinline int32 InterlockedCompareExchange(volatile int32 *dest, int32 exch, int32 cmp){
return __sync_val_compare_and_swap(dest, cmp, exch);
}//end: InterlockedCompareExchnage()
-
static forceinline int64 InterlockedExchange64(volatile int64 *target, int64 val){
return __sync_lock_test_and_set(target, val);
}//end: InterlockedExchange64()
-
static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){
return __sync_lock_test_and_set(target, val);
}//end: InterlockedExchange()
-
#endif //endif compiler decision
-
#endif /* COMMON_ATOMIC_H */
diff --git a/src/common/core.c b/src/common/core.c
index 7f5a1da53..dcc96fa41 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -206,7 +206,7 @@ const char *cmdline_arg_source(struct CmdlineArgData *arg) {
*/
bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) {
struct CmdlineArgData *data = NULL;
-
+
RECREATE(cmdline->args_data, struct CmdlineArgData, ++cmdline->args_data_count);
data = &cmdline->args_data[cmdline->args_data_count-1];
data->pluginID = pluginID;
@@ -227,7 +227,7 @@ static CMDLINEARG(help)
ShowInfo("Usage: %s [options]\n", SERVER_NAME);
ShowInfo("\n");
ShowInfo("Options:\n");
-
+
for (i = 0; i < cmdline->args_data_count; i++) {
struct CmdlineArgData *data = &cmdline->args_data[i];
char altname[16], paramnames[256];
@@ -400,7 +400,7 @@ int main (int argc, char **argv) {
cmdline->exec(argc, argv, CMDLINE_OPT_SILENT);
iMalloc->init_messages(); // Initialization messages (after buying us some time to suppress them if needed)
-
+
sysinfo->init();
if (!(showmsg->silent&0x1))
diff --git a/src/common/db.h b/src/common/db.h
index 9b9cba8f8..73d44a755 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -269,13 +269,9 @@ typedef uint64 (*DBHasher)(DBKey key, unsigned short maxlen);
*/
typedef void (*DBReleaser)(DBKey key, DBData data, DBRelease which);
-
-
typedef struct DBIterator DBIterator;
typedef struct DBMap DBMap;
-
-
/**
* Database iterator.
* Supports forward iteration, backward iteration and removing entries from the database.
@@ -621,7 +617,6 @@ struct DBMap {
#define i64db_get(db,k) ( DB->data2ptr((db)->get((db),DB->i642key(k))) )
#define ui64db_get(db,k) ( DB->data2ptr((db)->get((db),DB->ui642key(k))) )
-
// Get int-type data from DBMaps of various key types
#define db_iget(db,k) ( DB->data2i((db)->get((db),(k))) )
#define idb_iget(db,k) ( DB->data2i((db)->get((db),DB->i2key(k))) )
@@ -940,7 +935,6 @@ void db_defaults(void);
HPShared struct db_interface *DB;
-
/// Finds an entry in an array.
/// ex: ARR_FIND(0, size, i, list[i] == target);
///
@@ -955,8 +949,6 @@ HPShared struct db_interface *DB;
break; \
}while(0)
-
-
/// Moves an entry of the array.
/// Use ARR_MOVERIGHT/ARR_MOVELEFT if __from and __to are direct numbers.
/// ex: ARR_MOVE(i, 0, list, int);// move index i to index 0
@@ -980,8 +972,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// Moves an entry of the array to the right.
/// ex: ARR_MOVERIGHT(1, 4, list, int);// move index 1 to index 4
///
@@ -997,8 +987,6 @@ HPShared struct db_interface *DB;
memmove((__arr)+(__to), &__backup__, sizeof(__type)); \
}while(0)
-
-
/// Moves an entry of the array to the left.
/// ex: ARR_MOVELEFT(3, 0, list, int);// move index 3 to index 0
///
@@ -1014,14 +1002,10 @@ HPShared struct db_interface *DB;
memmove((__arr)+(__to), &__backup__, sizeof(__type)); \
}while(0)
-
-
/////////////////////////////////////////////////////////////////////
// Vector library based on defines. (dynamic array)
// uses aMalloc, aRealloc, aFree
-
-
/// Declares an anonymous vector struct.
///
/// @param __type Type of data
@@ -1032,8 +1016,6 @@ HPShared struct db_interface *DB;
__type* _data_; \
}
-
-
/// Declares a named vector struct.
///
/// @param __name Structure name
@@ -1045,8 +1027,6 @@ HPShared struct db_interface *DB;
__type* _data_; \
}
-
-
/// Declares and initializes an anonymous vector variable.
///
/// @param __type Type of data
@@ -1054,8 +1034,6 @@ HPShared struct db_interface *DB;
#define VECTOR_VAR(__type,__var) \
VECTOR_DECL(__type) __var = {0,0,NULL}
-
-
/// Declares and initializes a named vector variable.
///
/// @param __name Structure name
@@ -1063,16 +1041,12 @@ HPShared struct db_interface *DB;
#define VECTOR_STRUCT_VAR(__name,__var) \
struct __name __var = {0,0,NULL}
-
-
/// Initializes a vector.
///
/// @param __vec Vector
#define VECTOR_INIT(__vec) \
memset(&(__vec), 0, sizeof(__vec))
-
-
/// Returns the internal array of values.
///
/// @param __vec Vector
@@ -1080,8 +1054,6 @@ HPShared struct db_interface *DB;
#define VECTOR_DATA(__vec) \
( (__vec)._data_ )
-
-
/// Returns the length of the vector.
///
/// @param __vec Vector
@@ -1089,8 +1061,6 @@ HPShared struct db_interface *DB;
#define VECTOR_LENGTH(__vec) \
( (__vec)._len_ )
-
-
/// Returns the capacity of the vector.
///
/// @param __vec Vector
@@ -1098,8 +1068,6 @@ HPShared struct db_interface *DB;
#define VECTOR_CAPACITY(__vec) \
( (__vec)._max_ )
-
-
/// Returns the value at the target index.
/// Assumes the index exists.
///
@@ -1109,8 +1077,6 @@ HPShared struct db_interface *DB;
#define VECTOR_INDEX(__vec,__idx) \
( VECTOR_DATA(__vec)[__idx] )
-
-
/// Returns the first value of the vector.
/// Assumes the array is not empty.
///
@@ -1119,8 +1085,6 @@ HPShared struct db_interface *DB;
#define VECTOR_FIRST(__vec) \
( VECTOR_INDEX(__vec,0) )
-
-
/// Returns the last value of the vector.
/// Assumes the array is not empty.
///
@@ -1129,8 +1093,6 @@ HPShared struct db_interface *DB;
#define VECTOR_LAST(__vec) \
( VECTOR_INDEX(__vec,VECTOR_LENGTH(__vec)-1) )
-
-
/// Resizes the vector.
/// Excess values are discarded, new positions are zeroed.
///
@@ -1159,8 +1121,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// Ensures that the array has the target number of empty positions.
/// Increases the capacity in multiples of __step.
///
@@ -1176,8 +1136,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// Inserts a zeroed value in the target index.
/// Assumes the index is valid and there is enough capacity.
///
@@ -1191,8 +1149,6 @@ HPShared struct db_interface *DB;
++VECTOR_LENGTH(__vec); /* increase length */ \
}while(0)
-
-
/// Inserts a value in the target index. (using the '=' operator)
/// Assumes the index is valid and there is enough capacity.
///
@@ -1207,8 +1163,6 @@ HPShared struct db_interface *DB;
++VECTOR_LENGTH(__vec); /* increase length */ \
}while(0)
-
-
/// Inserts a value in the target index. (using memcpy)
/// Assumes the index is valid and there is enough capacity.
///
@@ -1218,8 +1172,6 @@ HPShared struct db_interface *DB;
#define VECTOR_INSERTCOPY(__vec,__idx,__val) \
VECTOR_INSERTARRAY(__vec,__idx,&(__val),1)
-
-
/// Inserts the values of the array in the target index. (using memcpy)
/// Assumes the index is valid and there is enough capacity.
///
@@ -1235,8 +1187,6 @@ HPShared struct db_interface *DB;
VECTOR_LENGTH(__vec) += (__n); /* increase length */ \
}while(0)
-
-
/// Inserts a zeroed value in the end of the vector.
/// Assumes there is enough capacity.
///
@@ -1247,7 +1197,6 @@ HPShared struct db_interface *DB;
++VECTOR_LENGTH(__vec); /* increase length */ \
}while(0)
-
/// Inserts a value in the end of the vector. (using the '=' operator)
/// Assumes there is enough capacity.
///
@@ -1259,8 +1208,6 @@ HPShared struct db_interface *DB;
++VECTOR_LENGTH(__vec); /* increase length */ \
}while(0)
-
-
/// Inserts a value in the end of the vector. (using memcpy)
/// Assumes there is enough capacity.
///
@@ -1269,8 +1216,6 @@ HPShared struct db_interface *DB;
#define VECTOR_PUSHCOPY(__vec,__val) \
VECTOR_PUSHARRAY(__vec,&(__val),1)
-
-
/// Inserts the values of the array in the end of the vector. (using memcpy)
/// Assumes there is enough capacity.
///
@@ -1283,8 +1228,6 @@ HPShared struct db_interface *DB;
VECTOR_LENGTH(__vec) += (__n); /* increase length */ \
}while(0)
-
-
/// Removes and returns the last value of the vector.
/// Assumes the array is not empty.
///
@@ -1293,8 +1236,6 @@ HPShared struct db_interface *DB;
#define VECTOR_POP(__vec) \
( VECTOR_INDEX(__vec,--VECTOR_LENGTH(__vec)) )
-
-
/// Removes the last N values of the vector and returns the value of the last pop.
/// Assumes there are enough values.
///
@@ -1304,8 +1245,6 @@ HPShared struct db_interface *DB;
#define VECTOR_POPN(__vec,__n) \
( VECTOR_INDEX(__vec,(VECTOR_LENGTH(__vec)-=(__n))) )
-
-
/// Removes the target index from the vector.
/// Assumes the index is valid and there are enough values.
///
@@ -1314,8 +1253,6 @@ HPShared struct db_interface *DB;
#define VECTOR_ERASE(__vec,__idx) \
VECTOR_ERASEN(__vec,__idx,1)
-
-
/// Removes N values from the target index of the vector.
/// Assumes the index is valid and there are enough values.
///
@@ -1329,8 +1266,6 @@ HPShared struct db_interface *DB;
VECTOR_LENGTH(__vec) -= (__n); /* decrease length */ \
}while(0)
-
-
/// Clears the vector, freeing allocated data.
///
/// @param __vec Vector
@@ -1344,77 +1279,57 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/////////////////////////////////////////////////////////////////////
// Binary heap library based on defines. (uses the vector defines above)
// uses aMalloc, aRealloc, aFree
// WARNING: BHEAP implementation details affect behaviour of A* pathfinding
-
-
/// Declares an anonymous binary heap struct.
///
/// @param __type Type of data
#define BHEAP_DECL(__type) VECTOR_DECL(__type)
-
-
/// Declares a named binary heap struct.
///
/// @param __name Structure name
/// @param __type Type of data
#define BHEAP_STRUCT_DECL(__name,__type) VECTOR_STRUCT_DECL(__name,__type)
-
-
/// Declares and initializes an anonymous binary heap variable.
///
/// @param __type Type of data
/// @param __var Variable name
#define BHEAP_VAR(__type,__var) VECTOR_VAR(__type,__var)
-
-
/// Declares and initializes a named binary heap variable.
///
/// @param __name Structure name
/// @param __var Variable name
#define BHEAP_STRUCT_VAR(__name,__var) VECTOR_STRUCT_VAR(__name,__var)
-
-
/// Initializes a heap.
///
/// @param __heap Binary heap
#define BHEAP_INIT(__heap) VECTOR_INIT(__heap)
-
-
/// Returns the internal array of values.
///
/// @param __heap Binary heap
/// @return Array of values
#define BHEAP_DATA(__heap) VECTOR_DATA(__heap)
-
-
/// Returns the length of the heap.
///
/// @param __heap Binary heap
/// @return Length
#define BHEAP_LENGTH(__heap) VECTOR_LENGTH(__heap)
-
-
/// Returns the capacity of the heap.
///
/// @param __heap Binary heap
/// @return Capacity
#define BHEAP_CAPACITY(__heap) VECTOR_CAPACITY(__heap)
-
-
/// Ensures that the heap has the target number of empty positions.
/// Increases the capacity in multiples of __step.
///
@@ -1423,8 +1338,6 @@ HPShared struct db_interface *DB;
/// @param __step Increase
#define BHEAP_ENSURE(__heap,__n,__step) VECTOR_ENSURE(__heap,__n,__step)
-
-
/// Returns the top value of the heap.
/// Assumes the heap is not empty.
///
@@ -1432,8 +1345,6 @@ HPShared struct db_interface *DB;
/// @return Value at the top
#define BHEAP_PEEK(__heap) VECTOR_INDEX(__heap,0)
-
-
/// Inserts a value in the heap. (using the '=' operator)
/// Assumes there is enough capacity.
///
@@ -1460,8 +1371,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// See BHEAP_PUSH. Version used by A* implementation, matching client bheap.
///
/// @param __heap Binary heap
@@ -1475,8 +1384,6 @@ HPShared struct db_interface *DB;
BHEAP_SIFTDOWN(__heap,0,_i_,__topcmp,__swp); \
}while(0)
-
-
/// Removes the top value of the heap. (using the '=' operator)
/// Assumes the heap is not empty.
///
@@ -1490,8 +1397,6 @@ HPShared struct db_interface *DB;
/// @param __swp Swapper
#define BHEAP_POP(__heap,__topcmp,__swp) BHEAP_POPINDEX(__heap,0,__topcmp,__swp)
-
-
/// See BHEAP_POP. Version used by A* implementation, matching client bheap.
///
/// @param __heap Binary heap
@@ -1505,8 +1410,6 @@ HPShared struct db_interface *DB;
BHEAP_SIFTUP(__heap,0,__topcmp,__swp); \
}while(0)
-
-
/// Removes the target value of the heap. (using the '=' operator)
/// Assumes the index exists.
///
@@ -1553,8 +1456,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// Follow path up towards (but not all the way to) the root, swapping nodes until finding
/// a place where the new item that was placed at __idx fits.
/// Only goes as high as __startidx (usually 0).
@@ -1577,8 +1478,6 @@ HPShared struct db_interface *DB;
} \
}while(0)
-
-
/// Repeatedly swap the smaller child with parent, after placing a new item at __idx.
///
/// @param __heap Binary heap
@@ -1607,8 +1506,6 @@ HPShared struct db_interface *DB;
BHEAP_SIFTDOWN(__heap,__idx,_i_,__topcmp,__swp); \
}while(0)
-
-
/// Call this after modifying the item at __idx__ to restore the heap
///
/// @param __heap Binary heap
@@ -1621,15 +1518,11 @@ HPShared struct db_interface *DB;
BHEAP_SIFTUP(__heap,__idx,__topcmp,__swp); \
}while(0)
-
-
/// Clears the binary heap, freeing allocated data.
///
/// @param __heap Binary heap
#define BHEAP_CLEAR(__heap) VECTOR_CLEAR(__heap)
-
-
/// Generic comparator for a min-heap. (minimum value at top)
/// Returns -1 if v1 is smaller, 1 if v2 is smaller, 0 if equal.
///
@@ -1638,8 +1531,6 @@ HPShared struct db_interface *DB;
/// @return negative if v1 is top, positive if v2 is top, 0 if equal
#define BHEAP_MINTOPCMP(v1,v2) ( v1 == v2 ? 0 : v1 < v2 ? -1 : 1 )
-
-
/// Generic comparator for a max-heap. (maximum value at top)
/// Returns -1 if v1 is bigger, 1 if v2 is bigger, 0 if equal.
///
@@ -1648,6 +1539,4 @@ HPShared struct db_interface *DB;
/// @return negative if v1 is top, positive if v2 is top, 0 if equal
#define BHEAP_MAXTOPCMP(v1,v2) ( v1 == v2 ? 0 : v1 > v2 ? -1 : 1 )
-
-
#endif /* COMMON_DB_H */
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 614678da8..b59c2b63d 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -47,7 +47,6 @@ typedef struct FILELIST {
// (NOTE: probably meant to be used to override grf contents by files in the data directory)
//#define GRFIO_LOCAL
-
// stores info about every loaded file
FILELIST* filelist = NULL;
int filelist_entrys = 0;
@@ -61,14 +60,12 @@ int gentry_maxentry = 0;
// the path to the data directory
char data_dir[1024] = "";
-
// little endian char array to uint conversion
static unsigned int getlong(unsigned char* p)
{
return (p[0] << 0 | p[1] << 8 | p[2] << 16 | p[3] << 24);
}
-
static void NibbleSwap(unsigned char* src, int len)
{
while( len > 0 )
@@ -79,7 +76,6 @@ static void NibbleSwap(unsigned char* src, int len)
}
}
-
/// Substitutes some specific values for others, leaves rest intact. Obfuscation.
/// NOTE: Operation is symmetric (calling it twice gives back the original input).
static uint8_t grf_substitution(uint8_t in)
@@ -142,7 +138,6 @@ static void grf_shuffle_dec(BIT64* src)
*src = out;
}
-
static void grf_decode_header(unsigned char* buf, size_t len)
{
BIT64* p = (BIT64*)buf;
@@ -156,7 +151,6 @@ static void grf_decode_header(unsigned char* buf, size_t len)
// the rest is plaintext, done.
}
-
static void grf_decode_full(unsigned char* buf, size_t len, int cycle)
{
BIT64* p = (BIT64*)buf;
@@ -195,7 +189,6 @@ static void grf_decode_full(unsigned char* buf, size_t len, int cycle)
}
}
-
/// Decodes grf data.
/// @param buf data to decode (in-place)
/// @param len length of the data
@@ -235,7 +228,6 @@ static void grf_decode(unsigned char* buf, size_t len, char entry_type, int entr
}
}
-
/******************************************************
*** Zlib Subroutines ***
******************************************************/
@@ -246,14 +238,12 @@ unsigned long grfio_crc32(const unsigned char* buf, unsigned int len)
return crc32(crc32(0L, Z_NULL, 0), buf, len);
}
-
/// zlib uncompress
int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen)
{
return uncompress((Bytef*)dest, destLen, (const Bytef*)source, sourceLen);
}
-
/// zlib compress
int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen) {
if( *destLen == 0 ) /* [Ind/Hercules] */
@@ -264,7 +254,6 @@ int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned
return compress((Bytef*)dest, destLen, (const Bytef*)source, sourceLen);
}
-
/***********************************************************
*** File List Subroutines ***
***********************************************************/
@@ -370,12 +359,10 @@ static void filelist_compact(void)
}
}
-
/***********************************************************
*** Grfio Subroutines ***
***********************************************************/
-
/// Combines are resource path with the data folder location to create local resource path.
static void grfio_localpath_create(char* buffer, size_t size, const char* filename)
{
@@ -399,7 +386,6 @@ static void grfio_localpath_create(char* buffer, size_t size, const char* filena
buffer[i] = '/';
}
-
/// Reads a file into a newly allocated buffer (from grf or data directory).
void *grfio_reads(const char *fname, int *size)
{
@@ -449,7 +435,7 @@ void *grfio_reads(const char *fname, int *size)
// Archive[GRF] File Read
char *grfname = gentry_table[entry->gentry - 1];
FILE *in = fopen(grfname, "rb");
-
+
if (in != NULL) {
int fsize = entry->srclen_aligned;
unsigned char *buf = (unsigned char *)aMalloc(fsize);
@@ -496,7 +482,6 @@ void *grfio_reads(const char *fname, int *size)
return NULL;
}
-
/// Decodes encrypted filename from a version 01xx grf index.
static char* decode_filename(unsigned char* buf, int len)
{
@@ -508,7 +493,6 @@ static char* decode_filename(unsigned char* buf, int len)
return (char*)buf;
}
-
/// Compares file extension against known large file types.
/// @return true if the file should undergo full mode 0 decryption, and true otherwise.
static bool isFullEncrypt(const char* fname)
@@ -525,7 +509,6 @@ static bool isFullEncrypt(const char* fname)
return true;
}
-
/// Loads all entries in the specified grf file into the filelist.
/// @param gentry index of the grf file name in the gentry_table
static int grfio_entryread(const char *grfname, int gentry)
@@ -691,7 +674,6 @@ static int grfio_entryread(const char *grfname, int gentry)
return 0; // 0:no error
}
-
static bool grfio_parse_restable_row(const char* row)
{
char w1[256], w2[256];
@@ -733,7 +715,6 @@ static bool grfio_parse_restable_row(const char* row)
return false;
}
-
/// Grfio Resource file check.
static void grfio_resourcecheck(void)
{
@@ -785,7 +766,6 @@ static void grfio_resourcecheck(void)
}
}
-
/// Reads a grf file and adds it to the list.
static int grfio_add(const char* fname)
{
@@ -802,7 +782,6 @@ static int grfio_add(const char* fname)
return grfio_entryread(fname, gentry_entrys - 1);
}
-
/// Finalizes grfio.
void grfio_final(void)
{
@@ -829,7 +808,6 @@ void grfio_final(void)
gentry_entrys = gentry_maxentry = 0;
}
-
/// Initializes grfio.
void grfio_init(const char* fname)
{
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 1567f20be..75b62fdc4 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -333,18 +333,15 @@ enum {
OPTION_DRAGON5 = 0x04000000,
OPTION_HANBOK = 0x08000000,
OPTION_OKTOBERFEST = 0x10000000,
-
#ifndef NEW_CARTS
OPTION_CART1 = 0x00000008,
OPTION_CART2 = 0x00000080,
OPTION_CART3 = 0x00000100,
OPTION_CART4 = 0x00000200,
OPTION_CART5 = 0x00000400,
-
/* compound constant for older carts */
OPTION_CART = OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5,
#endif
-
// compound constants
OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,
OPTION_COSTUME = OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER|OPTION_HANBOK|OPTION_OKTOBERFEST,
@@ -757,7 +754,6 @@ enum {
GD_MAX,
};
-
//These mark the ID of the jobs, as expected by the client. [Skotlex]
enum {
JOB_NOVICE,
diff --git a/src/common/mutex.c b/src/common/mutex.c
index 5dfb3d01c..715609628 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -25,7 +25,6 @@ struct ramutex{
#endif
};
-
struct racond{
#ifdef WIN32
HANDLE events[2];
@@ -40,14 +39,12 @@ struct racond{
#endif
};
-
////////////////////
// Mutex
//
// Implementation:
//
-
ramutex *ramutex_create(void) {
struct ramutex *m;
@@ -66,7 +63,6 @@ ramutex *ramutex_create(void) {
return m;
}//end: ramutex_create()
-
void ramutex_destroy(ramutex *m) {
#ifdef WIN32
@@ -79,7 +75,6 @@ void ramutex_destroy(ramutex *m) {
}//end: ramutex_destroy()
-
void ramutex_lock(ramutex *m) {
#ifdef WIN32
@@ -89,7 +84,6 @@ void ramutex_lock(ramutex *m) {
#endif
}//end: ramutex_lock
-
bool ramutex_trylock(ramutex *m) {
#ifdef WIN32
if(TryEnterCriticalSection(&m->hMutex) != FALSE)
@@ -104,7 +98,6 @@ bool ramutex_trylock(ramutex *m) {
#endif
}//end: ramutex_trylock()
-
void ramutex_unlock(ramutex *m) {
#ifdef WIN32
LeaveCriticalSection(&m->hMutex);
@@ -114,8 +107,6 @@ void ramutex_unlock(ramutex *m) {
}//end: ramutex_unlock()
-
-
///////////////
// Condition Variables
//
@@ -143,7 +134,6 @@ racond *racond_create(void) {
return c;
}//end: racond_create()
-
void racond_destroy(racond *c) {
#ifdef WIN32
CloseHandle( c->events[ EVENT_COND_SIGNAL ] );
@@ -156,14 +146,12 @@ void racond_destroy(racond *c) {
aFree(c);
}//end: racond_destroy()
-
void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) {
#ifdef WIN32
register DWORD ms;
int result;
bool is_last = false;
-
EnterCriticalSection(&c->waiters_lock);
c->nWaiters++;
LeaveCriticalSection(&c->waiters_lock);
@@ -191,7 +179,6 @@ void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) {
if(is_last == true)
ResetEvent( c->events[EVENT_COND_BROADCAST] );
-
ramutex_lock(m);
#else
@@ -210,7 +197,6 @@ void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) {
#endif
}//end: racond_wait()
-
void racond_signal(racond *c) {
#ifdef WIN32
# if 0
@@ -228,7 +214,6 @@ void racond_signal(racond *c) {
#endif
}//end: racond_signal()
-
void racond_broadcast(racond *c) {
#ifdef WIN32
# if 0
@@ -245,5 +230,3 @@ void racond_broadcast(racond *c) {
pthread_cond_broadcast(&c->hCond);
#endif
}//end: racond_broadcast()
-
-
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 829ba4aab..98faa9f06 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -58,6 +58,5 @@ void assert_report(const char *file, int line, const char *func, const char *tar
**/
void nullpo_defaults(void) {
nullpo = &nullpo_s;
-
nullpo->assert_report = assert_report;
}
diff --git a/src/common/socket.c b/src/common/socket.c
index c4cc4a329..de8ca4682 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -113,7 +113,6 @@ int sock2fd(SOCKET s)
return fd;
}
-
/// Inserts the socket into the global array of sockets.
/// Returns a new fd associated with the socket.
/// If there are too many sockets it closes the socket, sets an error and
@@ -293,7 +292,6 @@ void set_defaultparse(ParseFunc defaultparse)
default_func_parse = defaultparse;
}
-
/*======================================
* CORE : Socket options
*--------------------------------------*/
@@ -1066,12 +1064,12 @@ static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
int list = 0;
ConnectHistory *hist = NULL;
DBIterator *iter;
-
+
if( !db_size(connect_history) )
return 0;
-
+
iter = db_iterator(connect_history);
-
+
for( hist = dbi_first(iter); dbi_exists(iter); hist = dbi_next(iter) ){
if( (!hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_interval*3) ||
(hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_autoreset) )
@@ -1081,13 +1079,12 @@ static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
}
list++;
}
-
dbi_destroy(iter);
-
+
if( access_debug ){
ShowInfo("connect_check_clear: Cleared %d of %d from IP list.\n", clear, list);
}
-
+
return list;
}
@@ -1206,7 +1203,6 @@ int socket_config_read(const char* cfgName)
return 0;
}
-
void socket_final(void)
{
int i;
diff --git a/src/common/sql.c b/src/common/sql.c
index 0ca51e272..ee759eb61 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -36,8 +36,6 @@ struct Sql {
int keepalive;
};
-
-
// Column length receiver.
// Takes care of the possible size mismatch between uint32 and unsigned long.
struct s_column_length {
@@ -46,8 +44,6 @@ struct s_column_length {
};
typedef struct s_column_length s_column_length;
-
-
/// Sql statement
struct SqlStmt {
StringBuf buf;
@@ -61,14 +57,10 @@ struct SqlStmt {
bool bind_columns;
};
-
-
///////////////////////////////////////////////////////////////////////////////
// Sql Handle
///////////////////////////////////////////////////////////////////////////////
-
-
/// Allocates and initializes a new Sql handle.
Sql* Sql_Malloc(void)
{
@@ -84,8 +76,6 @@ Sql* Sql_Malloc(void)
return self;
}
-
-
static int Sql_P_Keepalive(Sql* self);
/// Establishes a connection.
@@ -111,8 +101,6 @@ int Sql_Connect(Sql* self, const char* user, const char* passwd, const char* hos
return SQL_SUCCESS;
}
-
-
/// Retrieves the timeout of the connection.
int Sql_GetTimeout(Sql* self, uint32* out_timeout)
{
@@ -130,8 +118,6 @@ int Sql_GetTimeout(Sql* self, uint32* out_timeout)
return SQL_ERROR;
}
-
-
/// Retrieves the name of the columns of a table into out_buf, with the separator after each name.
int Sql_GetColumnNames(Sql* self, const char* table, char* out_buf, size_t buf_len, char sep)
{
@@ -160,8 +146,6 @@ int Sql_GetColumnNames(Sql* self, const char* table, char* out_buf, size_t buf_l
return SQL_SUCCESS;
}
-
-
/// Changes the encoding of the connection.
int Sql_SetEncoding(Sql* self, const char* encoding)
{
@@ -170,8 +154,6 @@ int Sql_SetEncoding(Sql* self, const char* encoding)
return SQL_ERROR;
}
-
-
/// Pings the connection.
int Sql_Ping(Sql* self)
{
@@ -180,8 +162,6 @@ int Sql_Ping(Sql* self)
return SQL_ERROR;
}
-
-
/// Wrapper function for Sql_Ping.
///
/// @private
@@ -193,8 +173,6 @@ static int Sql_P_KeepaliveTimer(int tid, int64 tick, int id, intptr_t data)
return 0;
}
-
-
/// Establishes keepalive (periodic ping) on the connection.
///
/// @return the keepalive timer id, or INVALID_TIMER
@@ -218,8 +196,6 @@ static int Sql_P_Keepalive(Sql* self)
return timer->add_interval(timer->gettick() + ping_interval*1000, Sql_P_KeepaliveTimer, 0, (intptr_t)self, ping_interval*1000);
}
-
-
/// Escapes a string.
size_t Sql_EscapeString(Sql* self, char *out_to, const char *from)
{
@@ -229,8 +205,6 @@ size_t Sql_EscapeString(Sql* self, char *out_to, const char *from)
return (size_t)mysql_escape_string(out_to, from, (unsigned long)strlen(from));
}
-
-
/// Escapes a string.
size_t Sql_EscapeStringLen(Sql* self, char *out_to, const char *from, size_t from_len)
{
@@ -240,8 +214,6 @@ size_t Sql_EscapeStringLen(Sql* self, char *out_to, const char *from, size_t fro
return (size_t)mysql_escape_string(out_to, from, (unsigned long)from_len);
}
-
-
/// Executes a query.
int Sql_Query(Sql *self, const char *query, ...) __attribute__((format(printf, 2, 3)));
int Sql_Query(Sql *self, const char *query, ...) {
@@ -255,8 +227,6 @@ int Sql_Query(Sql *self, const char *query, ...) {
return res;
}
-
-
/// Executes a query.
int Sql_QueryV(Sql* self, const char* query, va_list args)
{
@@ -282,8 +252,6 @@ int Sql_QueryV(Sql* self, const char* query, va_list args)
return SQL_SUCCESS;
}
-
-
/// Executes a query.
int Sql_QueryStr(Sql* self, const char* query)
{
@@ -309,8 +277,6 @@ int Sql_QueryStr(Sql* self, const char* query)
return SQL_SUCCESS;
}
-
-
/// Returns the number of the AUTO_INCREMENT column of the last INSERT/UPDATE query.
uint64 Sql_LastInsertId(Sql* self)
{
@@ -320,8 +286,6 @@ uint64 Sql_LastInsertId(Sql* self)
return 0;
}
-
-
/// Returns the number of columns in each row of the result.
uint32 Sql_NumColumns(Sql* self)
{
@@ -330,8 +294,6 @@ uint32 Sql_NumColumns(Sql* self)
return 0;
}
-
-
/// Returns the number of rows in the result.
uint64 Sql_NumRows(Sql* self)
{
@@ -340,8 +302,6 @@ uint64 Sql_NumRows(Sql* self)
return 0;
}
-
-
/// Fetches the next row.
int Sql_NextRow(Sql* self) {
if( self && self->result ) {
@@ -357,8 +317,6 @@ int Sql_NextRow(Sql* self) {
return SQL_ERROR;
}
-
-
/// Gets the data of a column.
int Sql_GetData(Sql* self, size_t col, char** out_buf, size_t* out_len)
{
@@ -375,8 +333,6 @@ int Sql_GetData(Sql* self, size_t col, char** out_buf, size_t* out_len)
return SQL_ERROR;
}
-
-
/// Frees the result of the query.
void Sql_FreeResult(Sql* self) {
if( self && self->result ) {
@@ -387,8 +343,6 @@ void Sql_FreeResult(Sql* self) {
}
}
-
-
/// Shows debug information (last query).
void Sql_ShowDebug_(Sql* self, const char* debug_file, const unsigned long debug_line)
{
@@ -400,8 +354,6 @@ void Sql_ShowDebug_(Sql* self, const char* debug_file, const unsigned long debug
ShowDebug("at %s:%lu\n", debug_file, debug_line);
}
-
-
/// Frees a Sql handle returned by Sql_Malloc.
void Sql_Free(Sql* self) {
if( self )
@@ -414,14 +366,10 @@ void Sql_Free(Sql* self) {
}
}
-
-
///////////////////////////////////////////////////////////////////////////////
// Prepared Statements
///////////////////////////////////////////////////////////////////////////////
-
-
/// Returns the mysql integer type for the target size.
///
/// @private
@@ -439,8 +387,6 @@ static enum enum_field_types Sql_P_SizeToMysqlIntType(int sz)
}
}
-
-
/// Binds a parameter/result.
///
/// @private
@@ -514,8 +460,6 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type,
return SQL_SUCCESS;
}
-
-
/// Prints debug information about a field (type and length).
///
/// @private
@@ -551,8 +495,6 @@ static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_ty
ShowDebug("%stype=%s%s, length=%lu%s\n", prefix, sign, type_string, length, length_postfix);
}
-
-
/// Reports debug information about a truncated column.
///
/// @private
@@ -575,8 +517,6 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(SqlStmt* self, size_t i)
mysql_free_result(meta);
}
-
-
/// Allocates and initializes a new SqlStmt handle.
SqlStmt* SqlStmt_Malloc(Sql* sql) {
SqlStmt* self;
@@ -604,8 +544,6 @@ SqlStmt* SqlStmt_Malloc(Sql* sql) {
return self;
}
-
-
/// Prepares the statement.
int SqlStmt_Prepare(SqlStmt *self, const char *query, ...) __attribute__((format(printf, 2, 3)));
int SqlStmt_Prepare(SqlStmt *self, const char *query, ...) {
@@ -619,8 +557,6 @@ int SqlStmt_Prepare(SqlStmt *self, const char *query, ...) {
return res;
}
-
-
/// Prepares the statement.
int SqlStmt_PrepareV(SqlStmt* self, const char* query, va_list args)
{
@@ -641,8 +577,6 @@ int SqlStmt_PrepareV(SqlStmt* self, const char* query, va_list args)
return SQL_SUCCESS;
}
-
-
/// Prepares the statement.
int SqlStmt_PrepareStr(SqlStmt* self, const char* query)
{
@@ -663,8 +597,6 @@ int SqlStmt_PrepareStr(SqlStmt* self, const char* query)
return SQL_SUCCESS;
}
-
-
/// Returns the number of parameters in the prepared statement.
size_t SqlStmt_NumParams(SqlStmt* self)
{
@@ -674,8 +606,6 @@ size_t SqlStmt_NumParams(SqlStmt* self)
return 0;
}
-
-
/// Binds a parameter to a buffer.
int SqlStmt_BindParam(SqlStmt* self, size_t idx, enum SqlDataType buffer_type, void* buffer, size_t buffer_len)
{
@@ -704,8 +634,6 @@ int SqlStmt_BindParam(SqlStmt* self, size_t idx, enum SqlDataType buffer_type, v
return SQL_SUCCESS;// out of range - ignore
}
-
-
/// Executes the prepared statement.
int SqlStmt_Execute(SqlStmt* self)
{
@@ -731,8 +659,6 @@ int SqlStmt_Execute(SqlStmt* self)
return SQL_SUCCESS;
}
-
-
/// Returns the number of the AUTO_INCREMENT column of the last INSERT/UPDATE statement.
uint64 SqlStmt_LastInsertId(SqlStmt* self)
{
@@ -742,8 +668,6 @@ uint64 SqlStmt_LastInsertId(SqlStmt* self)
return 0;
}
-
-
/// Returns the number of columns in each row of the result.
size_t SqlStmt_NumColumns(SqlStmt* self)
{
@@ -753,8 +677,6 @@ size_t SqlStmt_NumColumns(SqlStmt* self)
return 0;
}
-
-
/// Binds the result of a column to a buffer.
int SqlStmt_BindColumn(SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) {
if (self == NULL)
@@ -796,8 +718,6 @@ int SqlStmt_BindColumn(SqlStmt *self, size_t idx, enum SqlDataType buffer_type,
}
}
-
-
/// Returns the number of rows in the result.
uint64 SqlStmt_NumRows(SqlStmt* self)
{
@@ -807,8 +727,6 @@ uint64 SqlStmt_NumRows(SqlStmt* self)
return 0;
}
-
-
/// Fetches the next row.
int SqlStmt_NextRow(SqlStmt* self)
{
@@ -892,8 +810,6 @@ int SqlStmt_NextRow(SqlStmt* self)
return SQL_SUCCESS;
}
-
-
/// Frees the result of the statement execution.
void SqlStmt_FreeResult(SqlStmt* self)
{
@@ -901,8 +817,6 @@ void SqlStmt_FreeResult(SqlStmt* self)
mysql_stmt_free_result(self->stmt);
}
-
-
/// Shows debug information (with statement).
void SqlStmt_ShowDebug_(SqlStmt* self, const char* debug_file, const unsigned long debug_line)
{
@@ -914,8 +828,6 @@ void SqlStmt_ShowDebug_(SqlStmt* self, const char* debug_file, const unsigned lo
ShowDebug("at %s:%lu\n", debug_file, debug_line);
}
-
-
/// Frees a SqlStmt returned by SqlStmt_Malloc.
void SqlStmt_Free(SqlStmt* self)
{
diff --git a/src/common/sql.h b/src/common/sql.h
index 7fb4aabe8..fc1562347 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -142,8 +142,6 @@ struct sql_interface {
/// Allocates and initializes a new Sql handle.
struct Sql *(*Malloc) (void);
-
-
///////////////////////////////////////////////////////////////////////////////
// Prepared Statements
///////////////////////////////////////////////////////////////////////////////
@@ -157,7 +155,6 @@ struct sql_interface {
// 1) SELECT col FROM table WHERE id=?
// 2) INSERT INTO table(col1,col2) VALUES(?,?)
-
/*=====================================
SQL Statement interface [Susu]
*-------------------------------------*/
@@ -169,8 +166,6 @@ struct sql_interface {
/// @return SqlStmt handle or NULL if an error occurred
struct SqlStmt* (*StmtMalloc)(Sql* sql);
-
-
/// Prepares the statement.
/// Any previous result is freed and all parameter bindings are removed.
/// The query is constructed as if it was sprintf.
@@ -185,8 +180,6 @@ struct sql_interface {
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtPrepareV)(SqlStmt* self, const char* query, va_list args);
-
-
/// Prepares the statement.
/// Any previous result is freed and all parameter bindings are removed.
/// The query is used directly.
@@ -194,15 +187,11 @@ struct sql_interface {
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtPrepareStr)(SqlStmt* self, const char* query);
-
-
/// Returns the number of parameters in the prepared statement.
///
/// @return Number or parameters
size_t (*StmtNumParams)(SqlStmt* self);
-
-
/// Binds a parameter to a buffer.
/// The buffer data will be used when the statement is executed.
/// All parameters should have bindings.
@@ -210,30 +199,22 @@ struct sql_interface {
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtBindParam)(SqlStmt* self, size_t idx, SqlDataType buffer_type, void* buffer, size_t buffer_len);
-
-
/// Executes the prepared statement.
/// Any previous result is freed and all column bindings are removed.
///
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtExecute)(SqlStmt* self);
-
-
/// Returns the number of the AUTO_INCREMENT column of the last INSERT/UPDATE statement.
///
/// @return Value of the auto-increment column
uint64 (*StmtLastInsertId)(SqlStmt* self);
-
-
/// Returns the number of columns in each row of the result.
///
/// @return Number of columns
size_t (*StmtNumColumns)(SqlStmt* self);
-
-
/// 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
@@ -242,23 +223,17 @@ struct sql_interface {
/// @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);
-
-
/// Returns the number of rows in the result.
///
/// @return Number of rows
uint64 (*StmtNumRows)(SqlStmt* self);
-
-
/// Fetches the next row.
/// All column bindings will be filled with data.
///
/// @return SQL_SUCCESS, SQL_ERROR or SQL_NO_DATA
int (*StmtNextRow)(SqlStmt* self);
-
-
/// Frees the result of the statement execution.
void (*StmtFreeResult)(SqlStmt* self);
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 024b73e59..fcd1b483b 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -423,8 +423,6 @@ bool strlib_bin2hex(char *output, unsigned char *input, size_t count)
return true;
}
-
-
/////////////////////////////////////////////////////////////////////
/// Parses a single field in a delim-separated string.
/// The delimiter after the field is skipped.
@@ -582,7 +580,6 @@ int sv_parse_next(struct s_svstate* svstate)
return 1;
}
-
/// Parses a delim-separated string.
/// Starts parsing at startoff and fills the pos array with position pairs.
/// out_pos[0] and out_pos[1] are the start and end of line.
@@ -892,7 +889,6 @@ const char* skip_escaped_c(const char* p) {
return p;
}
-
/// Opens and parses a file containing delim-separated columns, feeding them to the specified callback function row by row.
/// Tracks the progress of the operation (current line number, number of successfully processed rows).
/// Returns 'true' if it was able to process the specified file, or 'false' if it could not be read.
@@ -970,7 +966,6 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
return true;
}
-
/////////////////////////////////////////////////////////////////////
// StringBuf - dynamic string
//
diff --git a/src/common/thread.c b/src/common/thread.c
index 9b9308d06..d5bbd7f97 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -48,12 +48,10 @@ struct rAthread {
#endif
};
-
#ifdef HAS_TLS
__thread int g_rathread_ID = -1;
#endif
-
///
/// Subystem Code
///
@@ -76,8 +74,6 @@ void rathread_init(void) {
}//end: rathread_init()
-
-
void rathread_final(void) {
register unsigned int i;
@@ -94,8 +90,6 @@ void rathread_final(void) {
}//end: rathread_final()
-
-
// gets called whenever a thread terminated ..
static void rat_thread_terminated(rAthread *handle) {
// Preserve handle->myID and handle->hThread, set everything else to its default value
@@ -131,7 +125,6 @@ static void *raThreadMainRedirector( void *p ){
#endif
-
ret = ((rAthread*)p)->proc( ((rAthread*)p)->param ) ;
#ifdef WIN32
@@ -146,10 +139,6 @@ static void *raThreadMainRedirector( void *p ){
#endif
}//end: raThreadMainRedirector()
-
-
-
-
///
/// API Level
///
@@ -157,7 +146,6 @@ rAthread *rathread_create(rAthreadProc entryPoint, void *param) {
return rathread_createEx( entryPoint, param, (1<<23) /*8MB*/, RAT_PRIO_NORMAL );
}//end: rathread_create()
-
rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio) {
#ifndef WIN32
pthread_attr_t attr;
@@ -166,13 +154,11 @@ rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack
unsigned int i;
rAthread *handle = NULL;
-
// given stacksize aligned to systems pagesize?
tmp = szStack % sysinfo->getpagesize();
if(tmp != 0)
szStack += tmp;
-
// Get a free Thread Slot.
for(i = 0; i < RA_THREADS_MAX; i++){
if(l_threads[i].proc == NULL){
@@ -208,7 +194,6 @@ rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack
return handle;
}//end: rathread_createEx
-
void rathread_destroy(rAthread *handle) {
#ifdef WIN32
if( TerminateThread(handle->hThread, 0) != FALSE){
@@ -253,7 +238,6 @@ rAthread *rathread_self(void) {
return NULL;
}//end: rathread_self()
-
int rathread_get_tid(void) {
#ifdef HAS_TLS
@@ -269,7 +253,6 @@ int rathread_get_tid(void) {
}//end: rathread_get_tid()
-
bool rathread_wait(rAthread *handle, void **out_exitCode) {
// Hint:
// no thread data cleanup routine call here!
@@ -286,18 +269,15 @@ bool rathread_wait(rAthread *handle, void **out_exitCode) {
}//end: rathread_wait()
-
void rathread_prio_set(rAthread *handle, RATHREAD_PRIO prio) {
handle->prio = RAT_PRIO_NORMAL;
//@TODO
}//end: rathread_prio_set()
-
RATHREAD_PRIO rathread_prio_get(rAthread *handle) {
return handle->prio;
}//end: rathread_prio_get()
-
void rathread_yield(void) {
#ifdef WIN32
SwitchToThread();
diff --git a/src/common/utils.c b/src/common/utils.c
index 3606c6755..f5eecb65d 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -60,7 +60,6 @@ void WriteDump(FILE* fp, const void* buffer, size_t length)
}
}
-
/// Dumps given buffer on the console.
void ShowDump(const void *buffer, size_t length) {
size_t i;
@@ -86,7 +85,6 @@ void ShowDump(const void *buffer, size_t length) {
}
}
-
#ifdef WIN32
static char* checkpath(char *path, const char *srcpath)
@@ -137,7 +135,6 @@ void findfile(const char *p, const char *pat, void (func)(const char*))
func( tmppath );
}
-
if( FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
findfile(tmppath, pat, func);
@@ -155,7 +152,7 @@ static char* checkpath(char *path, const char*srcpath)
{
// just make sure the char*path is not const
char *p=path;
-
+
if(NULL!=path && NULL!=srcpath) {
while(*srcpath) {
if (*srcpath=='\\') {
@@ -349,7 +346,6 @@ const char* timestamp2string(char* str, size_t size, time_t timestamp, const cha
return str;
}
-
/* [Ind/Hercules] Caching */
bool HCache_check(const char *file)
{
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 0bd231e3a..ac78e8c84 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -147,27 +147,27 @@ void HPM_map_plugin_load_sub(struct hplugin *plugin) {
bool HPM_map_add_atcommand(char *name, AtCommandFunc func) {
unsigned int i = 0;
-
+
for(i = 0; i < atcommand_list_items; i++) {
if( !strcmpi(atcommand_list[i].name,name) ) {
ShowDebug("HPM_map_add_atcommand: duplicate command '%s', skipping...\n", name);
return false;
}
}
-
+
i = atcommand_list_items;
-
+
RECREATE(atcommand_list, struct HPM_atcommand_list , ++atcommand_list_items);
-
+
safestrncpy(atcommand_list[i].name, name, sizeof(atcommand_list[i].name));
atcommand_list[i].func = func;
-
+
return true;
}
void HPM_map_atcommands(void) {
unsigned int i;
-
+
for(i = 0; i < atcommand_list_items; i++) {
atcommand->add(atcommand_list[i].name,atcommand_list[i].func,true);
}
@@ -178,9 +178,9 @@ void HPM_map_atcommands(void) {
**/
void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned int *mask) {
unsigned char index = pcg->HPMpermissions_count;
-
+
RECREATE(pcg->HPMpermissions, struct pc_groups_new_permission, ++pcg->HPMpermissions_count);
-
+
pcg->HPMpermissions[index].pID = pluginID;
pcg->HPMpermissions[index].name = aStrdup(name);
pcg->HPMpermissions[index].mask = mask;
@@ -207,6 +207,5 @@ void HPM_map_do_final(void) {
}
aFree(pcg->HPMpermissions);
}
-
HPM->datacheck_final();
}
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 7277f8f08..beeccaddd 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -123,7 +123,7 @@ bool msg_config_read(const char *cfg_name, bool allow_override) {
ShowError("Messages file not found: %s\n", cfg_name);
return false;
}
-
+
if( !atcommand->max_message_table )
atcommand->expand_message_table();
@@ -152,9 +152,8 @@ bool msg_config_read(const char *cfg_name, bool allow_override) {
}
}
}
-
fclose(fp);
-
+
if( ++called == 1 ) { //Original
if( script->lang_export_fp ) {
int i;
@@ -178,7 +177,7 @@ bool msg_config_read(const char *cfg_name, bool allow_override) {
*------------------------------------------*/
void do_final_msg(void) {
int i, j;
-
+
for(i = 0; i < atcommand->max_message_table; i++) {
for (j = 0; j < MAX_MSG; j++) {
if( atcommand->msg_table[i][j] )
@@ -186,7 +185,7 @@ void do_final_msg(void) {
}
aFree(atcommand->msg_table[i]);
}
-
+
if( atcommand->msg_table )
aFree(atcommand->msg_table);
}
@@ -198,8 +197,6 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) {
return info->help;
}
-
-
/*==========================================
* @send (used for testing packet sends from the client)
*------------------------------------------*/
@@ -862,7 +859,6 @@ ACMD(storage)
return true;
}
-
/*==========================================
*
*------------------------------------------*/
@@ -1106,7 +1102,7 @@ ACMD(heal)
// some overflow checks
if( hp == INT_MIN ) hp++;
if( sp == INT_MIN ) sp++;
-
+
if ( hp == 0 && sp == 0 ) {
if (!status_percent_heal(&sd->bl, 100, 100))
clif->message(fd, msg_fd(fd,157)); // HP and SP have already been recovered.
@@ -4610,7 +4606,6 @@ ACMD(jailfor) {
return true;
}
-
//By Coltaro
ACMD(jailtime)
{
@@ -4768,7 +4763,6 @@ ACMD(disguiseguild)
return true;
}
-
/*==========================================
* @undisguise by [Yor]
*------------------------------------------*/
@@ -4858,7 +4852,6 @@ ACMD(exp)
return true;
}
-
/*==========================================
* @broadcast by [Valaris]
*------------------------------------------*/
@@ -5103,7 +5096,6 @@ ACMD(follow) {
return true;
}
-
/*==========================================
* @dropall by [MouseJstr]
* Drop all your possession on the ground
@@ -6627,7 +6619,6 @@ ACMD(mobinfo)
monster->status.vit, monster->status.int_, monster->status.dex, monster->status.luk);
clif->message(fd, atcmd_output);
-
#ifdef RENEWAL
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1291), // ATK : %d~%d MATK : %d~%d Range : %d~%d~%d Size : %s Race : %s Element : %s(Lv : %d)
MOB_ATK1(monster), MOB_ATK2(monster), MOB_MATK1(monster), MOB_MATK2(monster), monster->status.rhw.range,
@@ -7311,7 +7302,6 @@ ACMD(mutearea) {
return true;
}
-
ACMD(rates)
{
char buf[CHAT_SIZE_MAX];
@@ -7748,7 +7738,6 @@ ACMD(duel) {
return true;
}
-
ACMD(leave) {
if (sd->duel_group <= 0) {
// "Duel: @leave without @duel."
@@ -9306,7 +9295,7 @@ ACMD(skdebug) {
ACMD(cddebug) {
int i;
struct skill_cd* cd = NULL;
-
+
if (!(cd = idb_get(skill->cd_db,sd->status.char_id))) {
clif->message(fd,"No cool down list found");
} else {
@@ -9314,7 +9303,7 @@ ACMD(cddebug) {
for(i = 0; i < cd->cursor; i++) {
if( cd->entry[i] ) {
const struct TimerData *td = timer->get(cd->entry[i]->timer);
-
+
if( !td || td->func != skill->blockpc_end ) {
clif->messages(fd,"Found invalid entry in slot %d for skill %s",i,skill->dbs->db[cd->entry[i]->skidx].name);
sd->blockskill[cd->entry[i]->skidx] = false;
@@ -9322,7 +9311,7 @@ ACMD(cddebug) {
}
}
}
-
+
if (!cd || (*message && !strcmpi(message,"reset"))) {
for(i = 0; i < MAX_SKILL; i++) {
if( sd->blockskill[i] ) {
@@ -9336,12 +9325,12 @@ ACMD(cddebug) {
timer->delete(cd->entry[i]->timer,skill->blockpc_end);
ers_free(skill->cd_entry_ers, cd->entry[i]);
}
-
+
idb_remove(skill->cd_db,sd->status.char_id);
ers_free(skill->cd_ers, cd);
}
}
-
+
return true;
}
@@ -9350,7 +9339,7 @@ ACMD(cddebug) {
**/
ACMD(lang) {
uint8 i;
-
+
if (!*message) {
clif->messages(fd,"Usage: @%s <Language>",info->command);
clif->messages(fd,"There are %d languages available:",script->max_lang_id);
@@ -9358,7 +9347,7 @@ ACMD(lang) {
clif->messages(fd,"- %s",script->languages[i]);
return false;
}
-
+
for(i = 0; i < script->max_lang_id; i++) {
if( strcmpi(message,script->languages[i]) == 0 ) {
if( i == sd->lang_id ) {
@@ -9370,14 +9359,14 @@ ACMD(lang) {
break;
}
}
-
+
if( i == script->max_lang_id ) {
clif->messages(fd,"'%s' did not match any language available",message);
clif->messages(fd,"There are %d languages available:",script->max_lang_id);
for(i = 0; i < script->max_lang_id; i++)
clif->messages(fd,"- %s",script->languages[i]);
}
-
+
return true;
}
/**
diff --git a/src/map/battle.c b/src/map/battle.c
index d7f12aba9..15db4d88c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -104,7 +104,6 @@ struct block_list* battle_gettargeted(struct block_list *target) {
return bl_list[rnd()%c];
}
-
//Returns the id of the current targeted character of the passed bl. [Skotlex]
int battle_gettarget(struct block_list* bl) {
@@ -273,7 +272,7 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct
if (d_tbl && sc && check_distance_bl(target, d_tbl, sc->data[SC_DEVOTION]->val3) && damage > 0 && skill_id != PA_PRESSURE && skill_id != CR_REFLECTSHIELD)
damage = 0;
-
+
if ( !battle_config.delay_battle_damage || amotion <= 1 ) {
map->freeblock_lock();
status_fix_damage(src, target, damage, ddelay); // We have to separate here between reflect damage and others [icescope]
@@ -460,7 +459,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
if( sc->data[SC_ZENKAI] && watk->ele == sc->data[SC_ZENKAI]->val2 )
eatk += 200;
}
-
+
#ifdef RENEWAL_EDP
if ( sc && sc->data[SC_EDP] && skill_id != AS_GRIMTOOTH && skill_id != AS_VENOMKNIFE && skill_id != ASC_BREAKER ) {
struct status_data *tstatus;
@@ -470,9 +469,8 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
} else /* fall through */
#endif
damage += eatk;
-
damage = battle->calc_elefix(src, bl, skill_id, skill_lv, damage, nk, n_ele, s_ele, s_ele_, type == EQI_HAND_L, flag);
-
+
/**
* In RE Shield Boomerang takes weapon element only for damage calculation,
* - resist calculation is always against neutral
@@ -969,11 +967,10 @@ int64 battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64
// FIXME: wflag is undocumented
int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int cflag, int wflag){
struct map_session_data *sd, *tsd;
- short cardfix =
#ifdef RENEWAL
- 100;
+ short cardfix = 100;
#else
- 1000;
+ short cardfix = 1000;
#endif
short t_class, s_class, s_race2, t_race2;
struct status_data *sstatus, *tstatus;
@@ -2884,7 +2881,6 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
return 0;
}
-
if( (sce=sc->data[SC_PARRYING]) && flag&BF_WEAPON && skill_id != WS_CARTTERMINATION && rnd()%100 < sce->val2 )
{ // attack blocked by Parrying
clif->skill_nodamage(bl, bl, LK_PARRYING, sce->val1,1);
@@ -3136,7 +3132,6 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if( sc->data[SC_MEIKYOUSISUI] && rnd()%100 < 40 ) // custom value
damage = 0;
-
if (!damage) return 0;
if( (sce = sc->data[SC_LIGHTNINGWALK]) && flag&BF_LONG && rnd()%100 < sce->val1 ) {
@@ -4904,7 +4899,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
else
wd.dmg_lv = ATK_DEF;
break;
-
+
case KO_BAKURETSU:
{
#ifdef RENEWAL
@@ -5542,7 +5537,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#endif
}
-
if( src != target ) { // Don't reflect your own damage (Grand Cross)
if( wd.dmg_lv == ATK_MISS || wd.dmg_lv == ATK_BLOCK ) {
int64 prev1 = wd.damage, prev2 = wd.damage2;
@@ -6394,7 +6388,6 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
switch( target->type ) { // Checks on actual target
case BL_PC: {
struct status_change* sc = status->get_sc(src);
-
if( ((TBL_PC*)target)->invincible_timer != INVALID_TIMER ) {
switch( battle->get_current_skill(src) ) {
/* TODO a proper distinction should be established bugreport:8397 */
@@ -6433,7 +6426,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
TBL_SKILL *su = (TBL_SKILL*)target;
if( !su->group )
return 0;
- if( skill->get_inf2(su->group->skill_id)&INF2_TRAP &&
+ if( skill->get_inf2(su->group->skill_id)&INF2_TRAP &&
su->group->unit_id != UNT_USED_TRAPS &&
su->group->unit_id != UNT_NETHERWORLD ) { //Only a few skills can target traps...
switch( battle->get_current_skill(src) ) {
@@ -7401,7 +7394,6 @@ void battle_adjust_conf(void) {
}
#endif
-
#ifndef CELL_NOSTACK
if (battle_config.custom_cell_stack_limit != 1)
ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n");
diff --git a/src/map/battleground.c b/src/map/battleground.c
index a92b3faef..5df05d301 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -906,7 +906,6 @@ void do_final_battleground(void)
}
aFree(bg->arena);
}
-
}
void battleground_defaults(void) {
bg = &bg_s;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 2df7e19b8..1e376e3bc 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -482,7 +482,6 @@ int chrif_reconnect(DBKey key, DBData *data, va_list ap) {
return 0;
}
-
/// Called when all the connection steps are completed.
void chrif_on_ready(void) {
static bool once = false;
@@ -512,7 +511,6 @@ void chrif_on_ready(void) {
}
}
-
/*==========================================
*
*------------------------------------------*/
@@ -659,7 +657,6 @@ void chrif_authfail(int fd) {/* HELLO WORLD. ip in RFIFOL 15 is not being used (
}
}
-
/**
* This can still happen (client times out while waiting for char to confirm auth data)
* @see DBApply
@@ -797,7 +794,7 @@ bool chrif_char_ask_name(int acc, const char* character_name, unsigned short ope
/**
* Requests a sex change (either per character or per account).
- *
+ *
* @param sd The character's data.
* @param change_account Whether to change the per-account sex.
* @retval true.
@@ -1230,7 +1227,6 @@ bool chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) {
return true;
}
-
/*=========================================
* Tell char-server character disconnected [Wizputer]
*-----------------------------------------*/
@@ -1301,7 +1297,6 @@ void chrif_on_disconnect(void) {
timer->add(timer->gettick() + 1000, chrif->check_connect_char_server, 0, 0);
}
-
void chrif_update_ip(int fd) {
uint32 new_ip;
@@ -1658,7 +1653,6 @@ void do_init_chrif(bool minimal) {
timer->add_interval(timer->gettick() + 1000, chrif->send_usercount_tochar, 0, 0, UPDATE_INTERVAL);
}
-
/*=====================================
* Default Functions : chrif.h
* Generated by HerculesInterfaceMaker
diff --git a/src/map/clif.c b/src/map/clif.c
index ab5708fc8..0d25be0a6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -92,7 +92,6 @@ static inline int itemtype(int type) {
}
}
-
static inline void WBUFPOS(uint8* p, unsigned short pos, short x, short y, unsigned char dir) {
p += pos;
p[0] = (uint8)(x>>2);
@@ -100,7 +99,6 @@ static inline void WBUFPOS(uint8* p, unsigned short pos, short x, short y, unsig
p[2] = (uint8)((y<<4) | (dir&0xf));
}
-
// client-side: x0+=sx0*0.0625-0.5 and y0+=sy0*0.0625-0.5
static inline void WBUFPOS2(uint8* p, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0) {
p += pos;
@@ -646,7 +644,6 @@ void clif_authok(struct map_session_data *sd)
p.startTime = (unsigned int)timer->gettick();
WBUFPOS(&p.PosDir[0],0,sd->bl.x,sd->bl.y,sd->ud.dir); /* do the stupid client math */
p.xSize = p.ySize = 5; /* not-used */
-
#if PACKETVER >= 20080102
p.font = sd->status.font;
#endif
@@ -656,7 +653,6 @@ void clif_authok(struct map_session_data *sd)
clif->send(&p,sizeof(p),&sd->bl,SELF);
}
-
/// Notifies the client, that it's connection attempt was refused (ZC_REFUSE_ENTER).
/// 0074 <error code>.B
/// error code:
@@ -673,7 +669,6 @@ void clif_authrefuse(int fd, uint8 error_code)
WFIFOSET(fd,packet_len(0x74));
}
-
/// Notifies the client of a ban or forced disconnect (SC_NOTIFY_BAN).
/// 0081 <error code>.B
/// error code:
@@ -720,7 +715,6 @@ void clif_authfail_fd(int fd, int type)
}
-
/// Notifies the client, whether it can disconnect and change servers (ZC_RESTART_ACK).
/// 00b3 <type>.B
/// type:
@@ -768,8 +762,6 @@ void clif_dropflooritem(struct flooritem_data* fitem) {
clif->send(&p, sizeof(p), &fitem->bl, AREA);
}
-
-
/// Makes an item disappear from the ground.
/// 00a1 <id>.L (ZC_ITEM_DISAPPEAR)
void clif_clearflooritem(struct flooritem_data *fitem, int fd)
@@ -790,7 +782,6 @@ void clif_clearflooritem(struct flooritem_data *fitem, int fd)
}
}
-
/// Makes a unit (char, npc, mob, homun) disappear to one client (ZC_NOTIFY_VANISH).
/// 0080 <id>.L <type>.B
/// type:
@@ -834,7 +825,6 @@ void clif_clearunit_area(struct block_list* bl, clr_type type)
}
}
-
/// Used to make monsters with player-sprites disappear after dying
/// like normal monsters, because the client does not remove those
/// automatically.
@@ -983,7 +973,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
int g_id = status->get_guild_id(bl);
nullpo_retv(bl);
-
+
#if PACKETVER < 20091103
if( !pc->db_checkid(vd->class_) ) {
clif->set_unit_idle2(bl,tsd,target);
@@ -1293,7 +1283,6 @@ void clif_class_change(struct block_list *bl, int class_, int type)
}
}
-
/// Notifies the client of an object's spirits.
/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
@@ -1389,7 +1378,6 @@ bool clif_spawn(struct block_list *bl)
if (vd->cloth_color)
clif->refreshlook(bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,AREA_WOS);
-
switch (bl->type) {
case BL_PC:
{
@@ -1512,7 +1500,6 @@ void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
clif->send(buf,packet_len(0x22e),&sd->bl,SELF);
}
-
/// Notification about a change in homunuculus' state (ZC_CHANGESTATE_MER).
/// 0230 <type>.B <state>.B <id>.L <data>.L
/// type:
@@ -1621,7 +1608,6 @@ void clif_hom_food(struct map_session_data *sd,int foodid,int fail)
return;
}
-
/// Notifies the client, that it is walking (ZC_NOTIFY_PLAYERMOVE).
/// 0087 <walk start time>.L <walk data>.6B
void clif_walkok(struct map_session_data *sd)
@@ -1739,7 +1725,6 @@ void clif_move(struct unit_data *ud)
#endif
}
-
/*==========================================
* Delays the map->quit of a player after they are disconnected. [Skotlex]
*------------------------------------------*/
@@ -1784,7 +1769,6 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
WFIFOSET(fd,packet_len(0x91));
}
-
/// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
@@ -1802,7 +1786,6 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index,
WFIFOSET(fd,packet_len(0x92));
}
-
void clif_blown(struct block_list *bl)
{
//Aegis packets says fixpos, but it's unsure whether slide works better or not.
@@ -1811,7 +1794,6 @@ void clif_blown(struct block_list *bl)
clif->slide(bl, bl->x, bl->y);
}
-
/// Visually moves(slides) a character to x,y. If the target cell
/// isn't walkable, the char doesn't move at all. If the char is
/// sitting it will stand up (ZC_STOPMOVE).
@@ -1833,7 +1815,6 @@ void clif_fixpos(struct block_list *bl) {
}
}
-
/// Displays the buy/sell dialog of an NPC shop (ZC_SELECT_DEALTYPE).
/// 00c4 <shop id>.L
void clif_npcbuysell(struct map_session_data* sd, int id)
@@ -1849,7 +1830,6 @@ void clif_npcbuysell(struct map_session_data* sd, int id)
WFIFOSET(fd,packet_len(0xc4));
}
-
/// Presents list of items, that can be bought in an NPC shop (ZC_PC_PURCHASE_ITEMLIST).
/// 00c6 <packet len>.W { <price>.L <discount price>.L <item type>.B <name id>.W }*
void clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
@@ -1912,7 +1892,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))
continue; // Don't allow sale of bound items
@@ -1929,7 +1909,6 @@ void clif_selllist(struct map_session_data *sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Displays an NPC dialog message (ZC_SAY_DIALOG).
/// 00b4 <packet len>.W <npc id>.L <message>.?B
/// Client behavior (dialog window):
@@ -1956,7 +1935,6 @@ void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Adds a 'next' button to an NPC dialog (ZC_WAIT_DIALOG).
/// 00b5 <npc id>.L
/// Client behavior (dialog window):
@@ -1980,7 +1958,6 @@ void clif_scriptnext(struct map_session_data *sd, int npcid)
WFIFOSET(fd,packet_len(0xb5));
}
-
/// Adds a 'close' button to an NPC dialog (ZC_CLOSE_DIALOG).
/// 00b6 <npc id>.L
/// Client behavior:
@@ -2035,7 +2012,6 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
WFIFOSET(fd, packet_len(0x78));
}
-
/// Displays an NPC dialog menu (ZC_MENU_LIST).
/// 00b7 <packet len>.W <npc id>.L <menu items>.?B
/// Client behavior:
@@ -2078,7 +2054,6 @@ void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Displays an NPC dialog input box for numbers (ZC_OPEN_EDITDLG).
/// 0142 <npc id>.L
/// Client behavior (inputnum window):
@@ -2108,7 +2083,6 @@ void clif_scriptinput(struct map_session_data *sd, int npcid) {
WFIFOSET(fd,packet_len(0x142));
}
-
/// Displays an NPC dialog input box for numbers (ZC_OPEN_EDITDLGSTR).
/// 01d4 <npc id>.L
/// Client behavior (inputstr window):
@@ -2138,7 +2112,6 @@ void clif_scriptinputstr(struct map_session_data *sd, int npcid) {
WFIFOSET(fd,packet_len(0x1d4));
}
-
/// Marks a position on client's minimap (ZC_COMPASS).
/// 0144 <npc id>.L <type>.L <x>.L <y>.L <id>.B <color>.L
/// npc id:
@@ -2190,7 +2163,6 @@ void clif_cutin(struct map_session_data* sd, const char* image, int type)
WFIFOSET(fd,packet_len(0x1b3));
}
-
/*==========================================
* Fills in card data from the given item and into the buffer. [Skotlex]
*------------------------------------------*/
@@ -2314,7 +2286,6 @@ void clif_add_random_options(unsigned char* buf, struct item* item)
}
}
-
/// Notifies the client, about a received inventory item or the result of a pick-up request.
/// 00a0 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B <result>.B (ZC_ITEM_PICKUP_ACK)
/// 029a <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B <result>.B <expire time>.L (ZC_ITEM_PICKUP_ACK2)
@@ -2375,7 +2346,6 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
clif->send(&p,sizeof(p),&sd->bl,SELF);
}
-
/// Notifies the client, that an inventory item was deleted or dropped (ZC_ITEM_THROW_ACK).
/// 00af <index>.W <amount>.W
void clif_dropitem(struct map_session_data *sd,int n,int amount)
@@ -2392,7 +2362,6 @@ void clif_dropitem(struct map_session_data *sd,int n,int amount)
WFIFOSET(fd,packet_len(0xaf));
}
-
/// Notifies the client, that an inventory item was deleted (ZC_DELETE_ITEM_FROM_BODY).
/// 07fa <delete type>.W <index>.W <amount>.W
/// delete type: @see enum delitem_reason
@@ -2416,7 +2385,6 @@ void clif_delitem(struct map_session_data *sd,int n,int amount, short reason)
#endif
}
-
// Simplifies inventory/cart/storage packets by handling the packet section relevant to items. [Skotlex]
// Equip is >= 0 for equippable items (holds the equip-point, is 0 for pet
// armor/egg) -1 for stackable items, -2 for stackable items where arrows must send in the equip-point.
@@ -2465,7 +2433,6 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct
p->location = eqp_pos;
p->WearState = i->equip;
-
#if PACKETVER < 20120925
p->IsDamaged = i->attribute ? 1 : 0;
#endif
@@ -2476,7 +2443,7 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct
#if PACKETVER >= 20071002
p->HireExpireDate = i->expire_time;
#endif
-
+
#if PACKETVER >= 20080102
p->bindOnEquipType = i->bound ? 2 : id->flag.bindonequip ? 1 : 0;
#endif
@@ -2515,18 +2482,18 @@ void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, stru
p->ITID = i->nameid;
p->type = itemtype(id->type);
-
+
#if PACKETVER < 20120925
p->IsIdentified = i->identify ? 1 : 0;
#endif
p->count = i->amount;
p->WearState = id->equip;
-
+
#if PACKETVER >= 5
clif->addcards2(&p->slot.card[0], i);
#endif
-
+
#if PACKETVER >= 20080102
p->HireExpireDate = i->expire_time;
#endif
@@ -2692,7 +2659,6 @@ void clif_cartlist(struct map_session_data *sd) {
}
}
-
/// Removes cart (ZC_CARTOFF).
/// 012b
/// Client behavior:
@@ -2706,7 +2672,6 @@ void clif_clearcart(int fd)
}
-
/// Guild XY locators (ZC_NOTIFY_POSITION_TO_GUILDM) [Valaris]
/// 01eb <account id>.L <x>.W <y>.W
void clif_guild_xy(struct map_session_data *sd)
@@ -2923,13 +2888,11 @@ void clif_updatestatus(struct map_session_data *sd,int type)
WFIFOL(fd,4)=sd->battle_status.cri/10;
break;
case SP_MATK1:
- WFIFOL(fd,4)=pc_rightside_matk(sd);
+ WFIFOL(fd,4)=pc_rightside_matk(sd);
break;
case SP_MATK2:
- WFIFOL(fd,4)=pc_leftside_matk(sd);
+ WFIFOL(fd,4)=pc_leftside_matk(sd);
break;
-
-
case SP_ZENY:
WFIFOW(fd,0)=0xb1;
WFIFOL(fd,4)=sd->status.zeny;
@@ -3229,7 +3192,6 @@ void clif_refreshlook(struct block_list *bl,int id,int type,int val,enum send_ta
clif->sendlook(bl, id, type, val, 0, target);
}
-
/// Character status (ZC_STATUS).
/// 00bd <stpoint>.W <str>.B <need str>.B <agi>.B <need agi>.B <vit>.B <need vit>.B
/// <int>.B <need int>.B <dex>.B <need dex>.B <luk>.B <need luk>.B <atk>.W <atk2>.W
@@ -3293,7 +3255,6 @@ void clif_initialstatus(struct map_session_data *sd) {
clif->updatestatus(sd,SP_ASPD);
}
-
/// Marks an ammunition item in inventory as equipped (ZC_EQUIP_ARROW).
/// 013c <index>.W
void clif_arrowequip(struct map_session_data *sd,int val)
@@ -3312,7 +3273,6 @@ void clif_arrowequip(struct map_session_data *sd,int val)
WFIFOSET(fd,packet_len(0x013c));
}
-
/// Ammunition action message (ZC_ACTION_FAILURE).
/// 013b <type>.W
/// type:
@@ -3335,7 +3295,6 @@ void clif_arrow_fail(struct map_session_data *sd,int type)
WFIFOSET(fd,packet_len(0x013b));
}
-
/// Presents a list of items, that can be processed by Arrow Crafting (ZC_MAKINGARROW_LIST).
/// 01ad <packet len>.W { <name id>.W }*
void clif_arrow_create_list(struct map_session_data *sd)
@@ -3370,7 +3329,6 @@ void clif_arrow_create_list(struct map_session_data *sd)
}
}
-
/// Notifies the client, about the result of an status change request (ZC_STATUS_CHANGE_ACK).
/// 00bc <status id>.W <result>.B <value>.B
/// status id:
@@ -3393,7 +3351,6 @@ void clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
WFIFOSET(fd,packet_len(0xbc));
}
-
/// Notifies the client about the result of a request to equip an item (ZC_REQ_WEAR_EQUIP_ACK).
/// 00aa <index>.W <equip location>.W <result>.B
/// 00aa <index>.W <equip location>.W <view id>.W <result>.B (PACKETVER >= 20100629)
@@ -3416,7 +3373,6 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,enum e_EQUIP_IT
clif->send(&p, sizeof(p), &sd->bl, SELF);
}
-
/// Notifies the client about the result of a request to take off an item (ZC_REQ_TAKEOFF_EQUIP_ACK).
/// 00ac <index>.W <equip location>.W <result>.B
void clif_unequipitemack(struct map_session_data *sd,int n,int pos,enum e_UNEQUIP_ITEM_ACK result) {
@@ -3432,7 +3388,6 @@ void clif_unequipitemack(struct map_session_data *sd,int n,int pos,enum e_UNEQUI
clif->send(&p, sizeof(p), &sd->bl, SELF);
}
-
/// Notifies clients in the area about an special/visual effect (ZC_NOTIFY_EFFECT).
/// 019b <id>.L <effect id>.L
/// effect id:
@@ -3459,7 +3414,6 @@ void clif_misceffect(struct block_list* bl,int type)
clif->send(buf,packet_len(0x19b),bl,AREA);
}
-
/// Notifies clients in the area of a state change.
/// 0119 <id>.L <body state>.W <health state>.W <effect state>.W <pk mode>.B (ZC_STATE_CHANGE)
/// 0229 <id>.L <body state>.W <health state>.W <effect state>.L <pk mode>.B (ZC_STATE_CHANGE3)
@@ -3510,7 +3464,6 @@ void clif_changeoption(struct block_list* bl)
#endif
}
-
/// Displays status change effects on NPCs/monsters (ZC_NPC_SHOWEFST_UPDATE).
/// 028a <id>.L <effect state>.L <level>.L <showEFST>.L
void clif_changeoption2(struct block_list* bl) {
@@ -3536,7 +3489,6 @@ void clif_changeoption2(struct block_list* bl) {
clif->send(buf,packet_len(0x28a),bl,AREA);
}
-
/// Notifies the client about the result of an item use request.
/// 00a8 <index>.W <amount>.W <result>.B (ZC_USE_ITEM_ACK)
/// 01c8 <index>.W <name id>.W <id>.L <amount>.W <result>.B (ZC_USE_ITEM_ACK2)
@@ -3599,7 +3551,6 @@ void clif_createchat(struct map_session_data* sd, int flag)
WFIFOSET(fd,packet_len(0xd6));
}
-
/// Display a chat above the owner (ZC_ROOM_NEWENTRY).
/// 00d7 <packet len>.W <owner id>.L <char id>.L <limit>.W <users>.W <type>.B <title>.?B
/// type:
@@ -3637,7 +3588,6 @@ void clif_dispchat(struct chat_data* cd, int fd)
}
}
-
/// Chatroom properties adjustment (ZC_CHANGE_CHATROOM).
/// 00df <packet len>.W <owner id>.L <chat id>.L <limit>.W <users>.W <type>.B <title>.?B
/// type:
@@ -3669,7 +3619,6 @@ void clif_changechatstatus(struct chat_data* cd)
clif->send(buf,WBUFW(buf,2),cd->owner,CHAT);
}
-
/// Removes the chatroom (ZC_DESTROY_ROOM).
/// 00d8 <chat id>.L
void clif_clearchat(struct chat_data *cd,int fd)
@@ -3689,7 +3638,6 @@ void clif_clearchat(struct chat_data *cd,int fd)
}
}
-
/// Displays messages regarding join chat failures (ZC_REFUSE_ENTER_ROOM).
/// 00da <result>.B
/// result:
@@ -3715,7 +3663,6 @@ void clif_joinchatfail(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0xda));
}
-
/// Notifies the client about entering a chatroom (ZC_ENTER_ROOM).
/// 00db <packet len>.W <chat id>.L { <role>.L <name>.24B }*
/// role:
@@ -3754,7 +3701,6 @@ void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
WFIFOSET(fd, WFIFOW(fd, 2));
}
-
/// Notifies clients in a chat about a new member (ZC_MEMBER_NEWENTRY).
/// 00dc <users>.W <name>.24B
void clif_addchat(struct chat_data* cd,struct map_session_data *sd)
@@ -3770,7 +3716,6 @@ void clif_addchat(struct chat_data* cd,struct map_session_data *sd)
clif->send(buf,packet_len(0xdc),&sd->bl,CHAT_WOS);
}
-
/// Announce the new owner (ZC_ROLE_CHANGE).
/// 00e1 <role>.L <nick>.24B
/// role:
@@ -3794,7 +3739,6 @@ void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
clif->send(buf,packet_len(0xe1)*2,&sd->bl,CHAT);
}
-
/// Notify about user leaving the chatroom (ZC_MEMBER_EXIT).
/// 00dd <users>.W <nick>.24B <flag>.B
/// flag:
@@ -3815,7 +3759,6 @@ void clif_leavechat(struct chat_data* cd, struct map_session_data* sd, bool flag
clif->send(buf,packet_len(0xdd),&sd->bl,CHAT);
}
-
/// Opens a trade request window from char 'name'.
/// 00e5 <nick>.24B (ZC_REQ_EXCHANGE_ITEM)
/// 01f4 <nick>.24B <charid>.L <baselvl>.W (ZC_REQ_EXCHANGE_ITEM2)
@@ -3848,7 +3791,6 @@ void clif_traderequest(struct map_session_data *sd, const char *name)
#endif // PACKETVER < 6
}
-
/// Reply to a trade-request.
/// 00e7 <result>.B (ZC_ACK_EXCHANGE_ITEM)
/// 01f5 <result>.B <charid>.L <baselvl>.W (ZC_ACK_EXCHANGE_ITEM2)
@@ -3886,7 +3828,6 @@ void clif_tradestart(struct map_session_data *sd, uint8 type)
WFIFOSET(fd,packet_len(0xe7));
}
-
/// Notifies the client about an item from other player in current trade.
/// 00e9 <amount>.L <nameid>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_EXCHANGE_ITEM)
/// 080f <nameid>.W <item type>.B <amount>.L <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_EXCHANGE_ITEM2)
@@ -3952,7 +3893,6 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd
WFIFOSET(fd,packet_len(tradeaddType));
}
-
/// Notifies the client about the result of request to add an item to the current trade (ZC_ACK_ADD_EXCHANGE_ITEM).
/// 00ea <index>.W <result>.B
/// result:
@@ -3972,7 +3912,6 @@ void clif_tradeitemok(struct map_session_data* sd, int index, int fail)
WFIFOSET(fd,packet_len(0xea));
}
-
/// Notifies the client about finishing one side of the current trade (ZC_CONCLUDE_EXCHANGE_ITEM).
/// 00ec <who>.B
/// who:
@@ -3990,7 +3929,6 @@ void clif_tradedeal_lock(struct map_session_data* sd, int fail)
WFIFOSET(fd,packet_len(0xec));
}
-
/// Notifies the client about the trade being canceled (ZC_CANCEL_EXCHANGE_ITEM).
/// 00ee
void clif_tradecancelled(struct map_session_data* sd)
@@ -4004,7 +3942,6 @@ void clif_tradecancelled(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0xee));
}
-
/// Result of a trade (ZC_EXEC_EXCHANGE_ITEM).
/// 00f0 <result>.B
/// result:
@@ -4022,7 +3959,6 @@ void clif_tradecompleted(struct map_session_data* sd, int fail)
WFIFOSET(fd,packet_len(0xf0));
}
-
/// Resets the trade window on the send side (ZC_EXCHANGEITEM_UNDO).
/// 00f1
/// NOTE: Unknown purpose. Items are not removed until the window is
@@ -4039,7 +3975,6 @@ void clif_tradeundo(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0xf1));
}
-
/// Updates storage total amount (ZC_NOTIFY_STOREITEM_COUNTINFO).
/// 00f2 <current count>.W <max count>.W
void clif_updatestorageamount(struct map_session_data* sd, int amount, int max_amount)
@@ -4056,7 +3991,6 @@ void clif_updatestorageamount(struct map_session_data* sd, int amount, int max_a
WFIFOSET(fd,packet_len(0xf2));
}
-
/// Notifies the client of an item being added to the storage.
/// 00f4 <index>.W <amount>.L <nameid>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_STORE)
/// 01c4 <index>.W <amount>.L <nameid>.W <type>.B <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_STORE2)
@@ -4070,7 +4004,6 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde
fd=sd->fd;
view = itemdb_viewid(i->nameid);
-
WFIFOHEAD(fd,packet_len(storageaddType));
WFIFOW(fd, 0) = storageaddType; // Storage item added
WFIFOW(fd, 2) = index+1; // index
@@ -4090,7 +4023,6 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde
WFIFOSET(fd,packet_len(storageaddType));
}
-
/// Notifies the client of an item being deleted from the storage (ZC_DELETE_ITEM_FROM_STORE).
/// 00f6 <index>.W <amount>.L
void clif_storageitemremoved(struct map_session_data* sd, int index, int amount)
@@ -4107,7 +4039,6 @@ void clif_storageitemremoved(struct map_session_data* sd, int index, int amount)
WFIFOSET(fd,packet_len(0xf6));
}
-
/// Closes storage (ZC_CLOSE_STORE).
/// 00f8
void clif_storageclose(struct map_session_data* sd)
@@ -4274,7 +4205,6 @@ int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, i
return delay>0?delay:1; //Return 1 to specify there should be no noticeable delay, but you should stop walking.
}
-
/// Sends a 'damage' packet (src performs action on dst)
/// 008a <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.W <div>.W <type>.B <damage2>.W (ZC_NOTIFY_ACT)
/// 02e1 <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.L <div>.W <type>.B <damage2>.L (ZC_NOTIFY_ACT2)
@@ -4298,7 +4228,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, int sdelay, int
if(in_damage) in_damage = in_damage*(sc->data[SC_ILLUSION]->val2) + rnd()%100;
if(in_damage2) in_damage2 = in_damage2*(sc->data[SC_ILLUSION]->val2) + rnd()%100;
}
-
+
#if PACKETVER < 20071113
damage = (short)min(in_damage,INT16_MAX);
damage2 = (short)min(in_damage2,INT16_MAX);
@@ -4409,7 +4339,6 @@ void clif_standing(struct block_list* bl)
}
}
-
/// Inform client(s) about a map-cell change (ZC_UPDATE_MAPINFO).
/// 0192 <x>.W <y>.W <type>.W <map name>.16B
void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) {
@@ -4435,7 +4364,6 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe
}
}
-
/// Notifies the client about an item on floor (ZC_ITEM_ENTRY).
/// 009d <id>.L <name id>.W <identified>.B <x>.W <y>.W <amount>.W <subX>.B <subY>.B
void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fitem) {
@@ -4502,7 +4430,6 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, en
#endif
p.PacketType = skill_entryType;
-
#if PACKETVER >= 20110718
p.PacketLength = sizeof(p);
#endif
@@ -4518,7 +4445,7 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, en
p.job = UNT_DUMMYSKILL;
else
p.job = su->group->unit_id;
-
+
#if PACKETVER >= 20110718
p.RadiusRange = (unsigned char)su->range;
#endif
@@ -4535,7 +4462,6 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, en
clif->changemapcell(bl->type == BL_PC ? ((TBL_PC*)bl)->fd : 0,su->bl.m,su->bl.x,su->bl.y,5,SELF);
}
-
/*==========================================
* Server tells client to remove unit of id 'unit->bl.id'
*------------------------------------------*/
@@ -4551,7 +4477,6 @@ void clif_clearchar_skillunit(struct skill_unit *su, int fd) {
clif->changemapcell(fd,su->bl.m,su->bl.x,su->bl.y,su->val2,SELF);
}
-
/// Removes a skill unit (ZC_SKILL_DISAPPEAR).
/// 0120 <id>.L
void clif_skill_delunit(struct skill_unit *su) {
@@ -4564,7 +4489,6 @@ void clif_skill_delunit(struct skill_unit *su) {
clif->send(buf,packet_len(0x120),&su->bl,AREA);
}
-
/// Sent when an object gets ankle-snared (ZC_SKILL_UPDATE).
/// 01ac <id>.L
/// Only affects units with class [139,153] client-side.
@@ -4579,7 +4503,6 @@ void clif_skillunit_update(struct block_list* bl)
clif->send(buf,packet_len(0x1ac),bl,AREA);
}
-
/*==========================================
*
*------------------------------------------*/
@@ -4701,7 +4624,6 @@ int clif_insight(struct block_list *bl,va_list ap)
return 0;
}
-
/// Updates whole skill tree (ZC_SKILLINFO_LIST).
/// 010f <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B }*
void clif_skillinfoblock(struct map_session_data *sd)
@@ -4794,7 +4716,6 @@ void clif_addskill(struct map_session_data *sd, int id)
WFIFOSET(fd,packet_len(0x111));
}
-
/// Deletes a skill from the skill tree (ZC_SKILLINFO_DELETE).
/// 0441 <skill id>.W
void clif_deleteskill(struct map_session_data *sd, int id)
@@ -4841,7 +4762,6 @@ void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, in
WFIFOSET(fd, packet_len(0x10e));
}
-
/// Updates a skill in the skill tree (ZC_SKILLINFO_UPDATE2).
/// 07e1 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <upgradable>.B
void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
@@ -4874,7 +4794,6 @@ void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
WFIFOSET(fd,packet_len(0x7e1));
}
-
/// Notifies clients in area, that an object is about to use a skill.
/// 013e <src id>.L <dst id>.L <x>.W <y>.W <skill id>.W <property>.L <delaytime>.L (ZC_USESKILL_ACK)
/// 07fb <src id>.L <dst id>.L <x>.W <y>.W <skill id>.W <property>.L <delaytime>.L <is disposable>.B (ZC_USESKILL_ACK2)
@@ -4919,7 +4838,6 @@ void clif_skillcasting(struct block_list* bl, int src_id, int dst_id, int dst_x,
clif->send(buf,packet_len(cmd), bl, AREA);
}
-
/// Notifies clients in area, that an object canceled casting (ZC_DISPEL).
/// 01b9 <id>.L
void clif_skillcastcancel(struct block_list* bl)
@@ -4933,7 +4851,6 @@ void clif_skillcastcancel(struct block_list* bl)
clif->send(buf,packet_len(0x1b9), bl, AREA);
}
-
/// Notifies the client about the result of a skill use request (ZC_ACK_TOUSESKILL).
/// 0110 <skill id>.W <num>.L <result>.B <cause>.B
/// num (only used when skill id = NV_BASIC and cause = 0):
@@ -4991,7 +4908,6 @@ void clif_skill_fail(struct map_session_data *sd,uint16 skill_id,enum useskill_f
WFIFOSET(fd,packet_len(0x110));
}
-
/// Skill cooldown display icon (ZC_SKILL_POSTDELAY).
/// 043d <skill ID>.W <tick>.L
void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration)
@@ -5010,7 +4926,6 @@ void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned
#endif
}
-
/// Skill attack effect and damage.
/// 0114 <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.W <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL)
/// 01de <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.L <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL2)
@@ -5024,11 +4939,11 @@ int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick
damage = (int)cap_value(in_damage,INT_MIN,INT_MAX);
type = clif_calc_delay(type,div,damage,ddelay);
-
+
#if PACKETVER >= 20131223
if( type == 6 ) type = 8; //bugreport:8263
#endif
-
+
if( ( sc = status->get_sc(dst) ) && sc->count ) {
if(sc->data[SC_ILLUSION] && damage)
damage = damage*(sc->data[SC_ILLUSION]->val2) + rnd()%100;
@@ -5102,7 +5017,6 @@ int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick
return clif->calc_walkdelay(dst,ddelay,type,damage,div);
}
-
/// Ground skill attack effect and damage (ZC_NOTIFY_SKILL_POSITION).
/// 0115 <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <x>.W <y>.W <damage>.W <level>.W <div>.W <type>.B
#if 0
@@ -5160,7 +5074,6 @@ int clif_skill_damage2(struct block_list *src, struct block_list *dst, int64 tic
}
#endif // 0
-
/// Non-damaging skill effect (ZC_USE_SKILL).
/// 011a <skill id>.W <skill lv>.W <dst id>.L <src id>.L <result>.B
int clif_skill_nodamage(struct block_list *src,struct block_list *dst,uint16 skill_id,int heal,int fail)
@@ -5193,7 +5106,6 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,uint16 ski
return fail;
}
-
/// Non-damaging ground skill effect (ZC_NOTIFY_GROUNDSKILL).
/// 0117 <skill id>.W <src id>.L <level>.W <x>.W <y>.W <tick>.L
void clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick) {
@@ -5245,7 +5157,6 @@ void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 s
sd->menuskill_val = skill_lv;
}
-
/// Memo message (ZC_ACK_REMEMBER_WARPPOINT).
/// 011e <type>.B
/// type:
@@ -5268,7 +5179,6 @@ void clif_skill_memomessage(struct map_session_data* sd, int type)
WFIFOSET(fd,packet_len(0x11e));
}
-
/// Teleport message (ZC_NOTIFY_MAPINFO).
/// 0189 <type>.W
/// type:
@@ -5291,7 +5201,6 @@ void clif_skill_mapinfomessage(struct map_session_data *sd, int type)
WFIFOSET(fd,packet_len(0x189));
}
-
/// Displays Sense (WZ_ESTIMATION) information window (ZC_MONSTER_INFO).
/// 018c <class>.W <level>.W <size>.W <hp>.L <def>.W <race>.W <mdef>.W <element>.W
/// <water%>.B <earth%>.B <fire%>.B <wind%>.B <poison%>.B <holy%>.B <shadow%>.B <ghost%>.B <undead%>.B
@@ -5328,7 +5237,6 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) {
clif->send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF);
}
-
/// Presents a textual list of producible items (ZC_MAKABLEITEMLIST).
/// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }*
/// material id:
@@ -5370,7 +5278,6 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int
}
}
-
/// Present a list of producible items (ZC_MAKINGITEM_LIST).
/// 025a <packet len>.W <mk type>.W { <name id>.W }*
/// mk type:
@@ -5483,7 +5390,7 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val
p.index = type;
p.AID = bl->id;
p.state = (unsigned char)flag;
-
+
#if PACKETVER >= 20120618
p.Total = tick; /* at this stage remain and total are the same value I believe */
#endif
@@ -5659,7 +5566,6 @@ void clif_broadcast2(struct block_list* bl, const char* mes, size_t len, unsigne
aFree(buf);
}
-
/// Displays heal effect (ZC_RECOVERY).
/// 013d <var id>.W <amount>.W
/// var id:
@@ -5675,7 +5581,6 @@ void clif_heal(int fd,int type,int val)
WFIFOSET(fd,packet_len(0x13d));
}
-
/// Displays resurrection effect (ZC_RESURRECTION).
/// 0148 <id>.L <type>.W
/// type:
@@ -5700,7 +5605,6 @@ void clif_resurrection(struct block_list *bl,int type)
}
}
-
/// Sets the map property (ZC_NOTIFY_MAPPROPERTY).
/// 0199 <type>.W
void clif_map_property(struct map_session_data* sd, enum map_property property)
@@ -5716,7 +5620,6 @@ void clif_map_property(struct map_session_data* sd, enum map_property property)
WFIFOSET(fd,packet_len(0x199));
}
-
/// Set the map type (ZC_NOTIFY_MAPPROPERTY2).
/// 01d6 <type>.W
void clif_map_type(struct map_session_data* sd, enum map_type type) {
@@ -5731,7 +5634,6 @@ void clif_map_type(struct map_session_data* sd, enum map_type type) {
WFIFOSET(fd,packet_len(0x1D6));
}
-
/// Updates PvP ranking (ZC_NOTIFY_RANKING).
/// 019a <id>.L <ranking>.L <total>.L
// FIXME: missing documentation for the 'type' parameter
@@ -5765,7 +5667,6 @@ void clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
}
}
-
/*==========================================
*
*------------------------------------------*/
@@ -5782,7 +5683,6 @@ void clif_map_property_mapall(int mapid, enum map_property property)
clif->send(buf,packet_len(0x199),&bl,ALL_SAMEMAP);
}
-
/// Notifies the client about the result of a refine attempt (ZC_ACK_ITEMREFINING).
/// 0188 <result>.W <index>.W <refine>.W
/// result:
@@ -5799,7 +5699,6 @@ void clif_refine(int fd, int fail, int index, int val)
WFIFOSET(fd,packet_len(0x188));
}
-
/// Notifies the client about the result of a weapon refine attempt (ZC_ACK_WEAPONREFINE).
/// 0223 <result>.L <nameid>.W
/// result:
@@ -5816,7 +5715,6 @@ void clif_upgrademessage(int fd, int result, int item_id)
WFIFOSET(fd,packet_len(0x223));
}
-
/// Whisper is transmitted to the destination player (ZC_WHISPER).
/// 0097 <packet len>.W <nick>.24B <message>.?B
/// 0097 <packet len>.W <nick>.24B <isAdmin>.L <message>.?B (PACKETVER >= 20091104)
@@ -5848,7 +5746,6 @@ void clif_wis_message(int fd, const char *nick, const char *mes, size_t mes_len)
#endif
}
-
/// Inform the player about the result of his whisper action (ZC_ACK_WHISPER).
/// 0098 <result>.B
/// result:
@@ -5868,11 +5765,10 @@ void clif_wis_end(int fd, int flag) {
#if PACKETVER >= 20131223
p.unknown = 0;
#endif
-
+
clif->send(&p, sizeof(p), &sd->bl, SELF);
}
-
/// Returns character name requested by char_id (ZC_ACK_REQNAME_BYGID).
/// 0194 <char id>.L <name>.24B
void clif_solved_charname(int fd, int charid, const char* name)
@@ -5885,7 +5781,6 @@ void clif_solved_charname(int fd, int charid, const char* name)
WFIFOSET(fd,packet_len(0x194));
}
-
/// Presents a list of items that can be carded/composed (ZC_ITEMCOMPOSITION_LIST).
/// 017b <packet len>.W { <name id>.W }*
void clif_use_card(struct map_session_data *sd,int idx)
@@ -5916,7 +5811,6 @@ void clif_use_card(struct map_session_data *sd,int idx)
WFIFOSET(fd, WFIFOW(fd, 2));
}
-
/// Notifies the client about the result of item carding/composition (ZC_ACK_ITEMCOMPOSITION).
/// 017d <equip index>.W <card index>.W <result>.B
/// result:
@@ -5937,7 +5831,6 @@ void clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int
WFIFOSET(fd,packet_len(0x17d));
}
-
/// Presents a list of items that can be identified (ZC_ITEMIDENTIFY_LIST).
/// 0177 <packet len>.W { <name id>.W }*
void clif_item_identify_list(struct map_session_data *sd)
@@ -5966,7 +5859,6 @@ void clif_item_identify_list(struct map_session_data *sd)
}
}
-
/// Notifies the client about the result of a item identify request (ZC_ACK_ITEMIDENTIFY).
/// 0179 <index>.W <result>.B
void clif_item_identified(struct map_session_data *sd,int idx,int flag)
@@ -5983,7 +5875,6 @@ void clif_item_identified(struct map_session_data *sd,int idx,int flag)
WFIFOSET(fd,packet_len(0x179));
}
-
/// Presents a list of items that can be repaired (ZC_REPAIRITEMLIST).
/// 01fc <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
void clif_item_repair_list(struct map_session_data *sd,struct map_session_data *dstsd, int lv)
@@ -6018,7 +5909,6 @@ void clif_item_repair_list(struct map_session_data *sd,struct map_session_data *
clif->skill_fail(sd,sd->ud.skill_id,USESKILL_FAIL_LEVEL,0);
}
-
/// Notifies the client about the result of a item repair request (ZC_ACK_ITEMREPAIR).
/// 01fe <index>.W <result>.B
/// index:
@@ -6042,7 +5932,6 @@ void clif_item_repaireffect(struct map_session_data *sd,int idx,int flag)
}
-
/// Displays a message, that an equipment got damaged (ZC_EQUIPITEM_DAMAGED).
/// 02bb <equip location>.W <account id>.L
void clif_item_damaged(struct map_session_data* sd, unsigned short position)
@@ -6059,7 +5948,6 @@ void clif_item_damaged(struct map_session_data* sd, unsigned short position)
WFIFOSET(fd,packet_len(0x2bb));
}
-
/// Presents a list of weapon items that can be refined [Taken from jAthena] (ZC_NOTIFY_WEAPONITEMLIST).
/// 0221 <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
void clif_item_refine_list(struct map_session_data *sd)
@@ -6096,7 +5984,6 @@ 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 <upgradeable>.B
void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv)
@@ -6119,7 +6006,6 @@ void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv
WFIFOSET(fd,packet_len(0x147));
}
-
/// Adds an item to character's cart.
/// 0124 <index>.W <amount>.L <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_CART)
/// 01c5 <index>.W <amount>.L <name id>.W <type>.B <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_CART2)
@@ -6158,7 +6044,6 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
WFIFOSET(fd,packet_len(cartaddType));
}
-
/// Deletes an item from character's cart (ZC_DELETE_ITEM_FROM_CART).
/// 0125 <index>.W <amount>.L
void clif_cart_delitem(struct map_session_data *sd,int n,int amount)
@@ -6176,7 +6061,6 @@ void clif_cart_delitem(struct map_session_data *sd,int n,int amount)
WFIFOSET(fd,packet_len(0x125));
}
-
/// Opens the shop creation menu (ZC_OPENSTORE).
/// 012d <num>.W
/// num:
@@ -6194,7 +6078,6 @@ void clif_openvendingreq(struct map_session_data* sd, int num)
WFIFOSET(fd,packet_len(0x12d));
}
-
/// Displays a vending board to target/area (ZC_STORE_ENTRY).
/// 0131 <owner id>.L <message>.80B
void clif_showvendingboard(struct block_list* bl, const char* message, int fd)
@@ -6216,7 +6099,6 @@ void clif_showvendingboard(struct block_list* bl, const char* message, int fd)
}
}
-
/// Removes a vending board from screen (ZC_DISAPPEAR_ENTRY).
/// 0132 <owner id>.L
void clif_closevendingboard(struct block_list* bl, int fd)
@@ -6236,7 +6118,6 @@ void clif_closevendingboard(struct block_list* bl, int fd)
}
}
-
/// Sends a list of items in a shop.
/// R 0133 <packet len>.W <owner id>.L { <price>.L <amount>.W <index>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC)
/// R 0800 <packet len>.W <owner id>.L <unique id>.L { <price>.L <amount>.W <index>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC2)
@@ -6292,7 +6173,6 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Shop purchase failure (ZC_PC_PURCHASE_RESULT_FROMMC).
/// 0135 <index>.W <amount>.W <result>.B
/// result:
@@ -6318,13 +6198,12 @@ void clif_buyvending(struct map_session_data* sd, int index, int amount, int fai
WFIFOSET(fd,packet_len(0x135));
}
-
/// Shop creation success (ZC_PC_PURCHASE_MYITEMLIST).
/// 0136 <packet len>.W <owner id>.L { <price>.L <index>.W <amount>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
void clif_openvending(struct map_session_data* sd, int id, struct s_vending* vending_items) {
int i,fd;
int count;
-
+
#if PACKETVER >= 20150226
const int item_length = 47;
#else
@@ -6358,7 +6237,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven
#endif
}
WFIFOSET(fd,WFIFOW(fd,2));
-
+
#if PACKETVER >= 20141022
/** should go elsewhere perhaps? it has to be bundled with this however. **/
WFIFOHEAD(fd, 3);
@@ -6368,7 +6247,6 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven
#endif
}
-
/// Inform merchant that someone has bought an item (ZC_DELETEITEM_FROM_MCSTORE).
/// 0137 <index>.W <amount>.W
void clif_vendingreport(struct map_session_data* sd, int index, int amount)
@@ -6385,7 +6263,6 @@ void clif_vendingreport(struct map_session_data* sd, int index, int amount)
WFIFOSET(fd,packet_len(0x137));
}
-
/// Result of organizing a party (ZC_ACK_MAKE_GROUP).
/// 00fa <result>.B
/// result:
@@ -6407,7 +6284,6 @@ void clif_party_created(struct map_session_data *sd,int result)
WFIFOSET(fd,packet_len(0xfa));
}
-
/// Adds new member to a party.
/// 0104 <account id>.L <role>.L <x>.W <y>.W <state>.B <party name>.24B <char name>.24B <map name>.16B (ZC_ADD_MEMBER_TO_GROUP)
/// 01e9 <account id>.L <role>.L <x>.W <y>.W <state>.B <party name>.24B <char name>.24B <map name>.16B <item pickup rule>.B <item share rule>.B (ZC_ADD_MEMBER_TO_GROUP2)
@@ -6446,7 +6322,6 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
clif->send(buf,packet_len(0x1e9),&sd->bl,PARTY);
}
-
/// Sends party information (ZC_GROUP_LIST).
/// 00fb <packet len>.W <party name>.24B { <account id>.L <nick>.24B <map name>.16B <role>.B <state>.B }*
/// role:
@@ -6488,7 +6363,6 @@ void clif_party_info(struct party_data* p, struct map_session_data *sd)
}
}
-
/// The player's 'party invite' state, sent during login (ZC_PARTY_CONFIG).
/// 02c9 <flag>.B
/// flag:
@@ -6506,7 +6380,6 @@ void clif_partyinvitationstate(struct map_session_data* sd)
WFIFOSET(fd, packet_len(0x2c9));
}
-
/// Party invitation request.
/// 00fe <party id>.L <party name>.24B (ZC_REQ_JOIN_GROUP)
/// 02c6 <party id>.L <party name>.24B (ZC_PARTY_JOIN_REQ)
@@ -6535,7 +6408,6 @@ void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
WFIFOSET(fd,packet_len(cmd));
}
-
/// Party invite result.
/// 00fd <nick>.24S <result>.B (ZC_ACK_REQ_JOIN_GROUP)
/// 02c5 <nick>.24S <result>.L (ZC_PARTY_JOIN_REQ_ACK)
@@ -6577,7 +6449,6 @@ void clif_party_inviteack(struct map_session_data* sd, const char* nick, int res
#endif
}
-
/// Updates party settings.
/// 0101 <exp option>.L (ZC_GROUPINFO_CHANGE)
/// 07d8 <exp option>.L <item pick rule>.B <item share rule>.B (ZC_REQ_GROUPINFO_CHANGE_V2)
@@ -6620,7 +6491,6 @@ void clif_party_option(struct party_data *p,struct map_session_data *sd,int flag
clif->send(buf,packet_len(cmd),&sd->bl,SELF);
}
-
/// 0105 <account id>.L <char name>.24B <result>.B (ZC_DELETE_MEMBER_FROM_GROUP).
/// result:
/// 0 = leave
@@ -6655,7 +6525,6 @@ void clif_party_withdraw(struct party_data* p, struct map_session_data* sd, int
clif->send(buf,packet_len(0x105),&sd->bl,SELF);
}
-
/// Party chat message (ZC_NOTIFY_CHAT_PARTY).
/// 0109 <packet len>.W <account id>.L <message>.?B
void clif_party_message(struct party_data* p, int account_id, const char* mes, int len)
@@ -6685,7 +6554,6 @@ void clif_party_message(struct party_data* p, int account_id, const char* mes, i
}
}
-
/// Updates the position of a party member on the minimap (ZC_NOTIFY_POSITION_TO_GROUPM).
/// 0107 <account id>.L <x>.W <y>.W
void clif_party_xy(struct map_session_data *sd)
@@ -6701,7 +6569,6 @@ void clif_party_xy(struct map_session_data *sd)
clif->send(buf,packet_len(0x107),&sd->bl,PARTY_SAMEMAP_WOS);
}
-
/*==========================================
* Sends x/y dot to a single fd. [Skotlex]
*------------------------------------------*/
@@ -6716,7 +6583,6 @@ void clif_party_xy_single(int fd, struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x107));
}
-
/// Updates HP bar of a party member.
/// 0106 <account id>.L <hp>.W <max hp>.W (ZC_NOTIFY_HP_TO_GROUPM)
/// 080e <account id>.L <hp>.L <max hp>.L (ZC_NOTIFY_HP_TO_GROUPM_R2)
@@ -6748,7 +6614,6 @@ void clif_party_hp(struct map_session_data *sd)
clif->send(buf,packet_len(cmd),&sd->bl,PARTY_AREA_WOS);
}
-
/*==========================================
* Sends HP bar to a single fd. [Skotlex]
*------------------------------------------*/
@@ -6799,7 +6664,6 @@ void clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
WFIFOSET(fd,packet_len(0x139));
}
-
/// Notifies the client about the result of an item produce request (ZC_ACK_REQMAKINGITEM).
/// 018f <result>.W <name id>.W
/// result:
@@ -6825,7 +6689,6 @@ void clif_produceeffect(struct map_session_data* sd,int flag,int nameid)
WFIFOSET(fd,packet_len(0x18f));
}
-
/// Initiates the pet taming process (ZC_START_CAPTURE).
/// 019e
void clif_catch_process(struct map_session_data *sd)
@@ -6840,7 +6703,6 @@ void clif_catch_process(struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x19e));
}
-
/// Displays the result of a pet taming attempt (ZC_TRYCAPTURE_MONSTER).
/// 01a0 <result>.B
/// 0 = failure
@@ -6858,7 +6720,6 @@ void clif_pet_roulette(struct map_session_data *sd,int data)
WFIFOSET(fd,packet_len(0x1a0));
}
-
/// Presents a list of pet eggs that can be hatched (ZC_PETEGG_LIST).
/// 01a6 <packet len>.W { <index>.W }*
void clif_sendegg(struct map_session_data *sd)
@@ -6889,7 +6750,6 @@ void clif_sendegg(struct map_session_data *sd)
sd->menuskill_val = -1;
}
-
/// Sends a specific pet data update (ZC_CHANGESTATE_PET).
/// 01a4 <type>.B <id>.L <data>.L
/// type:
@@ -6916,7 +6776,6 @@ void clif_send_petdata(struct map_session_data* sd, struct pet_data* pd, int typ
clif->send(buf, packet_len(0x1a4), &pd->bl, AREA);
}
-
/// Pet's base data (ZC_PROPERTY_PET).
/// 01a2 <name>.24B <renamed>.B <level>.W <hunger>.W <intimacy>.W <accessory id>.W <class>.W
void clif_send_petstatus(struct map_session_data *sd)
@@ -6943,7 +6802,6 @@ void clif_send_petstatus(struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x1a2));
}
-
/// Notification about a pet's emotion/talk (ZC_PET_ACT).
/// 01aa <id>.L <data>.L
/// data:
@@ -6972,7 +6830,6 @@ void clif_pet_emotion(struct pet_data *pd,int param)
clif->send(buf,packet_len(0x1aa),&pd->bl,AREA);
}
-
/// Result of request to feed a pet (ZC_FEED_PET).
/// 01a3 <result>.B <name id>.W
/// result:
@@ -6992,7 +6849,6 @@ void clif_pet_food(struct map_session_data *sd,int foodid,int fail)
WFIFOSET(fd,packet_len(0x1a3));
}
-
/// Presents a list of skills that can be auto-spelled (ZC_AUTOSPELLLIST).
/// 01cd { <skill id>.L }*7
void clif_autospell(struct map_session_data *sd,uint16 skill_lv)
@@ -7039,7 +6895,6 @@ void clif_autospell(struct map_session_data *sd,uint16 skill_lv)
sd->menuskill_val = skill_lv;
}
-
/// Devotion's visual effect (ZC_DEVOTIONLIST).
/// 01cf <devoter id>.L { <devotee id>.L }*5 <max distance>.W
void clif_devotion(struct block_list *src, struct map_session_data *tsd)
@@ -7100,7 +6955,6 @@ void clif_spiritball(struct block_list *bl) {
clif->send(buf, packet_len(0x1d0), bl, AREA);
}
-
/// Notifies clients in area of a character's combo delay (ZC_COMBODELAY).
/// 01d2 <account id>.L <delay>.L
void clif_combo_delay(struct block_list *bl,int wait)
@@ -7115,7 +6969,6 @@ void clif_combo_delay(struct block_list *bl,int wait)
clif->send(buf,packet_len(0x1d2),bl,AREA);
}
-
/// Notifies clients in area that a character has blade-stopped another (ZC_BLADESTOP).
/// 01d1 <src id>.L <dst id>.L <flag>.L
/// flag:
@@ -7135,7 +6988,6 @@ void clif_bladestop(struct block_list *src, int dst_id, int active)
clif->send(buf,packet_len(0x1d1),src,AREA);
}
-
/// MVP effect (ZC_MVP).
/// 010c <account id>.L
void clif_mvp_effect(struct map_session_data *sd)
@@ -7149,7 +7001,6 @@ void clif_mvp_effect(struct map_session_data *sd)
clif->send(buf,packet_len(0x10c),&sd->bl,AREA);
}
-
/// MVP item reward message (ZC_MVP_GETTING_ITEM).
/// 010a <name id>.W
void clif_mvp_item(struct map_session_data *sd,int nameid)
@@ -7168,7 +7019,6 @@ void clif_mvp_item(struct map_session_data *sd,int nameid)
WFIFOSET(fd,packet_len(0x10a));
}
-
/// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP).
/// 010b <exp>.L
void clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
@@ -7184,7 +7034,6 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
WFIFOSET(fd,packet_len(0x10b));
}
-
/// Dropped MVP item reward message (ZC_THROW_MVPITEM).
/// 010d
///
@@ -7199,7 +7048,6 @@ void clif_mvp_noitem(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0x10d));
}
-
/// Guild creation result (ZC_RESULT_MAKE_GUILD).
/// 0167 <result>.B
/// result:
@@ -7220,7 +7068,6 @@ void clif_guild_created(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0x167));
}
-
/// Notifies the client that it is belonging to a guild (ZC_UPDATE_GDID).
/// 016c <guild id>.L <emblem id>.L <mode>.L <ismaster>.B <inter sid>.L <guild name>.24B
/// mode: @see enum guild_permission
@@ -7243,7 +7090,6 @@ void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
WFIFOSET(fd,packet_len(0x16c));
}
-
/// Guild member login notice.
/// 016d <account id>.L <char id>.L <status>.L (ZC_UPDATE_CHARSTAT)
/// 01f2 <account id>.L <char id>.L <status>.L <gender>.W <hair style>.W <hair color>.W (ZC_UPDATE_CHARSTAT2)
@@ -7316,7 +7162,6 @@ void clif_guild_send_onlineinfo(struct map_session_data *sd)
clif->send(buf, p_len*count, &sd->bl, SELF);
}
-
/// Bitmask of enabled guild window tabs (ZC_ACK_GUILD_MENUINTERFACE).
/// 014e <menu flag>.L
/// menu flag:
@@ -7340,7 +7185,6 @@ void clif_guild_masterormember(struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x14e));
}
-
/// Guild basic information (Territories [Valaris])
/// 0150 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B (ZC_GUILD_INFO)
/// 01b6 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B <zeny>.L (ZC_GUILD_INFO2)
@@ -7376,7 +7220,6 @@ void clif_guild_basicinfo(struct map_session_data *sd) {
WFIFOSET(fd,packet_len(0x1b6));
}
-
/// Guild alliance and opposition list (ZC_MYGUILD_BASIC_INFO).
/// 014c <packet len>.W { <relation>.L <guild id>.L <guild name>.24B }*
void clif_guild_allianceinfo(struct map_session_data *sd)
@@ -7404,7 +7247,6 @@ void clif_guild_allianceinfo(struct map_session_data *sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Guild member manager information (ZC_MEMBERMGR_INFO).
/// 0154 <packet len>.W { <account>.L <char id>.L <hair style>.W <hair color>.W <gender>.W <class>.W <level>.W <contrib exp>.L <state>.L <position>.L <memo>.50B <name>.24B }*
/// state:
@@ -7448,7 +7290,6 @@ void clif_guild_memberlist(struct map_session_data *sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Guild position name information (ZC_POSITION_ID_NAME_INFO).
/// 0166 <packet len>.W { <position id>.L <position name>.24B }*
void clif_guild_positionnamelist(struct map_session_data *sd) {
@@ -7470,7 +7311,6 @@ void clif_guild_positionnamelist(struct map_session_data *sd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Guild position information (ZC_POSITION_INFO).
/// 0160 <packet len>.W { <position id>.L <mode>.L <ranking>.L <pay rate>.L }*
/// mode: @see enum guild_permission
@@ -7498,7 +7338,6 @@ void clif_guild_positioninfolist(struct map_session_data *sd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Notifies clients in a guild about updated position information (ZC_ACK_CHANGE_GUILD_POSITIONINFO).
/// 0174 <packet len>.W { <position id>.L <mode>.L <ranking>.L <pay rate>.L <position name>.24B }*
/// mode: @see enum guild_permission
@@ -7527,7 +7366,6 @@ void clif_guild_positionchanged(struct guild *g,int idx)
clif->send(buf,WBUFW(buf,2),&sd->bl,GUILD);
}
-
/// Notifies clients in a guild about updated member position assignments (ZC_ACK_REQ_CHANGE_MEMBERS).
/// 0156 <packet len>.W { <account id>.L <char id>.L <position id>.L }*
void clif_guild_memberpositionchanged(struct guild *g,int idx)
@@ -7551,7 +7389,6 @@ void clif_guild_memberpositionchanged(struct guild *g,int idx)
clif->send(buf,WBUFW(buf,2),&sd->bl,GUILD);
}
-
/// Sends emblems bitmap data to the client that requested it (ZC_GUILD_EMBLEM_IMG).
/// 0152 <packet len>.W <guild id>.L <emblem id>.L <emblem data>.?B
void clif_guild_emblem(struct map_session_data *sd,struct guild *g)
@@ -7573,7 +7410,6 @@ void clif_guild_emblem(struct map_session_data *sd,struct guild *g)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Sends update of the guild id/emblem id to everyone in the area (ZC_CHANGE_GUILD).
/// 01b4 <id>.L <guild id>.L <emblem id>.W
void clif_guild_emblem_area(struct block_list* bl)
@@ -7591,7 +7427,6 @@ void clif_guild_emblem_area(struct block_list* bl)
clif->send(buf, 12, bl, AREA_WOS);
}
-
/// 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 <upgradeable>.B }*
void clif_guild_skillinfo(struct map_session_data* sd)
@@ -7631,7 +7466,6 @@ void clif_guild_skillinfo(struct map_session_data* sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Sends guild notice to client (ZC_GUILD_NOTICE).
/// 016f <subject>.60B <notice>.120B
void clif_guild_notice(struct map_session_data* sd, struct guild* g)
@@ -7656,7 +7490,6 @@ void clif_guild_notice(struct map_session_data* sd, struct guild* g)
WFIFOSET(fd,packet_len(0x16f));
}
-
/// Guild invite (ZC_REQ_JOIN_GUILD).
/// 016a <guild id>.L <guild name>.24B
void clif_guild_invite(struct map_session_data *sd,struct guild *g)
@@ -7674,7 +7507,6 @@ void clif_guild_invite(struct map_session_data *sd,struct guild *g)
WFIFOSET(fd,packet_len(0x16a));
}
-
/// Reply to invite request (ZC_ACK_REQ_JOIN_GUILD).
/// 0169 <answer>.B
/// answer:
@@ -7695,7 +7527,6 @@ void clif_guild_inviteack(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0x169));
}
-
/// Notifies clients of a guild of a leaving member (ZC_ACK_LEAVE_GUILD).
/// 015a <char name>.24B <reason>.40B
void clif_guild_leave(struct map_session_data *sd,const char *name,const char *mes)
@@ -7710,7 +7541,6 @@ void clif_guild_leave(struct map_session_data *sd,const char *name,const char *m
clif->send(buf,packet_len(0x15a),&sd->bl,GUILD_NOBG);
}
-
/// Notifies clients of a guild of an expelled member.
/// 015c <char name>.24B <reason>.40B <account name>.24B (ZC_ACK_BAN_GUILD)
/// 0839 <char name>.24B <reason>.40B (ZC_ACK_BAN_GUILD_SSO)
@@ -7736,7 +7566,6 @@ void clif_guild_expulsion(struct map_session_data* sd, const char* name, const c
clif->send(buf, packet_len(cmd), &sd->bl, GUILD_NOBG);
}
-
/// Guild expulsion list (ZC_BAN_LIST).
/// 0163 <packet len>.W { <char name>.24B <account name>.24B <reason>.40B }*
/// 0163 <packet len>.W { <char name>.24B <reason>.40B }* (PACKETVER >= 20100803)
@@ -7779,7 +7608,6 @@ void clif_guild_expulsionlist(struct map_session_data* sd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Guild chat message (ZC_GUILD_CHAT).
/// 017f <packet len>.W <message>.?B
void clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
@@ -7821,7 +7649,6 @@ void clif_guild_reqalliance(struct map_session_data *sd,int account_id,const cha
WFIFOSET(fd,packet_len(0x171));
}
-
/// Notifies the client about the result of a alliance request (ZC_ACK_REQ_ALLY_GUILD).
/// 0173 <answer>.B
/// answer:
@@ -7844,7 +7671,6 @@ void clif_guild_allianceack(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0x173));
}
-
/// Notifies the client that a alliance or opposition has been removed (ZC_DELETE_RELATED_GUILD).
/// 0184 <other guild id>.L <relation>.L
/// relation:
@@ -7866,7 +7692,6 @@ void clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
WFIFOSET(fd,packet_len(0x184));
}
-
/// Notifies the client about the result of a opposition request (ZC_ACK_REQ_HOSTILE_GUILD).
/// 0181 <result>.B
/// result:
@@ -7887,7 +7712,6 @@ void clif_guild_oppositionack(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0x181));
}
-
/// Adds alliance or opposition (ZC_ADD_RELATED_GUILD).
/// 0185 <relation>.L <guild id>.L <guild name>.24B
/*
@@ -7902,7 +7726,6 @@ void clif_guild_allianceadded(struct guild *g,int idx)
}
*/
-
/// Notifies the client about the result of a guild break (ZC_ACK_DISORGANIZE_GUILD_RESULT).
/// 015e <reason>.L
/// 0 = success
@@ -7921,7 +7744,6 @@ void clif_guild_broken(struct map_session_data *sd,int flag)
WFIFOSET(fd,packet_len(0x15e));
}
-
/// Displays emotion on an object (ZC_EMOTION).
/// 00c0 <id>.L <type>.B
/// type:
@@ -7938,7 +7760,6 @@ void clif_emotion(struct block_list *bl,int type)
clif->send(buf,packet_len(0xc0),bl,AREA);
}
-
/// Displays the contents of a talkiebox trap (ZC_TALKBOX_CHATCONTENTS).
/// 0191 <id>.L <contents>.80B
void clif_talkiebox(struct block_list* bl, const char* talkie)
@@ -7953,7 +7774,6 @@ void clif_talkiebox(struct block_list* bl, const char* talkie)
clif->send(buf,packet_len(0x191),bl,AREA);
}
-
/// Displays wedding effect centered on an object (ZC_CONGRATULATION).
/// 01ea <id>.L
void clif_wedding_effect(struct block_list *bl)
@@ -7967,7 +7787,6 @@ void clif_wedding_effect(struct block_list *bl)
clif->send(buf, packet_len(0x1ea), bl, AREA);
}
-
/// Notifies the client of the name of the partner character (ZC_COUPLENAME).
/// 01e6 <partner name>.24B
void clif_callpartner(struct map_session_data *sd) {
@@ -7992,7 +7811,6 @@ void clif_callpartner(struct map_session_data *sd) {
clif->send(buf, packet_len(0x1e6), &sd->bl, AREA);
}
-
/// Initiates the partner "taming" process [DracoRPG] (ZC_START_COUPLE).
/// 01e4
/// This packet while still implemented by the client is no longer being officially used.
@@ -8009,7 +7827,6 @@ void clif_marriage_process(struct map_session_data *sd)
}
*/
-
/// Notice of divorce (ZC_DIVORCE).
/// 0205 <partner name>.24B
void clif_divorced(struct map_session_data* sd, const char* name)
@@ -8024,7 +7841,6 @@ void clif_divorced(struct map_session_data* sd, const char* name)
WFIFOSET(fd, packet_len(0x205));
}
-
/// Marriage proposal (ZC_REQ_COUPLE).
/// 01e2 <account id>.L <char id>.L <char name>.24B
/// This packet while still implemented by the client is no longer being officially used.
@@ -8066,7 +7882,6 @@ void clif_disp_message(struct block_list* src, const char* mes, size_t len, enum
clif->send(buf, WBUFW(buf,2), src, target);
}
-
/// Notifies the client about the result of a request to disconnect another player (ZC_ACK_DISCONNECT_CHARACTER).
/// 00cd <result>.L (unknown packet version or invalid information at packet_len_table)
/// 00cd <result>.B
@@ -8086,7 +7901,6 @@ void clif_GM_kickack(struct map_session_data *sd, int result)
WFIFOSET(fd, packet_len(0xcd));
}
-
void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) {
int fd;
@@ -8102,7 +7916,6 @@ void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) {
clif->GM_kickack(sd, 1);
}
-
/// Displays various manner-related status messages (ZC_ACK_GIVE_MANNER_POINT).
/// 014a <result>.L
/// result:
@@ -8124,7 +7937,6 @@ void clif_manner_message(struct map_session_data* sd, uint32 type)
WFIFOSET(fd, packet_len(0x14a));
}
-
/// 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:
@@ -8144,7 +7956,6 @@ void clif_GM_silence(struct map_session_data* sd, struct map_session_data* tsd,
WFIFOSET(fd, packet_len(0x14b));
}
-
/// Notifies the client about the result of a request to allow/deny whispers from a player (ZC_SETTING_WHISPER_PC).
/// 00d1 <type>.B <result>.B
/// type:
@@ -8188,7 +7999,6 @@ void clif_wisall(struct map_session_data *sd,int type,int flag) {
WFIFOSET(fd,packet_len(0xd2));
}
-
/// Play a BGM! [Rikter/Yommy] (ZC_PLAY_NPC_BGM).
/// 07fe <bgm>.24B
void clif_playBGM(struct map_session_data* sd, const char* name)
@@ -8204,7 +8014,6 @@ void clif_playBGM(struct map_session_data* sd, const char* name)
WFIFOSET(fd,packet_len(0x7fe));
}
-
/// Plays/stops a wave sound (ZC_SOUND).
/// 01d3 <file name>.24B <act>.B <term>.L <npc id>.L
/// file name:
@@ -8251,7 +8060,6 @@ void clif_soundeffectall(struct block_list* bl, const char* name, int type, enum
clif->send(buf, packet_len(0x1d3), bl, coverage);
}
-
/// Displays special effects (npcs, weather, etc) [Valaris] (ZC_NOTIFY_EFFECT2).
/// 01f3 <id>.L <effect id>.L
/// effect id:
@@ -8285,7 +8093,6 @@ void clif_specialeffect_single(struct block_list* bl, int type, int fd) {
WFIFOSET(fd,10);
}
-
/// Notifies clients of an special/visual effect that accepts an value (ZC_NOTIFY_EFFECT3).
/// 0284 <id>.L <effect id>.L <num data>.L
/// effect id:
@@ -8456,7 +8263,6 @@ void clif_refresh(struct map_session_data *sd)
clif->refresh_storagewindow(sd);
}
-
/// Updates the object's (bl) name on client.
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
@@ -8596,7 +8402,6 @@ void clif_charnameack (int fd, struct block_list *bl)
}
}
-
//Used to update when a char leaves a party/guild. [Skotlex]
//Needed because when you send a 0x95 packet, the client will not remove the cached party/guild info that is not sent.
void clif_charnameupdate (struct map_session_data *ssd)
@@ -8651,7 +8456,6 @@ void clif_charnameupdate (struct map_session_data *ssd)
clif->send(buf, packet_len(cmd), &ssd->bl, AREA);
}
-
/// Taekwon Jump (TK_HIGHJUMP) effect (ZC_HIGHJUMP).
/// 01ff <id>.L <x>.W <y>.W
///
@@ -8676,7 +8480,6 @@ void clif_slide(struct block_list *bl, int x, int y)
}
}
-
/// Public chat message (ZC_NOTIFY_CHAT). lordalfa/Skotlex - used by @me as well
/// 008d <packet len>.W <id>.L <message>.?B
void clif_disp_overhead(struct block_list *bl, const char* mes)
@@ -8724,7 +8527,6 @@ void clif_party_xy_remove(struct map_session_data *sd)
clif->send(buf,packet_len(0x107),&sd->bl,PARTY_SAMEMAP_WOS);
}
-
/// Displays a skill message (thanks to Rayce) (ZC_SKILLMSG).
/// 0215 <msg id>.L
/// msg id:
@@ -8753,7 +8555,6 @@ void clif_gospel_info(struct map_session_data *sd, int type)
}
-
/// Multi-purpose mission information packet (ZC_STARSKILL).
/// 020e <mapname>.24B <monster_id>.L <star>.B <result>.B
/// result:
@@ -8844,7 +8645,6 @@ void clif_feel_hate_reset(struct map_session_data *sd)
clif->starskill(sd, "", 0, 0, 30);
}
-
/// Equip window (un)tick ack (ZC_CONFIG).
/// 02d9 <type>.L <value>.L
/// type:
@@ -8865,7 +8665,6 @@ void clif_equiptickack(struct map_session_data* sd, int flag)
WFIFOSET(fd, packet_len(0x2d9));
}
-
/// The player's 'view equip' state, sent during login (ZC_CONFIG_NOTIFY).
/// 02da <open equip window>.B
/// open equip window:
@@ -8883,7 +8682,6 @@ void clif_equpcheckbox(struct map_session_data* sd)
WFIFOSET(fd, packet_len(0x2da));
}
-
/// Sends info about a player's equipped items.
/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <up-viewid>.W <mid-viewid>.W <low-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.26B* (ZC_EQUIPWIN_MICROSCOPE)
/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE, PACKETVER >= 20100629)
@@ -8925,7 +8723,6 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
clif->send(&viewequip_list, viewequip_list.PacketLength, &sd->bl, SELF);
}
-
/**
* Displays a string from msgstringtable.txt (ZC_MSG).
*
@@ -9165,7 +8962,6 @@ void clif_channel_msg2(struct channel_data *chan, char *msg)
// ------------
// Parses incoming (player) connection
-
/// Request to connect to map-server.
/// 0072 <account id>.L <char id>.L <auth code>.L <client time>.L <gender>.B (CZ_ENTER)
/// 0436 <account id>.L <char id>.L <auth code>.L <client time>.L <gender>.B (CZ_ENTER2)
@@ -9600,7 +9396,6 @@ void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) {
#endif
}
-
/// Server's tick (ZC_NOTIFY_TIME).
/// 007f <time>.L
void clif_notify_time(struct map_session_data* sd, int64 time) {
@@ -9615,7 +9410,6 @@ void clif_notify_time(struct map_session_data* sd, int64 time) {
WFIFOSET(fd,packet_len(0x7f));
}
-
void clif_parse_TickSend(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for server's tick.
/// 007e <client tick>.L (CZ_REQUEST_TIME)
@@ -9628,7 +9422,6 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd)
clif->notify_time(sd, timer->gettick());
}
-
/// Sends hotkey bar.
/// 02b9 { <is skill>.B <id>.L <count>.W }*27 (ZC_SHORTCUT_KEY_LIST)
/// 07d9 { <is skill>.B <id>.L <count>.W }*36 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090603)
@@ -9677,7 +9470,6 @@ void clif_parse_Hotkey(int fd, struct map_session_data *sd) {
#endif
}
-
/// Displays cast-like progress bar (ZC_PROGRESS).
/// 02f0 <color>.L <time>.L
/* TODO ZC_PROGRESS_ACTOR <account_id>.L */
@@ -9695,7 +9487,6 @@ void clif_progressbar(struct map_session_data * sd, unsigned int color, unsigned
WFIFOSET(fd,packet_len(0x2f0));
}
-
/// Removes an ongoing progress bar (ZC_PROGRESS_CANCEL).
/// 02f2
void clif_progressbar_abort(struct map_session_data * sd)
@@ -9710,7 +9501,6 @@ void clif_progressbar_abort(struct map_session_data * sd)
WFIFOSET(fd,packet_len(0x2f2));
}
-
void clif_parse_progressbar(int fd, struct map_session_data * sd) __attribute__((nonnull (2)));
/// Notification from the client, that the progress bar has reached 100% (CZ_PROGRESS).
/// 02f1
@@ -9725,7 +9515,6 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd)
npc->scriptcont(sd, npc_id, false);
}
-
void clif_parse_WalkToXY(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to walk to a certain position on the current map.
/// 0085 <dest>.3B (CZ_REQUEST_MOVE)
@@ -9761,7 +9550,6 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
unit->walktoxy(&sd->bl, x, y, 4);
}
-
/// Notification about the result of a disconnect request (ZC_ACK_REQ_DISCONNECT).
/// 018b <result>.W
/// result:
@@ -9781,7 +9569,6 @@ void clif_disconnect_ack(struct map_session_data* sd, short result)
WFIFOSET(fd,packet_len(0x18b));
}
-
void clif_parse_QuitGame(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to disconnect from server (CZ_REQ_DISCONNECT).
/// 018a <type>.W
@@ -9801,7 +9588,6 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Requesting unit's name.
/// 0094 <id>.L (CZ_REQNAME)
@@ -9982,17 +9768,16 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
WFIFOW(fd,0) = 0x8e;
}
WFIFOSET(fd, WFIFOW(fd,2));
-
+
// Chat logging type 'O' / Global Chat
logs->chat(LOG_CHAT_GLOBAL, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message);
-
+
#ifdef PCRE_SUPPORT
// trigger listening npcs
map->foreachinrange(npc_chat->sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl);
#endif
}
-
void clif_parse_MapMove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /mm /mapmove (as @rura GM command) (CZ_MOVETO_MAP).
/// Request to warp to a map on given coordinates.
@@ -10008,7 +9793,6 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-
/// Updates body and head direction of an object (ZC_CHANGE_DIRECTION).
/// 009c <id>.L <head dir>.W <dir>.B
/// head dir:
@@ -10043,7 +9827,6 @@ void clif_changed_dir(struct block_list *bl, enum send_target target)
}
}
-
void clif_parse_ChangeDir(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change own body and head direction.
/// 009b <head dir>.W <dir>.B (CZ_CHANGE_DIRECTION)
@@ -10060,7 +9843,6 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
clif->changed_dir(&sd->bl, AREA_WOS);
}
-
void clif_parse_Emotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to show an emotion (CZ_REQ_EMOTION).
/// 00bf <type>.B
@@ -10095,7 +9877,6 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
clif->skill_fail(sd, 1, USESKILL_FAIL_LEVEL, 1);
}
-
/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(struct map_session_data* sd, int count) {
@@ -10110,7 +9891,6 @@ void clif_user_count(struct map_session_data* sd, int count) {
WFIFOSET(fd,packet_len(0xc2));
}
-
void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /w /who (CZ_REQ_USER_COUNT).
/// Request to display amount of currently connected players.
@@ -10119,10 +9899,9 @@ void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) {
clif->user_count(sd, map->getusers());
}
-
void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick) {
struct block_list *target = NULL;
-
+
nullpo_retv(sd);
if (pc_isdead(sd)) {
clif->clearunit_area(&sd->bl, CLR_DEAD);
@@ -10149,12 +9928,11 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
switch(action_type) {
case 0x00: // once attack
case 0x07: // continuous attack
-
if( (target = map->id2bl(target_id)) && target->type == BL_NPC ) {
npc->click(sd,(TBL_NPC*)target);
return;
}
-
+
if( pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE )
return;
@@ -10240,7 +10018,6 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
);
}
-
void clif_parse_Restart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Response to the death/system menu (CZ_RESTART).
/// 00b2 <type>.B
@@ -10267,7 +10044,6 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) {
}
}
-
void clif_parse_WisMessage(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Validates and processes whispered messages (CZ_WHISPER).
/// 0096 <packet len>.W <nick>.24B <message>.?B
@@ -10403,7 +10179,6 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
clif->wis_message(dstsd->fd, sd->status.name, message, messagelen);
}
-
void clif_parse_Broadcast(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /b /nb (CZ_BROADCAST).
/// Request to broadcast a message on whole server.
@@ -10420,7 +10195,6 @@ void clif_parse_Broadcast(int fd, struct map_session_data* sd) {
atcommand->exec(fd, sd, command, true);
}
-
void clif_parse_TakeItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to pick up an item.
/// 009f <id>.L (CZ_ITEM_PICKUP)
@@ -10465,7 +10239,6 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
clif->additem(sd,0,0,6);
}
-
void clif_parse_DropItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to drop an item.
/// 00a2 <index>.W <amount>.W (CZ_ITEM_THROW)
@@ -10503,7 +10276,6 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
clif->dropitem(sd, item_index, 0);
}
-
void clif_parse_UseItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use an item.
/// 00a7 <index>.W <account id>.L (CZ_USE_ITEM)
@@ -10532,7 +10304,6 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
clif->useitemack(sd,n,0,false); //Send an empty ack packet or the client gets stuck.
}
-
void clif_parse_EquipItem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to equip an item (CZ_REQ_WEAR_EQUIP).
/// 00a9 <index>.W <position>.W
@@ -10608,7 +10379,6 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
pc->unequipitem(sd,index, PCUNEQUIPITEM_RECALC);
}
-
void clif_parse_NpcClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to start a conversation with an NPC (CZ_CONTACTNPC).
/// 0090 <id>.L <type>.B
@@ -10649,7 +10419,6 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
}
}
-
void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Selection between buy/sell was made (CZ_ACK_SELECT_DEALTYPE).
/// 00c5 <id>.L <type>.B
@@ -10663,7 +10432,6 @@ void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
npc->buysellsel(sd, RFIFOL(fd,2), RFIFOB(fd,6));
}
-
/// Notification about the result of a purchase attempt from an NPC shop (ZC_PC_PURCHASE_RESULT).
/// 00ca <result>.B
/// result:
@@ -10682,7 +10450,6 @@ void clif_npc_buy_result(struct map_session_data* sd, unsigned char result) {
WFIFOSET(fd,packet_len(0xca));
}
-
void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to buy chosen items from npc shop (CZ_PC_PURCHASE_ITEMLIST).
/// 00c8 <packet len>.W { <amount>.W <name id>.W }*
@@ -10702,7 +10469,6 @@ void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
clif->npc_buy_result(sd, result);
}
-
/// Notification about the result of a sell attempt to an NPC shop (ZC_PC_SELL_RESULT).
/// 00cb <result>.B
/// result:
@@ -10719,7 +10485,6 @@ void clif_npc_sell_result(struct map_session_data* sd, unsigned char result) {
WFIFOSET(fd,packet_len(0xcb));
}
-
void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to sell chosen items to npc shop (CZ_PC_SELL_ITEMLIST).
/// 00c9 <packet len>.W { <index>.W <amount>.W }*
@@ -10741,7 +10506,6 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
clif->npc_sell_result(sd, fail);
}
-
void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Chatroom creation request (CZ_CREATE_CHATROOM).
/// 00d5 <packet len>.W <limit>.W <type>.B <passwd>.8B <title>.?B
@@ -10782,7 +10546,6 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
chat->create_pc_chat(sd, s_title, s_password, limit, pub);
}
-
void clif_parse_ChatAddMember(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Chatroom join request (CZ_REQ_ENTER_ROOM).
/// 00d9 <chat ID>.L <passwd>.8B
@@ -10794,7 +10557,6 @@ void clif_parse_ChatAddMember(int fd, struct map_session_data* sd)
chat->join(sd,chatid,password);
}
-
void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Chatroom properties adjustment request (CZ_CHANGE_CHATROOM).
/// 00de <packet len>.W <limit>.W <type>.B <passwd>.8B <title>.?B
@@ -10820,7 +10582,6 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
chat->change_status(sd, s_title, s_password, limit, pub);
}
-
void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to change the chat room ownership (CZ_REQ_ROLE_CHANGE).
/// 00e0 <role>.L <nick>.24B
@@ -10832,7 +10593,6 @@ void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd)
chat->change_owner(sd,(char*)RFIFOP(fd,6));
}
-
void clif_parse_KickFromChat(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a player from chat room (CZ_REQ_EXPEL_MEMBER).
/// 00e2 <name>.24B
@@ -10841,7 +10601,6 @@ void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
chat->kick(sd,(char*)RFIFOP(fd,2));
}
-
void clif_parse_ChatLeave(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to leave the current chatroom (CZ_EXIT_ROOM).
/// 00e3
@@ -10850,7 +10609,6 @@ void clif_parse_ChatLeave(int fd, struct map_session_data* sd)
chat->leave(sd, false);
}
-
//Handles notifying asker and rejecter of what has just occurred.
//Type is used to determine the correct msg_txt to use:
//0:
@@ -10866,7 +10624,6 @@ void clif_noask_sub(struct map_session_data *src, struct map_session_data *targe
clif_disp_onlyself(target, output, strlen(output));
}
-
void clif_parse_TradeRequest(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to begin a trade (CZ_REQ_EXCHANGE_ITEM).
/// 00e4 <account id>.L
@@ -10892,7 +10649,6 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) {
trade->request(sd,t_sd);
}
-
void clif_parse_TradeAck(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a trade request (CZ_ACK_EXCHANGE_ITEM).
/// 00e6 <result>.B
@@ -10904,7 +10660,6 @@ void clif_parse_TradeAck(int fd,struct map_session_data *sd)
trade->ack(sd,RFIFOB(fd,2));
}
-
void clif_parse_TradeAddItem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item to current trade (CZ_ADD_EXCHANGE_ITEM).
/// 00e8 <index>.W <amount>.L
@@ -10919,7 +10674,6 @@ void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
trade->additem(sd, index, (short)amount);
}
-
void clif_parse_TradeOk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to lock items in current trade (CZ_CONCLUDE_EXCHANGE_ITEM).
/// 00eb
@@ -10928,7 +10682,6 @@ void clif_parse_TradeOk(int fd,struct map_session_data *sd)
trade->ok(sd);
}
-
void clif_parse_TradeCancel(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to cancel current trade (CZ_CANCEL_EXCHANGE_ITEM).
/// 00ed
@@ -10937,7 +10690,6 @@ void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
trade->cancel(sd);
}
-
void clif_parse_TradeCommit(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to commit current trade (CZ_EXEC_EXCHANGE_ITEM).
/// 00ef
@@ -10946,7 +10698,6 @@ void clif_parse_TradeCommit(int fd,struct map_session_data *sd)
trade->commit(sd);
}
-
void clif_parse_StopAttack(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to stop chasing/attacking an unit (CZ_CANCEL_LOCKON).
/// 0118
@@ -10955,7 +10706,6 @@ void clif_parse_StopAttack(int fd,struct map_session_data *sd)
pc_stop_attack(sd);
}
-
void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from inventory to cart (CZ_MOVE_ITEM_FROM_BODY_TO_CART).
/// 0126 <index>.W <amount>.L
@@ -10971,7 +10721,6 @@ void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) {
}
}
-
void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from cart to inventory (CZ_MOVE_ITEM_FROM_CART_TO_BODY).
/// 0127 <index>.W <amount>.L
@@ -10982,7 +10731,6 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
pc->getitemfromcart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));
}
-
void clif_parse_RemoveOption(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to remove cart/falcon/peco/dragon (CZ_REQ_CARTOFF).
/// 012a
@@ -11001,7 +10749,6 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
}
}
-
void clif_parse_ChangeCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change cart's visual look (CZ_REQ_CHANGECART).
/// 01af <num>.W
@@ -11009,7 +10756,6 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{// TODO: State tracking?
int type;
-
if( pc->checkskill(sd, MC_CHANGECART) < 1 )
return;
@@ -11041,7 +10787,6 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
pc->setcart(sd,type);
}
-
void clif_parse_StatusUp(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to increase status (CZ_STATUS_CHANGE).
/// 00bb <status id>.W <amount>.B
@@ -11062,7 +10807,6 @@ void clif_parse_StatusUp(int fd,struct map_session_data *sd) {
pc->statusup(sd, RFIFOW(fd,2), increase_amount);
}
-
void clif_parse_SkillUp(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to increase level of a skill (CZ_UPGRADE_SKILLLEVEL).
/// 0112 <skill id>.W
@@ -11174,7 +10918,6 @@ void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct map_se
unit->skilluse_pos(&md->bl, x, y, skill_id, skill_lv);
}
-
void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a targeted skill.
/// 0113 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL)
@@ -11306,7 +11049,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
clif->pUseSkillToPos_mercenary(sd->md, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo);
return;
}
-
+
#ifdef RENEWAL
if( sd->state.workinprogress&1 ){
clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message.
@@ -11369,7 +11112,6 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
}
}
-
void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a ground skill.
/// 0116 <skill lv>.W <skill id>.W <x>.W <y>.W (CZ_USE_SKILL_TOGROUND)
@@ -11391,7 +11133,6 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
);
}
-
void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a ground skill with text.
/// 0190 <skill lv>.W <skill id>.W <x>.W <y>.W <contents>.80B (CZ_USE_SKILL_TOGROUND_WITHTALKBOX)
@@ -11413,7 +11154,6 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd)
);
}
-
void clif_parse_UseSkillMap(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Answer to map selection dialog (CZ_SELECT_WARPPOINT).
/// 011b <skill id>.W <map name>.16B
@@ -11438,7 +11178,6 @@ void clif_parse_UseSkillMap(int fd, struct map_session_data* sd)
skill->castend_map(sd,skill_id,map_name);
}
-
void clif_parse_RequestMemo(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to set a memo on current map (CZ_REMEMBER_WARPPOINT).
/// 011d
@@ -11448,7 +11187,6 @@ void clif_parse_RequestMemo(int fd,struct map_session_data *sd)
pc->memo(sd,-1);
}
-
void clif_parse_ProduceMix(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to pharmacy item selection dialog (CZ_REQMAKINGITEM).
/// 018e <name id>.W { <material id>.W }*3
@@ -11474,7 +11212,6 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_Cooking(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to mixing item selection dialog (CZ_REQ_MAKINGITEM).
/// 025b <mk type>.W <name id>.W
@@ -11503,7 +11240,6 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) {
clif_menuskill_clear(sd);
}
-
void clif_parse_RepairItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to repair weapon item selection dialog (CZ_REQ_ITEMREPAIR).
/// 01fd <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W
@@ -11521,7 +11257,6 @@ void clif_parse_RepairItem(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to refine weapon item selection dialog (CZ_REQ_WEAPONREFINE).
/// 0222 <index>.L
@@ -11544,7 +11279,6 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to script menu dialog (CZ_CHOOSE_MENU).
/// 00b8 <npc id>.L <choice>.B
@@ -11575,7 +11309,6 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
npc->scriptcont(sd,npc_id, false);
}
-
void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC dialog 'next' click (CZ_REQ_NEXT_SCRIPT).
/// 00b9 <npc id>.L
@@ -11584,7 +11317,6 @@ void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
npc->scriptcont(sd,RFIFOL(fd,2), false);
}
-
void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC numeric input dialog value (CZ_INPUT_EDITDLG).
/// 0143 <npc id>.L <value>.L
@@ -11600,7 +11332,6 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
npc->scriptcont(sd, npcid, false);
}
-
void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// NPC text input dialog value (CZ_INPUT_EDITDLGSTR).
/// 01d5 <packet len>.W <npc id>.L <string>.?B
@@ -11617,7 +11348,6 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd)
npc->scriptcont(sd, npcid, false);
}
-
void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC dialog 'close' click (CZ_CLOSE_DIALOG).
/// 0146 <npc id>.L
@@ -11629,7 +11359,6 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
npc->scriptcont(sd, RFIFOL(fd,2), true);
}
-
void clif_parse_ItemIdentify(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to identify item selection dialog (CZ_REQ_ITEMIDENTIFY).
/// 0178 <index>.W
@@ -11651,7 +11380,6 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_SelectArrow(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to arrow crafting item selection dialog (CZ_REQ_MAKINGARROW).
/// 01ae <name id>.W
@@ -11684,7 +11412,6 @@ void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_AutoSpell(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to SA_AUTOSPELL skill selection dialog (CZ_SELECTAUTOSPELL).
/// 01ce <skill id>.L
@@ -11704,7 +11431,6 @@ void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_UseCard(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to display item carding/composition list (CZ_REQ_ITEMCOMPOSITION_LIST).
/// 017a <card index>.W
@@ -11713,7 +11439,6 @@ void clif_parse_UseCard(int fd,struct map_session_data *sd)
clif->use_card(sd,RFIFOW(fd,2)-2);
}
-
void clif_parse_InsertCard(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to carding/composing item selection dialog (CZ_REQ_ITEMCOMPOSITION).
/// 017c <card index>.W <equip index>.W
@@ -11722,7 +11447,6 @@ void clif_parse_InsertCard(int fd,struct map_session_data *sd)
pc->insert_card(sd,RFIFOW(fd,2)-2,RFIFOW(fd,4)-2);
}
-
void clif_parse_SolveCharName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request of character's name by char ID.
/// 0193 <char id>.L (CZ_REQNAME_BYGID)
@@ -11735,7 +11459,6 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
map->reqnickdb(sd, charid);
}
-
void clif_parse_ResetChar(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /resetskill /resetstate (CZ_RESET).
/// Request to reset stats or skills.
@@ -11754,7 +11477,6 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
atcommand->exec(fd, sd, cmd, true);
}
-
void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /lb /nlb (CZ_LOCALBROADCAST).
/// Request to broadcast a message on current map.
@@ -11772,7 +11494,6 @@ void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd)
atcommand->exec(fd, sd, command, true);
}
-
void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from inventory to storage.
/// 00f3 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_BODY_TO_STORE)
@@ -11796,7 +11517,6 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
gstorage->add(sd, item_index, item_amount);
}
-
void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from storage to inventory.
/// 00f5 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_STORE_TO_BODY)
@@ -11815,7 +11535,6 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd)
gstorage->get(sd, item_index, item_amount);
}
-
void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from cart to storage (CZ_MOVE_ITEM_FROM_CART_TO_STORE).
/// 0129 <index>.W <amount>.L
@@ -11832,7 +11551,6 @@ void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
gstorage->addfromcart(sd, RFIFOW(fd,2) - 2, RFIFOL(fd,4));
}
-
void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from storage to cart (CZ_MOVE_ITEM_FROM_STORE_TO_CART).
/// 0128 <index>.W <amount>.L
@@ -11849,7 +11567,6 @@ void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
gstorage->gettocart(sd, RFIFOW(fd,2)-1, RFIFOL(fd,4));
}
-
void clif_parse_CloseKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to close storage (CZ_CLOSE_STORE).
/// 00f7
@@ -11861,7 +11578,6 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
gstorage->close(sd);
}
-
/// Displays kafra storage password dialog (ZC_REQ_STORE_PASSWORD).
/// 023a <info>.W
/// info:
@@ -11882,7 +11598,6 @@ void clif_storagepassword(struct map_session_data* sd, short info)
WFIFOSET(fd,packet_len(0x23a));
}
-
void clif_parse_StoragePassword(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to the kafra storage password dialog (CZ_ACK_STORE_PASSWORD).
/// 023b <type>.W <password>.16B <new password>.16B
@@ -11895,7 +11610,6 @@ void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
//TODO
}
-
/// Result of kafra storage password validation (ZC_RESULT_STORE_PASSWORD).
/// 023c <result>.W <error count>.W
/// result:
@@ -11919,7 +11633,6 @@ void clif_storagepassword_result(struct map_session_data* sd, short result, shor
WFIFOSET(fd,packet_len(0x23c));
}
-
void clif_parse_CreateParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party creation request
/// 00f9 <party name>.24B (CZ_MAKE_GROUP)
@@ -11961,7 +11674,6 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
party->create(sd,name,item1,item2);
}
-
void clif_parse_PartyInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party invitation request
/// 00fc <account id>.L (CZ_REQ_JOIN_GROUP)
@@ -12007,7 +11719,6 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) {
party->invite(sd, t_sd);
}
-
void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party invitation reply
/// 00ff <party id>.L <flag>.L (CZ_JOIN_GROUP)
@@ -12026,7 +11737,6 @@ void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd)
party->reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
}
-
void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to leave party (CZ_REQ_LEAVE_GROUP).
/// 0100
@@ -12039,7 +11749,6 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
party->leave(sd);
}
-
void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a party member (CZ_REQ_EXPEL_GROUP_MEMBER).
/// 0103 <account id>.L <char name>.24B
@@ -12052,7 +11761,6 @@ void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
party->removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
}
-
void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change party options.
/// 0102 <exp share rule>.L (CZ_CHANGE_GROUPEXPOPTION)
@@ -12084,7 +11792,6 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
#endif
}
-
void clif_parse_PartyMessage(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Validates and processes party messages (CZ_REQUEST_CHAT_PARTY).
/// 0108 <packet len>.W <text>.?B (<name> : <message>) 00
@@ -12118,7 +11825,6 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
party->send_message(sd, text, textlen);
}
-
void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Changes Party Leader (CZ_CHANGE_GROUP_MASTER).
/// 07da <account id>.L
@@ -12149,7 +11855,6 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
#endif
}
-
/// Result of request to register a party booking advertisement (ZC_PARTY_BOOKING_ACK_REGISTER).
/// 0803 <result>.W
/// result:
@@ -12172,7 +11877,6 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
#endif
}
-
void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// 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
@@ -12191,7 +11895,6 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
#endif
}
-
/// Party booking search results (ZC_PARTY_BOOKING_ACK_SEARCH).
/// 0805 <packet len>.W <more results>.B { <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6 }*
/// more results:
@@ -12225,7 +11928,6 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
#endif
}
-
void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to delete own party booking advertisement (CZ_PARTY_BOOKING_REQ_DELETE).
/// 0806
@@ -12239,7 +11941,6 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
#endif
}
-
/// Result of request to delete own party booking advertisement (ZC_PARTY_BOOKING_ACK_DELETE).
/// 0807 <result>.W
/// result:
@@ -12263,7 +11964,6 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
#endif
}
-
void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to update party booking advertisement (CZ_PARTY_BOOKING_REQ_UPDATE).
/// 0808 { <job>.W }*6
@@ -12282,7 +11982,6 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
#endif
}
-
/// 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)
@@ -12309,7 +12008,6 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
#endif
}
-
/// 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)
@@ -12331,7 +12029,6 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo
#endif
}
-
/// Notification about deleted party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_DELETE).
/// 080b <index>.L
void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
@@ -12768,7 +12465,6 @@ void clif_parse_CloseVending(int fd, struct map_session_data* sd)
vending->close(sd);
}
-
void clif_parse_VendingListReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to open a vending shop (CZ_REQ_BUY_FROMMC).
/// 0130 <account id>.L
@@ -12780,7 +12476,6 @@ void clif_parse_VendingListReq(int fd, struct map_session_data* sd)
vending->list(sd,RFIFOL(fd,2));
}
-
void clif_parse_PurchaseReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC).
/// 0134 <packet len>.W <account id>.L { <amount>.W <index>.W }*
@@ -12796,7 +12491,6 @@ void clif_parse_PurchaseReq(int fd, struct map_session_data* sd)
sd->vended_id = 0;
}
-
void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC2).
/// 0801 <packet len>.W <account id>.L <unique id>.L { <amount>.W <index>.W }*
@@ -12813,7 +12507,6 @@ void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd)
sd->vended_id = 0;
}
-
void clif_parse_OpenVending(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Confirm or cancel the shop preparation window.
/// 012f <packet len>.W <shop name>.80B { <index>.W <amount>.W <price>.L }* (CZ_REQ_OPENSTORE)
@@ -12863,7 +12556,6 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
guild->create(sd, name);
}
-
void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild window interface permissions (CZ_REQ_GUILD_MENUINTERFACE).
/// 014d
@@ -12872,7 +12564,6 @@ void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd)
clif->guild_masterormember(sd);
}
-
void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild window information (CZ_REQ_GUILD_MENU).
/// 014f <type>.L
@@ -12914,7 +12605,6 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update guild positions (CZ_REG_CHANGE_GUILD_POSITIONINFO).
/// 0161 <packet len>.W { <position id>.L <mode>.L <ranking>.L <pay rate>.L <name>.24B }*
@@ -12930,7 +12620,6 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update the position of guild members (CZ_REQ_CHANGE_MEMBERPOS).
/// 0155 <packet len>.W { <account id>.L <char id>.L <position id>.L }*
@@ -12947,7 +12636,6 @@ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild emblem data (CZ_REQ_GUILD_EMBLEM_IMG).
/// 0151 <guild id>.L
@@ -13084,7 +12772,6 @@ bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
return true;
}
-
void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update the guild emblem (CZ_REGISTER_GUILD_EMBLEM_IMG).
/// 0153 <packet len>.W <emblem data>.?B
@@ -13105,7 +12792,6 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
guild->change_emblem(sd, emblem_len, (const char*)emblem);
}
-
void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Guild notice update request (CZ_GUILD_NOTICE).
/// 016e <guild id>.L <msg1>.60B <msg2>.120B
@@ -13182,7 +12868,6 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd)
guild->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-
void clif_parse_GuildLeave(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to leave guild (CZ_REQ_LEAVE_GUILD).
/// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B
@@ -13200,7 +12885,6 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
guild->leave(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
-
void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a member of a guild (CZ_REQ_BAN_GUILD).
/// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B
@@ -13213,7 +12897,6 @@ void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
guild->expulsion(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
-
void clif_parse_GuildMessage(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Validates and processes guild messages (CZ_GUILD_CHAT).
/// 017e <packet len>.W <text>.?B (<name> : <message>) 00
@@ -13250,7 +12933,6 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd)
guild->send_message(sd, text, textlen);
}
-
void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild alliance request (CZ_REQ_ALLY_GUILD).
/// 0170 <account id>.L <inviter account id>.L <inviter char id>.L
@@ -13277,7 +12959,6 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
guild->reqalliance(sd,t_sd);
}
-
void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a guild alliance request (CZ_ALLY_GUILD).
/// 0172 <inviter account id>.L <answer>.L
@@ -13289,7 +12970,6 @@ void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd)
guild->reply_reqalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-
void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a guild alliance or opposition (CZ_REQ_DELETE_RELATED_GUILD).
/// 0183 <opponent guild id>.L <relation>.L
@@ -13308,7 +12988,6 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
guild->delalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-
void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to set a guild as opposition (CZ_REQ_HOSTILE_GUILD).
/// 0180 <account id>.L
@@ -13335,7 +13014,6 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
guild->opposition(sd,t_sd);
}
-
void clif_parse_GuildBreak(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete own guild (CZ_REQ_DISORGANIZE_GUILD).
/// 015d <key>.40B
@@ -13351,7 +13029,6 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
guild->dobreak(sd,(char*)RFIFOP(fd,2));
}
-
/// Pet
///
@@ -13369,7 +13046,6 @@ void clif_parse_PetMenu(int fd, struct map_session_data *sd)
pet->menu(sd,RFIFOB(fd,2));
}
-
void clif_parse_CatchPet(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Attempt to tame a monster (CZ_TRYCAPTURE_MONSTER).
/// 019f <id>.L
@@ -13378,7 +13054,6 @@ void clif_parse_CatchPet(int fd, struct map_session_data *sd)
pet->catch_process2(sd,RFIFOL(fd,2));
}
-
void clif_parse_SelectEgg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to pet incubator egg selection dialog (CZ_SELECT_PETEGG).
/// 01a7 <index>.W
@@ -13391,7 +13066,6 @@ void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
void clif_parse_SendEmotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to display pet's emotion/talk (CZ_PET_ACT).
/// 01a9 <data>.L
@@ -13423,7 +13097,6 @@ void clif_parse_SendEmotion(int fd, struct map_session_data *sd)
clif->pet_emotion(sd->pd,RFIFOL(fd,2));
}
-
void clif_parse_ChangePetName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change pet's name (CZ_RENAME_PET).
/// 01a5 <name>.24B
@@ -13432,7 +13105,6 @@ void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
pet->change_name(sd,(char*)RFIFOP(fd,2));
}
-
void clif_parse_GMKick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /kill (CZ_DISCONNECT_CHARACTER).
/// Request to disconnect a character.
@@ -13492,7 +13164,6 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) {
}
}
-
void clif_parse_GMKickAll(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /killall (CZ_DISCONNECT_ALL_CHARACTER).
/// Request to disconnect all characters.
@@ -13503,7 +13174,6 @@ void clif_parse_GMKickAll(int fd, struct map_session_data* sd) {
atcommand->exec(fd, sd, cmd, true);
}
-
void clif_parse_GMShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /remove (CZ_REMOVE_AID).
/// Request to warp to a character with given login ID.
@@ -13524,7 +13194,6 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-
void clif_parse_GMRemove2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /remove (CZ_REMOVE_AID_SSO).
/// Request to warp to a character with given account ID.
@@ -13541,7 +13210,6 @@ void clif_parse_GMRemove2(int fd, struct map_session_data* sd) {
}
}
-
void clif_parse_GMRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /recall (CZ_RECALL).
/// Request to summon a player with given login ID to own position.
@@ -13562,7 +13230,6 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-
void clif_parse_GMRecall2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /recall (CZ_RECALL_SSO).
/// Request to summon a player with given account ID to own position.
@@ -13579,7 +13246,6 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) {
}
}
-
void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /item /monster (CZ_ITEM_CREATE).
/// Request to execute GM commands.
@@ -13650,7 +13316,6 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
}
}
-
void clif_parse_GMHide(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /hide (CZ_CHANGE_EFFECTSTATE).
/// 019d <effect state>.L
@@ -13664,7 +13329,6 @@ void clif_parse_GMHide(int fd, struct map_session_data *sd) {
atcommand->exec(fd, sd, cmd, true);
}
-
void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to adjust player's manner points (CZ_REQ_GIVE_MANNER_POINT).
/// 0149 <account id>.L <type>.B <value>.W
@@ -13719,7 +13383,6 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
atcommand->exec(fd, sd, command, true);
}
-
void clif_parse_GMRc(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /rc (CZ_REQ_GIVE_MANNER_BYNAME).
/// GM adjustment of a player's manner value by -60.
@@ -13734,7 +13397,6 @@ void clif_parse_GMRc(int fd, struct map_session_data* sd)
atcommand->exec(fd, sd, command, true);
}
-
/// Result of request to resolve account name (ZC_ACK_ACCOUNTNAME).
/// 01e0 <account id>.L <account name>.24B
void clif_account_name(struct map_session_data* sd, int account_id, const char* accname) {
@@ -13749,7 +13411,6 @@ void clif_account_name(struct map_session_data* sd, int account_id, const char*
WFIFOSET(fd,packet_len(0x1e0));
}
-
void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// GM requesting account name (for right-click gm menu) (CZ_REQ_ACCOUNTNAME).
/// 01df <account id>.L
@@ -13761,7 +13422,6 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
clif->account_name(sd, account_id, ""); // insert account name here >_<
}
-
void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /changemaptype <x> <y> <type> (CZ_CHANGE_MAPTYPE).
/// GM single cell type change request.
@@ -13784,7 +13444,6 @@ void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) {
//FIXME: once players leave the map, the client 'forgets' this information.
}
-
void clif_parse_PMIgnore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// /in /ex (CZ_SETTING_WHISPER_PC).
/// Request to allow/deny whispers from a nick.
@@ -13838,7 +13497,6 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd) {
clif->wisexin(sd, type, 0); // success
}
-
void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /inall /exall (CZ_SETTING_WHISPER_STATE).
/// Request to allow/deny all whispers.
@@ -13875,7 +13533,6 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
clif->wisall(sd, type, flag);
}
-
/// Whisper ignore list (ZC_WHISPER_LIST).
/// 00d4 <packet len>.W { <char name>.24B }*
void clif_PMIgnoreList(struct map_session_data* sd) {
@@ -13894,7 +13551,6 @@ void clif_PMIgnoreList(struct map_session_data* sd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Whisper ignore list request (CZ_REQ_WHISPER_LIST).
/// 00d3
@@ -13903,7 +13559,6 @@ void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
clif->PMIgnoreList(sd);
}
-
void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke the /doridori recovery bonus (CZ_DORIDORI).
/// 01e7
@@ -13923,7 +13578,6 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke the effect of super novice's guardian angel prayer (CZ_CHOPOKGI).
/// 01ed
@@ -13953,7 +13607,6 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
}
}
-
/// Friends List
///
@@ -13982,7 +13635,6 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha
WFIFOSET(fd, packet_len(0x206));
}
-
//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)
{
@@ -13994,7 +13646,6 @@ int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
return 0;
}
-
/// Sends the whole friends list (ZC_FRIENDS_LIST).
/// 0201 <packet len>.W { <account id>.L <char id>.L <name>.24B }*
void clif_friendslist_send(struct map_session_data *sd)
@@ -14022,7 +13673,6 @@ void clif_friendslist_send(struct map_session_data *sd)
}
}
-
/// Notification about the result of a friend add request (ZC_ADD_FRIENDS_LIST).
/// 0209 <result>.W <account id>.L <char id>.L <name>.24B
/// result:
@@ -14047,7 +13697,6 @@ void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_dat
WFIFOSET(fd, packet_len(0x209));
}
-
/// Asks a player for permission to be added as friend (ZC_REQ_ADD_FRIENDS).
/// 0207 <req account id>.L <req char id>.L <req char name>.24B
void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_id, const char* name) {
@@ -14063,7 +13712,6 @@ void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_i
WFIFOSET(fd,packet_len(0x207));
}
-
void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add a player as friend (CZ_ADD_FRIENDS).
/// 0202 <name>.24B
@@ -14113,7 +13761,6 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) {
clif->friendlist_req(f_sd, sd->status.account_id, sd->status.char_id, sd->status.name);
}
-
void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a friend add request (CZ_ACK_REQ_ADD_FRIENDS).
/// 0208 <inviter account id>.L <inviter char id>.L <result>.B
@@ -14182,7 +13829,6 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a friend (CZ_DELETE_FRIENDS).
/// 0203 <account id>.L <char id>.L
@@ -14247,7 +13893,6 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
WFIFOSET(fd, packet_len(0x20a));
}
-
/// /pvpinfo list (ZC_ACK_PVPPOINT).
/// 0210 <char id>.L <account id>.L <win point>.L <lose point>.L <point>.L
void clif_PVPInfo(struct map_session_data* sd) {
@@ -14265,7 +13910,6 @@ void clif_PVPInfo(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x210));
}
-
void clif_parse_PVPInfo(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// /pvpinfo (CZ_REQ_PVPPOINT).
/// 020f <char id>.L <account id>.L
@@ -14494,7 +14138,6 @@ void clif_ranking_pk(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x238));
}
-
void clif_parse_RankingPk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// /pk (CZ_KILLER_RANK).
/// 0237
@@ -14502,7 +14145,6 @@ void clif_parse_RankingPk(int fd,struct map_session_data *sd) {
clif->ranking_pk(sd);
}
-
void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// SG Feel save OK [Komurka] (CZ_AGREE_STARPLACE).
/// 0254 <which>.B
@@ -14530,7 +14172,6 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-
/// Star Gladiator's Feeling map confirmation prompt (ZC_STARPLACE).
/// 0253 <which>.B
/// which:
@@ -14548,7 +14189,6 @@ void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
sd->menuskill_val = skill_lv;
}
-
void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change homunculus' name (CZ_RENAME_MER).
/// 0231 <name>.24B
@@ -14556,7 +14196,6 @@ void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) {
homun->change_name(sd,(char*)RFIFOP(fd,2));
}
-
void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to warp/move homunculus/mercenary to it's owner (CZ_REQUEST_MOVETOOWNER).
/// 0234 <id>.L
@@ -14578,7 +14217,6 @@ void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
unit->walktoxy(bl, ud->to_x, ud->to_y, 4);
}
-
void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move homunculus/mercenary (CZ_REQUEST_MOVENPC).
/// 0232 <id>.L <position data>.3B
@@ -14600,7 +14238,6 @@ void clif_parse_HomMoveTo(int fd, struct map_session_data *sd)
unit->walktoxy(bl, x, y, 4);
}
-
void clif_parse_HomAttack(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to do an action with homunculus/mercenary (CZ_REQUEST_ACTNPC).
/// 0233 <id>.L <target id>.L <action>.B
@@ -14623,7 +14260,6 @@ void clif_parse_HomAttack(int fd,struct map_session_data *sd)
unit->attack(bl, target_id, action_type != 0);
}
-
void clif_parse_HomMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke a homunculus menu action (CZ_COMMAND_MER).
/// 022d <type>.W <command>.B
@@ -14644,7 +14280,6 @@ void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
homun->menu(sd,RFIFOB(fd,packet_db[cmd].pos[1]));
}
-
void clif_parse_AutoRevive(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to resurrect oneself using Token of Siegfried (CZ_STANDING_RESURRECTION).
/// 0292
@@ -14673,7 +14308,6 @@ void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
}
-
/// Information about character's status values (ZC_ACK_STATUS_GM).
/// 0214 <str>.B <standardStr>.B <agi>.B <standardAgi>.B <vit>.B <standardVit>.B
/// <int>.B <standardInt>.B <dex>.B <standardDex>.B <luk>.B <standardLuk>.B
@@ -14714,7 +14348,6 @@ void clif_check(int fd, struct map_session_data* pl_sd) {
WFIFOSET(fd,packet_len(0x214));
}
-
void clif_parse_Check(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /check (CZ_REQ_STATUS_GM).
/// Request character's status values.
@@ -14736,8 +14369,6 @@ void clif_parse_Check(int fd, struct map_session_data *sd)
clif->check(fd, pl_sd);
}
-
-
/// MAIL SYSTEM
/// By Zephyrus
///
@@ -14756,7 +14387,6 @@ void clif_Mail_setattachment(int fd, int index, uint8 flag)
WFIFOSET(fd,packet_len(0x255));
}
-
/// Notification about the result of retrieving a mail attachment (ZC_MAIL_REQ_GET_ITEM).
/// 0245 <result>.B
/// result:
@@ -14771,7 +14401,6 @@ void clif_Mail_getattachment(int fd, uint8 flag)
WFIFOSET(fd,packet_len(0x245));
}
-
/// Notification about the result of sending a mail (ZC_MAIL_REQ_SEND).
/// 0249 <result>.B
/// result:
@@ -14785,7 +14414,6 @@ void clif_Mail_send(int fd, bool fail)
WFIFOSET(fd,packet_len(0x249));
}
-
/// Notification about the result of deleting a mail (ZC_ACK_MAIL_DELETE).
/// 0257 <mail id>.L <result>.W
/// result:
@@ -14800,7 +14428,6 @@ void clif_Mail_delete(int fd, int mail_id, short fail)
WFIFOSET(fd, packet_len(0x257));
}
-
/// Notification about the result of returning a mail (ZC_ACK_MAIL_RETURN).
/// 0274 <mail id>.L <result>.W
/// result:
@@ -14815,7 +14442,6 @@ void clif_Mail_return(int fd, int mail_id, short fail)
WFIFOSET(fd,packet_len(0x274));
}
-
/// Notification about new mail (ZC_MAIL_RECEIVE).
/// 024a <mail id>.L <title>.40B <sender>.24B
void clif_Mail_new(int fd, int mail_id, const char *sender, const char *title)
@@ -14830,7 +14456,6 @@ void clif_Mail_new(int fd, int mail_id, const char *sender, const char *title)
WFIFOSET(fd,packet_len(0x24a));
}
-
/// Opens/closes the mail window (ZC_MAIL_WINDOWS).
/// 0260 <type>.L
/// type:
@@ -14844,7 +14469,6 @@ void clif_Mail_window(int fd, int flag)
WFIFOSET(fd,packet_len(0x260));
}
-
/// Lists mails stored in inbox (ZC_MAIL_REQ_GET_LIST).
/// 0240 <packet len>.W <amount>.L { <mail id>.L <title>.40B <read>.B <sender>.24B <time>.L }*amount
/// read:
@@ -14887,7 +14511,6 @@ void clif_Mail_refreshinbox(struct map_session_data *sd)
}
}
-
void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Mail inbox list request (CZ_MAIL_GET_LIST).
/// 023f
@@ -14904,7 +14527,6 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
mail->removezeny(sd, 0);
}
-
/// Opens a mail (ZC_MAIL_REQ_OPEN).
/// 0242 <packet len>.W <mail id>.L <title>.40B <sender>.24B <time>.L <zeny>.L
/// <amount>.L <name id>.W <item type>.W <identified>.B <damaged>.B <refine>.B
@@ -14967,7 +14589,6 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id)
}
}
-
void clif_parse_Mail_read(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to open a mail (CZ_MAIL_OPEN).
/// 0241 <mail id>.L
@@ -14983,7 +14604,6 @@ void clif_parse_Mail_read(int fd, struct map_session_data *sd)
clif->mail_read(sd, RFIFOL(fd,2));
}
-
void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to receive mail's attachment (CZ_MAIL_GET_ITEM).
/// 0244 <mail id>.L
@@ -15052,7 +14672,6 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
intif->Mail_getattach(sd->status.char_id, mail_id);
}
-
void clif_parse_Mail_delete(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a mail (CZ_MAIL_DELETE).
/// 0243 <mail id>.L
@@ -15084,7 +14703,6 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_Mail_return(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to return a mail (CZ_REQ_MAIL_RETURN).
/// 0273 <mail id>.L <receive name>.24B
@@ -15109,7 +14727,6 @@ void clif_parse_Mail_return(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item or Zeny to mail (CZ_MAIL_ADD_ITEM).
/// 0247 <index>.W <amount>.L
@@ -15128,7 +14745,6 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
clif->mail_setattachment(fd,idx,flag);
}
-
void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to reset mail item and/or Zeny (CZ_MAIL_RESET_ITEM).
/// 0246 <type>.W
@@ -15146,7 +14762,6 @@ void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
mail->removezeny(sd, 0);
}
-
void clif_parse_Mail_send(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to send mail (CZ_MAIL_SEND).
/// 0248 <packet len>.W <recipient>.24B <title>.40B <body len>.B <body>.?B
@@ -15207,7 +14822,6 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
sd->cansendmail_tick = timer->gettick() + 1000; // 1 Second flood Protection
}
-
/// AUCTION SYSTEM
/// By Zephyrus
///
@@ -15235,7 +14849,6 @@ void clif_Auction_openwindow(struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x25f));
}
-
/// Returns auction item search results (ZC_AUCTION_ITEM_REQ_SEARCH).
/// 0252 <packet len>.W <pages>.L <count>.L { <auction id>.L <seller name>.24B <name id>.W <type>.L <amount>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <now price>.L <max price>.L <buyer name>.24B <delete time>.L }*
void clif_Auction_results(struct map_session_data *sd, short count, short pages, uint8 *buf)
@@ -15281,7 +14894,6 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages,
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Result from request to add an item (ZC_ACK_AUCTION_ADD_ITEM).
/// 0256 <index>.W <result>.B
/// result:
@@ -15295,7 +14907,6 @@ void clif_Auction_setitem(int fd, int index, bool fail) {
WFIFOSET(fd,packet_len(0x256));
}
-
void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to initialize 'new auction' data (CZ_AUCTION_CREATE).
/// 024b <type>.W
@@ -15311,7 +14922,6 @@ void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
sd->auction.amount = 0;
}
-
void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item to the action (CZ_AUCTION_ADD_ITEM).
/// 024c <index>.W <count>.L
@@ -15377,7 +14987,6 @@ void clif_Auction_message(int fd, unsigned char flag)
WFIFOSET(fd,packet_len(0x250));
}
-
/// Result of the auction close request (ZC_AUCTION_ACK_MY_SELL_STOP).
/// 025e <result>.W
/// result:
@@ -15392,7 +15001,6 @@ void clif_Auction_close(int fd, unsigned char flag)
WFIFOSET(fd,packet_len(0x25e));
}
-
void clif_parse_Auction_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an auction (CZ_AUCTION_ADD).
/// 024d <now money>.L <max money>.L <delete hour>.W
@@ -15488,7 +15096,6 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_Auction_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Cancels an auction (CZ_AUCTION_ADD_CANCEL).
/// 024e <auction id>.L
@@ -15499,7 +15106,6 @@ void clif_parse_Auction_cancel(int fd, struct map_session_data *sd)
intif->Auction_cancel(sd->status.char_id, auction_id);
}
-
void clif_parse_Auction_close(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Closes an auction (CZ_AUCTION_REQ_MY_SELL_STOP).
/// 025d <auction id>.L
@@ -15510,7 +15116,6 @@ void clif_parse_Auction_close(int fd, struct map_session_data *sd)
intif->Auction_close(sd->status.char_id, auction_id);
}
-
void clif_parse_Auction_bid(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Places a bid on an auction (CZ_AUCTION_BUY).
/// 024f <auction id>.L <money>.L
@@ -15536,7 +15141,6 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
}
}
-
void clif_parse_Auction_search(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Auction Search (CZ_AUCTION_ITEM_SEARCH).
/// 0251 <search type>.W <auction id>.L <search text>.24B <page number>.W
@@ -15562,7 +15166,6 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd)
intif->Auction_requestlist(sd->status.char_id, type, price, search_text, page);
}
-
void clif_parse_Auction_buysell(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Requests list of own currently active bids or auctions (CZ_AUCTION_REQ_MY_INFO).
/// 025c <type>.W
@@ -15581,7 +15184,6 @@ void clif_parse_Auction_buysell(int fd, struct map_session_data* sd)
intif->Auction_requestlist(sd->status.char_id, type, 0, "", 1);
}
-
/// CASH/POINT SHOP
///
@@ -15674,7 +15276,6 @@ void clif_cashshop_ack(struct map_session_data* sd, int error) {
WFIFOSET(fd, packet_len(0x289));
}
-
void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to buy item(s) from cash shop (CZ_PC_BUY_CASH_POINT_ITEM).
/// 0288 <name id>.W <amount>.W
@@ -15710,7 +15311,6 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
clif->cashshop_ack(sd,fail);
}
-
/// Adoption System
///
@@ -15732,7 +15332,6 @@ void clif_Adopt_reply(struct map_session_data *sd, int type)
WFIFOSET(fd,6);
}
-
/// Adoption confirmation (ZC_REQ_BABY).
/// 01f6 <account id>.L <char id>.L <name>.B
void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *src, int p_id) {
@@ -15749,7 +15348,6 @@ void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *sr
WFIFOSET(fd,34);
}
-
void clif_parse_Adopt_request(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to adopt a player (CZ_REQ_JOIN_BABY).
/// 01f9 <account id>.L
@@ -15762,7 +15360,6 @@ void clif_parse_Adopt_request(int fd, struct map_session_data *sd) {
}
}
-
void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to adopt confirmation (CZ_JOIN_BABY).
/// 01f7 <account id>.L <char id>.L <answer>.L
@@ -15791,7 +15388,6 @@ void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) {
pc->adoption(p1_sd, p2_sd, sd);
}
-
/// Convex Mirror (ZC_BOSS_INFO).
/// 0293 <infoType>.B <x>.L <y>.L <minHours>.W <minMinutes>.W <maxHours>.W <maxMinutes>.W <monster name>.51B
/// infoType:
@@ -15833,7 +15429,6 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
WFIFOSET(fd,70);
}
-
void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Requesting equip of a player (CZ_EQUIPWIN_MICROSCOPE).
/// 02d6 <account id>.L
@@ -15850,7 +15445,6 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
clif->msgtable(sd, MSG_EQUIP_NOT_PUBLIC);
}
-
void clif_parse_EquipTick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to change equip window tick (CZ_CONFIG).
/// 02d8 <type>.L <value>.L
@@ -15917,11 +15511,9 @@ void clif_quest_send_list(struct map_session_data *sd)
WFIFOW(fd, i*info_len+21) = qi->objectives_count;
#endif
}
-
WFIFOSET(fd, len);
}
-
/// Sends list of all quest missions (ZC_ALL_QUEST_MISSION).
/// 02b2 <packet len>.W <num>.L { <quest id>.L <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3 }*num
void clif_quest_send_mission(struct map_session_data *sd)
@@ -15956,7 +15548,6 @@ void clif_quest_send_mission(struct map_session_data *sd)
WFIFOSET(fd, len);
}
-
/// Notification about a new quest (ZC_ADD_QUEST).
/// 02b3 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3
void clif_quest_add(struct map_session_data *sd, struct quest *qd)
@@ -15988,7 +15579,6 @@ void clif_quest_add(struct map_session_data *sd, struct quest *qd)
WFIFOSET(fd, packet_len(0x2b3));
}
-
/// Notification about a quest being removed (ZC_DEL_QUEST).
/// 02b4 <quest id>.L
void clif_quest_delete(struct map_session_data *sd, int quest_id) {
@@ -16002,7 +15592,6 @@ void clif_quest_delete(struct map_session_data *sd, int quest_id) {
WFIFOSET(fd, packet_len(0x2b4));
}
-
/// Notification of an update to the hunting mission counter (ZC_UPDATE_MISSION_HUNT).
/// 02b5 <packet len>.W <mobs>.W { <quest id>.L <mob id>.L <total count>.W <current count>.W }*3
void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
@@ -16033,7 +15622,6 @@ void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
WFIFOSET(fd, len);
}
-
void clif_parse_questStateAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change the state of a quest (CZ_ACTIVE_QUEST).
/// 02b6 <quest id>.L <active>.B
@@ -16041,7 +15629,6 @@ void clif_parse_questStateAck(int fd, struct map_session_data *sd) {
quest->update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE);
}
-
/// Notification about the change of a quest state (ZC_ACTIVE_QUEST).
/// 02b7 <quest id>.L <active>.B
void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active) {
@@ -16056,7 +15643,6 @@ void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool ac
WFIFOSET(fd, packet_len(0x2b7));
}
-
/// Notification about an NPC's quest state (ZC_QUEST_NOTIFY_EFFECT).
/// 0446 <npc id>.L <x>.W <y>.W <effect>.W <type>.W
/// effect:
@@ -16087,7 +15673,6 @@ void clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, s
#endif
}
-
/// Mercenary System
///
@@ -16155,7 +15740,6 @@ void clif_mercenary_updatestatus(struct map_session_data *sd, int type) {
WFIFOSET(fd,packet_len(0x2a2));
}
-
/// Mercenary base status data (ZC_MER_INIT).
/// 029b <id>.L <atk>.W <matk>.W <hit>.W <crit>.W <def>.W <mdef>.W <flee>.W <aspd>.W
/// <name>.24B <level>.W <hp>.L <maxhp>.L <sp>.L <maxsp>.L <expire time>.L <faith>.W
@@ -16214,7 +15798,6 @@ void clif_mercenary_info(struct map_session_data *sd) {
WFIFOSET(fd,packet_len(0x29b));
}
-
/// 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 <upgradeable>.B }*
void clif_mercenary_skillblock(struct map_session_data *sd)
@@ -16252,7 +15835,6 @@ void clif_mercenary_skillblock(struct map_session_data *sd)
WFIFOSET(fd,len);
}
-
void clif_parse_mercenary_action(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to invoke a mercenary menu action (CZ_MER_COMMAND).
/// 029f <command>.B
@@ -16268,7 +15850,6 @@ void clif_parse_mercenary_action(int fd, struct map_session_data* sd)
mercenary->delete(sd->md, 2);
}
-
/// Mercenary Message
/// message:
/// 0 = Mercenary soldier's duty hour is over.
@@ -16280,7 +15861,6 @@ void clif_mercenary_message(struct map_session_data* sd, int message)
clif->msgtable(sd, MSG_MERCENARY_EXPIRED + message);
}
-
/// Notification about the remaining time of a rental item (ZC_CASH_TIME_COUNTER).
/// 0298 <name id>.W <seconds>.L
void clif_rental_time(int fd, int nameid, int seconds)
@@ -16292,7 +15872,6 @@ void clif_rental_time(int fd, int nameid, int seconds)
WFIFOSET(fd,packet_len(0x298));
}
-
/// Deletes a rental item from client's inventory (ZC_CASH_ITEM_DELETE).
/// 0299 <index>.W <name id>.W
void clif_rental_expired(int fd, int index, int nameid)
@@ -16304,7 +15883,6 @@ void clif_rental_expired(int fd, int index, int nameid)
WFIFOSET(fd,packet_len(0x299));
}
-
/// Book Reading (ZC_READ_BOOK).
/// 0294 <book id>.L <page>.L
void clif_readbook(int fd, int book_id, int page)
@@ -16316,7 +15894,6 @@ void clif_readbook(int fd, int book_id, int page)
WFIFOSET(fd,packet_len(0x294));
}
-
/// Battlegrounds
///
@@ -16346,7 +15923,6 @@ void clif_bg_hp(struct map_session_data *sd)
clif->send(buf, packet_len(cmd), &sd->bl, BG_AREA_WOS);
}
-
/// Updates the position of a camp member on the minimap (ZC_BATTLEFIELD_NOTIFY_POSITION).
/// 02df <account id>.L <name>.24B <class>.W <x>.W <y>.W
void clif_bg_xy(struct map_session_data *sd)
@@ -16379,14 +15955,13 @@ void clif_bg_xy_remove(struct map_session_data *sd)
clif->send(buf, packet_len(0x2df), &sd->bl, BG_SAMEMAP_WOS);
}
-
/// Notifies clients of a battleground message (ZC_BATTLEFIELD_CHAT).
/// 02dc <packet len>.W <account id>.L <name>.24B <message>.?B
void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, size_t len)
{
struct map_session_data *sd;
unsigned char *buf;
-
+
nullpo_retv(bgd);
nullpo_retv(name);
nullpo_retv(mes);
@@ -16405,7 +15980,6 @@ void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name
aFree(buf);
}
-
void clif_parse_BattleChat(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Validates and processes battlechat messages [pakpil] (CZ_BATTLEFIELD_CHAT).
/// 0x2db <packet len>.W <text>.?B (<name> : <message>) 00
@@ -16438,7 +16012,6 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd)
bg->send_message(sd, text, textlen);
}
-
/// Notifies client of a battleground score change (ZC_BATTLEFIELD_NOTIFY_POINT).
/// 02de <camp A points>.W <camp B points>.W
void clif_bg_updatescore(int16 m) {
@@ -16467,7 +16040,6 @@ void clif_bg_updatescore_single(struct map_session_data *sd) {
WFIFOSET(fd,packet_len(0x2de));
}
-
/// Battleground camp belong-information (ZC_BATTLEFIELD_NOTIFY_CAMPINFO).
/// 02dd <account id>.L <name>.24B <camp>.W
void clif_sendbgemblem_area(struct map_session_data *sd)
@@ -16493,7 +16065,6 @@ void clif_sendbgemblem_single(int fd, struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x2dd));
}
-
/// Custom Fonts (ZC_NOTIFY_FONT).
/// 02ef <account_id>.L <font id>.W
void clif_font(struct map_session_data *sd)
@@ -16508,7 +16079,6 @@ void clif_font(struct map_session_data *sd)
#endif
}
-
/*==========================================
* Instancing Window
*------------------------------------------*/
@@ -16617,7 +16187,6 @@ void clif_instance_leave(int fd)
WFIFOSET(fd,packet_len(0x02CE));
}
-
/// Notifies clients about item picked up by a party member (ZC_ITEM_PICKUP_PARTY).
/// 02b8 <account id>.L <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B
void clif_party_show_picker(struct map_session_data * sd, struct item * item_data)
@@ -16642,7 +16211,6 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat
#endif
}
-
/// Display gained exp (ZC_NOTIFY_EXP).
/// 07f6 <account id>.L <amount>.L <var id>.W <exp type>.W
/// var id:
@@ -16666,7 +16234,6 @@ void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, b
WFIFOSET(fd,packet_len(0x7f6));
}
-
/// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT).
/// type:
/// 0 = Displays 'value' for 5 seconds.
@@ -16685,7 +16252,6 @@ void clif_showdigit(struct map_session_data* sd, unsigned char type, int value)
WFIFOSET(sd->fd, packet_len(0x1b1));
}
-
void clif_parse_LessEffect(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Notification of the state of client command /effect (CZ_LESSEFFECT).
/// 021d <state>.L
@@ -16795,7 +16361,6 @@ void clif_elemental_info(struct map_session_data *sd) {
WFIFOSET(fd,22);
}
-
/// Buying Store System
///
@@ -16813,7 +16378,6 @@ void clif_buyingstore_open(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0x810));
}
-
void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to create a buying store (CZ_REQ_OPEN_BUYING_STORE).
/// 0811 <packet len>.W <limit zeny>.L <result>.B <store name>.80B { <name id>.W <amount>.W <price>.L }*
@@ -16856,7 +16420,6 @@ void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) {
buyingstore->create(sd, zenylimit, result, storename, itemlist, count);
}
-
/// Notification, that the requested buying store could not be created (ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER).
/// 0812 <result>.W <total weight>.L
/// result:
@@ -16877,7 +16440,6 @@ void clif_buyingstore_open_failed(struct map_session_data* sd, unsigned short re
WFIFOSET(fd,packet_len(0x812));
}
-
/// Notification, that the requested buying store was created (ZC_MYITEMLIST_BUYING_STORE).
/// 0813 <packet len>.W <account id>.L <limit zeny>.L { <price>.L <count>.W <type>.B <name id>.W }*
void clif_buyingstore_myitemlist(struct map_session_data* sd)
@@ -16904,7 +16466,6 @@ void clif_buyingstore_myitemlist(struct map_session_data* sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Notifies clients in area of a buying store (ZC_BUYING_STORE_ENTRY).
/// 0814 <account id>.L <store name>.80B
void clif_buyingstore_entry(struct map_session_data* sd)
@@ -16931,7 +16492,6 @@ void clif_buyingstore_entry_single(struct map_session_data* sd, struct map_sessi
WFIFOSET(fd,packet_len(0x814));
}
-
void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to close own buying store (CZ_REQ_CLOSE_BUYING_STORE).
/// 0815
@@ -16939,7 +16499,6 @@ void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data* sd) {
buyingstore->close(sd);
}
-
/// Notifies clients in area that a buying store was closed (ZC_DISAPPEAR_BUYING_STORE_ENTRY).
/// 0816 <account id>.L
void clif_buyingstore_disappear_entry(struct map_session_data* sd)
@@ -16965,7 +16524,6 @@ void clif_buyingstore_disappear_entry_single(struct map_session_data* sd, struct
WFIFOSET(fd,packet_len(0x816));
}
-
/// Request to open someone else's buying store (CZ_REQ_CLICK_TO_BUYING_STORE).
/// 0817 <account id>.L
void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data* sd)
@@ -16977,7 +16535,6 @@ void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data* sd)
buyingstore->open(sd, account_id);
}
-
/// Sends buying store item list (ZC_ACK_ITEMLIST_BUYING_STORE).
/// 0818 <packet len>.W <account id>.L <store id>.L <limit zeny>.L { <price>.L <amount>.W <type>.B <name id>.W }*
void clif_buyingstore_itemlist(struct map_session_data* sd, struct map_session_data* pl_sd)
@@ -17006,7 +16563,6 @@ void clif_buyingstore_itemlist(struct map_session_data* sd, struct map_session_d
WFIFOSET(fd,WFIFOW(fd,2));
}
-
void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to sell items to a buying store (CZ_REQ_TRADE_BUYING_STORE).
/// 0819 <packet len>.W <account id>.L <store id>.L { <index>.W <name id>.W <amount>.W }*
@@ -17042,7 +16598,6 @@ void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) {
buyingstore->trade(sd, account_id, buyer_id, itemlist, count);
}
-
/// Notifies the buyer, that the buying store has been closed due to a post-trade condition (ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER).
/// 081a <result>.W
/// result:
@@ -17061,7 +16616,6 @@ void clif_buyingstore_trade_failed_buyer(struct map_session_data* sd, short resu
WFIFOSET(fd,packet_len(0x81a));
}
-
/// Updates the zeny limit and an item in the buying store item list (ZC_UPDATE_ITEM_FROM_BUYING_STORE).
/// 081b <name id>.W <amount>.W <limit zeny>.L
void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short nameid, unsigned short amount)
@@ -17078,7 +16632,6 @@ void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short na
WFIFOSET(fd,packet_len(0x81b));
}
-
/// Deletes item from inventory, that was sold to a buying store (ZC_ITEM_DELETE_BUYING_STORE).
/// 081c <index>.W <amount>.W <price>.L
/// message:
@@ -17099,7 +16652,6 @@ void clif_buyingstore_delete_item(struct map_session_data* sd, short index, unsi
WFIFOSET(fd,packet_len(0x81c));
}
-
/// Notifies the seller, that a buying store trade failed (ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER).
/// 0824 <result>.W <name id>.W
/// result:
@@ -17120,7 +16672,6 @@ void clif_buyingstore_trade_failed_seller(struct map_session_data* sd, short res
WFIFOSET(fd,packet_len(0x824));
}
-
void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Search Store Info System
///
@@ -17177,7 +16728,6 @@ void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) {
searchstore->query(sd, type, min_price, max_price, (const unsigned short*)itemlist, item_count, (const unsigned short*)cardlist, card_count);
}
-
/// Results for a store search request (ZC_SEARCH_STORE_INFO_ACK).
/// 0836 <packet len>.W <is first page>.B <is next page>.B <remaining uses>.B { <store id>.L <account id>.L <shop name>.80B <nameid>.W <item type>.B <price>.L <amount>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
/// is first page:
@@ -17229,7 +16779,6 @@ void clif_search_store_info_ack(struct map_session_data* sd)
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Notification of failure when searching for stores (ZC_SEARCH_STORE_INFO_FAILED).
/// 0837 <reason>.B
/// reason:
@@ -17250,7 +16799,6 @@ void clif_search_store_info_failed(struct map_session_data* sd, unsigned char re
WFIFOSET(fd,packet_len(0x837));
}
-
void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to display next page of results (CZ_SEARCH_STORE_INFO_NEXT_PAGE).
/// 0838
@@ -17259,7 +16807,6 @@ void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data* sd)
searchstore->next(sd);
}
-
/// Opens the search store window (ZC_OPEN_SEARCH_STORE_INFO).
/// 083a <type>.W <remaining uses>.B
/// type:
@@ -17280,7 +16827,6 @@ void clif_open_search_store_info(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0x83a));
}
-
void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to close the store search window (CZ_CLOSE_SEARCH_STORE_INFO).
/// 083b
@@ -17289,7 +16835,6 @@ void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data* sd)
searchstore->close(sd);
}
-
void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
/// Request to invoke catalog effect on a store from search results (CZ_SSILIST_ITEM_CLICK).
/// 083c <account id>.L <store id>.L <nameid>.W
@@ -17306,7 +16851,6 @@ void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data* sd
searchstore->click(sd, account_id, store_id, nameid);
}
-
/// Notification of the store position on current map (ZC_SSILIST_ITEM_CLICK_ACK).
/// 083d <xPos>.W <yPos>.W
void clif_search_store_info_click_ack(struct map_session_data* sd, short x, short y)
@@ -17322,7 +16866,6 @@ void clif_search_store_info_click_ack(struct map_session_data* sd, short x, shor
WFIFOSET(fd,packet_len(0x83d));
}
-
/// Parse function for packet debugging.
void clif_parse_debug(int fd,struct map_session_data *sd) {
int cmd, packet_len;
@@ -17684,7 +17227,6 @@ void clif_cashshop_db(void) {
}
}
-
RECREATE(clif->cs.data[i], struct hCSData *, ++clif->cs.item_count[i]);
CREATE(clif->cs.data[i][ clif->cs.item_count[i] - 1 ], struct hCSData , 1);
@@ -18007,7 +17549,6 @@ void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK
}
}
-
void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, char *name) {
struct packet_bgqueue_notice_delete p;
@@ -18384,7 +17925,7 @@ int clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst
if(sc && sc->count && sc->data[SC_ILLUSION]) {
if(in_damage) in_damage = in_damage*(sc->data[SC_ILLUSION]->val2) + rnd()%100;
}
-
+
#if PACKETVER < 20071113
damage = (short)min(in_damage,INT16_MAX);
#else
@@ -18525,7 +18066,7 @@ void clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, i
p.prev_leader_aid = prev_leader_aid;
p.new_leader_aid = new_leader_aid;
-
+
clif->send(&p,sizeof(p),&sd->bl,PARTY);
}
@@ -18533,12 +18074,12 @@ void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) __attribute__(
/* Roulette System [Yommy/Hercules] */
void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) {
struct packet_roulette_open_ack p;
-
+
if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
return;
}
-
+
p.PacketType = 0xa1a;
p.Result = 0;
p.Serial = 0;
@@ -18561,11 +18102,11 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) {
clif->message(fd,"Roulette is disabled");
return;
}
-
+
p.PacketType = rouletteinfoackType;
p.PacketLength = 8 + (42 * 8);
p.RouletteSerial = 1;
-
+
for(i = 0; i < MAX_ROULETTE_LEVEL; i++) {
for(j = 0; j < MAX_ROULETTE_COLUMNS-i; j++) {
p.ItemInfo[count].Row = i;
@@ -18575,24 +18116,20 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) {
count++;
}
}
-
clif->send(&p,sizeof(p), &sd->bl, SELF);
return;
}
void clif_parse_RouletteClose(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
void clif_parse_RouletteClose(int fd, struct map_session_data* sd) {
-
if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
return;
}
-
-
+
/** What do we need this for? (other than state tracking), game client closes the window without our response. **/
-
//ShowDebug("clif_parse_RouletteClose\n");
-
+
return;
}
@@ -18600,24 +18137,23 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) __attribut
void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
unsigned char result = GENERATE_ROULETTE_SUCCESS;
short stage = sd->roulette.stage;
-
+
if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
return;
}
-
+
if( sd->roulette.stage >= MAX_ROULETTE_LEVEL )
stage = sd->roulette.stage = 0;
-
+
if( stage == 0 ) {
if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) <= 0 &&
pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) < 10 &&
pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) < 10 )
result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
}
-
+
if( result == GENERATE_ROULETTE_SUCCESS ) {
-
if( stage == 0 ) {
if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) > 0 ) {
pc_setglobalreg(sd, script->add_str("TmpRouletteBronze"), pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) - 1);
@@ -18629,7 +18165,6 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
stage = sd->roulette.stage = 4;
}
}
-
sd->roulette.prizeStage = stage;
sd->roulette.prizeIdx = rnd()%clif->rd.items[stage];
if( sd->roulette.prizeIdx == 0 ) {
@@ -18638,15 +18173,15 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
it.nameid = clif->rd.nameid[stage][0];
it.identify = 1;
-
+
pc->additem(sd, &it, clif->rd.qty[stage][0], LOG_TYPE_OTHER);/** TODO maybe a new log type for roulette items? **/
-
+
sd->roulette.stage = 0;
result = GENERATE_ROULETTE_LOSING;
} else
sd->roulette.claimPrize = true;
}
-
+
clif->roulette_generate_ack(sd,result,stage,sd->roulette.prizeIdx,0);
if( result == GENERATE_ROULETTE_SUCCESS )
sd->roulette.stage++;
@@ -18658,19 +18193,19 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) __attribut
**/
void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) {
struct packet_roulette_itemrecv_ack p;
-
+
if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
return;
}
-
+
p.PacketType = roulettercvitemackType;
p.AdditionItemID = 0;/** TODO **/
-
+
if( sd->roulette.claimPrize ) {
struct item it;
memset(&it, 0, sizeof(it));
-
+
it.nameid = clif->rd.nameid[sd->roulette.prizeStage][sd->roulette.prizeIdx];
it.identify = 1;
@@ -18697,7 +18232,7 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) {
}
} else
p.Result = RECV_ITEM_FAILED;
-
+
clif->send(&p,sizeof(p), &sd->bl, SELF);
return;
}
@@ -18707,39 +18242,38 @@ bool clif_parse_roulette_db(void) {
config_setting_t *roulette = NULL, *levels = NULL;
const char *config_filename = "db/roulette_db.conf"; // FIXME hardcoded name
int i, j, item_count_t = 0;
-
+
for( i = 0; i < MAX_ROULETTE_LEVEL; i++ ) {
clif->rd.items[i] = 0;
}
-
+
if (libconfig->read_file(&roulette_conf, config_filename)) {
ShowError("can't read %s\n", config_filename);
return false;
}
-
roulette = libconfig->lookup(&roulette_conf, "roulette");
-
+
if( roulette != NULL && (levels = libconfig->setting_get_elem(roulette, 0)) != NULL ) {
for(i = 0; i < MAX_ROULETTE_LEVEL; i++) {
config_setting_t *level;
char entry_name[10];
-
+
sprintf(entry_name,"level_%d",i+1);
-
+
if( (level = libconfig->setting_get_member(levels, entry_name)) != NULL ) {
int k, item_count = libconfig->setting_length(level);
-
+
for(k = 0; k < item_count; k++) {
config_setting_t *entry = libconfig->setting_get_elem(level,k);
const char *name = config_setting_name(entry);
int qty = libconfig->setting_get_int(entry);
struct item_data * data = NULL;
-
+
if( qty < 1 ) {
ShowWarning("roulette_db: unsupported qty '%d' for entry named '%s' in category '%s'\n", qty, name, entry_name);
continue;
}
-
+
if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) {
if( !( data = itemdb->exists(atoi(name+2))) ) {
ShowWarning("roulette_db: unknown item id '%s' in category '%s'\n", name+2, entry_name);
@@ -18751,26 +18285,25 @@ bool clif_parse_roulette_db(void) {
continue;
}
}
-
+
j = clif->rd.items[i];
RECREATE(clif->rd.nameid[i],int,++clif->rd.items[i]);
RECREATE(clif->rd.qty[i],int,clif->rd.items[i]);
-
+
clif->rd.nameid[i][j] = data->nameid;
clif->rd.qty[i][j] = qty;
-
+
item_count_t++;
}
}
}
-
}
libconfig->destroy(&roulette_conf);
-
+
for(i = 0; i < MAX_ROULETTE_LEVEL; i++) {
int limit = MAX_ROULETTE_COLUMNS-i;
if( clif->rd.items[i] == limit ) continue;
-
+
if( clif->rd.items[i] > limit ) {
ShowWarning("roulette_db: level %d has %d items, only %d supported, capping...\n",i+1,clif->rd.items[i],limit);
clif->rd.items[i] = limit;
@@ -18778,23 +18311,20 @@ bool clif_parse_roulette_db(void) {
}
/** this scenario = clif->rd.items[i] < limit **/
ShowWarning("roulette_db: level %d has %d items, %d are required. filling with apples\n",i+1,clif->rd.items[i],limit);
-
+
clif->rd.items[i] = limit;
RECREATE(clif->rd.nameid[i],int,clif->rd.items[i]);
RECREATE(clif->rd.qty[i],int,clif->rd.items[i]);
-
for(j = 0; j < MAX_ROULETTE_COLUMNS-i; j++) {
- if( clif->rd.qty[i][j] ) continue;
-
+ if (clif->rd.qty[i][j])
+ continue;
clif->rd.nameid[i][j] = ITEMID_APPLE;
clif->rd.qty[i][j] = 1;
}
}
-
-
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", item_count_t, config_filename);
-
+
return true;
}
@@ -18813,13 +18343,13 @@ void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char resul
p.RemainBronze = pc_readglobalreg(sd, script->add_str("TmpRouletteBronze"));
p.RemainGold = pc_readglobalreg(sd, script->add_str("TmpRouletteGold"));
p.RemainSilver = pc_readglobalreg(sd, script->add_str("TmpRouletteSilver"));
-
+
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
-/**
-* Stackable items merger
-**/
+/**
+ * Stackable items merger
+ */
void clif_openmergeitem(int fd, struct map_session_data *sd)
{
int i = 0, n = 0, j = 0;
@@ -18838,8 +18368,6 @@ void clif_openmergeitem(int fd, struct map_session_data *sd)
merge_items[n].nameid = item_data->nameid;
merge_items[n].position = i + 2;
n++;
-
-
}
qsort(merge_items,n,sizeof(struct merge_item),clif->comparemergeitem);
@@ -18888,7 +18416,7 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd)
nullpo_retv(sd);
length = (RFIFOW(fd,2) - 4)/2;
-
+
if (length >= MAX_INVENTORY || length < 2) {
WFIFOHEAD(fd,7);
WFIFOW(fd,0) = 0x96f;
@@ -18923,7 +18451,6 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd)
n++;
}
-
if (n < 2 || count == 0) {
WFIFOHEAD(fd,7);
WFIFOW(fd,0) = 0x96f;
@@ -18947,14 +18474,13 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd)
for (i = 0; i < n; i++)
pc->delitem(sd,indexes[i],amounts[i],0,DELITEM_NORMAL,LOG_TYPE_NPC);
-
memset(&item_data,'\0',sizeof(item_data));
item_data.nameid = nameid;
item_data.identify = 1;
item_data.unique_id = itemdb->unique_id(sd);
pc->additem(sd,&item_data,count,LOG_TYPE_NPC);
-
+
ARR_FIND(0,MAX_INVENTORY,i,item_data.unique_id == sd->status.inventory[i].unique_id);
WFIFOHEAD(fd,7);
@@ -18963,7 +18489,6 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd)
WFIFOW(fd,4) = count;
WFIFOB(fd,6) = MERGEITEM_SUCCESS;
WFIFOSET(fd,7);
-
}
void clif_cancelmergeitem (int fd, struct map_session_data *sd)
@@ -19195,14 +18720,13 @@ static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...)
va_end(va);
}
void packetdb_loaddb(void) {
-
memset(packet_db,0,sizeof(packet_db));
-
- #define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF)
- #define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0)
- #include "packets.h" /* load structure data */
- #undef packet
- #undef packetKeys
+
+#define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF)
+#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0)
+#include "packets.h" /* load structure data */
+#undef packet
+#undef packetKeys
}
void clif_bc_ready(void) {
if( battle_config.display_status_timers )
@@ -19262,7 +18786,7 @@ void do_final_clif(void)
}
aFree(clif->cs.data[i]);
}
-
+
for(i = 0; i < MAX_ROULETTE_LEVEL; i++) {
if( clif->rd.nameid[i] )
aFree(clif->rd.nameid[i]);
diff --git a/src/map/duel.c b/src/map/duel.c
index 21f5c0c93..e18e2fc45 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -26,10 +26,10 @@ struct duel_interface *duel;
void duel_savetime(struct map_session_data* sd) {
time_t clock;
struct tm *t;
-
+
time(&clock);
t = localtime(&clock);
-
+
pc_setglobalreg(sd, script->add_str("PC_LAST_DUEL_TIME"), t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
}
@@ -37,12 +37,12 @@ int duel_checktime(struct map_session_data* sd) {
int diff;
time_t clock;
struct tm *t;
-
+
time(&clock);
t = localtime(&clock);
-
+
diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, script->add_str("PC_LAST_DUEL_TIME") );
-
+
return !(diff >= 0 && diff < battle_config.duel_time_interval);
}
@@ -55,7 +55,7 @@ static int duel_showinfo_sub(struct map_session_data* sd, va_list va)
nullpo_retr(1, sd);
nullpo_retr(1, ssd);
if (sd->duel_group != ssd->duel_group) return 0;
-
+
sprintf(output, " %d. %s", ++(*p), sd->status.name);
clif_disp_onlyself(ssd, output, strlen(output));
return 1;
@@ -84,21 +84,21 @@ void duel_showinfo(const unsigned int did, struct map_session_data* sd) {
int duel_create(struct map_session_data* sd, const unsigned int maxpl) {
int i=1;
char output[256];
-
+
nullpo_ret(sd);
while(i < MAX_DUEL && duel->list[i].members_count > 0) i++;
if(i == MAX_DUEL) return 0;
-
+
duel->count++;
sd->duel_group = i;
duel->list[i].members_count++;
duel->list[i].invites_count = 0;
duel->list[i].max_players_limit = maxpl;
-
+
safestrncpy(output, msg_sd(sd,372), sizeof(output)); // " -- Duel has been created (@invite/@leave) --"
clif_disp_onlyself(sd, output, strlen(output));
-
+
clif->map_property(sd, MAPPROPERTY_FREEPVPZONE);
clif->maptypeproperty2(&sd->bl,SELF);
return i;
@@ -115,7 +115,7 @@ void duel_invite(const unsigned int did, struct map_session_data* sd, struct map
target_sd->duel_invite = did;
duel->list[did].invites_count++;
-
+
// "Blue -- Player %s invites you to PVP duel (@accept/@reject) --"
sprintf(output, msg_sd(target_sd,374), sd->status.name);
clif->broadcast((struct block_list *)target_sd, output, strlen(output)+1, BC_BLUE, SELF);
@@ -132,19 +132,18 @@ static int duel_leave_sub(struct map_session_data* sd, va_list va)
void duel_leave(const unsigned int did, struct map_session_data* sd) {
char output[256];
-
+
nullpo_retv(sd);
// " <- Player %s has left duel --"
sprintf(output, msg_sd(sd,375), sd->status.name);
clif->disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
-
+
duel->list[did].members_count--;
-
if(duel->list[did].members_count == 0) {
map->foreachpc(duel_leave_sub, did);
duel->count--;
}
-
+
sd->duel_group = 0;
duel_savetime(sd);
clif->map_property(sd, MAPPROPERTY_NOTHING);
@@ -153,13 +152,13 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) {
void duel_accept(const unsigned int did, struct map_session_data* sd) {
char output[256];
-
+
nullpo_retv(sd);
duel->list[did].members_count++;
sd->duel_group = sd->duel_invite;
duel->list[did].invites_count--;
sd->duel_invite = 0;
-
+
// " -> Player %s has accepted duel --"
sprintf(output, msg_sd(sd,376), sd->status.name);
clif->disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
@@ -170,12 +169,12 @@ void duel_accept(const unsigned int did, struct map_session_data* sd) {
void duel_reject(const unsigned int did, struct map_session_data* sd) {
char output[256];
-
+
nullpo_retv(sd);
// " -- Player %s has rejected duel --"
sprintf(output, msg_sd(sd,377), sd->status.name);
clif->disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
-
+
duel->list[did].invites_count--;
sd->duel_invite = 0;
}
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 435dffaf4..b629275e5 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -785,7 +785,7 @@ int read_elementaldb(void) {
struct status_data *estatus;
sprintf(line, "%s/%s", map->db_path, "elemental_db.txt");
-
+
if( core->runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
memset(elemental->db,0,sizeof(elemental->db));
@@ -980,27 +980,26 @@ void elemental_defaults(void) {
/* */
memset(elemental->db,0,sizeof(elemental->db));
-
+
/* funcs */
-
elemental->class = elemental_class;
elemental->get_viewdata = elemental_get_viewdata;
-
+
elemental->create = elemental_create;
elemental->data_received = elemental_data_received;
elemental->save = elemental_save;
-
+
elemental->change_mode_ack = elemental_change_mode_ack;
elemental->change_mode = elemental_change_mode;
-
+
elemental->heal = elemental_heal;
elemental->dead = elemental_dead;
-
+
elemental->delete = elemental_delete;
elemental->summon_stop = elemental_summon_stop;
-
+
elemental->get_lifetime = elemental_get_lifetime;
-
+
elemental->unlocktarget = elemental_unlocktarget;
elemental->skillnotok = elemental_skillnotok;
elemental->set_target = elemental_set_target;
@@ -1008,11 +1007,11 @@ void elemental_defaults(void) {
elemental->clean_effect = elemental_clean_effect;
elemental->action = elemental_action;
elemental->skill_get_requirements = elemental_skill_get_requirements;
-
+
elemental->read_skilldb = read_elemental_skilldb;
elemental->reload_db = reload_elementaldb;
elemental->reload_skilldb = reload_elemental_skilldb;
-
+
elemental->search_index = elemental_search_index;
elemental->summon_init = elemental_summon_init;
elemental->summon_end_timer = elemental_summon_end_timer;
diff --git a/src/map/guild.c b/src/map/guild.c
index 0e5fa977e..7a187b625 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -227,7 +227,7 @@ int guild_getposition(struct guild* g, struct map_session_data* sd)
if( g == NULL && (g=sd->guild) == NULL )
return -1;
-
+
ARR_FIND( 0, g->max_member, i, g->member[i].account_id == sd->status.account_id && g->member[i].char_id == sd->status.char_id );
return( i < g->max_member ) ? g->member[i].position : -1;
}
@@ -263,7 +263,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
struct guild *g;
c = DB->data2ptr(data);
-
+
if (
(g = guild->search(c->guild_id)) == NULL ||
(i = guild->getindex(g, c->account_id, c->char_id)) < 0
@@ -475,7 +475,7 @@ int guild_recv_info(struct guild *sg) {
if (channel->config->ally_autojoin) {
struct s_mapiterator* iter = mapit_getallusers();
struct guild *tg[MAX_GUILDALLIANCE];
-
+
for (i = 0; i < MAX_GUILDALLIANCE; i++) {
tg[i] = NULL;
if( sg->alliance[i].opposition == 0 && sg->alliance[i].guild_id )
@@ -507,11 +507,8 @@ int guild_recv_info(struct guild *sg) {
}
}
}
-
mapit->free(iter);
-
}
-
aChSysSave = chan;
}
@@ -540,16 +537,16 @@ int guild_recv_info(struct guild *sg) {
instances_save = g->instances;
}
memcpy(g,sg,sizeof(struct guild));
-
+
g->channel = aChSysSave;
g->instance = instance_save;
g->instances = instances_save;
-
+
if(g->max_member > MAX_GUILD) {
ShowError("guild_recv_info: Received guild with %d members, but MAX_GUILD is only %d. Extra guild-members have been lost!\n", g->max_member, MAX_GUILD);
g->max_member = MAX_GUILD;
}
-
+
for(i=bm=m=0;i<g->max_member;i++){
if(g->member[i].account_id>0){
sd = g->member[i].sd = guild->sd_check(g->guild_id, g->member[i].account_id, g->member[i].char_id);
@@ -623,7 +620,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
return 0;
}
}
-
+
if (!tsd->fd) { //You can't invite someone who has already disconnected.
clif->guild_inviteack(sd,1);
return 0;
@@ -735,10 +732,9 @@ void guild_member_joined(struct map_session_data *sd)
if (i == -1)
sd->status.guild_id = 0;
else {
-
g->member[i].sd = sd;
sd->guild = g;
-
+
if (channel->config->ally && channel->config->ally_autojoin) {
channel->join(g->channel, sd, "", true);
}
@@ -868,7 +864,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c
if(g == NULL)
return 0; // no such guild (error!)
-
+
i = guild->getindex(g, account_id, char_id);
if( i == -1 )
return 0; // not a member (inconsistency!)
@@ -876,7 +872,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; // no one online to inform
-
+
#ifdef GP_BOUND_ITEMS
//Guild bound item check
guild->retrieveitembound(char_id,account_id,guild_id);
@@ -940,9 +936,9 @@ void guild_retrieveitembound(int char_id,int aid,int guild_id) {
int guild_send_memberinfoshort(struct map_session_data *sd,int online)
{ // cleaned up [LuzZza]
struct guild *g;
-
+
nullpo_ret(sd);
-
+
if(sd->status.guild_id <= 0)
return 0;
@@ -960,7 +956,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
ShowError("guild_send_memberinfoshort: Failed to locate member %d:%d in guild %d!\n", sd->status.account_id, sd->status.char_id, g->guild_id);
return 0;
}
-
+
if (sd->state.connect_new) {
//Note that this works because it is invoked in parse_LoadEndAck before connect_new is cleared.
clif->guild_belonginfo(sd,g);
@@ -971,13 +967,12 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_)
{ // cleaned up [LuzZza]
-
int i,alv,c,idx=-1,om=0,oldonline=-1;
struct guild *g = guild->search(guild_id);
-
+
if(g == NULL)
return 0;
-
+
for(i=0,alv=0,c=0,om=0;i<g->max_member;i++){
struct guild_member *m=&g->member[i];
if(!m->account_id) continue;
@@ -993,7 +988,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
if(m->online)
om++;
}
-
+
if(idx == -1 || c == 0) {
//Treat char_id who doesn't match guild_id (not found as member)
struct map_session_data *sd = map->id2sd(account_id);
@@ -1004,7 +999,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
ShowWarning("guild: not found member %d,%d on %d[%s]\n", account_id,char_id,guild_id,g->name);
return 0;
}
-
+
g->average_lv=alv/c;
g->connect_member=om;
@@ -1013,14 +1008,14 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
if(oldonline!=online)
clif->guild_memberlogin_notice(g, idx, online);
-
+
if(!g->member[idx].sd)
return 0;
//Send XY dot updates. [Skotlex]
//Moved from guild_send_memberinfoshort [LuzZza]
for(i=0; i < g->max_member; i++) {
-
+
if(!g->member[i].sd || i == idx ||
g->member[i].sd->bl.m != g->member[idx].sd->bl.m)
continue;
@@ -1079,7 +1074,7 @@ int guild_memberposition_changed(struct guild *g,int idx,int pos)
g->member[idx].position=pos;
clif->guild_memberpositionchanged(g,idx);
-
+
// Update char position in client [LuzZza]
if(g->member[idx].sd != NULL)
clif->charnameupdate(g->member[idx].sd);
@@ -1111,7 +1106,7 @@ int guild_position_changed(int guild_id,int idx,struct guild_position *p)
return 0;
memcpy(&g->position[idx],p,sizeof(struct guild_position));
clif->guild_positionchanged(g,idx);
-
+
// Update char name in client [LuzZza]
for(i=0;i<g->max_member;i++)
if(g->member[i].position == idx && g->member[i].sd != NULL)
@@ -1251,29 +1246,27 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) {
struct guild *g;
struct guild_expcache *c;
int per;
-
+
nullpo_ret(sd);
if (!exp) return 0;
-
+
if (sd->status.guild_id == 0 ||
(g = sd->guild) == NULL ||
(per = guild->getposition(g,sd)) < 0 ||
(per = g->position[per].exp_mode) < 1)
return 0;
-
if (per < 100)
exp = exp * per / 100;
//Otherwise tax everything.
-
c = DB->data2ptr(guild->expcache_db->ensure(guild->expcache_db, DB->i2key(sd->status.char_id), guild->create_expcache, sd));
if (c->exp > UINT64_MAX - exp)
c->exp = UINT64_MAX;
else
c->exp += exp;
-
+
return exp;
}
@@ -1433,7 +1426,6 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
return 0;
}
-
nullpo_ret(sd);
if(tsd==NULL || tsd->status.guild_id<=0)
@@ -1499,7 +1491,7 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
struct guild *g, *tg; // Reconfirm the number of alliance
g=sd->guild;
tg=tsd->guild;
-
+
if(g==NULL || guild->get_alliance_count(g,0) >= battle_config.max_guild_alliance){
clif->guild_allianceack(sd,4);
clif->guild_allianceack(tsd,3);
@@ -1639,7 +1631,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
channel->guild_leave_alliance(g[1],g[0]);
}
}
-
+
if (!(flag & 0x08)) { // new relationship
for(i=0;i<2-(flag&1);i++) {
if(g[i]!=NULL) {
@@ -1671,7 +1663,6 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
clif->guild_oppositionack(sd[0],0);
}
-
for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members
if (g[i] != NULL) {
for (j = 0; j < g[i]->max_member; j++) {
@@ -1771,7 +1762,7 @@ int guild_broken(int guild_id,int flag)
}
if( g->instance )
aFree(g->instance);
-
+
if( g->hdata )
{
for( i = 0; i < g->hdatac; i++ ) {
@@ -1782,7 +1773,7 @@ int guild_broken(int guild_id,int flag)
}
aFree(g->hdata);
}
-
+
idb_remove(guild->db,guild_id);
return 0;
}
@@ -1795,7 +1786,7 @@ int guild_gm_change(int guild_id, struct map_session_data *sd)
if (sd->status.guild_id != guild_id)
return 0;
-
+
g=guild->search(guild_id);
nullpo_ret(g);
@@ -1839,7 +1830,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id)
clif->message(g->member[pos].sd->fd, msg_sd(g->member[pos].sd,878)); //"You no longer are the Guild Master."
g->member[pos].sd->state.gmaster_flag = 0;
}
-
+
if (g->member[0].sd && g->member[0].sd->fd) {
clif->message(g->member[0].sd->fd, msg_sd(g->member[0].sd,879)); //"You have become the Guild Master!"
g->member[0].sd->state.gmaster_flag = 1;
@@ -1867,7 +1858,7 @@ int guild_break(struct map_session_data *sd,char *name) {
struct guild *g;
struct unit_data *ud;
int i;
-
+
nullpo_ret(sd);
if( (g=sd->guild)==NULL )
@@ -1888,7 +1879,7 @@ int guild_break(struct map_session_data *sd,char *name) {
clif->guild_broken(sd,2);
return 0;
}
-
+
/* regardless of char server allowing it, we clear the guild master's auras */
if( (ud = unit->bl2ud(&sd->bl)) ) {
int count = 0;
@@ -1905,7 +1896,6 @@ int guild_break(struct map_session_data *sd,char *name) {
groups[count++] = ud->skillunit[i];
break;
}
-
}
for(i = 0; i < count; i++) { // FIXME: Why is this not done in the above loop?
skill->del_unitgroup(groups[i],ALC_MARK);
@@ -1915,7 +1905,7 @@ int guild_break(struct map_session_data *sd,char *name) {
#ifdef GP_BOUND_ITEMS
pc->bound_clear(sd,IBT_GUILD);
#endif
-
+
intif->guild_break(g->guild_id);
return 1;
}
@@ -2153,7 +2143,7 @@ bool guild_isallied(int guild_id, int guild_id2)
void guild_flag_add(struct npc_data *nd) {
int i;
-
+
/* check */
for( i = 0; i < guild->flags_count; i++ ) {
if( guild->flags[i] && guild->flags[i]->bl.id == nd->bl.id ) {
@@ -2184,11 +2174,10 @@ void guild_flag_remove(struct npc_data *nd) {
for( i = 0, cursor = 0; i < guild->flags_count; i++ ) {
if( guild->flags[i] == NULL )
continue;
-
+
if( cursor != i ) {
memmove(&guild->flags[cursor], &guild->flags[i], sizeof(struct npc_data*));
}
-
cursor++;
}
@@ -2234,7 +2223,7 @@ void guild_flags_clear(void) {
if( guild->flags[i] )
guild->flags[i] = NULL;
}
-
+
guild->flags_count = 0;
}
@@ -2247,7 +2236,7 @@ void do_init_guild(bool minimal) {
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);
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]
@@ -2262,7 +2251,7 @@ void do_final_guild(void) {
DBIterator *iter = db_iterator(guild->db);
struct guild *g;
int i;
-
+
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) {
if( g->channel != NULL )
channel->delete(g->channel);
@@ -2281,21 +2270,21 @@ void do_final_guild(void) {
aFree(g->hdata);
}
}
-
+
dbi_destroy(iter);
-
+
db_destroy(guild->db);
guild->castle_db->destroy(guild->castle_db,guild->castle_db_final);
guild->expcache_db->destroy(guild->expcache_db,guild->expcache_db_final);
guild->infoevent_db->destroy(guild->infoevent_db,guild->eventlist_db_final);
ers_destroy(guild->expcache_ers);
-
+
if( guild->flags )
aFree(guild->flags);
}
void guild_defaults(void) {
guild = &guild_s;
-
+
guild->init = do_init_guild;
guild->final = do_final_guild;
/* */
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index cc736708d..d0a4f6679 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -297,10 +297,10 @@ bool homunculus_levelup(struct homun_data *hd) {
ShowError("homunculus_levelup: Invalid class %d. \n", hd->homunculus.class_);
return false;
}
-
+
if( !hd->exp_next || hd->homunculus.exp < hd->exp_next )
return false;
-
+
switch( htype ) {
case HT_REG:
case HT_EVO:
@@ -312,7 +312,7 @@ bool homunculus_levelup(struct homun_data *hd) {
return false;
break;
}
-
+
hom = &hd->homunculus;
hom->level++ ;
if (!(hom->level % 3))
@@ -385,7 +385,7 @@ bool homunculus_evolve(struct homun_data *hd) {
sd = hd->master;
if (!sd)
return false;
-
+
if(!hd->homunculusDB->evo_class || hd->homunculus.class_ == hd->homunculusDB->evo_class) {
clif->emotion(&hd->bl, E_SWT);
return false;
@@ -438,7 +438,7 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) {
sd = hd->master;
if (!sd)
return false;
-
+
m_class = homun->class2type(hd->homunculus.class_);
m_id = homun->class2type(homun_id);
@@ -461,7 +461,6 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) {
clif->emotion(&sd->bl, E_NO1);
clif->specialeffect(&hd->bl,568,AREA);
-
//status_Calc flag&1 will make current HP/SP be reloaded from hom structure
hom = &hd->homunculus;
hom->hp = hd->battle_status.hp;
@@ -480,12 +479,12 @@ int homunculus_gainexp(struct homun_data *hd,unsigned int exp) {
if(hd->homunculus.vaporize != HOM_ST_ACTIVE)
return 1;
-
+
if( (htype = homun->class2type(hd->homunculus.class_)) == HT_INVALID ) {
ShowError("homunculus_gainexp: Invalid class %d. \n", hd->homunculus.class_);
return 0;
}
-
+
switch( htype ) {
case HT_REG:
case HT_EVO:
@@ -763,7 +762,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;
hd->masterteleport_timer = 0;
-
+
map->addiddb(&hd->bl);
status_calc_homunculus(hd,SCO_FIRST);
status_percent_heal(&hd->bl, 100, 100);
@@ -835,7 +834,7 @@ bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) {
if (!sd->status.hom_id) //Hom just created.
sd->status.hom_id = sh->hom_id;
-
+
if (sd->hd) //uh? Overwrite the data.
memcpy(&sd->hd->homunculus, sh, sizeof(struct s_homunculus));
else
@@ -985,10 +984,10 @@ bool homunculus_shuffle(struct homun_data *hd) {
exp = hd->homunculus.exp;
memcpy(&b_skill, &hd->homunculus.hskill, sizeof(b_skill));
skillpts = hd->homunculus.skillpts;
-
+
//Reset values to level 1.
homun->stat_reset(hd);
-
+
//Level it back up
do {
hd->homunculus.exp += hd->exp_next;
@@ -1159,7 +1158,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) {
// check for bounds [celest]
classid = atoi(split[0]) - HM_CLASS_BASE;
-
+
if ( classid >= MAX_HOMUNCULUS_CLASS ) {
ShowWarning("homunculus_read_skill_db_sub: Invalid homunculus class %d.\n", atoi(split[0]));
return false;
@@ -1273,7 +1272,7 @@ void do_init_homunculus(bool minimal) {
}
void do_final_homunculus(void) {
-
+
}
void homunculus_defaults(void) {
diff --git a/src/map/instance.c b/src/map/instance.c
index 1fc396325..300247fe7 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -47,7 +47,6 @@ bool instance_is_valid(int instance_id) {
return true;
}
-
/*--------------------------------------
* name : instance name
* Return value could be
@@ -61,7 +60,7 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
struct guild *g = NULL;
short *iptr = NULL;
int i;
-
+
switch ( type ) {
case IOT_NONE:
break;
@@ -93,15 +92,15 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
ShowError("instance_create: unknown type %d for owner_id %d and name %s.\n", type,owner_id,name);
return -1;
}
-
+
if( type != IOT_NONE && *icptr ) {
ARR_FIND(0, *icptr, i, strcmp(instance->list[iptr[i]].name,name) == 0 );
if( i != *icptr )
return -4;/* already got this instance */
}
-
+
ARR_FIND(0, instance->instances, i, instance->list[i].state == INSTANCE_FREE);
-
+
if( i == instance->instances )
RECREATE(instance->list, struct instance_data, ++instance->instances);
@@ -121,9 +120,9 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
instance->list[i].respawn.map = 0;
instance->list[i].respawn.y = 0;
instance->list[i].respawn.x = 0;
-
+
safestrncpy( instance->list[i].name, name, sizeof(instance->list[i].name) );
-
+
if( type != IOT_NONE ) {
int j;
ARR_FIND(0, *icptr, j, iptr[j] == -1);
@@ -146,7 +145,7 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
iptr[j] = i;
}
}
-
+
clif->instance(i, 1, 0); // Start instancing window
return i;
}
@@ -166,27 +165,27 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
ShowError("instance_add_map: trying to attach '%s' map to non-existing instance %d.\n", name, instance_id);
return -1;
}
-
+
if( map_name != NULL && strdb_iget(mapindex->db, map_name) ) {
ShowError("instance_add_map: trying to create instanced map with existent name '%s'\n", map_name);
return -2;
}
-
+
if( map->list[m].instance_id >= 0 ) {
// Source map already belong to a Instance.
ShowError("instance_add_map: trying to instance already instanced map %s.\n", name);
return -4;
}
-
+
ARR_FIND( instance->start_id, map->count, i, map->list[i].name[0] == 0 ); // Searching for a Free Map
-
+
if( i < map->count )
im = i; // Unused map found (old instance)
else {
im = map->count; // Using next map index
RECREATE(map->list,struct map_data,++map->count);
}
-
+
if( map->list[m].cell == (struct mapcell *)0xdeadbeaf )
map->cellfromcache(&map->list[m]);
@@ -199,13 +198,13 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
map->list[im].index = mapindex->addmap(-1, map->list[im].name); // Add map index
map->list[im].channel = NULL;
-
+
if( !map->list[im].index ) {
map->list[im].name[0] = '\0';
ShowError("instance_add_map: no more free map indexes.\n");
return -3; // No free map index
}
-
+
// Reallocate cells
num_cell = map->list[im].xs * map->list[im].ys;
CREATE( map->list[im].cell, struct mapcell, num_cell );
@@ -221,7 +220,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
map->list[im].cell[j].npc = 0;
map->list[im].cell[j].landprotector = 0;
}
-
+
size = map->list[im].bxs * map->list[im].bys * sizeof(struct block_list*);
map->list[im].block = (struct block_list**)aCalloc(size, 1);
map->list[im].block_mob = (struct block_list**)aCalloc(size, 1);
@@ -246,7 +245,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
if( map->list[m].skill_count ) {
map->list[im].skill_count = map->list[m].skill_count;
CREATE( map->list[im].skills, struct mapflag_skill_adjust*, map->list[im].skill_count );
-
+
for(i = 0; i < map->list[im].skill_count; i++) {
CREATE( map->list[im].skills[i], struct mapflag_skill_adjust, 1);
memcpy( map->list[im].skills[i],map->list[m].skills[i],sizeof(struct mapflag_skill_adjust));
@@ -256,20 +255,20 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
if( map->list[m].zone_mf_count ) {
map->list[im].zone_mf_count = map->list[m].zone_mf_count;
CREATE( map->list[im].zone_mf, char *, map->list[im].zone_mf_count );
-
+
for(i = 0; i < map->list[im].zone_mf_count; i++) {
CREATE(map->list[im].zone_mf[i], char, MAP_ZONE_MAPFLAG_LENGTH);
safestrncpy(map->list[im].zone_mf[i],map->list[m].zone_mf[i],MAP_ZONE_MAPFLAG_LENGTH);
}
}
-
+
//Mimic questinfo
if( map->list[m].qi_count ) {
map->list[im].qi_count = map->list[m].qi_count;
CREATE( map->list[im].qi_data, struct questinfo, map->list[im].qi_count );
memcpy( map->list[im].qi_data, map->list[m].qi_data, map->list[im].qi_count * sizeof(struct questinfo) );
}
-
+
map->list[im].m = im;
map->list[im].instance_id = instance_id;
map->list[im].instance_src_map = m;
@@ -280,7 +279,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
instance->list[instance_id].map[instance->list[instance_id].num_map - 1] = im; // Attach to actual instance
map->addmap2db(&map->list[im]);
-
+
return im;
}
@@ -305,11 +304,11 @@ int instance_map2imap(int16 m, int instance_id) {
int instance_mapname2imap(const char *map_name, int instance_id) {
int i;
-
+
if( !instance->valid(instance_id) ) {
return -1;
}
-
+
for( i = 0; i < instance->list[instance_id].num_map; i++ ) {
if( instance->list[instance_id].map[i] && !strcmpi(map->list[map->list[instance->list[instance_id].map[i]].instance_src_map].name,map_name) )
return instance->list[instance_id].map[i];
@@ -317,7 +316,6 @@ int instance_mapname2imap(const char *map_name, int instance_id) {
return -1;
}
-
/*--------------------------------------
* m : source map
* instance_id : where to search
@@ -354,7 +352,7 @@ int instance_init_npc(struct block_list* bl, va_list args) {
struct npc_data *nd = (struct npc_data*)bl;
struct event_data *ev;
char evname[EVENT_NAME_LENGTH];
-
+
snprintf(evname, EVENT_NAME_LENGTH, "%s::OnInstanceInit", nd->exname);
if( ( ev = strdb_get(npc->ev_db, evname) ) )
@@ -377,7 +375,7 @@ void instance_init(int instance_id) {
/* cant be together with the previous because it will rely on all of them being up */
map->foreachininstance(instance->init_npc, instance_id, BL_NPC);
-
+
instance->list[instance_id].state = INSTANCE_BUSY;
}
@@ -387,7 +385,7 @@ void instance_init(int instance_id) {
*--------------------------------------*/
int instance_del_load(struct map_session_data* sd, va_list args) {
int16 m = va_arg(args,int);
-
+
if( !sd || sd->bl.m != m )
return 0;
@@ -428,7 +426,7 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) {
*--------------------------------------*/
void instance_del_map(int16 m) {
int i;
-
+
if( m <= 0 || map->list[m].instance_id == -1 ) {
ShowError("instance_del_map: tried to remove non-existing instance map (%d)\n", m);
return;
@@ -439,38 +437,38 @@ void instance_del_map(int16 m) {
if( map->list[m].mob_delete_timer != INVALID_TIMER )
timer->delete(map->list[m].mob_delete_timer, map->removemobs_timer);
-
+
mapindex->removemap(map_id2index(m));
// Free memory
aFree(map->list[m].cell);
aFree(map->list[m].block);
aFree(map->list[m].block_mob);
-
+
if (map->list[m].unit_count && map->list[m].units) {
for(i = 0; i < map->list[m].unit_count; i++) {
aFree(map->list[m].units[i]);
}
aFree(map->list[m].units);
}
-
+
if (map->list[m].skill_count && map->list[m].skills) {
for(i = 0; i < map->list[m].skill_count; i++) {
aFree(map->list[m].skills[i]);
}
aFree(map->list[m].skills);
}
-
+
if (map->list[m].zone_mf_count && map->list[m].zone_mf) {
for(i = 0; i < map->list[m].zone_mf_count; i++) {
aFree(map->list[m].zone_mf[i]);
}
aFree(map->list[m].zone_mf);
}
-
+
if( map->list[m].qi_data )
aFree(map->list[m].qi_data);
-
+
// Remove from instance
for( i = 0; i < instance->list[map->list[m].instance_id].num_map; i++ ) {
if( instance->list[map->list[m].instance_id].map[i] == m ) {
@@ -481,10 +479,10 @@ void instance_del_map(int16 m) {
break;
}
}
-
+
if( i == instance->list[map->list[m].instance_id].num_map )
ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", map->list[m].name, instance->list[map->list[m].instance_id].name, m);
-
+
if( map->list[m].channel )
channel->delete(map->list[m].channel);
@@ -514,7 +512,7 @@ void instance_destroy(int instance_id) {
short *iptr = NULL;
int type, j;
unsigned int now = (unsigned int)time(NULL);
-
+
if( !instance->valid(instance_id) )
return; // nothing to do
@@ -524,7 +522,7 @@ void instance_destroy(int instance_id) {
type = 2;
else
type = 3;
-
+
clif->instance(instance_id, 5, type); // Report users this instance has been destroyed
switch ( instance->list[instance_id].owner_type ) {
@@ -555,13 +553,13 @@ void instance_destroy(int instance_id) {
ShowError("instance_destroy: unknown type %d for owner_id %d and name '%s'.\n", instance->list[instance_id].owner_type,instance->list[instance_id].owner_id,instance->list[instance_id].name);
break;
}
-
+
if( iptr != NULL ) {
ARR_FIND(0, *icptr, j, iptr[j] == instance_id);
if( j != *icptr )
iptr[j] = -1;
}
-
+
if (instance->list[instance_id].map) {
int last = 0;
while (instance->list[instance_id].num_map && last != instance->list[instance_id].map[0]) {
@@ -570,7 +568,7 @@ void instance_destroy(int instance_id) {
instance->del_map( instance->list[instance_id].map[0] );
}
}
-
+
if( instance->list[instance_id].regs.vars )
db_destroy(instance->list[instance_id].regs.vars);
if( instance->list[instance_id].regs.arrays )
@@ -585,11 +583,11 @@ void instance_destroy(int instance_id) {
if( instance->list[instance_id].map )
aFree(instance->list[instance_id].map);
-
+
instance->list[instance_id].map = NULL;
instance->list[instance_id].state = INSTANCE_FREE;
instance->list[instance_id].num_map = 0;
-
+
if (instance->list[instance_id].hdata)
{
for( j = 0; j < instance->list[instance_id].hdatac; j++ ) {
@@ -600,7 +598,7 @@ void instance_destroy(int instance_id) {
}
aFree(instance->list[instance_id].hdata);
}
-
+
instance->list[instance_id].hdata = NULL;
instance->list[instance_id].hdatac = 0;
}
@@ -688,13 +686,13 @@ void do_reload_instance(void) {
struct s_mapiterator *iter;
struct map_session_data *sd;
int i, k;
-
+
for(i = 0; i < instance->instances; i++) {
for(k = 0; k < instance->list[i].num_map; k++) {
if( !map->list[map->list[instance->list[i].map[k]].instance_src_map].flag.src4instance )
break;
}
-
+
if( k != instance->list[i].num_map ) /* any (or all) of them were disabled, we destroy */
instance->destroy(i);
else {
@@ -704,7 +702,7 @@ void do_reload_instance(void) {
instance->set_timeout(i,instance->list[i].original_progress_timeout,instance->list[i].idle_timeoutval);
}
}
-
+
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) {
if(sd && map->list[sd->bl.m].instance_id >= 0) {
@@ -714,14 +712,13 @@ void do_reload_instance(void) {
mapit->free(iter);
}
-
void do_final_instance(void) {
int i;
-
+
for(i = 0; i < instance->instances; i++) {
instance->destroy(i);
}
-
+
if( instance->list )
aFree(instance->list);
@@ -738,7 +735,7 @@ void do_init_instance(bool minimal) {
void instance_defaults(void) {
instance = &instance_s;
-
+
instance->init = do_init_instance;
instance->final = do_final_instance;
instance->reload = do_reload_instance;
diff --git a/src/map/intif.c b/src/map/intif.c
index 12f679552..1795055c4 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -279,7 +279,7 @@ int intif_saveregistry(struct map_session_data *sd) {
if (intif->CheckForCharServer() || !sd->regs.vars)
return -1;
-
+
WFIFOHEAD(inter_fd, 60000 + 300);
WFIFOW(inter_fd,0) = 0x3004;
/* 0x2 = length (set later) */
@@ -288,78 +288,76 @@ int intif_saveregistry(struct map_session_data *sd) {
WFIFOW(inter_fd,12) = 0;/* count */
plen = 14;
-
+
iter = db_iterator(sd->regs.vars);
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) {
const char *varname = NULL;
struct script_reg_state *src = NULL;
-
+
if( data->type != DB_DATA_PTR ) /* its a @number */
continue;
-
+
varname = script->get_str(script_getvarid(key.i64));
-
+
if( varname[0] == '@' ) /* @string$ can get here, so we skip */
continue;
-
+
src = DB->data2ptr(data);
/* no need! */
if( !src->update )
continue;
-
+
src->update = false;
-
+
len = strlen(varname)+1;
-
+
WFIFOB(inter_fd, plen) = (unsigned char)len;/* won't be higher; the column size is 32 */
plen += 1;
-
+
safestrncpy((char*)WFIFOP(inter_fd,plen), varname, len);
plen += len;
-
+
WFIFOL(inter_fd, plen) = script_getvaridx(key.i64);
plen += 4;
-
+
if( src->type ) {
struct script_reg_str *p = (struct script_reg_str *)src;
-
+
WFIFOB(inter_fd, plen) = p->value ? 2 : 3;
plen += 1;
-
+
if( p->value ) {
len = strlen(p->value)+1;
-
+
WFIFOB(inter_fd, plen) = (unsigned char)len;/* won't be higher; the column size is 254 */
plen += 1;
-
+
safestrncpy((char*)WFIFOP(inter_fd,plen), p->value, len);
plen += len;
} else {
script->reg_destroy_single(sd,key.i64,&p->flag);
}
-
} else {
struct script_reg_num *p = (struct script_reg_num *)src;
WFIFOB(inter_fd, plen) = p->value ? 0 : 1;
plen += 1;
-
+
if( p->value ) {
WFIFOL(inter_fd, plen) = p->value;
plen += 4;
} else {
script->reg_destroy_single(sd,key.i64,&p->flag);
}
-
}
-
+
WFIFOW(inter_fd,12) += 1;
-
+
if( plen > 60000 ) {
WFIFOW(inter_fd, 2) = plen;
WFIFOSET(inter_fd, plen);
-
+
/* prepare follow up */
WFIFOHEAD(inter_fd, 60000 + 300);
WFIFOW(inter_fd,0) = 0x3004;
@@ -367,19 +365,18 @@ int intif_saveregistry(struct map_session_data *sd) {
WFIFOL(inter_fd,4) = sd->status.account_id;
WFIFOL(inter_fd,8) = sd->status.char_id;
WFIFOW(inter_fd,12) = 0;/* count */
-
+
plen = 14;
}
-
}
dbi_destroy(iter);
/* mark & go. */
WFIFOW(inter_fd, 2) = plen;
WFIFOSET(inter_fd, plen);
-
+
sd->vars_dirty = false;
-
+
return 0;
}
@@ -826,7 +823,6 @@ int intif_guild_castle_dataload(int num, int *castle_ids)
return 1;
}
-
// Request change castle guild owner and save data
int intif_guild_castle_datasave(int castle_id,int index, int value)
{
@@ -895,7 +891,6 @@ int intif_homunculus_requestdelete(int homun_id)
}
-
//-----------------------------------------------------------------
// Packets receive from inter server
@@ -999,13 +994,13 @@ void intif_parse_Registers(int fd)
else { //Normally registries should arrive for in log-in chars.
sd = map->id2sd(account_id);
}
-
+
if (!sd || sd->status.char_id != char_id) {
return; //Character registry from another character.
}
-
+
flag = ( sd->vars_received&PRL_ACCG && sd->vars_received&PRL_ACCL && sd->vars_received&PRL_CHAR ) ? 0 : 1;
-
+
switch (RFIFOB(fd,12)) {
case 3: //Character Registry
sd->vars_received |= PRL_CHAR;
@@ -1024,14 +1019,14 @@ void intif_parse_Registers(int fd)
}
/* have it not complain about insertion of vars before loading, and not set those vars as new or modified */
pc->reg_load = true;
-
+
if( RFIFOW(fd, 14) ) {
char key[32];
unsigned int index;
int max = RFIFOW(fd, 14), cursor = 16, i;
-
+
script->parser_current_file = "loading char/acc variables";//for script_add_str to refer to here in case errors occur
-
+
/**
* Vessel!char_reg_num_db
*
@@ -1043,13 +1038,13 @@ void intif_parse_Registers(int fd)
char sval[254];
safestrncpy(key, (char*)RFIFOP(fd, cursor + 1), RFIFOB(fd, cursor));
cursor += RFIFOB(fd, cursor) + 1;
-
+
index = RFIFOL(fd, cursor);
cursor += 4;
-
+
safestrncpy(sval, (char*)RFIFOP(fd, cursor + 1), RFIFOB(fd, cursor));
cursor += RFIFOB(fd, cursor) + 1;
-
+
script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)sval, NULL);
}
/**
@@ -1063,23 +1058,22 @@ void intif_parse_Registers(int fd)
int ival;
safestrncpy(key, (char*)RFIFOP(fd, cursor + 1), RFIFOB(fd, cursor));
cursor += RFIFOB(fd, cursor) + 1;
-
+
index = RFIFOL(fd, cursor);
cursor += 4;
-
+
ival = RFIFOL(fd, cursor);
cursor += 4;
-
+
script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)h64BPTRSIZE(ival), NULL);
}
}
-
script->parser_current_file = NULL;/* reset */
}
-
+
/* flag it back */
pc->reg_load = false;
-
+
if (flag && sd->vars_received&PRL_ACCG && sd->vars_received&PRL_ACCL && sd->vars_received&PRL_CHAR)
pc->reg_received(sd); //Received all registry values, execute init scripts and what-not. [Skotlex]
}
@@ -1662,7 +1656,7 @@ void intif_parse_MailDelete(int fd) {
int char_id = RFIFOL(fd,2);
int mail_id = RFIFOL(fd,6);
bool failed = RFIFOB(fd,10);
-
+
if ( (sd = map->charid2sd(char_id)) == NULL) {
ShowError("intif_parse_MailDelete: char not found %d\n", char_id);
return;
@@ -1987,7 +1981,7 @@ int intif_mercenary_create(struct s_mercenary *merc)
void intif_parse_MercenaryReceived(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 mismatch %d != %"PRIuS"\n", len, sizeof(struct s_mercenary));
@@ -2067,7 +2061,7 @@ int intif_elemental_create(struct s_elemental *ele)
void intif_parse_ElementalReceived(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 mismatch %d != %"PRIuS"\n", len, sizeof(struct s_elemental));
@@ -2128,8 +2122,6 @@ void intif_parse_ElementalSaved(int fd) {
}
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;
@@ -2176,7 +2168,7 @@ void intif_itembound_req(int char_id,int aid,int guild_id) {
gstor->lock = 1; //Lock for retrieval process
#endif
}
-
+
//3856
void intif_parse_Itembound_ack(int fd) {
#ifdef GP_BOUND_ITEMS
@@ -2252,11 +2244,11 @@ int intif_parse(int fd)
case 0x383f: intif->pGuildEmblem(fd); break;
case 0x3840: intif->pGuildCastleDataLoad(fd); break;
case 0x3843: intif->pGuildMasterChanged(fd); break;
-
+
//Quest system
case 0x3860: intif->pQuestLog(fd); break;
case 0x3861: intif->pQuestSave(fd); break;
-
+
// Mail System
case 0x3848: intif->pMailInboxReceived(fd); break;
case 0x3849: intif->pMailNew(fd); break;
@@ -2287,7 +2279,7 @@ int intif_parse(int fd)
case 0x387c: intif->pElementalReceived(fd); break;
case 0x387d: intif->pElementalDeleted(fd); break;
case 0x387e: intif->pElementalSaved(fd); break;
-
+
case 0x3880: intif->pCreatePet(fd); break;
case 0x3881: intif->pRecvPetData(fd); break;
case 0x3882: intif->pSavePetOk(fd); break;
@@ -2328,7 +2320,7 @@ void intif_defaults(void) {
/* */
memcpy(intif->packet_len_table,&packet_len_table,sizeof(intif->packet_len_table));
-
+
/* funcs */
intif->parse = intif_parse;
intif->create_pet = intif_create_pet;
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index 2b5069af7..f89bd2f1c 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -36,10 +36,10 @@ int irc_connect_timer(int tid, int64 tick, int id, intptr_t data) {
struct hSockOpt opt;
if( ircbot->isOn || ++ircbot->fails >= 3 )
return 0;
-
+
opt.silent = 1;
opt.setTimeo = 0;
-
+
ircbot->last_try = timer->gettick();
if ((ircbot->fd = sockt->make_connection(ircbot->ip, channel->config->irc_server_port, &opt)) > 0) {
@@ -58,14 +58,14 @@ int irc_connect_timer(int tid, int64 tick, int id, intptr_t data) {
int irc_identify_timer(int tid, int64 tick, int id, intptr_t data) {
if( !ircbot->isOn )
return 0;
-
+
sprintf(send_string, "USER HerculesWS%d 8 * : Hercules IRC Bridge",rnd()%777);
ircbot->send(send_string);
sprintf(send_string, "NICK %s", channel->config->irc_nick);
ircbot->send(send_string);
timer->add(timer->gettick() + 3000, ircbot->join_timer, 0, 0);
-
+
return 0;
}
@@ -76,7 +76,7 @@ int irc_identify_timer(int tid, int64 tick, int id, intptr_t data) {
int irc_join_timer(int tid, int64 tick, int id, intptr_t data) {
if( !ircbot->isOn )
return 0;
-
+
if (channel->config->irc_nick_pw[0] != '\0') {
sprintf(send_string, "PRIVMSG NICKSERV : IDENTIFY %s", channel->config->irc_nick_pw);
ircbot->send(send_string);
@@ -84,7 +84,7 @@ int irc_join_timer(int tid, int64 tick, int id, intptr_t data) {
sprintf(send_string, "PRIVMSG NICKSERV : GHOST %s %s", channel->config->irc_nick, channel->config->irc_nick_pw);
}
}
-
+
sprintf(send_string, "JOIN %s", channel->config->irc_channel);
ircbot->send(send_string);
ircbot->isIn = true;
@@ -125,20 +125,20 @@ int irc_parse(int fd) {
timer->add(timer->gettick() + 120000, ircbot->connect_timer, 0, 0);
return 0;
}
-
+
if( !RFIFOREST(fd) )
return 0;
-
+
parse_string = (char*)RFIFOP(fd,0);
parse_string[ RFIFOREST(fd) - 1 ] = '\0';
-
+
parse_string = strtok_r(parse_string,"\r\n",&str_safe);
-
+
while (parse_string != NULL) {
ircbot->parse_sub(fd,parse_string);
parse_string = strtok_r(NULL,"\r\n",&str_safe);
}
-
+
RFIFOSKIP(fd, RFIFOREST(fd));
RFIFOFLUSH(fd);
return 0;
@@ -158,7 +158,7 @@ void irc_parse_source(char *source, char *nick, char *ident, char *host) {
int i, pos = 0;
size_t len = strlen(source);
unsigned char stage = 0;
-
+
for(i = 0; i < len; i++) {
if( stage == 0 && source[i] == '!' ) {
safestrncpy(nick, &source[0], min(i + 1, IRC_NICK_LENGTH));
@@ -182,21 +182,21 @@ void irc_parse_sub(int fd, char *str) {
char source[180], command[60], buf1[IRC_MESSAGE_LENGTH], buf2[IRC_MESSAGE_LENGTH];
char *target = buf1, *message = buf2;
struct irc_func *func;
-
+
source[0] = command[0] = buf1[0] = buf2[0] = '\0';
-
+
if( str[0] == ':' )
str++;
-
+
if (sscanf(str, "%179s %59s %499s :%499[^\r\n]", source, command, buf1, buf2) == 3 && buf1[0] == ':') {
// source command :message (i.e. QUIT)
message = buf1+1;
target = buf2;
}
-
+
if( command[0] == '\0' )
return;
-
+
if ((func = ircbot->func_search(command)) == NULL && (func = ircbot->func_search(source)) == NULL) {
#ifdef IRCBOT_DEBUG
ShowWarning("Unknown command received %s from %s\n",command,source);
@@ -204,7 +204,6 @@ void irc_parse_sub(int fd, char *str) {
return;
}
func->func(fd,command,source,target,message);
-
}
/**
@@ -301,7 +300,7 @@ void irc_privmsg(int fd, char *cmd, char *source, char *target, char *msg) {
if( source[0] != '\0' )
ircbot->parse_source(source,source_nick,source_ident,source_host);
-
+
if( ircbot->channel ) {
size_t padding_len = strlen(ircbot->channel->name) + strlen(source_nick) + 13;
while (1) {
@@ -421,26 +420,26 @@ void irc_bot_init(bool minimal) {
channel->config->irc = false;
return;
}
-
+
ircbot->funcs.size = ARRAYLENGTH(irc_func_base);
CREATE(ircbot->funcs.list,struct irc_func*,ircbot->funcs.size);
-
+
for( i = 0; i < ircbot->funcs.size; i++ ) {
-
+
CREATE(function, struct irc_func, 1);
-
+
safestrncpy(function->name, irc_func_base[i].name, sizeof(function->name));
function->func = irc_func_base[i].func;
-
+
ircbot->funcs.list[i] = function;
}
-
+
ircbot->fails = 0;
ircbot->fd = 0;
ircbot->isIn = false;
ircbot->isOn = false;
-
+
timer->add_func_list(ircbot->connect_timer, "irc_connect_timer");
timer->add(timer->gettick() + 7000, ircbot->connect_timer, 0, 0);
}
@@ -450,14 +449,14 @@ void irc_bot_init(bool minimal) {
*/
void irc_bot_final(void) {
int i;
-
+
if (!channel->config->irc)
return;
if( ircbot->isOn ) {
ircbot->send("QUIT :Hercules is shutting down");
sockt->close(ircbot->fd);
}
-
+
for( i = 0; i < ircbot->funcs.size; i++ ) {
aFree(ircbot->funcs.list[i]);
}
@@ -469,25 +468,25 @@ void irc_bot_final(void) {
*/
void ircbot_defaults(void) {
ircbot = &irc_bot_s;
-
+
ircbot->channel = NULL;
-
+
ircbot->init = irc_bot_init;
ircbot->final = irc_bot_final;
-
+
ircbot->parse = irc_parse;
ircbot->parse_sub = irc_parse_sub;
ircbot->parse_source = irc_parse_source;
-
+
ircbot->func_search = irc_func_search;
-
+
ircbot->connect_timer = irc_connect_timer;
ircbot->identify_timer = irc_identify_timer;
ircbot->join_timer = irc_join_timer;
-
+
ircbot->send = irc_send;
ircbot->relay = irc_relay;
-
+
ircbot->pong = irc_pong;
ircbot->privmsg = irc_privmsg;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index dbade4c10..ccedee72a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -160,14 +160,14 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str,
/* [Ind/Hercules] */
int itemdb_chain_item(unsigned short chain_id, int *rate) {
struct item_chain_entry *entry;
-
+
if( chain_id >= itemdb->chain_count ) {
ShowError("itemdb_chain_item: unknown chain id %d\n", chain_id);
return UNKNOWN_ITEM_ID;
}
-
+
entry = &itemdb->chains[chain_id].items[ rnd()%itemdb->chains[chain_id].qty ];
-
+
if( rnd()%10000 >= entry->rate )
return 0;
@@ -178,47 +178,47 @@ int itemdb_chain_item(unsigned short chain_id, int *rate) {
/* [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);
-
+
if ( package->must_items[i].force_serial )
it.unique_id = itemdb->unique_id(sd);
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 ) {
for( i = 0; i < package->random_qty; i++ ) {
struct item_package_rand_entry *entry;
-
+
entry = &package->random_groups[i].random_list[rnd()%package->random_groups[i].random_qty];
-
+
while( 1 ) {
if( rnd()%10000 >= entry->rate ) {
entry = entry->next;
@@ -226,28 +226,28 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa
} 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);
@@ -257,9 +257,8 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa
}
}
}
-
- return;
}
+
/*==========================================
* Return a random item id from group. (takes into account % chance giving/tot group)
*------------------------------------------*/
@@ -267,17 +266,17 @@ 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;
}
@@ -522,7 +521,6 @@ int itemdb_isstackable2(struct item_data *data)
}
}
-
/*==========================================
* Trade Restriction functions [Skotlex]
*------------------------------------------*/
@@ -569,10 +567,10 @@ int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(stru
if (!func(item_data, gmlv, gmlv2))
return 0;
-
+
if(item_data->slot == 0 || itemdb_isspecial(item->card[0]))
return 1;
-
+
for(i = 0; i < item_data->slot; i++) {
if (!item->card[i]) continue;
if (!func(itemdb->search(item->card[i]), gmlv, gmlv2))
@@ -623,12 +621,12 @@ void itemdb_read_groups(void) {
ShowError("can't read %s\n", config_filename);
return;
}
-
+
gsize = aMalloc( libconfig->setting_length(item_group_conf.root) * sizeof(unsigned int) );
-
+
for(i = 0; i < libconfig->setting_length(item_group_conf.root); i++)
gsize[i] = 0;
-
+
i = 0;
while( (itg = libconfig->setting_get_elem(item_group_conf.root,i++)) ) {
const char *name = config_setting_name(itg);
@@ -639,7 +637,7 @@ void itemdb_read_groups(void) {
--i;
continue;
}
-
+
c = 0;
while( (it = libconfig->setting_get_elem(itg,c++)) ) {
if( config_setting_is_list(it) )
@@ -647,19 +645,18 @@ void itemdb_read_groups(void) {
else
gsize[ i - 1 ] += 1;
}
-
}
-
+
i = 0;
CREATE(itemdb->groups, struct item_group, libconfig->setting_length(item_group_conf.root));
itemdb->group_count = (unsigned short)libconfig->setting_length(item_group_conf.root);
-
+
while( (itg = libconfig->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 = gsize[ count ];
@@ -672,13 +669,13 @@ void itemdb_read_groups(void) {
repeat = libconfig->setting_get_int_elem(it,1);
} else
itname = libconfig->setting_get_string_elem(itg,c - 1);
-
+
if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
if( !( data = itemdb->exists(atoi(itname+2)) ) )
ShowWarning("itemdb_read_groups: unknown item ID '%d' in group '%s'!\n",atoi(itname+2),config_setting_name(itg));
} else 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
@@ -689,25 +686,24 @@ void itemdb_read_groups(void) {
}
ecount += repeat;
}
-
count++;
}
-
+
libconfig->destroy(&item_group_conf);
aFree(gsize);
-
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename);
}
+
/* [Ind/Hercules] - HCache for Packages */
void itemdb_write_cached_packages(const char *config_filename) {
FILE *file;
unsigned short pcount = itemdb->package_count;
unsigned short i;
-
+
if( !(file = HCache->open(config_filename,"wb")) ) {
return;
}
-
+
// first 2 bytes = package count
hwrite(&pcount,sizeof(pcount),1,file);
@@ -741,7 +737,7 @@ void itemdb_write_cached_packages(const char *config_filename) {
for(c = 0; c < random_qty; c++) {
struct item_package_rand_group *group = &itemdb->packages[i].random_groups[c];
unsigned short group_qty = group->random_qty, h;
-
+
//next 2 bytes = how many entries in this group
hwrite(&group_qty,sizeof(group_qty),1,file);
//now we loop into the group's list
@@ -765,9 +761,8 @@ void itemdb_write_cached_packages(const char *config_filename) {
}
}
}
-
fclose(file);
-
+
return;
}
bool itemdb_read_cached_packages(const char *config_filename) {
@@ -778,7 +773,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
if( !(file = HCache->open(config_filename,"rb")) ) {
return false;
}
-
+
// first 2 bytes = package count
hread(&pcount,sizeof(pcount),1,file);
@@ -790,25 +785,25 @@ bool itemdb_read_cached_packages(const char *config_filename) {
struct item_data *pdata;
struct item_package *package = &itemdb->packages[i];
unsigned short c;
-
+
//into a package, first 2 bytes = id.
hread(&id,sizeof(id),1,file);
//next 2 bytes = must count
hread(&must_qty,sizeof(must_qty),1,file);
//next 2 bytes = random count
hread(&random_qty,sizeof(random_qty),1,file);
-
+
if( !(pdata = itemdb->exists(id)) )
ShowWarning("itemdb_read_cached_packages: unknown package item '%d', skipping..\n",id);
else
pdata->package = &itemdb->packages[i];
-
+
package->id = id;
package->random_qty = random_qty;
package->must_qty = must_qty;
package->must_items = NULL;
package->random_groups = NULL;
-
+
if( package->must_qty ) {
CREATE(package->must_items, struct item_package_must_entry, package->must_qty);
//now we loop into must
@@ -847,13 +842,13 @@ bool itemdb_read_cached_packages(const char *config_filename) {
for(c = 0; c < package->random_qty; c++) {
unsigned short group_qty = 0, h;
struct item_package_rand_entry *prev = NULL;
-
+
//next 2 bytes = how many entries in this group
hread(&group_qty,sizeof(group_qty),1,file);
-
+
package->random_groups[c].random_qty = group_qty;
CREATE(package->random_groups[c].random_list, struct item_package_rand_entry, package->random_groups[c].random_qty);
-
+
//now we loop into the group's list
for(h = 0; h < group_qty; h++) {
struct item_package_rand_entry *entry = &itemdb->packages[i].random_groups[c].random_list[h];
@@ -862,7 +857,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
struct item_data *data;
if( prev ) prev->next = entry;
-
+
//first 2 byte = item id
hread(&mid,sizeof(mid),1,file);
//next 2 byte = qty
@@ -880,7 +875,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
if( !(data = itemdb->exists(mid)) )
ShowWarning("itemdb_read_cached_packages: unknown item '%d' in package '%s'!\n",mid,itemdb_name(package->id));
-
+
entry->id = data ? data->nameid : 0;
entry->rate = rate;
entry->hours = hours;
@@ -895,9 +890,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
}
}
}
-
fclose(file);
-
ShowStatus("Done reading '"CL_WHITE"%hu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"' ("CL_GREEN"C"CL_RESET").\n", pcount, config_filename);
return true;
@@ -914,42 +907,41 @@ void itemdb_read_packages(void) {
int i = 0, count = 0, c = 0, highest_gcount = 0;
unsigned int *must = NULL, *random = NULL, *rgroup = NULL, **rgroups = NULL;
struct item_package_rand_entry **prev = NULL;
-
+
if( HCache->check(config_filename) ) {
if( itemdb->read_cached_packages(config_filename) )
return;
}
-
+
if (libconfig->read_file(&item_packages_conf, config_filename)) {
ShowError("can't read %s\n", config_filename);
return;
}
-
+
must = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) );
random = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) );
rgroup = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) );
rgroups = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int *) );
-
for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++) {
must[i] = 0;
random[i] = 0;
rgroup[i] = 0;
rgroups[i] = NULL;
}
-
+
/* validate tree, drop poisonous fruits! */
i = 0;
while( (itg = libconfig->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);
libconfig->setting_remove(item_packages_conf.root, name);
--i;
continue;
}
-
+
c = 0;
while( (it = libconfig->setting_get_elem(itg,c++)) ) {
int rval = 0;
@@ -959,7 +951,7 @@ void itemdb_read_packages(void) {
--c;
continue;
}
-
+
if( rval == 0 )
must[ i - 1 ] += 1;
else {
@@ -976,7 +968,7 @@ void itemdb_read_packages(void) {
for(i = 0; i < highest_gcount; i++) {
prev[i] = NULL;
}
-
+
for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++ ) {
rgroups[i] = aMalloc( rgroup[i] * sizeof(unsigned int) );
for( c = 0; c < rgroup[i]; c++ ) {
@@ -995,28 +987,28 @@ void itemdb_read_packages(void) {
}
}
}
-
+
CREATE(itemdb->packages, struct item_package, libconfig->setting_length(item_packages_conf.root));
itemdb->package_count = (unsigned short)libconfig->setting_length(item_packages_conf.root);
-
+
/* write */
i = 0;
while( (itg = libconfig->setting_get_elem(item_packages_conf.root,i++)) ) {
struct item_data *data = itemdb->name2id(config_setting_name(itg));
int r = 0, m = 0;
-
+
for(r = 0; r < highest_gcount; r++) {
prev[r] = NULL;
}
-
+
data->package = &itemdb->packages[count];
-
+
itemdb->packages[count].id = data->nameid;
itemdb->packages[count].random_groups = NULL;
itemdb->packages[count].must_items = NULL;
itemdb->packages[count].random_qty = rgroup[ i - 1 ];
itemdb->packages[count].must_qty = must[ i - 1 ];
-
+
if( itemdb->packages[count].random_qty ) {
CREATE(itemdb->packages[count].random_groups, struct item_package_rand_group, itemdb->packages[count].random_qty);
for( c = 0; c < itemdb->packages[count].random_qty; c++ ) {
@@ -1029,14 +1021,14 @@ void itemdb_read_packages(void) {
}
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 = libconfig->setting_get_elem(itg,c++)) ) {
int icount = 1, expire = 0, rate = 10000, gid = 0;
bool announce = false, named = false, force_serial = false;
-
+
itname = config_setting_name(it);
-
+
if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
if( !( data = itemdb->exists(atoi(itname+2)) ) )
ShowWarning("itemdb_read_packages: unknown item ID '%d' in package '%s'!\n",atoi(itname+2),config_setting_name(itg));
@@ -1045,10 +1037,10 @@ void itemdb_read_packages(void) {
if( ( t = libconfig->setting_get_member(it, "Count")) )
icount = libconfig->setting_get_int(t);
-
+
if( ( t = libconfig->setting_get_member(it, "Expire")) )
expire = libconfig->setting_get_int(t);
-
+
if( ( t = libconfig->setting_get_member(it, "Rate")) ) {
if( (rate = (unsigned short)libconfig->setting_get_int(t)) > 10000 ) {
ShowWarning("itemdb_read_packages: invalid rate (%d) for item '%s' in package '%s'!\n",rate,itname,config_setting_name(itg));
@@ -1061,7 +1053,7 @@ void itemdb_read_packages(void) {
if( ( t = libconfig->setting_get_member(it, "Named")) && libconfig->setting_get_bool(t) )
named = true;
-
+
if( ( t = libconfig->setting_get_member(it, "ForceSerial")) && libconfig->setting_get_bool(t) )
force_serial = true;
@@ -1081,12 +1073,12 @@ void itemdb_read_packages(void) {
m++;
} else {
int gidx = gid - 1;
-
+
r = itemdb->packages[count].random_groups[gidx].random_qty;
-
+
if( prev[gidx] )
prev[gidx]->next = &itemdb->packages[count].random_groups[gidx].random_list[r];
-
+
itemdb->packages[count].random_groups[gidx].random_list[r].id = data ? data->nameid : 0;
itemdb->packages[count].random_groups[gidx].random_list[r].qty = icount;
if( (itemdb->packages[count].random_groups[gidx].random_list[r].rate = rate) == 10000 ) {
@@ -1097,17 +1089,16 @@ void itemdb_read_packages(void) {
itemdb->packages[count].random_groups[gidx].random_list[r].named = named == true ? 1 : 0;
itemdb->packages[count].random_groups[gidx].random_list[r].force_serial = force_serial == true ? 1 : 0;
itemdb->packages[count].random_groups[gidx].random_qty += 1;
-
+
prev[gidx] = &itemdb->packages[count].random_groups[gidx].random_list[r];
}
-
}
-
+
for(r = 0; r < highest_gcount; r++) {
if( prev[r] )
prev[r]->next = &itemdb->packages[count].random_groups[r].random_list[0];
}
-
+
for( r = 0; r < itemdb->packages[count].random_qty; r++ ) {
if( itemdb->packages[count].random_groups[r].random_qty == 1 ) {
//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.
@@ -1116,11 +1107,9 @@ void itemdb_read_packages(void) {
itemdb->packages[count].random_groups[r].random_list[0].rate = 10000;
}
}
-
count++;
}
-
-
+
aFree(must);
aFree(random);
for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++ ) {
@@ -1129,12 +1118,12 @@ void itemdb_read_packages(void) {
aFree(rgroups);
aFree(rgroup);
aFree(prev);
-
+
libconfig->destroy(&item_packages_conf);
if( HCache->enabled )
itemdb->write_cached_packages(config_filename);
-
+
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename);
}
@@ -1147,7 +1136,7 @@ void itemdb_read_chains(void) {
const char *config_filename = "db/pre-re/item_chain.conf"; // FIXME hardcoded name
#endif
int i = 0, count = 0;
-
+
if (libconfig->read_file(&item_chain_conf, config_filename)) {
ShowError("can't read %s\n", config_filename);
return;
@@ -1155,7 +1144,7 @@ void itemdb_read_chains(void) {
CREATE(itemdb->chains, struct item_chain, libconfig->setting_length(item_chain_conf.root));
itemdb->chain_count = (unsigned short)libconfig->setting_length(item_chain_conf.root);
-
+
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = config_filename;
#endif // ENABLE_CASE_CHECK
@@ -1165,12 +1154,12 @@ void itemdb_read_chains(void) {
const char *name = config_setting_name(itc);
int c = 0;
config_setting_t *entry = NULL;
-
+
script->set_constant2(name,i-1,0);
itemdb->chains[count].qty = (unsigned short)libconfig->setting_length(itc);
-
+
CREATE(itemdb->chains[count].items, struct item_chain_entry, libconfig->setting_length(itc));
-
+
while( (entry = libconfig->setting_get_elem(itc,c++)) ) {
const char *itname = config_setting_name(entry);
if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
@@ -1178,32 +1167,32 @@ void itemdb_read_chains(void) {
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 ? libconfig->setting_get_int(entry) : 0;
-
+
prev = &itemdb->chains[count].items[c - 1];
}
-
+
if( prev )
prev->next = &itemdb->chains[count].items[0];
-
+
count++;
}
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = NULL;
#endif // ENABLE_CASE_CHECK
-
+
libconfig->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"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename);
}
@@ -1212,21 +1201,19 @@ void itemdb_read_chains(void) {
**/
int itemdb_combo_split_atoi (char *str, int *val) {
int i;
-
+
for (i=0; i<MAX_ITEMS_PER_COMBO; i++) {
if (!str) break;
-
+
val[i] = atoi(str);
-
str = strchr(str,':');
-
if (str)
*str++=0;
}
-
+
if( i == 0 ) //No data found.
return 0;
-
+
return i;
}
/**
@@ -1235,41 +1222,38 @@ int itemdb_combo_split_atoi (char *str, int *val) {
void itemdb_read_combos() {
uint32 lines = 0, count = 0;
char line[1024];
-
char filepath[256];
FILE* fp;
-
+
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);
return;
}
-
+
// process rows one by one
while(fgets(line, sizeof(line), fp)) {
char *str[2], *p;
-
+
lines++;
if (line[0] == '/' && line[1] == '/')
continue;
-
+
memset(str, 0, sizeof(str));
-
+
p = line;
-
p = trim(p);
-
if (*p == '\0')
continue;// empty line
-
+
if (!strchr(p,',')) {
/* is there even a single column? */
ShowError("itemdb_read_combos: Insufficient columns in line %d of \"%s\", skipping.\n", lines, filepath);
continue;
}
-
+
str[0] = p;
p = strchr(p,',');
*p = '\0';
@@ -1278,12 +1262,12 @@ void itemdb_read_combos() {
str[1] = p;
p = strchr(p,',');
p++;
-
+
if (str[1][0] != '{') {
ShowError("itemdb_read_combos(#1): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, filepath);
continue;
}
-
+
/* no ending key anywhere (missing \}\) */
if ( str[1][strlen(str[1])-1] != '}' ) {
ShowError("itemdb_read_combos(#2): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, filepath);
@@ -1292,12 +1276,12 @@ void itemdb_read_combos() {
int items[MAX_ITEMS_PER_COMBO];
int v = 0, retcount = 0;
struct item_combo *combo = NULL;
-
+
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, filepath);
continue;
}
-
+
/* validate */
for(v = 0; v < retcount; v++) {
if( !itemdb->exists(items[v]) ) {
@@ -1308,11 +1292,11 @@ void itemdb_read_combos() {
/* failed at some item */
if( v < retcount )
continue;
-
+
RECREATE(itemdb->combos, struct item_combo*, ++itemdb->combo_count);
-
+
CREATE(combo, struct item_combo, 1);
-
+
combo->count = retcount;
combo->script = script->parse(str[1], filepath, lines, 0, NULL);
combo->id = itemdb->combo_count - 1;
@@ -1320,37 +1304,28 @@ void itemdb_read_combos() {
for( v = 0; v < retcount; v++ ) {
combo->nameid[v] = items[v];
}
-
+
itemdb->combos[itemdb->combo_count - 1] = combo;
-
+
/* populate the items to refer to this combo */
for( v = 0; v < retcount; v++ ) {
struct item_data * it;
int index;
-
+
it = itemdb->exists(items[v]);
-
index = it->combos_count;
-
RECREATE(it->combos, struct item_combo*, ++it->combos_count);
-
it->combos[index] = combo;
}
-
}
-
count++;
}
-
fclose(fp);
-
ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"item_combo_db"CL_RESET"'.\n", count);
-
+
return;
}
-
-
/*======================================
* Applies gender restrictions according to settings. [Skotlex]
*======================================*/
@@ -1498,7 +1473,7 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
entry->flag.available = 1;
entry->view_id = 0;
}
-
+
entry->sex = itemdb->gendercheck(entry); //Apply gender filtering.
// Validated. Finally insert it
@@ -1813,7 +1788,7 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source)
if( (t = libconfig->setting_get_member(it, "ForceSerial")) )
id.flag.force_serial = libconfig->setting_get_bool(t) ? 1 : 0;
-
+
if ( (t = libconfig->setting_get_member(it, "BuyingStore")) )
id.flag.buyingstore = libconfig->setting_get_bool(t) ? 1 : 0;
@@ -1926,7 +1901,7 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source)
id.flag.available = 1;
id.view_id = i32;
}
-
+
if( libconfig->setting_lookup_string(it, "Script", &str) )
id.script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
@@ -1970,7 +1945,7 @@ int itemdb_readdb_libconfig(const char *filename) {
config_setting_t *itdb, *it;
char filepath[256];
int i = 0, count = 0;
-
+
sprintf(filepath, "%s/%s", map->db_path, filename);
memset(&duplicate,0,sizeof(duplicate));
if( libconfig->read_file(&item_db_conf, filepath) || !(itdb = libconfig->setting_get_member(item_db_conf.root, "item_db")) ) {
@@ -1995,7 +1970,7 @@ int itemdb_readdb_libconfig(const char *filename) {
}
libconfig->destroy(&item_db_conf);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
-
+
return count;
}
@@ -2008,7 +1983,7 @@ int itemdb_readdb_libconfig(const char *filename) {
*/
int itemdb_readdb_sql(const char *tablename) {
int i = 0, count = 0;
-
+
// retrieve all rows from the item database
if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `id`, `name_english`, `name_japanese`, `type`,"
" `price_buy`, `price_sell`, `weight`, `atk`,"
@@ -2053,7 +2028,7 @@ uint64 itemdb_unique_id(struct map_session_data *sd) {
void itemdb_read(bool minimal) {
int i;
DBData prev;
-
+
if (map->db_use_sql_item_db) {
const char* item_db_name[] = {
map->item_db_db,
@@ -2070,7 +2045,7 @@ void itemdb_read(bool minimal) {
for(i = 0; i < ARRAYLENGTH(filename); i++)
itemdb->readdb_libconfig(filename[i]);
}
-
+
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) ) {
@@ -2079,7 +2054,7 @@ void itemdb_read(bool minimal) {
}
}
}
-
+
if (minimal)
return;
@@ -2164,7 +2139,7 @@ void itemdb_clear(bool total) {
if( itemdb->array[i] )
itemdb->destroy_item_data(itemdb->array[i], 1);
}
-
+
if( itemdb->groups )
{
for( i = 0; i < itemdb->group_count; i++ ) {
@@ -2176,7 +2151,7 @@ void itemdb_clear(bool total) {
itemdb->groups = NULL;
itemdb->group_count = 0;
-
+
if (itemdb->chains) {
for (i = 0; i < itemdb->chain_count; i++) {
if (itemdb->chains[i].items)
@@ -2187,7 +2162,7 @@ void itemdb_clear(bool total) {
itemdb->chains = NULL;
itemdb->chain_count = 0;
-
+
if (itemdb->packages) {
for (i = 0; i < itemdb->package_count; i++) {
if (itemdb->packages[i].random_groups) {
@@ -2203,7 +2178,7 @@ void itemdb_clear(bool total) {
itemdb->packages = NULL;
}
itemdb->package_count = 0;
-
+
if (itemdb->combos) {
for (i = 0; i < itemdb->combo_count; i++) {
if (itemdb->combos[i]->script) // Check if script was loaded
@@ -2215,28 +2190,28 @@ void itemdb_clear(bool total) {
itemdb->combos = NULL;
itemdb->combo_count = 0;
-
+
if (total)
return;
-
+
itemdb->other->clear(itemdb->other, itemdb->final_sub);
-
+
memset(itemdb->array, 0, sizeof(itemdb->array));
-
- db_clear(itemdb->names);
+ db_clear(itemdb->names);
}
+
void itemdb_reload(void) {
struct s_mapiterator* iter;
struct map_session_data* sd;
int i,d,k;
-
+
itemdb->clear(false);
// read new data
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
for( i = 0; i < MAX_MOB_DB; i++ ) {
@@ -2257,7 +2232,7 @@ void itemdb_reload(void) {
if (k == MAX_SEARCH)
continue;
-
+
if (id->mob[k].id != i && k != MAX_SEARCH - 1)
memmove(&id->mob[k+1], &id->mob[k], (MAX_SEARCH-k-1)*sizeof(id->mob[0]));
id->mob[k].chance = entry->dropitem[d].p;
@@ -2287,7 +2262,7 @@ void itemdb_reload(void) {
void itemdb_name_constants(void) {
DBIterator *iter = db_iterator(itemdb->names);
struct item_data *data;
-
+
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = "Item Database (Likely an invalid or conflicting AegisName)";
#endif // ENABLE_CASE_CHECK
@@ -2301,7 +2276,7 @@ void itemdb_name_constants(void) {
}
void do_final_itemdb(void) {
itemdb->clear(true);
-
+
itemdb->other->destroy(itemdb->other, itemdb->final_sub);
itemdb->destroy_item_data(&itemdb->dummy, 0);
db_destroy(itemdb->names);
@@ -2318,14 +2293,14 @@ void do_init_itemdb(bool minimal) {
return;
clif->cashshop_load();
-
+
/** it failed? we disable it **/
if( !clif->parse_roulette_db() )
battle_config.feature_roulette = 0;
}
void itemdb_defaults(void) {
itemdb = &itemdb_s;
-
+
itemdb->init = do_init_itemdb;
itemdb->final = do_final_itemdb;
itemdb->reload = itemdb_reload;
diff --git a/src/map/log.c b/src/map/log.c
index 0c5977c05..a74cb27c5 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -54,7 +54,6 @@ char log_picktype2char(e_log_pick_type type) {
return 'X';
}
-
/// obtain log type character for chat logs
char log_chattype2char(e_log_chat_type type) {
switch( type ) {
@@ -70,7 +69,6 @@ char log_chattype2char(e_log_chat_type type) {
return 'O';
}
-
/// check if this item should be logged according the settings
bool should_log_item(int nameid, int amount, int refine, struct item_data *id) {
int filter = logs->config.filter;
@@ -112,7 +110,7 @@ void log_branch_sub_txt(struct map_session_data* sd) {
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_branch, "a") ) == NULL )
return;
time(&curtime);
@@ -145,7 +143,7 @@ void log_pick_sub_txt(int id, int16 m, e_log_pick_type type, int amount, struct
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_pick, "a") ) == NULL )
return;
time(&curtime);
@@ -174,7 +172,6 @@ void log_pick_pc(struct map_session_data* sd, e_log_pick_type type, int amount,
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);
@@ -192,7 +189,7 @@ void log_zeny_sub_txt(struct map_session_data* sd, e_log_pick_type type, struct
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_zeny, "a") ) == NULL )
return;
time(&curtime);
@@ -222,7 +219,7 @@ void log_mvpdrop_sub_txt(struct map_session_data* sd, int monster_id, int* log_m
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_mvpdrop,"a") ) == NULL )
return;
time(&curtime);
@@ -243,7 +240,7 @@ void log_mvpdrop(struct map_session_data* sd, int monster_id, int* log_mvp)
void log_atcommand_sub_sql(struct map_session_data* sd, const char* message) {
SqlStmt* stmt;
-
+
stmt = SQL->StmtMalloc(logs->mysql_handle);
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`atcommand_date`, `account_id`, `char_id`, `char_name`, `map`, `command`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", logs->config.log_gm, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) )
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH))
@@ -260,7 +257,7 @@ void log_atcommand_sub_txt(struct map_session_data* sd, const char* message) {
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_gm, "a") ) == NULL )
return;
time(&curtime);
@@ -298,7 +295,7 @@ void log_npc_sub_txt(struct map_session_data *sd, const char *message) {
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_npc, "a") ) == NULL )
return;
time(&curtime);
@@ -319,7 +316,7 @@ void log_npc(struct map_session_data* sd, const char* message)
void log_chat_sub_sql(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char* dst_charname, const char* message) {
SqlStmt* stmt;
-
+
stmt = SQL->StmtMalloc(logs->mysql_handle);
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%c', '%d', '%d', '%d', '%s', '%d', '%d', ?, ?)", logs->config.log_chat, logs->chattype2char(type), type_id, src_charid, src_accid, mapname, x, y)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, (char*)dst_charname, safestrnlen(dst_charname, NAME_LENGTH))
@@ -336,7 +333,7 @@ void log_chat_sub_txt(e_log_chat_type type, int type_id, int src_charid, int src
char timestring[255];
time_t curtime;
FILE* logfp;
-
+
if( ( logfp = fopen(logs->config.log_chat, "a") ) == NULL )
return;
time(&curtime);
@@ -363,12 +360,12 @@ void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid,
void log_sql_init(void) {
// log db connection
logs->mysql_handle = SQL->Malloc();
-
+
ShowInfo(""CL_WHITE"[SQL]"CL_RESET": Connecting to the Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",logs->db_name,logs->db_ip);
if ( SQL_ERROR == SQL->Connect(logs->mysql_handle, logs->db_id, logs->db_pw, logs->db_ip, logs->db_port, logs->db_name) )
exit(EXIT_FAILURE);
ShowStatus(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", logs->db_name);
-
+
if (map->default_codepage[0] != '\0')
if ( SQL_ERROR == SQL->SetEncoding(logs->mysql_handle, map->default_codepage) )
Sql_ShowDebug(logs->mysql_handle);
@@ -389,7 +386,6 @@ void log_set_defaults(void) {
logs->config.amount_items_log = 100;
}
-
int log_config_read(const char* cfgName) {
static int count = 0;
char line[1024], w1[1024], w2[1024];
@@ -506,7 +502,7 @@ void log_config_complete(void) {
}
void log_defaults(void) {
logs = &log_s;
-
+
sprintf(logs->db_ip,"127.0.0.1");
sprintf(logs->db_id,"ragnarok");
sprintf(logs->db_pw,"ragnarok");
@@ -515,7 +511,7 @@ void log_defaults(void) {
logs->db_port = 3306;
logs->mysql_handle = NULL;
/* */
-
+
logs->pick_pc = log_pick_pc;
logs->pick_mob = log_pick_mob;
logs->zeny = log_zeny;
@@ -524,7 +520,7 @@ void log_defaults(void) {
logs->atcommand = log_atcommand;
logs->branch = log_branch;
logs->mvpdrop = log_mvpdrop;
-
+
/* will be modified in a few seconds once loading is complete. */
logs->pick_sub = log_pick_sub_txt;
logs->zeny_sub = log_zeny_sub_txt;
diff --git a/src/map/mail.c b/src/map/mail.c
index 8acfbdcb9..e952d9b63 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -195,7 +195,7 @@ bool mail_invalid_operation(struct map_session_data *sd) {
void mail_defaults(void)
{
mail = &mail_s;
-
+
mail->clear = mail_clear;
mail->removeitem = mail_removeitem;
mail->removezeny = mail_removezeny;
diff --git a/src/map/map.c b/src/map/map.c
index 249108878..fe0922063 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -111,7 +111,7 @@ int map_usercount(void) {
*------------------------------------------*/
int map_freeblock (struct block_list *bl) {
nullpo_retr(map->block_free_lock, bl);
-
+
if (map->block_free_lock == 0) {
if( bl->type == BL_ITEM )
ers_free(map->flooritem_ers, bl);
@@ -119,10 +119,9 @@ int map_freeblock (struct block_list *bl) {
aFree(bl);
bl = NULL;
} else {
-
if( map->block_free_count >= map->block_free_list_size )
map_block_free_expand();
-
+
map->block_free[map->block_free_count++] = bl;
}
@@ -139,7 +138,6 @@ int map_freeblock_lock (void) {
* Remove the lock on map_bl
*------------------------------------------*/
int map_freeblock_unlock (void) {
-
if ((--map->block_free_lock) == 0) {
int i;
for (i = 0; i < map->block_free_count; i++) {
@@ -375,8 +373,6 @@ int map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
) {
sc->data[SC_PROPERTYWALK]->val3++;
}
-
-
}
/* Guild Aura Moving */
if( bl->type == BL_PC && ((TBL_PC*)bl)->state.gmaster_flag ) {
@@ -1366,7 +1362,6 @@ int map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) {
return 1;
}
-
if (pet->search_petDB_index(fitem->item_data.nameid, PET_EGG) >= 0)
intif->delete_petdata(MakeDWord(fitem->item_data.card[1], fitem->item_data.card[2]));
@@ -1424,7 +1419,6 @@ int map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, int16
return 1;
}
-
int map_count_sub(struct block_list *bl,va_list ap) {
return 1;
}
@@ -1603,7 +1597,7 @@ int map_addflooritem(const struct block_list *bl, struct item *item_data, int am
r=rnd();
fitem = ers_alloc(map->flooritem_ers, struct flooritem_data);
-
+
fitem->bl.type = BL_ITEM;
fitem->bl.prev = fitem->bl.next = NULL;
fitem->bl.m = m;
@@ -1789,7 +1783,7 @@ int map_quit(struct map_session_data *sd) {
//Non-active players should not have loaded any data yet (or it was cleared already) so no additional cleanups are needed.
return 0;
}
-
+
if( sd->expiration_tid != INVALID_TIMER )
timer->delete(sd->expiration_tid,pc->expiration_timer);
@@ -1882,7 +1876,7 @@ int map_quit(struct map_session_data *sd) {
if( sd->state.vending ) {
idb_remove(vending->db, sd->status.char_id);
}
-
+
party->booking_delete(sd); // Party Booking [Spiria]
pc->makesavestatus(sd);
pc->clean_skilltree(sd);
@@ -2663,14 +2657,11 @@ int map_getcellp(struct map_data* m, const struct block_list *bl, int16 x, int16
// base gat type checks
case CELL_CHKWALL:
return (!cell.walkable && !cell.shootable);
-
case CELL_CHKWATER:
return (cell.water);
-
case CELL_CHKCLIFF:
return (!cell.walkable && cell.shootable);
-
// base cell type checks
case CELL_CHKNPC:
return (cell.npc);
@@ -3045,7 +3036,6 @@ int map_readfromcache(struct map_data *m, char *buffer) {
return 0; // Not found
}
-
int map_addmap(const char* mapname) {
map->list[map->count].instance_id = -1;
mapindex->getmapname(mapname, map->list[map->count++].name);
@@ -3082,38 +3072,38 @@ int map_delmap(char* mapname) {
**/
void map_zone_clear_single(struct map_zone_data *zone) {
int i;
-
+
for(i = 0; i < zone->disabled_skills_count; i++) {
aFree(zone->disabled_skills[i]);
}
-
+
if( zone->disabled_skills )
aFree(zone->disabled_skills);
-
+
if( zone->disabled_items )
aFree(zone->disabled_items);
-
+
if( zone->cant_disable_items )
aFree(zone->cant_disable_items);
-
+
for(i = 0; i < zone->mapflags_count; i++) {
aFree(zone->mapflags[i]);
}
-
+
if( zone->mapflags )
aFree(zone->mapflags);
-
+
for(i = 0; i < zone->disabled_commands_count; i++) {
aFree(zone->disabled_commands[i]);
}
-
+
if( zone->disabled_commands )
aFree(zone->disabled_commands);
-
+
for(i = 0; i < zone->capped_skills_count; i++) {
aFree(zone->capped_skills[i]);
}
-
+
if( zone->capped_skills )
aFree(zone->capped_skills);
}
@@ -3123,11 +3113,11 @@ void map_zone_clear_single(struct map_zone_data *zone) {
void map_zone_db_clear(void) {
struct map_zone_data *zone;
DBIterator *iter = db_iterator(map->zone_db);
-
+
for(zone = dbi_first(iter); dbi_exists(iter); zone = dbi_next(iter)) {
map->zone_clear_single(zone);
}
-
+
dbi_destroy(iter);
db_destroy(map->zone_db);/* will aFree(zone) */
@@ -3245,10 +3235,10 @@ void do_final_maps(void) {
if( map->list[i].channel )
channel->delete(map->list[i].channel);
-
+
if( map->list[i].qi_data )
aFree(map->list[i].qi_data);
-
+
if( map->list[i].hdata )
{
for( v = 0; v < map->list[i].hdatac; v++ ) {
@@ -3324,10 +3314,10 @@ void map_flags_init(void) {
map->list[i].misc_damage_rate = 100;
map->list[i].short_damage_rate = 100;
map->list[i].long_damage_rate = 100;
-
+
if( map->list[i].qi_data )
aFree(map->list[i].qi_data);
-
+
map->list[i].qi_data = NULL;
map->list[i].qi_count = 0;
}
@@ -3718,7 +3708,7 @@ int inter_config_read(char *cfgName) {
while (fgets(line, sizeof(line), fp)) {
if (line[0] == '/' && line[1] == '/')
continue;
-
+
if (sscanf(line,"%1023[^:]: %1023[^\r\n]", w1, w2) < 2)
continue;
/* table names */
@@ -3856,34 +3846,31 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
char newzone[MAP_ZONE_NAME_LENGTH];
struct map_zone_data *zone = NULL;
int cursor, i, j;
-
+
sprintf(newzone, "%s+%s",main->name,other->name);
-
+
if( (zone = strdb_get(map->zone_db, newzone)) )
return zone;/* this zone has already been merged */
-
+
CREATE(zone, struct map_zone_data, 1);
-
safestrncpy(zone->name, newzone, MAP_ZONE_NAME_LENGTH);
-
zone->disabled_skills_count = main->disabled_skills_count + other->disabled_skills_count;
zone->disabled_items_count = main->disabled_items_count + other->disabled_items_count;
zone->mapflags_count = main->mapflags_count + other->mapflags_count;
zone->disabled_commands_count = main->disabled_commands_count + other->disabled_commands_count;
zone->capped_skills_count = main->capped_skills_count + other->capped_skills_count;
-
+
CREATE(zone->disabled_skills, struct map_zone_disabled_skill_entry *, zone->disabled_skills_count );
-
for(i = 0, cursor = 0; i < main->disabled_skills_count; i++, cursor++ ) {
CREATE(zone->disabled_skills[cursor], struct map_zone_disabled_skill_entry, 1 );
memcpy(zone->disabled_skills[cursor], main->disabled_skills[i], sizeof(struct map_zone_disabled_skill_entry));
}
-
+
for(i = 0; i < other->disabled_skills_count; i++, cursor++ ) {
CREATE(zone->disabled_skills[cursor], struct map_zone_disabled_skill_entry, 1 );
memcpy(zone->disabled_skills[cursor], other->disabled_skills[i], sizeof(struct map_zone_disabled_skill_entry));
}
-
+
for(j = 0; j < main->cant_disable_items_count; j++) {
for(i = 0; i < other->disabled_items_count; i++) {
if( other->disabled_items[i] == main->cant_disable_items[j] ) {
@@ -3894,11 +3881,10 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
}
CREATE(zone->disabled_items, int, zone->disabled_items_count );
-
for(i = 0, cursor = 0; i < main->disabled_items_count; i++, cursor++ ) {
zone->disabled_items[cursor] = main->disabled_items[i];
}
-
+
for(i = 0; i < other->disabled_items_count; i++) {
for(j = 0; j < main->cant_disable_items_count; j++) {
if( other->disabled_items[i] == main->cant_disable_items[j] ) {
@@ -3912,45 +3898,40 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
}
CREATE(zone->mapflags, char *, zone->mapflags_count );
-
for(i = 0, cursor = 0; i < main->mapflags_count; i++, cursor++ ) {
CREATE(zone->mapflags[cursor], char, MAP_ZONE_MAPFLAG_LENGTH );
safestrncpy(zone->mapflags[cursor], main->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH);
}
-
+
for(i = 0; i < other->mapflags_count; i++, cursor++ ) {
CREATE(zone->mapflags[cursor], char, MAP_ZONE_MAPFLAG_LENGTH );
safestrncpy(zone->mapflags[cursor], other->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH);
}
-
+
CREATE(zone->disabled_commands, struct map_zone_disabled_command_entry *, zone->disabled_commands_count);
-
for(i = 0, cursor = 0; i < main->disabled_commands_count; i++, cursor++ ) {
CREATE(zone->disabled_commands[cursor], struct map_zone_disabled_command_entry, 1);
memcpy(zone->disabled_commands[cursor], main->disabled_commands[i], sizeof(struct map_zone_disabled_command_entry));
}
-
+
for(i = 0; i < other->disabled_commands_count; i++, cursor++ ) {
CREATE(zone->disabled_commands[cursor], struct map_zone_disabled_command_entry, 1);
memcpy(zone->disabled_commands[cursor], other->disabled_commands[i], sizeof(struct map_zone_disabled_command_entry));
}
-
+
CREATE(zone->capped_skills, struct map_zone_skill_damage_cap_entry *, zone->capped_skills_count);
-
for(i = 0, cursor = 0; i < main->capped_skills_count; i++, cursor++ ) {
CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1);
memcpy(zone->capped_skills[cursor], main->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry));
}
-
+
for(i = 0; i < other->capped_skills_count; i++, cursor++ ) {
CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1);
memcpy(zone->capped_skills[cursor], other->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry));
}
-
+
zone->info.special = 2;
-
strdb_put(map->zone_db, newzone, zone);
-
return zone;
}
@@ -3959,17 +3940,17 @@ void map_zone_change2(int m, struct map_zone_data *zone) {
if( map->list[m].zone == zone )
return;
-
+
if( map->list[m].zone->info.special != 2 ) /* we don't update it for merged zones! */
map->list[m].prev_zone = map->list[m].zone;
-
+
if( map->list[m].zone_mf_count )
map->zone_remove(m);
if( zone->info.special ) {
zone = map->merge_zone(zone,map->list[m].prev_zone);
}
-
+
map->zone_apply(m,zone,empty,empty,empty);
}
/* when changing from a mapflag to another during runtime */
@@ -4988,7 +4969,6 @@ void read_map_zone_db(void) {
if( (libconfig->setting_length(items) - disabled_items_count) > 0 ) { //Some are forcefully enabled
zone->cant_disable_items_count = libconfig->setting_length(items) - disabled_items_count;
CREATE(zone->cant_disable_items, int, zone->cant_disable_items_count);
-
}
for(h = 0, v = 0, j = 0; h < libconfig->setting_length(items); h++) {
config_setting_t *item = libconfig->setting_get_elem(items, h);
@@ -5274,7 +5254,7 @@ void read_map_zone_db(void) {
}
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' zones in '"CL_WHITE"%s"CL_RESET"'.\n", zone_count, config_filename);
-
+
/* post-load processing */
if( (zone = strdb_get(map->zone_db, MAP_ZONE_PVP_NAME)) )
zone->info.special = 1;
@@ -5293,22 +5273,22 @@ int map_get_new_bonus_id (void) {
void map_add_questinfo(int m, struct questinfo *qi) {
unsigned short i;
-
+
/* duplicate, override */
for(i = 0; i < map->list[m].qi_count; i++) {
if( map->list[m].qi_data[i].nd == qi->nd )
break;
}
-
+
if( i == map->list[m].qi_count )
RECREATE(map->list[m].qi_data, struct questinfo, ++map->list[m].qi_count);
-
+
memcpy(&map->list[m].qi_data[i], qi, sizeof(struct questinfo));
}
bool map_remove_questinfo(int m, struct npc_data *nd) {
unsigned short i;
-
+
for(i = 0; i < map->list[m].qi_count; i++) {
struct questinfo *qi = &map->list[m].qi_data[i];
if( qi->nd == nd ) {
@@ -5319,7 +5299,6 @@ bool map_remove_questinfo(int m, struct npc_data *nd) {
return true;
}
}
-
return false;
}
@@ -5398,10 +5377,10 @@ int do_final(void) {
struct s_mapiterator* iter;
ShowStatus("Terminating...\n");
-
+
channel->config->closing = true;
HPM->event(HPET_FINAL);
-
+
if (map->cpsd) aFree(map->cpsd);
//Ladies and babies first.
@@ -5462,7 +5441,7 @@ int do_final(void) {
vending->final();
HPM_map_do_final();
-
+
map->map_db->destroy(map->map_db, map->db_final);
mapindex->final();
@@ -5488,8 +5467,7 @@ int do_final(void) {
aFree(map->block_free);
if( map->bl_list )
aFree(map->bl_list);
-
-
+
if( !map->enable_grf )
aFree(map->cache_buffer);
@@ -5501,7 +5479,7 @@ int do_final(void) {
aFree(map->GRF_PATH_FILENAME);
aFree(map->INTER_CONF_NAME);
aFree(map->LOG_CONF_NAME);
-
+
HPM->event(HPET_POST_FINAL);
ShowStatus("Finished.\n");
@@ -5513,7 +5491,6 @@ int map_abort_sub(struct map_session_data* sd, va_list ap) {
return 1;
}
-
//------------------------------
// Function called when the server
// has received a crash signal.
@@ -5542,7 +5519,6 @@ void set_server_type(void) {
SERVER_TYPE = SERVER_TYPE_MAP;
}
-
/// Called when a terminate signal is received.
void do_shutdown(void)
{
@@ -5594,12 +5570,12 @@ CPCMD(gm_use) {
}
map->cpsd_active = true;
-
+
if( !atcommand->exec(map->cpsd->fd, map->cpsd, line, false) )
ShowInfo("HCP: '"CL_WHITE"%s"CL_RESET"' failed\n",line);
else
ShowInfo("HCP: '"CL_WHITE"%s"CL_RESET"' was used\n",line);
-
+
map->cpsd_active = false;
}
/* Hercules Console Parser */
@@ -5803,11 +5779,10 @@ static CMDLINEARG(loadscript)
**/
static CMDLINEARG(generatetranslations) {
script->lang_export_file = aStrdup("./generated_translations.pot");
-
+
if( !(script->lang_export_fp = fopen(script->lang_export_file,"wb")) ) {
ShowError("export-dialog: failed to open '%s' for writing\n",script->lang_export_file);
}
-
core->runflag = CORE_ST_STOP;
return true;
}
@@ -5839,7 +5814,7 @@ int do_init(int argc, char *argv[])
#ifdef GCOLLECT
GC_enable_incremental();
#endif
-
+
map_load_defaults();
map->INTER_CONF_NAME = aStrdup("conf/inter-server.conf");
@@ -5854,9 +5829,9 @@ int do_init(int argc, char *argv[])
HPM_map_do_init();
cmdline->exec(argc, argv, CMDLINE_OPT_PREINIT);
HPM->config_read();
-
+
HPM->event(HPET_PRE_INIT);
-
+
cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL);
minimal = map->minimal;/* temp (perhaps make minimal a mask with options of what to load? e.g. plugin 1 does minimal |= mob_db; */
if (!minimal) {
@@ -5937,7 +5912,6 @@ int do_init(int argc, char *argv[])
map->readallmaps();
-
if (!minimal) {
timer->add_func_list(map->freeblock_timer, "map_freeblock_timer");
timer->add_func_list(map->clearflooritem_timer, "map_clearflooritem_timer");
@@ -5991,19 +5965,19 @@ int do_init(int argc, char *argv[])
HPM->event(HPET_READY);
exit(EXIT_SUCCESS);
}
-
+
npc->event_do_oninit( false ); // Init npcs (OnInit)
npc->market_fromsql(); /* after OnInit */
-
+
if (battle_config.pk_mode)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
Sql_HerculesUpdateCheck(map->mysql_handle);
-
+
#ifdef CONSOLE_INPUT
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);
if( core->runflag != CORE_ST_STOP ) {
@@ -6034,14 +6008,14 @@ void map_defaults(void) {
map->extra_scripts = NULL;
map->extra_scripts_count = 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;
@@ -6049,18 +6023,18 @@ void map_defaults(void) {
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->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");
-
+
map->INTER_CONF_NAME="conf/inter-server.conf";
map->LOG_CONF_NAME="conf/logs.conf";
map->MAP_CONF_NAME = "conf/map-server.conf";
@@ -6069,7 +6043,7 @@ void map_defaults(void) {
map->SCRIPT_CONF_NAME = "conf/script.conf";
map->MSG_CONF_NAME = "conf/messages.conf";
map->GRF_PATH_FILENAME = "conf/grf-files.txt";
-
+
map->default_codepage[0] = '\0';
map->server_port = 3306;
sprintf(map->server_ip,"127.0.0.1");
@@ -6080,15 +6054,15 @@ void map_defaults(void) {
map->default_lang_str[0] = '\0';
map->cpsd_active = false;
-
+
map->port = 0;
map->users = 0;
map->ip_set = 0;
map->char_ip_set = 0;
map->enable_grf = 0;
-
+
memset(&map->index2mapid, -1, sizeof(map->index2mapid));
-
+
map->id_db = NULL;
map->pc_db = NULL;
map->mobid_db = NULL;
@@ -6107,16 +6081,16 @@ void map_defaults(void) {
map->bl_list = NULL;
map->bl_list_count = 0;
map->bl_list_size = 0;
-
+
//all in a big chunk, respects order
memset(ZEROED_BLOCK_POS(map), 0, ZEROED_BLOCK_SIZE(map));
-
+
map->cpsd = NULL;
map->list = NULL;
-
+
map->iterator_ers = NULL;
map->cache_buffer = NULL;
-
+
map->flooritem_ers = NULL;
/* */
map->bonus_id = SP_LAST_KNOWN;
@@ -6283,19 +6257,17 @@ void map_defaults(void) {
map->abort_sub = map_abort_sub;
map->update_cell_bl = map_update_cell_bl;
-
map->get_new_bonus_id = map_get_new_bonus_id;
-
+
map->add_questinfo = map_add_questinfo;
map->remove_questinfo = map_remove_questinfo;
-
+
map->merge_zone = map_merge_zone;
map->zone_clear_single = map_zone_clear_single;
-
+
/**
* mapit interface
**/
-
mapit = &mapit_s;
mapit->alloc = mapit_alloc;
@@ -6305,5 +6277,4 @@ void map_defaults(void) {
mapit->next = mapit_next;
mapit->prev = mapit_prev;
mapit->exists = mapit_exists;
-
}
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index ff37f396d..b26876d39 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -471,7 +471,7 @@ bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
ShowError("read_mercenary_skilldb : Class %d not found in mercenary_db for skill entry.\n", class_);
return false;
}
-
+
skill_id = atoi(str[1]);
if( skill_id < MC_SKILLBASE || skill_id >= MC_SKILLBASE + MAX_MERCSKILL )
{
@@ -501,7 +501,7 @@ void do_init_mercenary(bool minimal) {
mercenary->read_db();
mercenary->read_skilldb();
-
+
timer->add_func_list(mercenary->contract_end_timer, "merc_contract_end_timer");
}
@@ -518,22 +518,21 @@ void mercenary_defaults(void) {
memset(mercenary->db, 0, sizeof(struct s_mercenary_db) * MAX_MERCENARY_CLASS);
/* funcs */
-
mercenary->init = do_init_mercenary;
-
+
mercenary->class = merc_class;
mercenary->get_viewdata = merc_get_viewdata;
-
+
mercenary->create = merc_create;
mercenary->data_received = merc_data_received;
mercenary->save = mercenary_save;
-
+
mercenary->heal = mercenary_heal;
mercenary->dead = mercenary_dead;
-
+
mercenary->delete = merc_delete;
mercenary->contract_stop = merc_contract_stop;
-
+
mercenary->get_lifetime = mercenary_get_lifetime;
mercenary->get_guild = mercenary_get_guild;
mercenary->get_faith = mercenary_get_faith;
@@ -541,14 +540,14 @@ void mercenary_defaults(void) {
mercenary->get_calls = mercenary_get_calls;
mercenary->set_calls = mercenary_set_calls;
mercenary->kills = mercenary_kills;
-
+
mercenary->checkskill = mercenary_checkskill;
mercenary->read_db = read_mercenarydb;
mercenary->read_skilldb = read_mercenary_skilldb;
-
+
mercenary->killbonus = mercenary_killbonus;
mercenary->search_index = merc_search_index;
-
+
mercenary->contract_end_timer = merc_contract_end_timer;
mercenary->read_db_sub = read_mercenarydb_sub;
mercenary->read_skill_db_sub = read_mercenary_skilldb_sub;
diff --git a/src/map/mob.c b/src/map/mob.c
index b1f6e8c61..2fe9fe8fb 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -291,7 +291,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data) {
status->set_viewdata(&md->bl, md->class_);
status->change_init(&md->bl);
unit->dataset(&md->bl);
-
+
map->addiddb(&md->bl);
return md;
}
@@ -468,7 +468,7 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const
struct mob_data* md = NULL;
int count, lv;
bool no_guardian_data = false;
-
+
if( ai && ai&0x200 ) {
no_guardian_data = true;
ai &=~ 0x200;
@@ -2371,7 +2371,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
if( drop_rate < 1 )
drop_rate = 1;
}
-
+
// attempt to drop the item
if (rnd() % 10000 >= drop_rate)
continue;
@@ -2390,14 +2390,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
//MSG: "'%s' won %s's %s (chance: %0.02f%%)"
intif->broadcast(message, strlen(message)+1, BC_DEFAULT);
}
-
+
/* heres the thing we got the feature set up however we're still discussing how to best define the ids,
* so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it,
* thus why we're unsure on how to best place the setting) */
/* temp, will not be hardcoded for long thudu. */
if( it->nameid == 7782 || it->nameid == 7783 ) /* for when not hardcoded: add a check on mvp bonus drop as well */
clif->item_drop_announce(mvp_sd, it->nameid, md->name);
-
+
// Announce first, or else ditem will be freed. [Lance]
// By popular demand, use base drop rate for autoloot code. [Skotlex]
mob->item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly);
@@ -3308,7 +3308,7 @@ int mobskill_event(struct mob_data *md, struct block_list *src, int64 tick, int
md->state.alchemist = 1;
return mob->skill_use(md, timer->gettick(), MSC_ALCHEMIST);
}
-
+
target_id = md->target_id;
if (!target_id || battle_config.mob_changetarget_byskill)
md->target_id = src->id;
@@ -3704,13 +3704,13 @@ bool mob_parse_dbrow(char** str) {
db->job_exp = (unsigned int)cap_value(exp, 0, UINT_MAX);
mstatus->rhw.range = atoi(str[9]);
-
+
mstatus->rhw.atk = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[10]));
mstatus->rhw.atk2 = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[11]));
-
+
mstatus->def = mob_parse_dbrow_cap_value(class_,DEFTYPE_MIN,DEFTYPE_MAX,atoi(str[12]));
mstatus->mdef = mob_parse_dbrow_cap_value(class_,DEFTYPE_MIN,DEFTYPE_MAX,atoi(str[13]));
-
+
mstatus->str = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[14]));
mstatus->agi = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[15]));
mstatus->vit = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[16]));
@@ -3945,7 +3945,7 @@ void mob_readdb(void) {
* mob_db table reading
*------------------------------------------*/
int mob_read_sqldb(void) {
- const char* mob_db_name[] = {
+ const char* mob_db_name[] = {
map->mob_db_db,
map->mob_db2_db
};
@@ -4521,7 +4521,7 @@ void mob_readskilldb(void) {
* seems to work though...
*/
int mob_read_sqlskilldb(void) {
- const char* mob_skill_db_name[] = {
+ const char* mob_skill_db_name[] = {
map->mob_skill_db_db,
map->mob_skill_db2_db
};
@@ -4532,7 +4532,6 @@ int mob_read_sqlskilldb(void) {
return 0;
}
-
for( fi = 0; fi < ARRAYLENGTH(mob_skill_db_name); ++fi ) {
uint32 lines = 0, count = 0;
@@ -4647,7 +4646,7 @@ void mob_load(bool minimal) {
void mob_reload(void) {
int i;
-
+
//Mob skills need to be cleared before re-reading them. [Skotlex]
for (i = 0; i < MAX_MOB_DB; i++)
if (mob->db_data[i] && !mob->is_clone(i)) {
@@ -4766,13 +4765,13 @@ void mob_defaults(void) {
//Defines the Manuk/Splendide mob groups for the status reductions [Epoque]
const int mob_manuk[8] = { 1986, 1987, 1988, 1989, 1990, 1997, 1998, 1999 };
const int mob_splendide[5] = { 1991, 1992, 1993, 1994, 1995 };
-
+
mob = &mob_s;
-
+
memset(mob->db_data, 0, sizeof(mob->db_data));
mob->dummy = NULL;
memset(mob->chat_db, 0, sizeof(mob->chat_db));
-
+
memcpy(mob->manuk, mob_manuk, sizeof(mob->manuk));
memcpy(mob->splendide, mob_splendide, sizeof(mob->splendide));
/* */
diff --git a/src/map/npc.c b/src/map/npc.c
index fe7ba693f..a0c14a058 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -271,7 +271,7 @@ int npc_rr_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
if( sd ) sd->npc_idle_timer = INVALID_TIMER;
return 0;//Not logged in anymore OR no longer attached to a npc
}
-
+
switch( sd->npc_idle_type ) {
case NPCT_INPUT:
timeout = NPC_SECURE_TIMEOUT_INPUT;
@@ -281,7 +281,7 @@ int npc_rr_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
break;
//case NPCT_WAIT: var starts with this value
}
-
+
if( DIFF_TICK(tick,sd->npc_idle_tick) > (timeout*1000) ) {
/**
* If we still have the NPC script attached, tell it to stop.
@@ -1239,7 +1239,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
if ((nd = npc->checknear(sd,&nd->bl)) == NULL)
return 1;
-
+
//Hidden/Disabled npc.
if (nd->class_ < 0 || nd->option&(OPTION_INVISIBLE|OPTION_HIDE))
return 1;
@@ -1281,7 +1281,7 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) {
nd?(char*)nd->name:"'Unknown NPC'", (int)id);
return 1;
}
-
+
if(id != npc->fake_nd->bl.id) { // Not item script
if ((npc->checknear(sd,target)) == NULL){
ShowWarning("npc_scriptcont: failed npc->checknear test.\n");
@@ -1303,10 +1303,10 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) {
**/
if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,timer->gettick()) > 0 )
return 1;
-
+
if( !sd->st )
return 1;
-
+
if( closing && sd->st->state == CLOSE )
sd->st->state = END;
@@ -1327,12 +1327,11 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) {
return 1;
if ( nd->subtype != SHOP && !(nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->items) ) {
-
if( nd->subtype == SCRIPT )
ShowError("npc_buysellsel: trader '%s' has no shop list!\n",nd->exname);
else
ShowError("npc_buysellsel: no such shop npc %d (%s)\n",id,nd->exname);
-
+
if (sd->npc_id == id)
sd->npc_id = 0;
return 1;
@@ -1340,7 +1339,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) {
if (nd->option & OPTION_INVISIBLE) // can't buy if npc is not visible (hack?)
return 1;
-
+
if( nd->class_ < 0 && !sd->state.callshop ) {// not called through a script and is not a visible NPC so an invalid call
return 1;
}
@@ -1354,7 +1353,6 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) {
} else {
clif->selllist(sd);
}
-
return 0;
}
@@ -1372,13 +1370,13 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
if( count <= 0 )
return ERROR_TYPE_ITEM_ID;
-
+
if( points < 0 )
return ERROR_TYPE_MONEY;
-
+
if( !(nd = (struct npc_data *)map->id2bl(sd->npc_shopid)) )
return ERROR_TYPE_NPC;
-
+
if( nd->subtype != CASHSHOP ) {
if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET ) {
shop = nd->u.scr.shop->item;
@@ -1389,7 +1387,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
}
-
+
new_ = 0;
w = 0;
vt = 0; // Global Value
@@ -1426,10 +1424,10 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
if( w + sd->weight > sd->max_weight )
return ERROR_TYPE_INVENTORY_WEIGHT;
-
+
if( pc->inventoryblank(sd) < new_ )
return ERROR_TYPE_INVENTORY_WEIGHT;
-
+
if( points > vt ) points = vt;
// Payment Process ----------------------------------------------------
@@ -1492,7 +1490,7 @@ void npc_market_fromsql(void) {
char name[NAME_LENGTH+1];
int itemid;
int amount;
-
+
if ( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemid`, `amount` FROM `%s`", map->npc_market_data_db)
|| SQL_ERROR == SQL->StmtExecute(stmt)
) {
@@ -1500,15 +1498,15 @@ void npc_market_fromsql(void) {
SQL->StmtFree(stmt);
return;
}
-
+
SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name[0], sizeof(name), NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &amount, 0, NULL, NULL);
-
+
while ( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) {
struct npc_data *nd = NULL;
unsigned short i;
-
+
if( !(nd = npc->name2id(name)) ) {
ShowError("npc_market_fromsql: NPC '%s' not found! skipping...\n",name);
npc->market_delfromsql_sub(name, USHRT_MAX);
@@ -1518,22 +1516,20 @@ void npc_market_fromsql(void) {
npc->market_delfromsql_sub(name, USHRT_MAX);
continue;
}
-
+
for(i = 0; i < nd->u.scr.shop->items; i++) {
if( nd->u.scr.shop->item[i].nameid == itemid ) {
nd->u.scr.shop->item[i].qty = amount;
break;
}
}
-
+
if( i == nd->u.scr.shop->items ) {
ShowError("npc_market_fromsql: NPC '%s' does not sell item %d (qty %d), deleting...\n",name,itemid,amount);
npc->market_delfromsql_sub(name, itemid);
continue;
}
-
}
-
SQL->StmtFree(stmt);
}
/**
@@ -1567,10 +1563,9 @@ void npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
* Judges whether to allow and spawn a trader's window.
**/
bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
-
if( !nd->u.scr.shop || !nd->u.scr.shop->items )
return false;
-
+
switch( nd->u.scr.shop->type ) {
case NST_ZENY:
sd->state.callshop = 1;
@@ -1578,12 +1573,12 @@ bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
return true;/* we skip sd->npc_shopid, npc->buysell will set it then when the player selects */
case NST_MARKET: {
unsigned short i;
-
+
for(i = 0; i < nd->u.scr.shop->items; i++) {
if( nd->u.scr.shop->item[i].qty )
break;
}
-
+
/* nothing to display, no items available */
if (i == nd->u.scr.shop->items) {
clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,881));
@@ -1597,9 +1592,7 @@ bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
clif->cashshop_show(sd,nd);
break;
}
-
sd->npc_shopid = nd->bl.id;
-
return true;
}
/**
@@ -1611,21 +1604,19 @@ void npc_trader_update(int master) {
DBIterator* iter;
struct block_list* bl;
struct npc_data *master_nd = map->id2nd(master);
-
+
CREATE(master_nd->u.scr.shop,struct npc_shop_data,1);
-
+
iter = db_iterator(map->id_db);
-
for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) ) {
if( bl->type == BL_NPC ) {
struct npc_data* nd = (struct npc_data*)bl;
-
+
if( nd->src_id == master ) {
nd->u.scr.shop = master_nd->u.scr.shop;
}
}
}
-
dbi_destroy(iter);
}
/**
@@ -1637,9 +1628,9 @@ void npc_trader_update(int master) {
void npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) {
char evname[EVENT_NAME_LENGTH];
struct event_data *ev = NULL;
-
+
npc->trader_funds[0] = npc->trader_funds[1] = 0;/* clear */
-
+
switch( nd->u.scr.shop->type ) {
case NST_CASH:
npc->trader_funds[0] = sd->cashPoints;
@@ -1651,14 +1642,14 @@ void npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) {
ShowError("npc_trader_count_funds: unsupported shop type %d\n",nd->u.scr.shop->type);
return;
}
-
+
snprintf(evname, EVENT_NAME_LENGTH, "%s::OnCountFunds",nd->exname);
-
+
if ( (ev = strdb_get(npc->ev_db, evname)) )
script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
else
ShowError("npc_trader_count_funds: '%s' event '%s' not found, operation failed\n",nd->exname,evname);
-
+
/* the callee will rely on npc->trader_funds, upon success script->run updates them */
}
/**
@@ -1674,19 +1665,17 @@ void npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) {
bool npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price, int points) {
char evname[EVENT_NAME_LENGTH];
struct event_data *ev = NULL;
-
+
npc->trader_ok = false;/* clear */
-
+
snprintf(evname, EVENT_NAME_LENGTH, "%s::OnPayFunds",nd->exname);
-
if ( (ev = strdb_get(npc->ev_db, evname)) ) {
pc->setreg(sd,script->add_str("@price"),price);
pc->setreg(sd,script->add_str("@points"),points);
-
script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
} else
ShowError("npc_trader_pay: '%s' event '%s' not found, operation failed\n",nd->exname,evname);
-
+
return npc->trader_ok;/* run script will deal with it */
}
/*==========================================
@@ -1698,7 +1687,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
struct npc_item_list *shop = NULL;
int i, price, w;
unsigned short shop_size = 0;
-
+
if( amount <= 0 )
return ERROR_TYPE_ITEM_ID;
@@ -1707,7 +1696,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
if( sd->state.trading )
return ERROR_TYPE_EXCHANGE;
-
+
if( !(nd = (struct npc_data *)map->id2bl(sd->npc_shopid)) )
return ERROR_TYPE_NPC;
@@ -1724,12 +1713,12 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
}
-
+
ARR_FIND(0, shop_size, i, shop[i].nameid == nameid);
-
+
if( i == shop_size )
return ERROR_TYPE_ITEM_ID;
-
+
if( shop[i].value <= 0 )
return ERROR_TYPE_ITEM_ID;
@@ -1762,7 +1751,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
}
price = shop[i].value * amount;
-
+
if( points > price )
points = price;
@@ -1772,7 +1761,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
} else {
if( (sd->kafraPoints < points) || (sd->cashPoints < price - points) )
return ERROR_TYPE_MONEY;
-
+
pc->paycash(sd, price, points);
}
@@ -1798,14 +1787,14 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
double z;
int i,j,w,skill_t,new_, idx = skill->get_index(MC_DISCOUNT);
unsigned short shop_size = 0;
-
+
nullpo_retr(3, sd);
nullpo_retr(3, item_list);
-
+
nd = npc->checknear(sd,map->id2bl(sd->npc_shopid));
if( nd == NULL )
return 3;
-
+
if( nd->subtype != SHOP ) {
if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type == NST_ZENY ) {
shop = nd->u.scr.shop->item;
@@ -1816,76 +1805,76 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
}
-
+
z = 0;
w = 0;
new_ = 0;
// process entries in buy list, one by one
for( i = 0; i < n; ++i ) {
int nameid, amount, value;
-
+
// find this entry in the shop's sell list
ARR_FIND( 0, shop_size, j,
item_list[i*2+1] == shop[j].nameid || //Normal items
item_list[i*2+1] == itemdb_viewid(shop[j].nameid) //item_avail replacement
);
-
+
if( j == shop_size )
return 3; // no such item in shop
-
+
amount = item_list[i*2+0];
nameid = item_list[i*2+1] = shop[j].nameid; //item_avail replacement
value = shop[j].value;
-
+
if( !itemdb->exists(nameid) )
return 3; // item no longer in itemdb
-
+
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 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;
}
-
+
if( nd->master_nd ) {
// Script-controlled shops decide by themselves, what can be bought and for what price.
continue;
}
-
+
switch( pc->checkadditem(sd,nameid,amount) ) {
case ADDITEM_EXIST:
break;
-
+
case ADDITEM_NEW:
new_++;
break;
-
+
case ADDITEM_OVERAMOUNT:
return 2;
}
-
+
value = pc->modifybuyvalue(sd,value);
-
+
z += (double)value * amount;
w += itemdb_weight(nameid) * amount;
}
-
+
if( nd->master_nd != NULL ) //Script-based shops.
return npc->buylist_sub(sd,n,item_list,nd->master_nd);
-
+
if( z > (double)sd->status.zeny )
return 1; // Not enough Zeny
if( w + sd->weight > sd->max_weight )
return 2; // Too heavy
if( pc->inventoryblank(sd) < new_ )
return 3; // Not enough space to store items
-
+
pc->payzeny(sd,(int)z,LOG_TYPE_NPC, NULL);
-
+
for( i = 0; i < n; ++i ) {
int nameid = item_list[i*2+1];
int amount = item_list[i*2+0];
-
+
if (itemdb_type(nameid) == IT_PETEGG) {
pet->create_egg(sd, nameid);
} else {
@@ -1893,16 +1882,16 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = nameid;
item_tmp.identify = 1;
-
+
pc->additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
}
}
-
+
// custom merchant shop exp bonus
if( battle_config.shop_exp > 0 && z > 0 && (skill_t = pc->checkskill2(sd,idx)) > 0 ) {
if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 )
skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0;
-
+
if( skill_t > 0 ) {
z = z * (double)skill_t * (double)battle_config.shop_exp/10000.;
if( z < 1 )
@@ -1910,7 +1899,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
pc->gainexp(sd,NULL,0,(int)z, false);
}
}
-
+
return 0;
}
@@ -1923,7 +1912,7 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
double z;
int i,j,w,new_;
unsigned short shop_size = 0;
-
+
nullpo_retr(1, sd);
nullpo_retr(1, p);
@@ -1934,21 +1923,21 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
-
+
z = 0;
w = 0;
new_ = 0;
-
+
// process entries in buy list, one by one
for( i = 0; i < list_size; ++i ) {
int nameid, amount, value;
-
+
// find this entry in the shop's sell list
ARR_FIND( 0, shop_size, j,
p->list[i].ITID == shop[j].nameid || //Normal items
p->list[i].ITID == itemdb_viewid(shop[j].nameid) //item_avail replacement
);
-
+
if( j == shop_size ) /* TODO find official response for this */
return 1; // no such item in shop
@@ -1962,26 +1951,24 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
if( !itemdb->exists(nameid) ) /* TODO find official response for this */
return 1; // item no longer in itemdb
-
+
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 non-stackable item %d!\n",
sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid);
amount = p->list[i].qty = 1;
}
-
+
switch( pc->checkadditem(sd,nameid,amount) ) {
case ADDITEM_EXIST:
break;
-
case ADDITEM_NEW:
new_++;
break;
-
case ADDITEM_OVERAMOUNT: /* TODO find official response for this */
return 1;
}
-
+
z += (double)value * amount;
w += itemdb_weight(nameid) * amount;
}
@@ -1996,20 +1983,20 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
return 1; // Not enough space to store items
pc->payzeny(sd,(int)z,LOG_TYPE_NPC, NULL);
-
+
for( i = 0; i < list_size; ++i ) {
int nameid = p->list[i].ITID;
int amount = p->list[i].qty;
-
+
j = npc_market_qty[i];
-
+
if( p->list[i].qty > shop[j].qty ) /* wohoo someone tampered with the packet. */
return 1;
-
+
shop[j].qty -= amount;
-
+
npc->market_tosql(nd,j);
-
+
if (itemdb_type(nameid) == IT_PETEGG) {
pet->create_egg(sd, nameid);
} else {
@@ -2017,7 +2004,7 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = nameid;
item_tmp.identify = 1;
-
+
pc->additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
}
}
@@ -2058,18 +2045,18 @@ 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);
-
+
// process item 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);
script->setarray_pc(sd, "@sold_identify", i, (void*)(intptr_t)sd->status.inventory[idx].identify, &key_identify);
-
+
for (j = 0; j < MAX_SLOTS; j++) {
// store each of the cards/special info from the item in the array
snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1);
script->setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]);
}
-
+
}
// invoke event
@@ -2078,7 +2065,6 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li
return 0;
}
-
/// Player item selling to npc shop.
///
/// @param item_list 'n' pairs <index,amount>
@@ -2100,7 +2086,6 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
return 1;
}
-
z = 0;
// verify the sell list
@@ -2246,7 +2231,7 @@ int npc_unload(struct npc_data* nd, bool single)
if( nd->ud && nd->ud != &npc->base_ud ) {
skill->clear_unitgroup(&nd->bl);
}
-
+
npc->remove_map(nd);
map->deliddb(&nd->bl);
if( single )
@@ -2270,7 +2255,7 @@ int npc_unload(struct npc_data* nd, bool single)
aFree(nd->path);/* remove now that no other instances exist */
}
}
-
+
if( single && nd->bl.m != -1 )
map->remove_questinfo(nd->bl.m,nd);
@@ -2284,7 +2269,7 @@ int npc_unload(struct npc_data* nd, bool single)
npc->ev_db->foreach(npc->ev_db,npc->unload_ev,nd->exname); //Clean up all events related
npc->ev_label_db->foreach(npc->ev_label_db,npc->unload_ev_label,nd);
}
-
+
iter = mapit_geteachpc();
for( bl = (struct block_list*)mapit->first(iter); mapit->exists(iter); bl = (struct block_list*)mapit->next(iter) ) {
struct map_session_data *sd = ((TBL_PC*)bl);
@@ -2646,7 +2631,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');;//try next
}
-
+
nd = npc->create_npc(m, x, y);
map->addnpc(m, nd);
npc->parsename(nd, w3, start, buffer, filepath);
@@ -2722,7 +2707,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');//try next
}
-
+
if( strcmp(w2,"cashshop") == 0 )
type = CASHSHOP;
else
@@ -2820,14 +2805,14 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
void npc_convertlabel_db(struct npc_label_list* label_list, const char *filepath) {
int i;
-
+
for( i = 0; i < script->label_count; i++ ) {
const char* lname = script->get_str(script->labels[i].key);
int lpos = script->labels[i].pos;
struct npc_label_list* label;
const char *p;
size_t len;
-
+
// In case of labels not terminated with ':', for user defined function support
p = lname;
@@ -2840,9 +2825,9 @@ void npc_convertlabel_db(struct npc_label_list* label_list, const char *filepath
ShowError("npc_parse_script: label name longer than 23 chars! (%s) in file '%s'.\n", lname, filepath);
return;
}
-
+
label = &label_list[i];
-
+
safestrncpy(label->name, lname, sizeof(label->name));
label->pos = lpos;
}
@@ -2958,13 +2943,10 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
if( end == NULL )
return NULL;// (simple) parse error, don't continue
-
script->parser_current_npc_name = w3;
-
scriptroot = script->parse(script_start, filepath, strline(buffer,script_start-buffer), SCRIPT_USE_LABEL_DB, retval);
-
script->parser_current_npc_name = NULL;
-
+
label_list = NULL;
label_list_num = 0;
if( script->label_count ) {
@@ -2994,7 +2976,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
if( options&NPO_TRADER )
nd->u.scr.trader = true;
nd->u.scr.shop = NULL;
-
+
++npc_script;
nd->bl.type = BL_NPC;
nd->subtype = SCRIPT;
@@ -3116,7 +3098,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if (retval) *retval = EXIT_FAILURE;
return end;//try next
}
-
+
if( type == WARP && sscanf(w4, "%d,%d", &xs, &ys) == 2 );// <spanx>,<spany>
else if( type == SCRIPT && sscanf(w4, "%*[^,],%d,%d", &xs, &ys) == 2);// <sprite id>,<triggerX>,<triggerY>
else if( type == WARP ) {
@@ -3485,7 +3467,7 @@ const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const cha
scriptroot = script->parse(script_start, filepath, strline(buffer,start-buffer), SCRIPT_RETURN_EMPTY_SCRIPT, retval);
script->parser_current_npc_name = NULL;
-
+
if( scriptroot == NULL )// parse error, continue
return end;
@@ -3501,7 +3483,6 @@ const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const cha
return end;
}
-
/*==========================================
* Parse Mob 1 - Parse mob list into each map
* Parse Mob 2 - Actually Spawns Mob
@@ -3823,7 +3804,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].flag.pvp_nocalcrank=state;
else if (!strcmpi(w3,"gvg")) {
struct map_zone_data *zone;
-
+
map->list[m].flag.gvg = state;
if( state && map->list[m].flag.pvp ) {
map->list[m].flag.pvp = 0;
@@ -3872,7 +3853,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 GvG flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
}
-
+
if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) != NULL && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
}
@@ -3958,11 +3939,11 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
size_t len = w4 ? strlen(w4) : 0;
-
+
modifier[0] = '\0';
if( w4 )
memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
-
+
for(k = 0; k < len; k++) {
if( skill_name[k] == '\t' ) {
memcpy(modifier, &skill_name[k+1], len - k);
@@ -3970,7 +3951,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
break;
}
}
-
+
if( modifier[0] == '\0' ) {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
@@ -3982,9 +3963,9 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if (retval) *retval = EXIT_FAILURE;
} else {
int idx = map->list[m].unit_count;
-
+
ARR_FIND(0, idx, k, map->list[m].units[k]->skill_id == skill_id);
-
+
if( k < idx ) {
if( atoi(modifier) != 100 )
map->list[m].units[k]->modifier = (unsigned short)atoi(modifier);
@@ -3995,9 +3976,9 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
for( k = 0; k < idx; k++ ) {
if( map->list[m].units[k] == NULL )
continue;
-
+
map->list[m].units[cursor] = map->list[m].units[k];
-
+
cursor++;
}
if( !( map->list[m].unit_count = cursor ) ) {
@@ -4016,12 +3997,12 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
size_t len = w4 ? strlen(w4) : 0;
-
+
modifier[0] = '\0';
-
+
if( w4 )
memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
-
+
for(k = 0; k < len; k++) {
if( skill_name[k] == '\t' ) {
memcpy(modifier, &skill_name[k+1], len - k);
@@ -4029,7 +4010,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
break;
}
}
-
+
if( modifier[0] == '\0' ) {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
@@ -4041,9 +4022,9 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if (retval) *retval = EXIT_FAILURE;
} else {
int idx = map->list[m].skill_count;
-
+
ARR_FIND(0, idx, k, map->list[m].skills[k]->skill_id == skill_id);
-
+
if( k < idx ) {
if( atoi(modifier) != 100 )
map->list[m].skills[k]->modifier = (unsigned short)atoi(modifier);
@@ -4054,9 +4035,9 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
for( k = 0; k < idx; k++ ) {
if( map->list[m].skills[k] == NULL )
continue;
-
+
map->list[m].skills[cursor] = map->list[m].skills[k];
-
+
cursor++;
}
if( !( map->list[m].skill_count = cursor ) ) {
@@ -4070,11 +4051,10 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].skills[idx]->skill_id = (unsigned short)skill_id;
map->list[m].skills[idx]->modifier = (unsigned short)atoi(modifier);
}
-
}
} else if (!strcmpi(w3,"zone")) {
struct map_zone_data *zone;
-
+
if( !(zone = strdb_get(map->zone_db, w4)) ) {
ShowWarning("npc_parse_mapflag: Invalid zone '%s'! removing flag from %s in file '%s', line '%d'.\n", w4, map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
@@ -4451,9 +4431,8 @@ int npc_reload(void) {
npc_last_npd = NULL;
npc_last_path = NULL;
npc_last_ref = NULL;
-
- //Remove all npcs/mobs. [Skotlex]
+ //Remove all npcs/mobs. [Skotlex]
iter = mapit_geteachiddb();
for( bl = (struct block_list*)mapit->first(iter); mapit->exists(iter); bl = (struct block_list*)mapit->next(iter) ) {
switch(bl->type) {
@@ -4617,7 +4596,7 @@ int do_init_npc(bool minimal) {
npc->base_ud.attackabletime =
npc->base_ud.canact_tick =
npc->base_ud.canmove_tick = timer->gettick();
-
+
//Stock view data for normal npcs.
memset(&npc_viewdb, 0, sizeof(npc_viewdb));
@@ -4645,12 +4624,12 @@ int do_init_npc(bool minimal) {
npc_process_files(START_NPC_NUM);
}
-
+
if (!minimal) {
map->zone_init();
-
+
npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */
-
+
// set up the events cache
memset(script_event, 0, sizeof(script_event));
npc->read_event_script();
@@ -4662,7 +4641,7 @@ int do_init_npc(bool minimal) {
timer->add_func_list(npc->event_do_clock,"npc_event_do_clock");
timer->add_func_list(npc->timerevent,"npc_timerevent");
}
-
+
if( script->lang_export_fp ) {
ShowInfo("Lang exported to '%s'\n",script->lang_export_file);
fclose(script->lang_export_fp);
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index 0b9023ede..503dbd845 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -80,7 +80,6 @@ struct pcre_interface *libpcre;
* deletes a pset
*/
-
/**
* delete everything associated with a entry
*
@@ -102,9 +101,9 @@ struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) {
struct npc_parse *npcParse = nd->chatdb;
if (npcParse == NULL)
nd->chatdb = npcParse = (struct npc_parse *)aCalloc(sizeof(struct npc_parse), 1);
-
+
pcreset = npcParse->active;
-
+
while (pcreset != NULL) {
if (pcreset->setid == setid)
break;
@@ -112,13 +111,13 @@ struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) {
}
if (pcreset == NULL)
pcreset = npcParse->inactive;
-
+
while (pcreset != NULL) {
if (pcreset->setid == setid)
break;
pcreset = pcreset->next;
}
-
+
if (pcreset == NULL) {
pcreset = (struct pcrematch_set *)aCalloc(sizeof(struct pcrematch_set), 1);
pcreset->next = npcParse->inactive;
@@ -128,7 +127,6 @@ struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) {
npcParse->inactive = pcreset;
pcreset->setid = setid;
}
-
return pcreset;
}
@@ -157,7 +155,7 @@ void activate_pcreset(struct npc_data* nd, int setid)
pcreset->prev->next = pcreset->next;
else
npcParse->inactive = pcreset->next;
-
+
pcreset->prev = NULL;
pcreset->next = npcParse->active;
if (pcreset->next != NULL)
@@ -195,7 +193,7 @@ void deactivate_pcreset(struct npc_data* nd, int setid)
pcreset->prev->next = pcreset->next;
else
npcParse->active = pcreset->next;
-
+
pcreset->prev = NULL;
pcreset->next = npcParse->inactive;
if (pcreset->next != NULL)
@@ -230,27 +228,26 @@ void delete_pcreset(struct npc_data* nd, int setid)
}
if (pcreset == NULL)
return;
-
+
if (pcreset->next != NULL)
pcreset->next->prev = pcreset->prev;
if (pcreset->prev != NULL)
pcreset->prev->next = pcreset->next;
-
+
if(active)
npcParse->active = pcreset->next;
else
npcParse->inactive = pcreset->next;
-
+
pcreset->prev = NULL;
pcreset->next = NULL;
-
+
while (pcreset->head) {
struct pcrematch_entry* n = pcreset->head->next;
npc_chat->finalize_pcrematch_entry(pcreset->head);
aFree(pcreset->head); // Cleaning the last ones.. [Lance]
pcreset->head = n;
}
-
aFree(pcreset);
}
@@ -261,25 +258,25 @@ struct pcrematch_entry* create_pcrematch_entry(struct pcrematch_set* set)
{
struct pcrematch_entry * e = (struct pcrematch_entry *) aCalloc(sizeof(struct pcrematch_entry), 1);
struct pcrematch_entry * last = set->head;
-
+
// Normally we would have just stuck it at the end of the list but
// this doesn't sink up with peoples usage pattern. They wanted
// the items defined first to have a higher priority then the
// items defined later. as a result, we have to do some work up front.
-
+
/* if we are the first pattern, stick us at the end */
if (last == NULL) {
set->head = e;
return e;
}
-
+
/* Look for the last entry */
while (last->next != NULL)
last = last->next;
-
+
last->next = e;
e->next = NULL;
-
+
return e;
}
@@ -290,7 +287,7 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c
{
const char *err;
int erroff;
-
+
struct pcrematch_set * s = npc_chat->lookup_pcreset(nd, setid);
struct pcrematch_entry *e = npc_chat->create_pcrematch_entry(s);
e->pattern = aStrdup(pattern);
@@ -310,13 +307,13 @@ void npc_chat_finalize(struct npc_data* nd)
struct npc_parse *npcParse = nd->chatdb;
if (npcParse == NULL)
return;
-
+
while(npcParse->active)
npc_chat->delete_pcreset(nd, npcParse->active->setid);
-
+
while(npcParse->inactive)
npc_chat->delete_pcreset(nd, npcParse->inactive->setid);
-
+
// Additional cleaning up [Lance]
aFree(npcParse);
}
@@ -334,15 +331,15 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
struct npc_label_list* lst;
struct pcrematch_set* pcreset;
struct pcrematch_entry* e;
-
+
// Not interested in anything you might have to say...
if (npcParse == NULL || npcParse->active == NULL)
return 0;
-
+
msg = va_arg(ap,char*);
len = va_arg(ap,int);
sd = va_arg(ap,struct map_session_data *);
-
+
// iterate across all active sets
for (pcreset = npcParse->active; pcreset != NULL; pcreset = pcreset->next)
{
@@ -350,7 +347,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
for (e = pcreset->head; e != NULL; e = e->next)
{
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));
if (r > 0)
@@ -363,7 +360,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
libpcre->copy_substring(msg, offsets, r, i, val, sizeof(val));
script->set_var(sd, var, val);
}
-
+
// find the target label.. this sucks..
lst = nd->u.scr.label_list;
ARR_FIND(0, nd->u.scr.label_list_num, i, strncmp(lst[i].name, e->label, sizeof(lst[i].name)) == 0);
@@ -371,14 +368,13 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
ShowWarning("npc_chat_sub: Unable to find label: %s\n", e->label);
return 0;
}
-
+
// run the npc script
script->run_npc(nd->u.scr.script,lst[i].pos,sd->bl.id,nd->bl.id);
return 0;
}
}
}
-
return 0;
}
@@ -388,7 +384,7 @@ BUILDIN(defpattern) {
const char* pattern = script_getstr(st,3);
const char* label = script_getstr(st,4);
struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid);
-
+
npc_chat->def_pattern(nd, setid, pattern, label);
return true;
@@ -397,7 +393,7 @@ BUILDIN(defpattern) {
BUILDIN(activatepset) {
int setid = script_getnum(st,2);
struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid);
-
+
npc_chat->activate_pcreset(nd, setid);
return true;
@@ -406,16 +402,16 @@ BUILDIN(activatepset) {
BUILDIN(deactivatepset) {
int setid = script_getnum(st,2);
struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid);
-
+
npc_chat->deactivate_pcreset(nd, setid);
-
+
return true;
}
BUILDIN(deletepset) {
int setid = script_getnum(st,2);
struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid);
-
+
npc_chat->delete_pcreset(nd, setid);
return true;
@@ -423,7 +419,7 @@ BUILDIN(deletepset) {
void npc_chat_defaults(void) {
npc_chat = &npc_chat_s;
-
+
npc_chat->sub = npc_chat_sub;
npc_chat->finalize = npc_chat_finalize;
npc_chat->def_pattern = npc_chat_def_pattern;
@@ -433,9 +429,9 @@ void npc_chat_defaults(void) {
npc_chat->activate_pcreset = activate_pcreset;
npc_chat->lookup_pcreset = lookup_pcreset;
npc_chat->finalize_pcrematch_entry = finalize_pcrematch_entry;
-
+
libpcre = &libpcre_s;
-
+
libpcre->compile = pcre_compile;
libpcre->study = pcre_study;
libpcre->exec = pcre_exec;
diff --git a/src/map/packets.h b/src/map/packets.h
index 1f465b833..ffa40ff7c 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2818,7 +2818,6 @@ packet(0x96e,-1,clif->ackmergeitems);
packet(0x0A22,5); // HEADER_ZC_RECV_ROULETTE_ITEM
#endif
-
// 2014-10-22bRagexe - YomRawr
#if PACKETVER >= 20141022
packet(0x0369,7,clif->pActionRequest,2,6);
@@ -2896,7 +2895,7 @@ packet(0x96e,-1,clif->ackmergeitems);
packet(0x0923,36,clif->pStoragePassword,0);
packet(0x09e8,11,clif->pDull); //CZ_OPEN_MAILBOX
packet(0x0a2e,6,clif->pDull); //TITLE
-#endif
+#endif
/* PacketKeys: http://herc.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */
#if PACKETVER >= 20110817
diff --git a/src/map/party.c b/src/map/party.c
index 472c03423..db285a4b4 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -98,7 +98,7 @@ TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
}
int party_db_final(DBKey key, DBData *data, va_list ap) {
struct party_data *p;
-
+
if ((p = DB->data2ptr(data))) {
if (p->instance)
aFree(p->instance);
@@ -114,7 +114,6 @@ int party_db_final(DBKey key, DBData *data, va_list ap) {
aFree(p->hdata);
}
}
-
return 0;
}
/// Party data lookup using party id.
@@ -168,7 +167,6 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
return 0;
}
-
void party_created(int account_id,int char_id,int fail,int party_id,char *name) {
struct map_session_data *sd;
sd=map->id2sd(account_id);
@@ -500,7 +498,6 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) {
break;
}
}
-
return 0;
}
@@ -600,7 +597,7 @@ int party_broken(int party_id)
instance->list[p->instance[j]].owner_id = 0;
}
}
-
+
for( i = 0; i < MAX_PARTY; i++ ) {
if( p->data[i].sd!=NULL ) {
clif->party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10);
@@ -690,7 +687,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
//Change leadership.
p->party.member[mi].leader = 0;
p->party.member[tmi].leader = 1;
-
+
/** update members **/
clif->PartyLeaderChanged(p->data[mi].sd, p->data[mi].sd->status.account_id, p->data[tmi].sd->status.account_id);
@@ -955,13 +952,13 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
base_exp_bonus = base_exp;
job_exp_bonus = job_exp;
#endif
-
+
for (i = 0; i < c; i++) {
#ifdef RENEWAL_EXP
if( !(src && src->type == BL_MOB && ((TBL_MOB*)src)->db->mexp) ){
struct mob_data *md = (TBL_MOB*)src;
int rate = pc->level_penalty_mod(md->level - (sd[i])->status.base_level, md->status.race, md->status.mode, 1);
-
+
base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX);
job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX);
}
@@ -1118,7 +1115,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) {
if (sd->state.autotrade)
return 0;
-
+
if (battle_config.idle_no_share && pc_isidle(sd))
return 0;
@@ -1189,9 +1186,8 @@ void party_booking_register(struct map_session_data *sd, short level, short mapi
#ifndef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
int i;
-
+
pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
-
if( pb_ad == NULL )
{
pb_ad = party->create_booking_data();
@@ -1202,17 +1198,17 @@ void party_booking_register(struct map_session_data *sd, short level, short mapi
clif->PartyBookingRegisterAck(sd, 2);
return;
}
-
+
memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
pb_ad->expiretime = (int)time(NULL);
pb_ad->p_detail.level = level;
pb_ad->p_detail.mapid = mapid;
-
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
-
+
clif->PartyBookingRegisterAck(sd, 0);
clif->PartyBookingInsertNotify(sd, pb_ad); // Notice
#else
@@ -1244,26 +1240,25 @@ void party_booking_update(struct map_session_data *sd, short* job) {
#ifndef PARTY_RECRUIT
int i;
struct party_booking_ad_info *pb_ad;
-
+
pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
-
+
if( pb_ad == NULL )
return;
-
+
pb_ad->expiretime = (int)time(NULL);// Update time.
-
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
-
+
clif->PartyBookingUpdateNotify(sd, pb_ad);
#else
return;
#endif
}
-
void party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) {
#ifdef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
@@ -1302,9 +1297,9 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
DBIterator* iter = db_iterator(party->booking_db);
-
+
memset(result_list, 0, sizeof(result_list));
-
+
for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) ) {
if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
continue;
@@ -1334,7 +1329,6 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
#endif
}
-
bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
@@ -1384,7 +1378,7 @@ void party_defaults(void) {
party->searchname = party_searchname;
party->getmemberid = party_getmemberid;
party->getavailablesd = party_getavailablesd;
-
+
party->create = party_create;
party->created = party_created;
party->request_info = party_request_info;
diff --git a/src/map/path.c b/src/map/path.c
index 7d6cd5490..a482fc473 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -256,7 +256,7 @@ bool path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int1
// Check destination cell
if (x1 < 0 || x1 >= md->xs || y1 < 0 || y1 >= md->ys || md->getcellp(md, bl, x1, y1, cell))
return false;
-
+
if( x0 == x1 && y0 == y1 ) {
wpd->path_len = 0;
wpd->path_pos = 0;
@@ -409,7 +409,6 @@ bool path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int1
return false;
}
-
//Distance functions, taken from http://www.flipcode.com/articles/article_fastdistance.shtml
bool check_distance(int dx, int dy, int distance)
{
@@ -489,7 +488,7 @@ int distance_client(int dx, int dy)
void path_defaults(void) {
path = &path_s;
-
+
path->blownpos = path_blownpos;
path->search_long = path_search_long;
path->search = path_search;
diff --git a/src/map/pc.c b/src/map/pc.c
index cc4b598bd..dc7014701 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -127,7 +127,7 @@ void pc_setinvincibletimer(struct map_session_data* sd, int val) {
nullpo_retv(sd);
val += map->list[sd->bl.m].invincible_time_inc;
-
+
if( sd->invincible_timer != INVALID_TIMER )
timer->delete(sd->invincible_timer,pc->invincible_timer);
sd->invincible_timer = timer->add(timer->gettick()+val,pc->invincible_timer,sd->bl.id,0);
@@ -188,7 +188,7 @@ int pc_getmaxspiritball(struct map_session_data *sd, int min) {
nullpo_ret(sd);
result = pc->checkskill(sd, MO_CALLSPIRITS);
-
+
if ( min && result < min )
result = min;
else if ( sd->sc.data[SC_RAISINGDRAGON] )
@@ -517,7 +517,7 @@ void pc_rental_expire(struct map_session_data *sd, int i) {
}
break;
}
-
+
clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_NORMAL, LOG_TYPE_OTHER);
}
@@ -623,14 +623,12 @@ int pc_makesavestatus(struct map_session_data *sd)
sd->status.last_point.x = 0;
sd->status.last_point.y = 0;
}
-
+
if( sd->status.save_point.map == 0 ) {
sd->status.save_point.map = 1;
sd->status.save_point.x = 0;
sd->status.save_point.y = 0;
}
-
-
return 0;
}
@@ -916,7 +914,7 @@ int pc_isequip(struct map_session_data *sd,int n)
if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
return 1;
-
+
if (item->elv && sd->status.base_level < (unsigned int)item->elv) {
clif->msgtable(sd, MSG_ITEM_CANT_EQUIP_LVL);
return 0;
@@ -1048,7 +1046,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
if( sd->status.clothes_color < MIN_CLOTH_COLOR || sd->status.clothes_color > MAX_CLOTH_COLOR ) {
sd->status.clothes_color = MIN_CLOTH_COLOR;
}
-
+
//Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
if(!sd->status.hp) pc_setdead(sd);
sd->state.connect_new = 1;
@@ -1080,7 +1078,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->hchsysch_tick = tick;
sd->idletime = sockt->last_tick;
-
+
for(i = 0; i < MAX_SPIRITBALL; i++)
sd->spirit_timer[i] = INVALID_TIMER;
for(i = 0; i < ARRAYLENGTH(sd->autobonus); i++)
@@ -1106,11 +1104,11 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
if( sd->status.option & OPTION_INVISIBLE && !pc->can_use_command(sd, "@hide") )
sd->status.option &=~ OPTION_INVISIBLE;
-
+
status->change_init(&sd->bl);
-
+
sd->sc.option = sd->status.option; //This is the actual option used in battle.
-
+
//Set here because we need the inventory data for weapon sprite parsing.
status->set_viewdata(&sd->bl, sd->status.class_);
unit->dataset(&sd->bl);
@@ -1119,25 +1117,25 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->guild_y = -1;
sd->disguise = -1;
-
+
sd->instance = NULL;
sd->instances = 0;
-
+
sd->bg_queue.arena = NULL;
sd->bg_queue.ready = 0;
sd->bg_queue.client_has_bg_data = 0;
sd->bg_queue.type = 0;
-
+
sd->queues = NULL;
sd->queues_count = 0;
-
+
sd->state.dialog = 0;
-
+
sd->delayed_damage = 0;
-
+
if( battle_config.item_check )
sd->state.itemcheck = 1;
-
+
// Event Timers
for( i = 0; i < MAX_EVENTTIMER; i++ )
sd->eventtimer[i] = INVALID_TIMER;
@@ -1157,9 +1155,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->vars_dirty = false;
sd->vars_ok = false;
sd->vars_received = 0x0;
-
+
sd->lang_id = map->default_lang_id;
-
+
//warp player
if ((i=pc->setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
@@ -1194,7 +1192,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sprintf(buf, msg_sd(sd,1295), sysinfo->vcstype(), sysinfo->vcsrevision_src(), sysinfo->vcsrevision_scripts()); // %s revision '%s' (src) / '%s' (scripts)
clif->message(sd->fd, buf);
}
-
+
if (expiration_time != 0) {
sd->expiration_time = expiration_time;
}
@@ -1223,7 +1221,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
/* [Ind/Hercules] */
sd->sc_display = NULL;
sd->sc_display_count = 0;
-
+
// Request all registries (auth is considered completed whence they arrive)
intif->request_registry(sd,7);
return true;
@@ -1324,7 +1322,7 @@ int pc_reg_received(struct map_session_data *sd)
sd->status.skill[idx].flag = SKILL_FLAG_PLAGIARIZED;
}
}
-
+
//Weird... maybe registries were reloaded?
if (sd->state.active)
return 0;
@@ -1370,7 +1368,7 @@ int pc_reg_received(struct map_session_data *sd)
clif->message(sd->fd, msg_sd(sd,11)); // Invisible: On
// decrement the number of pvp players on the map
map->list[sd->bl.m].users_pvp--;
-
+
if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking
timer->delete( sd->pvp_timer, pc->calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
@@ -1380,7 +1378,7 @@ int pc_reg_received(struct map_session_data *sd)
if( npc->motd ) /* [Ind/Hercules] */
script->run(npc->motd->u.scr.script, 0, sd->bl.id, npc->fake_nd->bl.id);
-
+
return 1;
}
@@ -1407,7 +1405,6 @@ int pc_calc_skillpoint(struct map_session_data* sd) {
return skill_point;
}
-
/*==========================================
* Calculation of skill level.
*------------------------------------------*/
@@ -1425,7 +1422,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
return 1;
}
c = pc->class2idx(c);
-
+
for( i = 0; i < MAX_SKILL; i++ ) {
if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these
sd->status.skill[i].id = 0; //First clear skills.
@@ -1543,7 +1540,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
if( f ) {
int inf2;
inf2 = skill->dbs->db[idx].inf2;
-
+
if(!sd->status.skill[idx].lv && (
(inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
inf2&INF2_WEDDING_SKILL ||
@@ -1552,7 +1549,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
continue; //Cannot be learned via normal means. Note this check DOES allows raising already known skills.
sd->status.skill[idx].id = id;
-
+
if(inf2&INF2_SPIRIT_SKILL) { //Spirit skills cannot be learned, they will only show up on your tree when you get buffed.
sd->status.skill[idx].lv = 1; // need to manually specify a skill level
sd->status.skill[idx].flag = SKILL_FLAG_TEMPORARY; //So it is not saved, and tagged as a "bonus" skill.
@@ -1690,7 +1687,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
novice_skills = pc->max_level[pc->class2idx(JOB_NOVICE)][1] - 1;
sd->sktree.second = sd->sktree.third = 0;
-
+
// limit 1st class and above to novice job levels
if(skill_point < novice_skills) {
c = MAPID_NOVICE;
@@ -1745,7 +1742,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
// restore non-limiting flags
c |= sd->class_&(JOBL_UPPER|JOBL_BABY);
-
+
return c;
}
@@ -4476,7 +4473,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
break;
}
}
-
+
i = MAX_INVENTORY;
// Stackable | Non Rental
@@ -4495,7 +4492,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
}
}
}
-
+
if ( i >= MAX_INVENTORY ) {
i = pc->search_inventory(sd,0);
if (i == INDEX_NOT_FOUND)
@@ -4822,7 +4819,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
return 0;
}
}
-
+
//Gender check
if(item->sex != 2 && sd->status.sex != item->sex)
return 0;
@@ -4843,7 +4840,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
(item->class_base[(sd->class_&JOBL_2_1) ? 1 : ((sd->class_&JOBL_2_2) ? 2 : 0)])
))
return 0;
-
+
//Not usable by upper class. [Haru]
while( 1 ) {
// Normal classes (no upper, no baby, no third classes)
@@ -4925,7 +4922,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
(itemdb_iscashfood(nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0)
)
return 0;
-
+
/* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */
if( sd->inventory_data[n]->flag.delay_consume && nameid != ITEMID_REINS_OF_MOUNT ) {
if( sd->sc.data[SC_ALL_RIDING] )
@@ -4979,11 +4976,11 @@ int pc_useitem(struct map_session_data *sd,int n) {
return 0;
}
}
-
+
//Dead Branch & Bloody Branch & Porings Box
if( nameid == ITEMID_BRANCH_OF_DEAD_TREE || nameid == ITEMID_BLOODY_DEAD_BRANCH || nameid == ITEMID_PORING_BOX )
logs->branch(sd);
-
+
sd->itemid = sd->status.inventory[n].nameid;
sd->itemindex = n;
if(sd->catch_target_class != -1) //Abort pet catching.
@@ -5187,7 +5184,7 @@ int pc_getitemfromcart(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((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
return pc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE);
@@ -5195,7 +5192,7 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
}
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:
@@ -5211,7 +5208,7 @@ void pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) {
break;
case IBT_GUILD: {
struct guild_storage *gstor = idb_get(gstorage->db,sd->status.guild_id);
-
+
for( i = 0; i < MAX_INVENTORY; i++ ){
if(sd->status.inventory[i].bound == type) {
if( gstor )
@@ -5224,7 +5221,6 @@ void pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) {
}
break;
}
-
}
/*==========================================
* Display item stolen msg to player sd
@@ -5448,7 +5444,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int
if( sd->state.changemap ) { // Misc map-changing settings
int i;
sd->state.pmap = sd->bl.m;
-
+
for( i = 0; i < sd->queues_count; i++ ) {
struct hQueue *queue;
if( (queue = script->queue(sd->queues[i])) && queue->onMapChange[0] != '\0' ) {
@@ -5456,7 +5452,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int
npc->event(sd, queue->onMapChange, 0);
}
}
-
+
if( map->list[m].cell == (struct mapcell *)0xdeadbeaf )
map->cellfromcache(&map->list[m]);
if (sd->sc.count) { // Cancel some map related stuff.
@@ -5499,7 +5495,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int
clif->message (sd->fd, msg_sd(sd,276)); // "You can't open a shop on this map"
vending->close(sd);
}
-
+
if (map->list[sd->bl.m].channel) {
channel->leave(map->list[sd->bl.m].channel,sd);
}
@@ -5585,7 +5581,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int
sd->md->bl.y = sd->md->ud.to_y = y;
sd->md->ud.dir = sd->ud.dir;
}
-
+
/* given autotrades have no clients you have to trigger this manually otherwise they get stuck in memory limbo bugreport:7495 */
if( sd->state.autotrade )
clif->pLoadEndAck(0,sd);
@@ -5703,14 +5699,14 @@ int pc_checkskill2(struct map_session_data *sd,uint16 index) {
}
if( skill->dbs->db[index].nameid >= GD_SKILLBASE && skill->dbs->db[index].nameid < GD_MAX ) {
struct guild *g;
-
+
if( sd->status.guild_id>0 && (g=sd->guild)!=NULL)
return guild->checkskill(g,skill->dbs->db[index].nameid);
return 0;
}
if(sd->status.skill[index].id == skill->dbs->db[index].nameid)
return (sd->status.skill[index].lv);
-
+
return 0;
}
@@ -6483,7 +6479,7 @@ int pc_stop_following (struct map_session_data *sd)
sd->ud.target_to = 0;
unit->stop_walking(&sd->bl, STOPWALKING_FLAG_FIXPOS);
-
+
return 0;
}
@@ -6622,8 +6618,6 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in
*job_exp = (unsigned int) cap_value((double)*job_exp * sd->status.mod_exp/100., 1, UINT_MAX);
}
-
- return;
}
/**
@@ -6704,7 +6698,7 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in
if(job_exp)
clif->displayexp(sd, job_exp, SP_JOBEXP, is_quest);
#endif
-
+
if(sd->state.showexp) {
char output[256];
sprintf(output,
@@ -6752,7 +6746,6 @@ unsigned int pc_thisbaseexp(struct map_session_data *sd)
return pc->exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-2];
}
-
/*==========================================
* job level exp lookup
* Return:
@@ -7002,7 +6995,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
if( !(index = skill->get_index(skill_id)) )
return 0;
-
+
if( sd->status.skill_point > 0 &&
sd->status.skill[index].id &&
sd->status.skill[index].flag == SKILL_FLAG_PERMANENT && //Don't allow raising while you have granted skills. [Skotlex]
@@ -7302,9 +7295,9 @@ int pc_resetskill(struct map_session_data* sd, int flag)
if( inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL) ) //Avoid reseting wedding/linker skills.
continue;
-
+
skill_id = skill->dbs->db[i].nameid;
-
+
// Don't reset trick dead if not a novice/baby
if( skill_id == NV_TRICKDEAD && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].lv = 0;
@@ -7318,7 +7311,7 @@ int pc_resetskill(struct map_session_data* sd, int flag)
if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED )
continue;
-
+
if( flag&PCRESETSKILL_CHSEX && !skill_ischangesex(i) )
continue;
@@ -7345,7 +7338,6 @@ int pc_resetskill(struct map_session_data* sd, int flag)
sd->status.skill_point += skill_point;
-
if (!(flag&PCRESETSKILL_RECOUNT)) {
// Remove all SCs that can't be inactivated without a skill
if( sd->sc.data[SC_STORMKICK_READY] )
@@ -7551,7 +7543,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if (sd->npc_id && sd->st && sd->st->state != RUN)
npc->event_dequeue(sd);
-
+
pc_setglobalreg(sd,script->add_str("PC_DIE_COUNTER"),sd->die_counter+1);
pc->setparam(sd, SP_KILLERRID, src?src->id:0);
@@ -7560,15 +7552,15 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if( (bgd = bg->team_search(sd->bg_id)) != NULL && bgd->die_event[0] )
npc->event(sd, bgd->die_event, 0);
}
-
+
for( i = 0; i < sd->queues_count; i++ ) {
struct hQueue *queue;
if( (queue = script->queue(sd->queues[i])) && queue->onDeath[0] != '\0' )
npc->event(sd, queue->onDeath, 0);
}
-
+
npc->script_event(sd,NPCE_DIE);
-
+
// Clear anything NPC-related when you die and was interacting with one.
if ( (sd->npc_id || sd->npc_shopid) && sd->state.dialog) {
if (sd->state.using_fake_npc) {
@@ -7666,7 +7658,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
else if (sd->status.karma < ssd->status.karma) // If player killed was more good
ssd->status.karma++;
-
// or the PK System way...
if (sd->status.karma > 0) // player killed is dishonourable?
@@ -7718,7 +7709,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
) {
unsigned int base_penalty = 0;
if (battle_config.death_penalty_base > 0) {
-
switch (battle_config.death_penalty_type) {
case 1:
base_penalty = (unsigned int) ((double)pc->nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000);
@@ -7727,7 +7717,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
base_penalty = (unsigned int) ((double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000);
break;
}
-
+
if(base_penalty) {
if (battle_config.pk_mode && src && src->type==BL_PC)
base_penalty*=2;
@@ -7737,10 +7727,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
clif->updatestatus(sd,SP_BASEEXP);
}
}
-
+
if(battle_config.death_penalty_job > 0) {
base_penalty = 0;
-
+
switch (battle_config.death_penalty_type) {
case 1:
base_penalty = (unsigned int) ((double)pc->nextjobexp(sd) * (double)battle_config.death_penalty_job/10000);
@@ -7749,7 +7739,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
base_penalty = (unsigned int) ((double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000);
break;
}
-
+
if(base_penalty) {
if (battle_config.pk_mode && src && src->type==BL_PC)
base_penalty*=2;
@@ -7759,7 +7749,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
clif->updatestatus(sd,SP_JOBEXP);
}
}
-
+
if(battle_config.zeny_penalty > 0 && !map->list[sd->bl.m].flag.nozenypenalty) {
base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.);
if(base_penalty)
@@ -8026,7 +8016,6 @@ int pc_readparam(struct map_session_data* sd,int type)
case SP_VARCASTRATE: val = sd->bonus.varcastrate; break;
case SP_ADD_VARIABLECAST:val = sd->bonus.add_varcast; break;
#endif
-
}
return val;
@@ -8432,7 +8421,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
/* going off star glad lineage, reset feel to not store no-longer-used vars in the database */
pc->resetfeel(sd);
}
-
+
sd->status.class_ = job;
fame_flag = pc->famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
sd->class_ = (unsigned short)b_class;
@@ -8695,7 +8684,7 @@ int pc_setoption(struct map_session_data *sd,int type)
new_look = JOB_STAR_GLADIATOR2;
else if (!(type&OPTION_FLYING) && p_type&OPTION_FLYING)
new_look = -1;
-
+
if (sd->disguise != -1 || !new_look)
return 0; //Disguises break sprite changes
@@ -8941,7 +8930,7 @@ int pc_readreg(struct map_session_data* sd, int64 reg) {
**/
void pc_setreg(struct map_session_data* sd, int64 reg, int val) {
unsigned int index = script_getvaridx(reg);
-
+
if( val ) {
i64db_iput(sd->regs.vars, reg, val);
if( index )
@@ -8960,7 +8949,7 @@ char* pc_readregstr(struct map_session_data* sd, int64 reg) {
struct script_reg_str *p = NULL;
p = i64db_get(sd->regs.vars, reg);
-
+
return p ? p->value : NULL;
}
/**
@@ -8973,10 +8962,10 @@ void pc_setregstr(struct map_session_data* sd, int64 reg, const char* str) {
if( str[0] ) {
p = ers_alloc(pc->str_reg_ers, struct script_reg_str);
-
+
p->value = aStrdup(str);
p->flag.type = 1;
-
+
if( sd->regs.vars->put(sd->regs.vars, DB->i642key(reg), DB->ptr2data(p), &prev) ) {
p = DB->data2ptr(&prev);
if( p->value )
@@ -9005,7 +8994,7 @@ void pc_setregstr(struct map_session_data* sd, int64 reg, const char* str) {
**/
int pc_readregistry(struct map_session_data *sd, int64 reg) {
struct script_reg_num *p = NULL;
-
+
if (!sd->vars_ok) {
ShowError("pc_readregistry: Trying to read reg %s before it's been loaded!\n", script->get_str(script_getvarid(reg)));
//This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
@@ -9013,7 +9002,7 @@ int pc_readregistry(struct map_session_data *sd, int64 reg) {
sockt->eof(sd->fd);
return 0;
}
-
+
p = i64db_get(sd->regs.vars, reg);
return p ? p->value : 0;
@@ -9026,7 +9015,7 @@ int pc_readregistry(struct map_session_data *sd, int64 reg) {
**/
char* pc_readregistry_str(struct map_session_data *sd, int64 reg) {
struct script_reg_str *p = NULL;
-
+
if (!sd->vars_ok) {
ShowError("pc_readregistry_str: Trying to read reg %s before it's been loaded!\n", script->get_str(script_getvarid(reg)));
//This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
@@ -9036,7 +9025,7 @@ char* pc_readregistry_str(struct map_session_data *sd, int64 reg) {
}
p = i64db_get(sd->regs.vars, reg);
-
+
return p ? p->value : NULL;
}
/**
@@ -9073,12 +9062,12 @@ int pc_setregistry(struct map_session_data *sd, int64 reg, int val) {
}
break;
}
-
+
if ( !pc->reg_load && !sd->vars_ok ) {
ShowError("pc_setregistry : refusing to set %s until vars are received.\n", regname);
return 0;
}
-
+
if( (p = i64db_get(sd->regs.vars, reg) ) ) {
if( val ) {
if( !p->value && index ) /* its a entry that was deleted, so we reset array */
@@ -9093,22 +9082,22 @@ int pc_setregistry(struct map_session_data *sd, int64 reg, int val) {
p->flag.update = 1;/* either way, it will require either delete or replace */
} else if( val ) {
DBData prev;
-
+
if( index )
script->array_update(&sd->regs, reg, false);
-
+
p = ers_alloc(pc->num_reg_ers, struct script_reg_num);
-
+
p->value = val;
if( !pc->reg_load )
p->flag.update = 1;
-
+
if( sd->regs.vars->put(sd->regs.vars, DB->i642key(reg), DB->ptr2data(p), &prev) ) {
p = DB->data2ptr(&prev);
ers_free(pc->num_reg_ers, p);
}
}
-
+
if( !pc->reg_load && p )
sd->vars_dirty = true;
@@ -9151,12 +9140,12 @@ int pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val)
script->array_update(&sd->regs, reg, false);
p = ers_alloc(pc->str_reg_ers, struct script_reg_str);
-
+
p->value = aStrdup(val);
if( !pc->reg_load )
p->flag.update = 1;
p->flag.type = 1;
-
+
if( sd->regs.vars->put(sd->regs.vars, DB->i642key(reg), DB->ptr2data(p), &prev) ) {
p = DB->data2ptr(&prev);
if( p->value )
@@ -9164,10 +9153,10 @@ int pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val)
ers_free(pc->str_reg_ers, p);
}
}
-
+
if( !pc->reg_load && p )
sd->vars_dirty = true;
-
+
return 1;
}
@@ -9295,7 +9284,7 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data ) {
/* ensure this isn't a duplicate combo */
if( sd->combos != NULL ) {
int x;
-
+
ARR_FIND( 0, sd->combo_count, x, sd->combos[x].id == data->combos[i]->id );
/* found a match, skip this combo */
@@ -9316,7 +9305,7 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data ) {
if(!sd->inventory_data[index])
continue;
-
+
if ( itemdb_type(id) != IT_CARD ) {
if ( sd->inventory_data[index]->nameid != id )
continue;
@@ -9351,15 +9340,13 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data ) {
/* we got here, means all items in the combo are matching */
RECREATE(sd->combos, struct pc_combos, ++sd->combo_count);
-
combo = &sd->combos[sd->combo_count - 1];
-
combo->bonus = data->combos[i]->script;
combo->id = data->combos[i]->id;
-
+
success++;
}
-
+
return success;
}
@@ -9369,11 +9356,11 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) {
if( !sd->combos )
return 0;/* nothing to do here, player has no combos */
-
+
for( i = 0; i < data->combos_count; i++ ) {
/* check if this combo exists in this user */
int x = 0, cursor = 0, j;
-
+
ARR_FIND( 0, sd->combo_count, x, sd->combos[x].id == data->combos[i]->id );
/* no match, skip this combo */
if( x == sd->combo_count )
@@ -9381,9 +9368,9 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) {
sd->combos[x].bonus = NULL;
sd->combos[x].id = 0;
-
+
retval++;
-
+
for( j = 0, cursor = 0; j < sd->combo_count; j++ ) {
if( sd->combos[j].bonus == NULL )
continue;
@@ -9395,7 +9382,7 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) {
cursor++;
}
-
+
/* it's empty, we can clear all the memory */
if( (sd->combo_count = cursor) == 0 ) {
aFree(sd->combos);
@@ -9403,7 +9390,7 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) {
break;
}
}
-
+
/* check if combo requirements still fit -- don't touch retval! */
pc->checkcombo( sd, data );
@@ -9569,7 +9556,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
sd->status.inventory[n].bound = (unsigned char)IBT_CHARACTER;
clif->notify_bounditem(sd,n);
}
-
+
if(pos == EQP_ACC) { //Accesories should only go in one of the two,
pos = req_pos&EQP_ACC;
if (pos == EQP_ACC) //User specified both slots..
@@ -9640,7 +9627,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
status_calc_pc(sd,SCO_NONE);
if (flag) //Update skill data
clif->skillinfoblock(sd);
-
+
//OnEquip script [Skotlex]
if (id->equip_script)
script->run_item_equip_script(sd, id, npc->fake_nd->bl.id);
@@ -9907,7 +9894,7 @@ int pc_checkitem(struct map_session_data *sd)
if ( !sd->status.cart[i].unique_id && !itemdb->isstackable(id) )
sd->status.cart[i].unique_id = itemdb->unique_id(sd);
}
-
+
for( i = 0; i < MAX_STORAGE; i++ ) {
id = sd->status.storage.items[i].nameid;
@@ -9924,7 +9911,7 @@ int pc_checkitem(struct map_session_data *sd)
if ( !sd->status.storage.items[i].unique_id && !itemdb->isstackable(id) )
sd->status.storage.items[i].unique_id = itemdb->unique_id(sd);
}
-
+
if (sd->guild) {
struct guild_storage *guild_storage = idb_get(gstorage->db,sd->guild->guild_id);
if (guild_storage) {
@@ -10399,7 +10386,7 @@ bool pc_can_use_command(struct map_session_data *sd, const char *command) {
/**
* Spirit Charm expiration timer.
- *
+ *
* @see TimerFunc
*/
int pc_charm_timer(int tid, int64 tick, int id, intptr_t data)
@@ -10437,7 +10424,7 @@ int pc_charm_timer(int tid, int64 tick, int id, intptr_t data)
/**
* Adds a spirit charm.
- *
+ *
* @param sd Target character.
* @param interval Duration.
* @param max Maximum amount of charms to add.
@@ -10480,7 +10467,7 @@ void pc_add_charm(struct map_session_data *sd, int interval, int max, int type)
/**
* Removes one or more spirit charms.
- *
+ *
* @param sd The target character.
* @param count Amount of charms to remove.
* @param type Type of charm to remove.
@@ -10622,32 +10609,32 @@ void pc_read_skill_tree(void) {
int i = 0;
struct s_mapiterator *iter;
struct map_session_data *sd;
-
+
if (libconfig->read_file(&skill_tree_conf, config_filename)) {
ShowError("can't read %s\n", config_filename);
return;
}
-
+
while ((skt = libconfig->setting_get_elem(skill_tree_conf.root,i++))) {
int k;
const char *name = config_setting_name(skt);
-
+
if ( (k = pc->check_job_name(name)) == -1 ) {
ShowWarning("pc_read_skill_tree: '%s' unknown job name!\n", name);
continue;
}
-
+
if( ( skills = libconfig->setting_get_member(skt,"skills") ) ) {
int c = 0;
int idx = pc->class2idx(k);
-
+
while ((sk = libconfig->setting_get_elem(skills,c++))) {
const char *sk_name = config_setting_name(sk);
int skill_id;
-
+
if( ( skill_id = skill->name2id(sk_name) ) ) {
int skidx, offset = 0, h = 0, rlen = 0;
-
+
ARR_FIND( 0, MAX_SKILL_TREE, skidx, pc->skill_tree[idx][skidx].id == 0 || pc->skill_tree[idx][skidx].id == skill_id );
if (skidx == MAX_SKILL_TREE) {
ShowWarning("pc_read_skill_tree: Unable to load skill %d (%s) into '%s's tree. Maximum number of skills per class has been reached.\n", skill_id, sk_name, name);
@@ -10655,10 +10642,10 @@ void pc_read_skill_tree(void) {
} else if (pc->skill_tree[idx][skidx].id) {
ShowNotice("pc_read_skill_tree: Overwriting %d for '%s' (%d)\n", skill_id, name, k);
}
-
+
pc->skill_tree[idx][skidx].id = skill_id;
pc->skill_tree[idx][skidx].idx = skill->get_index(skill_id);
-
+
if( config_setting_is_group(sk) ) {
int max = 0, jlevel = 0;
libconfig->setting_lookup_int(sk, "MaxLevel", &max);
@@ -10671,7 +10658,7 @@ void pc_read_skill_tree(void) {
pc->skill_tree[idx][skidx].max = (unsigned char)libconfig->setting_get_int(sk);
pc->skill_tree[idx][skidx].joblv = 0;
}
-
+
for (h = offset; h < rlen && h < MAX_PC_SKILL_REQUIRE; h++) {
config_setting_t *rsk = libconfig->setting_get_elem(sk,h);
int rskid;
@@ -10685,19 +10672,18 @@ void pc_read_skill_tree(void) {
ShowWarning("pc_read_skill_tree: error for '%s' in '%s'\n",sk_name,name);
}
}
-
} else {
ShowWarning("pc_read_skill_tree: unknown skill '%s' in '%s'\n",sk_name,name);
}
}
}
}
-
+
i = 0;
while( (skt = libconfig->setting_get_elem(skill_tree_conf.root,i++)) ) {
int k, idx;
const char *name = config_setting_name(skt);
-
+
if ( (k = pc->check_job_name(name)) == -1 ) {
ShowWarning("pc_read_skill_tree: '%s' unknown job name!\n", name);
continue;
@@ -10735,9 +10721,8 @@ void pc_read_skill_tree(void) {
}
}
-
}
-
+
libconfig->destroy(&skill_tree_conf);
/* lets update all players skill tree */
@@ -11024,7 +11009,7 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) {
void pc_bank_deposit(struct map_session_data *sd, int money) {
unsigned int limit_check = money+sd->status.bank_vault;
-
+
if( money <= 0 || limit_check > MAX_BANK_ZENY ) {
clif->bank_deposit(sd,BDA_OVERFLOW);
return;
@@ -11044,7 +11029,7 @@ void pc_bank_deposit(struct map_session_data *sd, int money) {
}
void pc_bank_withdraw(struct map_session_data *sd, int money) {
unsigned int limit_check = money+sd->status.zeny;
-
+
if (money <= 0) {
clif->bank_withdraw(sd,BWA_UNKNOWN_ERROR);
return;
@@ -11056,7 +11041,7 @@ void pc_bank_withdraw(struct map_session_data *sd, int money) {
clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1482));
return;
}
-
+
if( pc->getzeny(sd,money, LOG_TYPE_BANK, NULL) )
clif->bank_withdraw(sd,BWA_NO_MONEY);
else {
@@ -11070,16 +11055,16 @@ void pc_bank_withdraw(struct map_session_data *sd, int money) {
void pc_scdata_received(struct map_session_data *sd) {
pc->inventory_rentals(sd);
clif->show_modifiers(sd);
-
+
if (sd->expiration_time != 0) { // don't display if it's unlimited or unknow value
time_t exp_time = sd->expiration_time;
char tmpstr[1024];
strftime(tmpstr, sizeof(tmpstr) - 1, msg_sd(sd,501), localtime(&exp_time)); // "Your account time limit is: %d-%m-%Y %H:%M:%S."
clif->wis_message(sd->fd, map->wisp_server_name, tmpstr, strlen(tmpstr)+1);
-
+
pc->expire_check(sd);
}
-
+
if( sd->state.standalone ) {
clif->pLoadEndAck(0,sd);
pc->autotrade_populate(sd);
@@ -11088,16 +11073,16 @@ void pc_scdata_received(struct map_session_data *sd) {
}
int pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
-
+
if( !sd ) return 0;
-
+
sd->expiration_tid = INVALID_TIMER;
-
+
if( sd->fd )
clif->authfail_fd(sd->fd,10);
-
+
map->quit(sd);
-
+
return 0;
}
/* This timer exists only when a character with an expire timer > 24h is online */
@@ -11107,30 +11092,26 @@ int pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data* sd;
iter = mapit_getallusers();
-
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) {
if( sd->expiration_time )
pc->expire_check(sd);
}
-
mapit->free(iter);
-
+
return 0;
}
void pc_expire_check(struct map_session_data *sd) {
/* ongoing timer */
if( sd->expiration_tid != INVALID_TIMER )
return;
-
+
/* not within the next 24h, enable the global check */
if( sd->expiration_time > ( time(NULL) + ( ( 60 * 60 ) * 24 ) ) ) {
-
/* global check not running, enable */
if( pc->expiration_tid == INVALID_TIMER ) {
/* starts in 1h, repeats every hour */
pc->expiration_tid = timer->add_interval(timer->gettick() + ((1000*60)*60), pc->global_expiration_timer, 0, 0, ((1000*60)*60));
}
-
return;
}
@@ -11142,33 +11123,31 @@ void pc_expire_check(struct map_session_data *sd) {
void pc_autotrade_load(void)
{
char *data;
-
+
if (SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `account_id`,`char_id`,`sex`,`title` FROM `%s`",map->autotrade_merchants_db))
Sql_ShowDebug(map->mysql_handle);
-
+
while (SQL_SUCCESS == SQL->NextRow(map->mysql_handle)) {
struct map_session_data *sd;
int account_id, char_id;
char title[MESSAGE_SIZE];
unsigned char sex;
-
+
SQL->GetData(map->mysql_handle, 0, &data, NULL); account_id = atoi(data);
SQL->GetData(map->mysql_handle, 1, &data, NULL); char_id = atoi(data);
SQL->GetData(map->mysql_handle, 2, &data, NULL); sex = atoi(data);
SQL->GetData(map->mysql_handle, 3, &data, NULL); safestrncpy(title, data, sizeof(title));
CREATE(sd, TBL_PC, 1);
-
+
pc->setnewpc(sd, account_id, char_id, 0, 0, sex, 0);
-
+
safestrncpy(sd->message, title, MESSAGE_SIZE);
-
sd->state.standalone = 1;
sd->group = pcg->get_dummy_group();
-
+
chrif->authreq(sd,true);
}
-
SQL->FreeResult(map->mysql_handle);
}
/**
@@ -11184,17 +11163,16 @@ void pc_autotrade_start(struct map_session_data *sd) {
while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {
int itemkey, amount, price;
-
+
SQL->GetData(map->mysql_handle, 0, &data, NULL); itemkey = atoi(data);
SQL->GetData(map->mysql_handle, 1, &data, NULL); amount = atoi(data);
SQL->GetData(map->mysql_handle, 2, &data, NULL); price = atoi(data);
ARR_FIND(0, MAX_CART, i, sd->status.cart[i].id == itemkey);
-
if( i != MAX_CART && itemdb_cantrade(&sd->status.cart[i], 0, 0) ) {
if( amount > sd->status.cart[i].amount )
amount = sd->status.cart[i].amount;
-
+
if( amount ) {
sd->vending[count].index = i;
sd->vending[count].amount = amount;
@@ -11204,7 +11182,7 @@ void pc_autotrade_start(struct map_session_data *sd) {
}
}
}
-
+
if( !count ) {
pc->autotrade_update(sd,PAUC_REMOVE);
map->quit(sd);
@@ -11223,13 +11201,13 @@ void pc_autotrade_start(struct map_session_data *sd) {
**/
void pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update_action action) {
int i;
-
+
/* either way, this goes down */
if( action != PAUC_START ) {
if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'",map->autotrade_data_db,sd->status.char_id))
Sql_ShowDebug(map->mysql_handle);
}
-
+
switch( action ) {
case PAUC_REMOVE:
if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d' LIMIT 1",map->autotrade_merchants_db,sd->status.char_id))
@@ -11237,7 +11215,7 @@ void pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update
break;
case PAUC_START: {
char title[MESSAGE_SIZE*2+1];
-
+
SQL->EscapeStringLen(map->mysql_handle, title, sd->message, strnlen(sd->message, MESSAGE_SIZE));
if (SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s` (`account_id`,`char_id`,`sex`,`title`) VALUES ('%d','%d','%d','%s')",
@@ -11254,7 +11232,7 @@ void pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update
for( i = 0; i < sd->vend_num; i++ ) {
if( sd->vending[i].amount == 0 )
continue;
-
+
if (SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s` (`char_id`,`itemkey`,`amount`,`price`) VALUES ('%d','%d','%d','%d')",
map->autotrade_data_db,
sd->status.char_id,
@@ -11278,25 +11256,25 @@ void pc_autotrade_prepare(struct map_session_data *sd) {
unsigned char sex;
CREATE(data, struct autotrade_vending, 1);
-
+
memcpy(data->vending, sd->vending, sizeof(sd->vending));
-
+
for(i = 0; i < sd->vend_num; i++) {
if( sd->vending[i].amount ) {
memcpy(&data->list[cursor],&sd->status.cart[sd->vending[i].index],sizeof(struct item));
cursor++;
}
}
-
+
data->vend_num = (unsigned char)cursor;
-
+
idb_put(pc->at_db, sd->status.char_id, data);
-
+
account_id = sd->status.account_id;
char_id = sd->status.char_id;
sex = sd->status.sex;
safestrncpy(title, sd->message, sizeof(title));
-
+
sd->npc_id = 0;
sd->npc_shopid = 0;
if (sd->st) {
@@ -11307,11 +11285,10 @@ void pc_autotrade_prepare(struct map_session_data *sd) {
chrif->auth_delete(account_id, char_id, ST_LOGOUT);
CREATE(sd, TBL_PC, 1);
-
+
pc->setnewpc(sd, account_id, char_id, 0, 0, sex, 0);
-
+
safestrncpy(sd->message, title, MESSAGE_SIZE);
-
sd->state.standalone = 1;
sd->group = pcg->get_dummy_group();
@@ -11330,7 +11307,7 @@ void pc_autotrade_populate(struct map_session_data *sd) {
for(i = 0; i < data->vend_num; i++) {
if( !data->vending[i].amount )
continue;
-
+
for(j = 0; j < MAX_CART; j++) {
if( !memcmp((char*)(&data->list[i]) + sizeof(data->list[0].id), (char*)(&sd->status.cart[j]) + sizeof(data->list[0].id), sizeof(struct item) - sizeof(data->list[0].id)) ) {
if( cursor ) {
@@ -11341,20 +11318,20 @@ void pc_autotrade_populate(struct map_session_data *sd) {
break;
}
}
-
+
if( j != MAX_CART ) {
sd->vending[cursor].index = j;
sd->vending[cursor].amount = data->vending[i].amount;
sd->vending[cursor].value = data->vending[i].value;
-
+
cursor++;
}
}
-
+
sd->vend_num = cursor;
pc->autotrade_update(sd,PAUC_START);
-
+
for(i = 0; i < data->hdatac; i++ ) {
if( data->hdata[i]->flag.free ) {
aFree(data->hdata[i]->data);
@@ -11363,7 +11340,7 @@ void pc_autotrade_populate(struct map_session_data *sd) {
}
if( data->hdata )
aFree(data->hdata);
-
+
idb_remove(pc->at_db, sd->status.char_id);
}
@@ -11399,12 +11376,11 @@ bool pc_db_checkid(unsigned int class_)
}
void do_final_pc(void) {
-
db_destroy(pc->itemcd_db);
pc->at_db->destroy(pc->at_db,pc->autotrade_final);
-
+
pcg->final();
-
+
ers_destroy(pc->sc_display_ers);
ers_destroy(pc->num_reg_ers);
ers_destroy(pc->str_reg_ers);
@@ -11415,12 +11391,12 @@ void do_final_pc(void) {
void do_init_pc(bool minimal) {
if (minimal)
return;
-
+
pc->itemcd_db = idb_alloc(DB_OPT_RELEASE_DATA);
pc->at_db = idb_alloc(DB_OPT_RELEASE_DATA);
-
+
pc->readdb();
-
+
timer->add_func_list(pc->invincible_timer, "pc_invincible_timer");
timer->add_func_list(pc->eventtimer, "pc_eventtimer");
timer->add_func_list(pc->inventory_rental_end, "pc_inventory_rental_end");
@@ -11432,25 +11408,25 @@ void do_init_pc(bool minimal) {
timer->add_func_list(pc->charm_timer, "pc_charm_timer");
timer->add_func_list(pc->global_expiration_timer,"pc_global_expiration_timer");
timer->add_func_list(pc->expiration_timer,"pc_expiration_timer");
-
+
timer->add(timer->gettick() + map->autosave_interval, pc->autosave, 0, 0);
-
+
// 0=day, 1=night [Yor]
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;
int night_duration = battle_config.night_duration;
// add night/day timer [Yor]
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() + (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);
}
-
+
pcg->init();
-
+
pc->sc_display_ers = ers_new(sizeof(struct sc_display_entry), "pc.c:sc_display_ers", ERS_OPT_FLEX_CHUNK);
pc->num_reg_ers = ers_new(sizeof(struct script_reg_num), "pc.c::num_reg_ers", ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK);
pc->str_reg_ers = ers_new(sizeof(struct script_reg_str), "pc.c::str_reg_ers", ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK);
@@ -11503,7 +11479,7 @@ void pc_defaults(void) {
pc->get_dummy_sd = pc_get_dummy_sd;
pc->class2idx = pc_class2idx;
-
+
pc->can_use_command = pc_can_use_command;
pc->set_group = pc_set_group;
pc->should_log_commands = pc_should_log_commands;
@@ -11515,25 +11491,25 @@ void pc_defaults(void) {
pc->authok = pc_authok;
pc->authfail = pc_authfail;
pc->reg_received = pc_reg_received;
-
+
pc->isequip = pc_isequip;
pc->equippoint = pc_equippoint;
pc->setinventorydata = pc_setinventorydata;
-
+
pc->checkskill = pc_checkskill;
pc->checkskill2 = pc_checkskill2;
pc->checkallowskill = pc_checkallowskill;
pc->checkequip = pc_checkequip;
-
+
pc->calc_skilltree = pc_calc_skilltree;
pc->calc_skilltree_normalize_job = pc_calc_skilltree_normalize_job;
pc->clean_skilltree = pc_clean_skilltree;
-
+
pc->setpos = pc_setpos;
pc->setsavepoint = pc_setsavepoint;
pc->randomwarp = pc_randomwarp;
pc->memo = pc_memo;
-
+
pc->checkadditem = pc_checkadditem;
pc->inventoryblank = pc_inventoryblank;
pc->search_inventory = pc_search_inventory;
@@ -11544,47 +11520,47 @@ void pc_defaults(void) {
// Special Shop System
pc->paycash = pc_paycash;
pc->getcash = pc_getcash;
-
+
pc->cart_additem = pc_cart_additem;
pc->cart_delitem = pc_cart_delitem;
pc->putitemtocart = pc_putitemtocart;
pc->getitemfromcart = pc_getitemfromcart;
pc->cartitem_amount = pc_cartitem_amount;
-
+
pc->takeitem = pc_takeitem;
pc->dropitem = pc_dropitem;
-
+
pc->isequipped = pc_isequipped;
pc->can_Adopt = pc_can_Adopt;
pc->adoption = pc_adoption;
-
+
pc->updateweightstatus = pc_updateweightstatus;
-
+
pc->addautobonus = pc_addautobonus;
pc->exeautobonus = pc_exeautobonus;
pc->endautobonus = pc_endautobonus;
pc->delautobonus = pc_delautobonus;
-
+
pc->bonus = pc_bonus;
pc->bonus2 = pc_bonus2;
pc->bonus3 = pc_bonus3;
pc->bonus4 = pc_bonus4;
pc->bonus5 = pc_bonus5;
pc->skill = pc_skill;
-
+
pc->insert_card = pc_insert_card;
pc->can_insert_card = pc_can_insert_card;
pc->can_insert_card_into = pc_can_insert_card_into;
pc->steal_item = pc_steal_item;
pc->steal_coin = pc_steal_coin;
-
+
pc->modifybuyvalue = pc_modifybuyvalue;
pc->modifysellvalue = pc_modifysellvalue;
-
+
pc->follow = pc_follow; // [MouseJstr]
pc->stop_following = pc_stop_following;
-
+
pc->maxbaselv = pc_maxbaselv;
pc->maxjoblv = pc_maxjoblv;
pc->checkbaselevelup = pc_checkbaselevelup;
@@ -11612,11 +11588,11 @@ void pc_defaults(void) {
pc->unequipitem_pos = pc_unequipitem_pos;
pc->checkitem = pc_checkitem;
pc->useitem = pc_useitem;
-
+
pc->skillatk_bonus = pc_skillatk_bonus;
pc->skillheal_bonus = pc_skillheal_bonus;
pc->skillheal2_bonus = pc_skillheal2_bonus;
-
+
pc->damage = pc_damage;
pc->dead = pc_dead;
pc->revive = pc_revive;
@@ -11633,7 +11609,7 @@ void pc_defaults(void) {
pc->setridingwug = pc_setridingwug;
pc->changelook = pc_changelook;
pc->equiplookall = pc_equiplookall;
-
+
pc->readparam = pc_readparam;
pc->setparam = pc_setparam;
pc->readreg = pc_readreg;
@@ -11644,15 +11620,15 @@ void pc_defaults(void) {
pc->setregistry = pc_setregistry;
pc->readregistry_str = pc_readregistry_str;
pc->setregistry_str = pc_setregistry_str;
-
+
pc->addeventtimer = pc_addeventtimer;
pc->deleventtimer = pc_deleventtimer;
pc->cleareventtimer = pc_cleareventtimer;
pc->addeventtimercount = pc_addeventtimercount;
-
+
pc->calc_pvprank = pc_calc_pvprank;
pc->calc_pvprank_timer = pc_calc_pvprank_timer;
-
+
pc->ismarried = pc_ismarried;
pc->marriage = pc_marriage;
pc->divorce = pc_divorce;
@@ -11660,30 +11636,30 @@ void pc_defaults(void) {
pc->get_father = pc_get_father;
pc->get_mother = pc_get_mother;
pc->get_child = pc_get_child;
-
+
pc->bleeding = pc_bleeding;
pc->regen = pc_regen;
-
+
pc->setstand = pc_setstand;
pc->candrop = pc_candrop;
pc->can_talk = pc_can_talk;
pc->can_attack = pc_can_attack;
-
+
pc->jobid2mapid = pc_jobid2mapid; // Skotlex
pc->mapid2jobid = pc_mapid2jobid; // Skotlex
-
+
pc->job_name = job_name;
-
+
pc->setinvincibletimer = pc_setinvincibletimer;
pc->delinvincibletimer = pc_delinvincibletimer;
-
+
pc->addspiritball = pc_addspiritball;
pc->delspiritball = pc_delspiritball;
pc->addfame = pc_addfame;
pc->famerank = pc_famerank;
pc->set_hate_mob = pc_set_hate_mob;
pc->getmaxspiritball = pc_getmaxspiritball;
-
+
pc->readdb = pc_readdb;
pc->map_day_timer = map_day_timer; // by [yor]
pc->map_night_timer = map_night_timer; // by [yor]
@@ -11691,26 +11667,24 @@ void pc_defaults(void) {
pc->inventory_rentals = pc_inventory_rentals;
pc->inventory_rental_clear = pc_inventory_rental_clear;
pc->inventory_rental_add = pc_inventory_rental_add;
-
+
pc->disguise = pc_disguise;
pc->isautolooting = pc_isautolooting;
-
+
pc->overheat = pc_overheat;
-
pc->banding = pc_banding;
-
+
pc->itemcd_do = pc_itemcd_do;
-
pc->load_combo = pc_load_combo;
-
+
pc->add_charm = pc_add_charm;
pc->del_charm = pc_del_charm;
-
+
pc->baselevelchanged = pc_baselevelchanged;
pc->level_penalty_mod = pc_level_penalty_mod;
-
+
pc->calc_skillpoint = pc_calc_skillpoint;
-
+
pc->invincible_timer = pc_invincible_timer;
pc->spiritball_timer = pc_spiritball_timer;
pc->check_banding = pc_check_banding;
@@ -11738,15 +11712,15 @@ void pc_defaults(void) {
pc->checkcombo = pc_checkcombo;
pc->calcweapontype = pc_calcweapontype;
pc->removecombo = pc_removecombo;
-
+
pc->bank_withdraw = pc_bank_withdraw;
pc->bank_deposit = pc_bank_deposit;
-
+
pc->rental_expire = pc_rental_expire;
pc->scdata_received = pc_scdata_received;
-
+
pc->bound_clear = pc_bound_clear;
-
+
pc->expiration_timer = pc_expiration_timer;
pc->global_expiration_timer = pc_global_expiration_timer;
pc->expire_check = pc_expire_check;
diff --git a/src/map/pc.h b/src/map/pc.h
index 26df30527..e6e95978d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -569,7 +569,7 @@ END_ZEROED_BLOCK;
} roulette;
uint8 lang_id;
-
+
// temporary debugging of bug #3504
const char* delunit_prevfile;
int delunit_prevline;
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index 28bef6a85..7efcd7e26 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -51,7 +51,7 @@ static void read_config(void) {
config_setting_t *groups = NULL;
const char *config_filename = "conf/groups.conf"; // FIXME hardcoded name
int group_count = 0;
-
+
if (libconfig->read_file(&pc_group_config, config_filename))
return;
@@ -125,11 +125,10 @@ static void read_config(void) {
strdb_put(pcg->name_db, groupname, group_settings);
idb_put(pcg->db, id, group_settings);
-
}
group_count = libconfig->setting_length(groups); // Save number of groups
assert(group_count == db_size(pcg->db));
-
+
// Check if all commands and permissions exist
iter = db_iterator(pcg->db);
for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) {
@@ -182,7 +181,7 @@ static void read_config(void) {
*commands = group_settings->commands,
*permissions = group_settings->permissions;
int j, inherit_count = 0, done = 0;
-
+
if (group_settings->inheritance_done) // group already processed
continue;
@@ -192,7 +191,7 @@ static void read_config(void) {
group_settings->inheritance_done = true;
continue;
}
-
+
for (j = 0; j < inherit_count; ++j) {
GroupSettings *inherited_group = NULL;
const char *groupname = libconfig->setting_get_string_elem(inherit, j);
@@ -225,7 +224,7 @@ static void read_config(void) {
++done; // copied commands and permissions from one of inherited groups
}
-
+
if (done == inherit_count) { // copied commands from all of inherited groups
++i;
group_settings->inheritance_done = true; // we're done with this group
@@ -239,7 +238,7 @@ static void read_config(void) {
break;
}
} // while(i < group_count)
-
+
// Pack permissions into GroupSettings.e_permissions for faster checking
iter = db_iterator(pcg->db);
for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) {
@@ -365,28 +364,28 @@ int pc_group_get_idx(GroupSettings *group)
unsigned int pc_groups_add_permission(const char *name) {
uint64 key = 0x1;
unsigned char i;
-
+
for(i = 0; i < pcg->permission_count; i++) {
if( strcmpi(name,pcg->permissions[i].name) == 0 ) {
ShowError("pc_groups_add_permission(%s): failed! duplicate permission name!\n",name);
return 0;
}
}
-
+
if( i != 0 )
key = (uint64)pcg->permissions[i - 1].permission << 1;
-
+
if( key >= UINT_MAX ) {
ShowError("pc_groups_add_permission(%s): failed! not enough room, too many permissions!\n",name);
return 0;
}
-
+
i = pcg->permission_count;
RECREATE(pcg->permissions, struct pc_groups_permission_table, ++pcg->permission_count);
-
+
pcg->permissions[i].name = aStrdup(name);
pcg->permissions[i].permission = (unsigned int)key;
-
+
return (unsigned int)key;
}
/**
@@ -427,23 +426,23 @@ void do_init_pc_groups(void) {
{ "disable_skill_usage", PC_PERM_DISABLE_SKILL_USAGE },
};
unsigned char i, len = ARRAYLENGTH(pc_g_defaults);
-
+
for(i = 0; i < len; i++) {
unsigned int p;
if( ( p = pc_groups_add_permission(pc_g_defaults[i].name) ) != pc_g_defaults[i].permission )
ShowError("do_init_pc_groups: %s error : %d != %d\n",pc_g_defaults[i].name,p,pc_g_defaults[i].permission);
}
-
+
/**
* Handle plugin-provided permissions
**/
for(i = 0; i < pcg->HPMpermissions_count; i++) {
*pcg->HPMpermissions[i].mask = pc_groups_add_permission(pcg->HPMpermissions[i].name);
}
-
+
pcg->db = idb_alloc(DB_OPT_RELEASE_DATA);
pcg->name_db = stridb_alloc(DB_OPT_DUP_KEY, 0);
-
+
read_config();
}
@@ -468,7 +467,7 @@ void do_final_pc_groups(void)
pcg->db->destroy(pcg->db, group_db_clear_sub);
if (pcg->name_db != NULL)
db_destroy(pcg->name_db);
-
+
if(pcg->permissions != NULL) {
unsigned char i;
for(i = 0; i < pcg->permission_count; i++)
@@ -490,7 +489,7 @@ void pc_groups_reload(void) {
pcg->final();
pcg->init();
-
+
/* refresh online users permissions */
iter = mapit_getallusers();
for (sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter)) {
@@ -508,7 +507,6 @@ void pc_groups_reload(void) {
**/
void pc_groups_defaults(void) {
pcg = &pcg_s;
-
/* */
pcg->db = NULL;
pcg->name_db = NULL;
diff --git a/src/map/pet.c b/src/map/pet.c
index 6a7924a16..2865cc901 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -107,7 +107,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) {
if (DIFF_TICK(pd->ud.canact_tick, timer->gettick()) > 0)
return 0;
-
+
if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) {
//Skotlex: Use pet's skill
int inf;
@@ -133,7 +133,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
int rate;
pd = sd->pd;
-
+
Assert_ret(pd->msd == 0 || pd->msd->pd == pd);
if( bl == NULL || bl->type != BL_MOB || bl->prev == NULL
@@ -186,7 +186,7 @@ int pet_sc_check(struct map_session_data *sd, int type)
return 1;
pd->recovery->timer = timer->add(timer->gettick()+pd->recovery->delay*1000,pet->recovery_timer,sd->bl.id,0);
-
+
return 0;
}
@@ -211,7 +211,7 @@ int pet_hungry(int tid, int64 tick, int id, intptr_t data) {
if (pd->pet.intimate <= 0)
return 1; //You lost the pet already, the rest is irrelevant.
-
+
pd->pet.hungry--;
if( pd->pet.hungry < 0 )
{
@@ -337,7 +337,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
//The pet_id value was lost? odd... restore it.
sd->status.pet_id = petinfo->pet_id;
}
-
+
i = pet->search_petDB_index(petinfo->class_,PET_CLASS);
if(i < 0) {
sd->status.pet_id = 0;
@@ -367,10 +367,10 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
pd->last_thinktime = timer->gettick();
pd->state.skillbonus = 0;
-
+
if( battle_config.pet_status_support )
script->run_pet(pet->db[i].pet_script,0,sd->bl.id,0);
-
+
if( pd->petDB ) {
if( pd->petDB->equip_script )
status_calc_pc(sd,SCO_NONE);
@@ -380,7 +380,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
else
interval = pd->petDB->hungry_delay;
}
-
+
if( interval <= 0 )
interval = 1;
pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0);
@@ -567,7 +567,7 @@ bool pet_get_egg(int account_id, short pet_class, int pet_id ) {
// the first request. [Panikon]
i = pet->search_petDB_index(pet_class,PET_CLASS);
sd->catch_target_class = -1;
-
+
if(i < 0) {
intif->delete_petdata(pet_id);
return false;
@@ -594,11 +594,11 @@ int pet_menu(struct map_session_data *sd,int menunum)
nullpo_ret(sd);
if (sd->pd == NULL)
return 1;
-
+
//You lost the pet already.
if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incubate)
return 1;
-
+
egg_id = itemdb->exists(sd->pd->petDB->EggID);
if (egg_id) {
if ((egg_id->flag.trade_restriction&ITR_NODROP) && !pc->inventoryblank(sd)) {
@@ -606,7 +606,7 @@ int pet_menu(struct map_session_data *sd,int menunum)
return 1;
}
}
-
+
switch(menunum) {
case 0:
clif->send_petstatus(sd);
@@ -672,9 +672,9 @@ int pet_equipitem(struct map_session_data *sd,int index) {
nullpo_retr(1, sd);
pd = sd->pd;
if (!pd) return 1;
-
+
nameid = sd->status.inventory[index].nameid;
-
+
if(pd->petDB->AcceID == 0 || nameid != pd->petDB->AcceID || pd->pet.equip != 0) {
clif->equipitemack(sd,0,0,EIA_FAIL);
return 1;
@@ -843,7 +843,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
pet->randomwalk(pd,tick);
return 0;
}
-
+
if (!check_distance_bl(&sd->bl, &pd->bl, pd->db->range3)) {
//Master too far, chase.
if(pd->target_id)
@@ -867,7 +867,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
pd->status.speed = pd->petDB->speed;
pd->ud.state.change_walk_target = pd->ud.state.speed_changed = 1;
}
-
+
if (pd->target_id) {
target= map->id2bl(pd->target_id);
if (!target || pd->bl.m != target->m || status->isdead(target)
@@ -877,13 +877,13 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
pet->unlocktarget(pd);
}
}
-
+
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);
}
-
+
if (!target) {
//Just walk around.
if (check_distance_bl(&sd->bl, &pd->bl, 3))
@@ -898,7 +898,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
return 0;
}
-
+
if(pd->ud.target == target->id &&
(pd->ud.attacktimer != INVALID_TIMER || pd->ud.walktimer != INVALID_TIMER))
return 0; //Target already locked.
@@ -962,7 +962,7 @@ int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
if(sd_charid && sd_charid != pd->msd->status.char_id)
return 0;
-
+
if(unit->can_reach_bl(&pd->bl,bl, pd->db->range2, 1, NULL, NULL) &&
((*target) == NULL || //New target closer than previous one.
!check_distance_bl(&pd->bl, *target, distance_bl(&pd->bl, bl))))
@@ -1047,18 +1047,18 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
struct pet_data *pd;
int bonus;
int duration = 0;
-
+
if(sd == NULL || sd->pd==NULL || sd->pd->bonus == NULL)
return 1;
-
+
pd=sd->pd;
-
+
if(pd->bonus->timer != tid) {
ShowError("pet_skill_bonus_timer %d != %d\n",pd->bonus->timer,tid);
pd->bonus->timer = INVALID_TIMER;
return 0;
}
-
+
// determine the time for the next timer
if (pd->state.skillbonus && pd->bonus->delay > 0) {
bonus = 0;
@@ -1070,7 +1070,7 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
pd->bonus->timer = INVALID_TIMER;
return 0;
}
-
+
if (pd->state.skillbonus != bonus) {
pd->state.skillbonus = bonus;
status_calc_pc(sd, SCO_NONE);
@@ -1086,10 +1086,10 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
int pet_recovery_timer(int tid, int64 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)
return 1;
-
+
pd=sd->pd;
if(pd->recovery->timer != tid) {
@@ -1106,7 +1106,7 @@ int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
}
pd->recovery->timer = INVALID_TIMER;
-
+
return 0;
}
@@ -1120,14 +1120,14 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
short rate = 100;
if(sd==NULL || sd->pd == NULL || sd->pd->s_skill == NULL)
return 1;
-
+
pd=sd->pd;
-
+
if(pd->s_skill->timer != tid) {
ShowError("pet_skill_support_timer %d != %d\n",pd->s_skill->timer,tid);
return 0;
}
-
+
st = status->get_status_data(&sd->bl);
if (DIFF_TICK(pd->ud.canact_tick, tick) > 0) {
@@ -1135,7 +1135,7 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
pd->s_skill->timer=timer->add(pd->ud.canact_tick,pet->skill_support_timer,sd->bl.id,0);
return 0;
}
-
+
if(pc_isdead(sd) ||
(rate = get_percentage(st->sp, st->max_sp)) > pd->s_skill->sp ||
(rate = get_percentage(st->hp, st->max_hp)) > pd->s_skill->hp ||
@@ -1144,7 +1144,7 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
pd->s_skill->timer=timer->add(tick+(rate>10?rate:10)*100,pet->skill_support_timer,sd->bl.id,0);
return 0;
}
-
+
pet_stop_attack(pd);
pet_stop_walking(pd, STOPWALKING_FLAG_FIXPOS);
pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0);
@@ -1307,7 +1307,7 @@ int do_init_pet(bool minimal) {
pet->item_drop_ers = ers_new(sizeof(struct item_drop),"pet.c::item_drop_ers",ERS_OPT_NONE);
pet->item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"pet.c::item_drop_list_ers",ERS_OPT_NONE);
-
+
timer->add_func_list(pet->hungry,"pet_hungry");
timer->add_func_list(pet->ai_hard,"pet_ai_hard");
timer->add_func_list(pet->skill_bonus_timer,"pet_skill_bonus_timer"); // [Valaris]
@@ -1341,16 +1341,14 @@ int do_final_pet(void)
}
void pet_defaults(void) {
pet = &pet_s;
-
+
memset(pet->db,0,sizeof(pet->db));
pet->item_drop_ers = NULL;
pet->item_drop_list_ers = NULL;
-
- /* */
+
pet->init = do_init_pet;
pet->final = do_final_pet;
-
- /* */
+
pet->hungry_val = pet_hungry_val;
pet->set_intimate = pet_set_intimate;
pet->create_egg = pet_create_egg;
diff --git a/src/map/script.c b/src/map/script.c
index c59a4db45..30f0bad85 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -87,7 +87,6 @@ static inline void script_string_buf_addb(struct script_string_buf *buf,uint8 b)
buf->size += 512;
RECREATE(buf->ptr, char, buf->size);
}
-
buf->ptr[buf->pos++] = b;
}
@@ -267,7 +266,6 @@ void script_reportdata(struct script_data* data)
}
}
-
/// Reports on the console information about the current built-in function.
void script_reportfunc(struct script_state* st)
{
@@ -301,7 +299,6 @@ void script_reportfunc(struct script_state* st)
}
}
-
/*==========================================
* Output error message
*------------------------------------------*/
@@ -398,7 +395,6 @@ unsigned int calc_hash_ci(const char* p) {
return h % SCRIPT_HASH_SIZE;
}
-
/*==========================================
* script->str_data manipulation functions
*------------------------------------------*/
@@ -590,7 +586,6 @@ int script_add_str(const char* p)
return script->str_num++;
}
-
/// Appends 1 byte to the script buffer.
void add_scriptb(int a)
{
@@ -807,19 +802,19 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
else { //Nested function call
script->syntax.nested_call++;
nested_call = true;
-
+
if( script->str_data[func].val == script->buildin_lang_macro_offset ) {
script->syntax.lang_macro_active = true;
macro = true;
}
}
-
+
if( !macro ) {
// buildin function
script->addl(func);
script->addc(C_ARG);
}
-
+
arg = script->buildin[script->str_data[func].val];
if (script->str_data[func].deprecated)
DeprecationWarning(p);
@@ -903,17 +898,17 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
if( *p != ')' )
disp_error_message("parse_callfunc: expected ')' to close argument list",p);
++p;
-
+
if( script->str_data[func].val == script->buildin_lang_macro_offset )
script->syntax.lang_macro_active = false;
}
-
+
if( nested_call )
script->syntax.nested_call--;
-
+
if( !script->syntax.nested_call )
script->syntax.last_func = -1;
-
+
if( !macro )
script->addc(C_FUNC);
return p;
@@ -1149,15 +1144,15 @@ bool is_number(const char *p) {
int script_string_dup(char *str) {
size_t len = strlen(str);
int pos = script->string_list_pos;
-
+
while( pos+len+1 >= script->string_list_size ) {
script->string_list_size += (1024*1024)/2;
RECREATE(script->string_list,char,script->string_list_size);
}
-
+
safestrncpy(script->string_list+pos, str, len+1);
script->string_list_pos += len+1;
-
+
return pos;
}
@@ -1208,7 +1203,7 @@ const char* parse_simpleexpr(const char *p)
const char *start_point = p;
bool duplicate = true;
struct script_string_buf *sbuf = &script->parse_simpleexpr_str;
-
+
do {
p++;
while( *p && *p != '"' ) {
@@ -1231,19 +1226,19 @@ const char* parse_simpleexpr(const char *p)
p++; //'"'
p = script->skip_space(p);
} while( *p && *p == '"' );
-
+
script_string_buf_addb(sbuf, 0);
-
+
if (!(script->syntax.translation_db && (st = strdb_get(script->syntax.translation_db, sbuf->ptr)) != NULL)) {
script->addc(C_STR);
-
+
if( script->pos+sbuf->pos >= script->size ) {
do {
script->size += SCRIPT_BLOCK_SIZE;
} while( script->pos+sbuf->pos >= script->size );
RECREATE(script->buf,unsigned char,script->size);
}
-
+
memcpy(script->buf+script->pos, sbuf->ptr, sbuf->pos);
script->pos += sbuf->pos;
@@ -1253,19 +1248,19 @@ const char* parse_simpleexpr(const char *p)
unsigned int st_cursor = 0;
script->addc(C_LSTR);
-
+
expand += (sizeof(char*) + sizeof(uint8)) * st->translations;
-
+
while( script->pos+expand >= script->size ) {
script->size += SCRIPT_BLOCK_SIZE;
RECREATE(script->buf,unsigned char,script->size);
}
-
+
*((int *)(&script->buf[script->pos])) = st->string_id;
*((uint8 *)(&script->buf[script->pos + sizeof(int)])) = st->translations;
script->pos += sizeof(int) + sizeof(uint8);
-
+
for(j = 0; j < st->translations; j++) {
*((uint8 *)(&script->buf[script->pos])) = RBUFB(st->buf, st_cursor);
*((char **)(&script->buf[script->pos+sizeof(uint8)])) = &st->buf[st_cursor + sizeof(uint8)];
@@ -1275,19 +1270,19 @@ const char* parse_simpleexpr(const char *p)
st_cursor += sizeof(uint8);
}
}
-
+
/* When exporting we don't know what is a translation and what isn't */
if( script->lang_export_fp && sbuf->pos > 1 ) {//sbuf->pos will always be at least 1 because of the '\0'
if( !script->syntax.strings ) {
script->syntax.strings = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA, 0);
}
-
+
if( !strdb_exists(script->syntax.strings,sbuf->ptr) ) {
strdb_put(script->syntax.strings, sbuf->ptr, NULL);
duplicate = false;
}
}
-
+
if( script->lang_export_fp && !duplicate &&
( ( ( script->syntax.last_func == script->buildin_mes_offset ||
script->syntax.last_func == script->buildin_select_offset ) && !script->syntax.nested_call
@@ -1304,44 +1299,41 @@ const char* parse_simpleexpr(const char *p)
else
break;
}
-
+
while( *line_end != '\n' && *line_end != '\0' )
line_end++;
-
+
line_length = (size_t)(line_end - line_start);
-
if( line_length > 0 ) {
script_string_buf_ensure(lbuf,line_length + 1);
-
+
memcpy(lbuf->ptr, line_start, line_length);
lbuf->pos = line_length;
script_string_buf_addb(lbuf, 0);
-
+
normalize_name(lbuf->ptr, "\r\n\t ");
}
-
+
for(cursor = 0; cursor < sbuf->pos; cursor++) {
if( sbuf->ptr[cursor] == '"' )
script_string_buf_addb(ubuf, '\\');
script_string_buf_addb(ubuf, sbuf->ptr[cursor]);
}
script_string_buf_addb(ubuf, 0);
-
+
fprintf(script->lang_export_fp, "#: %s\n"
- "# %s\n"
- "msgctxt \"%s\"\n"
- "msgid \"%s\"\n"
- "msgstr \"\"\n",
+ "# %s\n"
+ "msgctxt \"%s\"\n"
+ "msgid \"%s\"\n"
+ "msgstr \"\"\n",
script->parser_current_file ? script->parser_current_file : "Unknown File",
lbuf->ptr,
script->parser_current_npc_name ? script->parser_current_npc_name : "Unknown NPC",
ubuf->ptr
);
-
lbuf->pos = 0;
ubuf->pos = 0;
}
-
sbuf->pos = 0;
} else {
int l;
@@ -2423,10 +2415,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
if( script->parse_cleanup_timer_id == INVALID_TIMER ) {
script->parse_cleanup_timer_id = timer->add(timer->gettick() + 10, script->parse_cleanup_timer, 0, 0);
}
-
+
if( script->syntax.strings ) /* used only when generating translation file */
db_destroy(script->syntax.strings);
-
+
memset(&script->syntax,0,sizeof(script->syntax));
script->syntax.last_func = -1;/* as valid values are >= 0 */
if( script->parser_current_npc_name ) {
@@ -2822,14 +2814,13 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data *
struct script_array *sa = idb_get(src->arrays, script_getvarid(uid));
if (sa) {
unsigned int i;
-
+
ARR_FIND(0, sa->size, i, sa->members[i] == 0);
if( i != sa->size ) {
if( !insert )
script->array_remove_member(src,sa,i);
return;
}
-
script->array_add_member(sa,0);
} else if (insert) {
script->array_update(src,reference_uid(script_getvarid(uid), 0),false);
@@ -2842,10 +2833,10 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data *
unsigned int script_array_size(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) {
struct script_array *sa = NULL;
struct reg_db *src = script->array_src(st, sd, name, ref);
-
+
if( src && src->arrays )
sa = idb_get(src->arrays, script->search_str(name));
-
+
return sa ? sa->size : 0;
}
/**
@@ -2854,25 +2845,22 @@ unsigned int script_array_size(struct script_state *st, struct map_session_data
unsigned int script_array_highest_key(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) {
struct script_array *sa = NULL;
struct reg_db *src = script->array_src(st, sd, name, ref);
-
-
+
if( src && src->arrays ) {
int key = script->add_word(name);
-
+
script->array_ensure_zero(st,sd,reference_uid(key, 0),ref);
-
+
if( ( sa = idb_get(src->arrays, key) ) ) {
unsigned int i, highest_key = 0;
-
+
for(i = 0; i < sa->size; i++) {
if( sa->members[i] > highest_key )
highest_key = sa->members[i];
}
-
return sa->size ? highest_key + 1 : 0;
}
}
-
return 0;
}
int script_free_array_db(DBKey key, DBData *data, va_list ap) {
@@ -2896,15 +2884,15 @@ void script_array_delete(struct reg_db *src, struct script_array *sa) {
**/
void script_array_remove_member(struct reg_db *src, struct script_array *sa, unsigned int idx) {
unsigned int i, cursor;
-
+
/* its the only member left, no need to do anything other than delete the array data */
if( sa->size == 1 ) {
script->array_delete(src,sa);
return;
}
-
+
sa->members[idx] = UINT_MAX;
-
+
for(i = 0, cursor = 0; i < sa->size; i++) {
if( sa->members[i] == UINT_MAX )
continue;
@@ -2912,7 +2900,7 @@ void script_array_remove_member(struct reg_db *src, struct script_array *sa, uns
sa->members[cursor] = sa->members[i];
cursor++;
}
-
+
sa->size = cursor;
}
/**
@@ -2921,11 +2909,9 @@ void script_array_remove_member(struct reg_db *src, struct script_array *sa, uns
* @param idx the index of the array member being inserted
**/
void script_array_add_member(struct script_array *sa, unsigned int idx) {
-
RECREATE(sa->members, unsigned int, ++sa->size);
-
- sa->members[sa->size - 1] = idx;
+ sa->members[sa->size - 1] = idx;
}
/**
* Obtains the source of the array database for this type and scenario
@@ -2933,7 +2919,7 @@ void script_array_add_member(struct script_array *sa, unsigned int idx) {
**/
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;
-
+
switch( name[0] ) {
/* from player */
default: /* char reg */
@@ -2956,13 +2942,12 @@ struct reg_db *script_array_src(struct script_state *st, struct map_session_data
}
break;
}
-
+
if( src ) {
if( !src->arrays )
src->arrays = idb_alloc(DB_OPT_BASE);
return src;
}
-
return NULL;
}
@@ -2977,7 +2962,7 @@ void script_array_update(struct reg_db *src, int64 num, bool empty) {
struct script_array *sa = NULL;
int id = script_getvarid(num);
unsigned int index = script_getvaridx(num);
-
+
if (!src->arrays) {
src->arrays = idb_alloc(DB_OPT_BASE);
} else {
@@ -2986,13 +2971,13 @@ void script_array_update(struct reg_db *src, int64 num, bool empty) {
if( sa ) {
unsigned int i;
-
+
/* search */
for(i = 0; i < sa->size; i++) {
if( sa->members[i] == index )
break;
}
-
+
/* if existent */
if( i != sa->size ) {
/* if empty, we gotta remove it */
@@ -3029,7 +3014,7 @@ void script_array_update(struct reg_db *src, int64 num, bool empty) {
*------------------------------------------*/
int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, const void* value, struct reg_db *ref) {
char prefix = name[0];
-
+
if( is_string_variable(name) ) {// string variable
const char *str = (const char*)value;
@@ -3432,7 +3417,7 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos,
st->oid = oid;
st->sleep.timer = INVALID_TIMER;
st->npc_item_flag = battle_config.item_enabled_npc;
-
+
if( st->script->instances != USHRT_MAX )
st->script->instances++;
else {
@@ -3457,11 +3442,11 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos,
void script_free_state(struct script_state* st) {
if( idb_exists(script->st_db,st->id) ) {
struct map_session_data *sd = st->rid ? map->id2sd(st->rid) : NULL;
-
+
if(st->bk_st) {// backup was not restored
ShowDebug("script_free_state: Previous script state lost (rid=%d, oid=%d, state=%d, bk_npcid=%d).\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid);
}
-
+
if(sd && sd->st == st) { //Current script is aborted.
if(sd->state.using_fake_npc){
clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
@@ -3864,7 +3849,6 @@ void op_1(struct script_state* st, int op)
script_pushint(st, i1);
}
-
/// Checks the type of all arguments passed to a built-in function.
///
/// @param st Script state whose stack arguments should be inspected.
@@ -3945,7 +3929,6 @@ void script_check_buildin_argtype(struct script_state* st, int func)
}
}
-
/// Executes a buildin command.
/// Stack: C_NAME(<command>) C_ARG <arg0> <arg1> ... <argN>
int run_func(struct script_state *st)
@@ -4207,15 +4190,15 @@ void run_script_main(struct script_state *st) {
int string_id = *((int *)(&st->script->script_buf[st->pos]));
uint8 translations = *((uint8 *)(&st->script->script_buf[st->pos+sizeof(int)]));
struct map_session_data *lsd = NULL;
-
+
st->pos += sizeof(int) + sizeof(uint8);
-
+
if( (!st->rid || !(lsd = map->id2sd(st->rid)) || !lsd->lang_id) && !map->default_lang_id )
script->push_str(stack,C_CONSTSTR,script->string_list+string_id);
else {
uint8 k, wlang_id = lsd ? lsd->lang_id : map->default_lang_id;
int offset = st->pos;
-
+
for(k = 0; k < translations; k++) {
uint8 lang_id = *(uint8 *)(&st->script->script_buf[offset]);
offset += sizeof(uint8);
@@ -4223,12 +4206,9 @@ void run_script_main(struct script_state *st) {
break;
offset += sizeof(char*);
}
-
script->push_str(stack,C_CONSTSTR,
- ( k == translations ) ? script->string_list+string_id : *(char**)(&st->script->script_buf[offset]) );
-
+ ( k == translations ) ? script->string_list+string_id : *(char**)(&st->script->script_buf[offset]) );
}
-
st->pos += ( ( sizeof(char*) + sizeof(uint8) ) * translations );
}
break;
@@ -4342,7 +4322,6 @@ int script_config_read(char *cfgName) {
char line[1024],w1[1024],w2[1024];
FILE *fp;
-
if( !( fp = fopen(cfgName,"r") ) ) {
ShowError("File not found: %s\n", cfgName);
return 1;
@@ -4417,7 +4396,6 @@ void script_add_autobonus(const char *autobonus)
}
}
-
/// resets a temporary character array variable to given value
void script_cleararray_pc(struct map_session_data* sd, const char* varname, void* value) {
struct script_array *sa = NULL;
@@ -4426,39 +4404,38 @@ void script_cleararray_pc(struct map_session_data* sd, const char* varname, void
int key;
key = script->add_str(varname);
-
+
if( !(src = script->array_src(NULL,sd,varname,NULL) ) )
return;
-
+
if( value )
script->array_ensure_zero(NULL,sd,reference_uid(key,0),NULL);
-
+
if( !(sa = idb_get(src->arrays, key)) ) /* non-existent array, nothing to empty */
return;
-
+
size = sa->size;
list = script->array_cpy_list(sa);
-
+
for(i = 0; i < size; i++) {
script->set_reg(NULL,sd,reference_uid(key, list[i]),varname,value,NULL);
}
}
-
/// sets a temporary character array variable element idx to given value
/// @param refcache Pointer to an int variable, which keeps a copy of the reference to varname and must be initialized to 0. Can be NULL if only one element is set.
void script_setarray_pc(struct map_session_data* sd, const char* varname, uint32 idx, void* value, int* refcache) {
int key;
-
+
if( idx >= SCRIPT_MAX_ARRAYSIZE ) {
ShowError("script_setarray_pc: Variable '%s' has invalid index '%u' (char_id=%d).\n", varname, idx, sd->status.char_id);
return;
}
key = ( refcache && refcache[0] ) ? refcache[0] : script->add_str(varname);
-
+
script->set_reg(NULL,sd,reference_uid(key, idx),varname,value,NULL);
-
+
if( refcache )
{// save to avoid repeated script->add_str calls
refcache[0] = key;
@@ -4469,23 +4446,22 @@ void script_setarray_pc(struct map_session_data* sd, const char* varname, uint32
**/
int script_reg_destroy(DBKey key, DBData *data, va_list ap) {
struct script_reg_state *src;
-
+
if( data->type != DB_DATA_PTR )/* got no need for those! */
return 0;
-
+
src = DB->data2ptr(data);
-
+
if( src->type ) {
struct script_reg_str *p = (struct script_reg_str *)src;
-
+
if( p->value )
aFree(p->value);
-
+
ers_free(pc->str_reg_ers,p);
} else {
ers_free(pc->num_reg_ers,(struct script_reg_num*)src);
}
-
return 0;
}
/**
@@ -4496,10 +4472,10 @@ void script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct sc
if( data->type ) {
struct script_reg_str *p = (struct script_reg_str*)data;
-
+
if( p->value )
aFree(p->value);
-
+
ers_free(pc->str_reg_ers,p);
} else {
ers_free(pc->num_reg_ers,(struct script_reg_num*)data);
@@ -4643,16 +4619,15 @@ void do_final_script(void) {
if( script->labels != NULL )
aFree(script->labels);
-
+
ers_destroy(script->array_ers);
-
+
if( script->generic_ui_array )
aFree(script->generic_ui_array);
-
+
script->clear_translations(false);
-
script->parser_clean_leftovers();
-
+
if( script->lang_export_file )
aFree(script->lang_export_file);
}
@@ -4662,11 +4637,10 @@ void do_final_script(void) {
**/
uint8 script_add_language(const char *name) {
uint8 lang_id = script->max_lang_id;
-
+
RECREATE(script->languages, char *, ++script->max_lang_id);
-
script->languages[lang_id] = aStrdup(name);
-
+
return lang_id;
}
/**
@@ -4682,9 +4656,9 @@ void script_load_translations(void) {
if (map->minimal) // No translations in minimal mode
return;
-
+
script->translation_db = strdb_alloc(DB_OPT_DUP_KEY, NAME_LENGTH*2+1);
-
+
if( script->languages ) {
for(i = 0; i < script->max_lang_id; i++)
aFree(script->languages[i]);
@@ -4692,31 +4666,30 @@ void script_load_translations(void) {
}
script->languages = NULL;
script->max_lang_id = 0;
-
+
script->add_language("English");/* 0 is default, which is whatever is in the npc files hardcoded (in our case, English) */
-
+
if (libconfig->read_file(&translations_conf, config_filename)) {
ShowError("load_translations: can't read '%s'\n", config_filename);
return;
}
-
+
if( !(translations = libconfig->lookup(&translations_conf, "translations")) ) {
ShowError("load_translations: invalid format on '%s'\n",config_filename);
return;
}
-
+
if( script->string_list )
aFree(script->string_list);
-
+
script->string_list = NULL;
script->string_list_pos = 0;
script->string_list_size = 0;
-
+
size = libconfig->setting_length(translations);
-
+
for(i = 0; i < size; i++) {
const char *translation_file = libconfig->setting_get_string_elem(translations, i);
-
script->load_translation(translation_file, ++lang_id, &total);
}
libconfig->destroy(&translations_conf);
@@ -4727,32 +4700,27 @@ void script_load_translations(void) {
DBMap *string_db;
struct string_translation *st = NULL;
uint32 j = 0;
-
-
+
CREATE(script->translation_buf, char *, total);
script->translation_buf_size = total;
-
+
main_iter = db_iterator(script->translation_db);
-
for( string_db = dbi_first(main_iter); dbi_exists(main_iter); string_db = dbi_next(main_iter) ) {
sub_iter = db_iterator(string_db);
-
for( st = dbi_first(sub_iter); dbi_exists(sub_iter); st = dbi_next(sub_iter) ) {
script->translation_buf[j++] = st->buf;
}
-
dbi_destroy(sub_iter);
}
-
dbi_destroy(main_iter);
}
-
+
for(k = 0; k < script->max_lang_id; k++) {
if( !strcmpi(script->languages[k],map->default_lang_str) ) {
break;
}
}
-
+
if( k == script->max_lang_id ) {
ShowError("load_translations: map server default_language setting '%s' is not a loaded language\n",map->default_lang_str);
map->default_lang_id = 0;
@@ -4767,21 +4735,21 @@ void script_load_translations(void) {
const char * script_get_translation_file_name(const char *file) {
static char file_name[200];
int i, len = (int)strlen(file), last_bar = -1, last_dot = -1;
-
+
for(i = 0; i < len; i++) {
if( file[i] == '/' || file[i] == '\\' )
last_bar = i;
else if ( file[i] == '.' )
last_dot = i;
}
-
+
if( last_bar != -1 || last_dot != -1 ) {
if( last_bar != -1 && last_dot < last_bar )
last_dot = -1;
safestrncpy(file_name, file+(last_bar >= 0 ? last_bar+1 : 0), ( last_dot >= 0 ? ( last_bar >= 0 ? last_dot - last_bar : last_dot ) : sizeof(file_name) ));
return file_name;
}
-
+
return file;
}
@@ -4796,25 +4764,25 @@ void script_load_translation(const char *file, uint8 lang_id, uint32 *total) {
size_t i;
FILE *fp;
struct script_string_buf msgid = { 0 }, msgstr = { 0 };
-
+
if( !(fp = fopen(file,"rb")) ) {
ShowError("load_translation: failed to open '%s' for reading\n",file);
return;
}
-
+
script->add_language(script->get_translation_file_name(file));
if( lang_id >= atcommand->max_message_table )
atcommand->expand_message_table();
-
+
while(fgets(line, sizeof(line), fp)) {
size_t len = strlen(line), cursor = 0;
-
+
if( len <= 1 )
continue;
-
+
if( line[0] == '#' )
continue;
-
+
if( strncasecmp(line,"msgctxt \"", 9) == 0 ) {
msgctxt[0] = '\0';
for(i = 9; i < len - 2; i++) {
@@ -4848,14 +4816,14 @@ void script_load_translation(const char *file, uint8 lang_id, uint32 *total) {
}
script_string_buf_addb(&msgstr,0);
}
-
+
if( msgctxt[0] && msgid.pos > 1 && msgstr.pos > 1 ) {
size_t msgstr_len = msgstr.pos;
unsigned int inner_len = 1 + (uint32)msgstr_len + 1; //uint8 lang_id + msgstr_len + '\0'
-
+
if( strcasecmp(msgctxt, "messages.conf") == 0 ) {
int k;
-
+
for(k = 0; k < MAX_MSG; k++) {
if( atcommand->msg_table[0][k] && strcmpi(atcommand->msg_table[0][k],msgid.ptr) == 0 ) {
if( atcommand->msg_table[lang_id][k] )
@@ -4864,29 +4832,24 @@ void script_load_translation(const char *file, uint8 lang_id, uint32 *total) {
break;
}
}
-
} else {
struct string_translation *st = NULL;
if( !( string_db = strdb_get(script->translation_db, msgctxt) ) ) {
string_db = strdb_alloc(DB_OPT_DUP_KEY, 0);
-
strdb_put(script->translation_db, msgctxt, string_db);
}
-
+
if( !(st = strdb_get(string_db, msgid.ptr) ) ) {
CREATE(st, struct string_translation, 1);
-
st->string_id = script->string_dup(msgid.ptr);
-
strdb_put(string_db, msgid.ptr, st);
}
-
RECREATE(st->buf, char, st->len + inner_len);
-
+
WBUFB(st->buf, st->len) = lang_id;
safestrncpy((char*)WBUFP(st->buf, st->len + 1), msgstr.ptr, msgstr_len + 1);
-
+
st->translations++;
st->len += inner_len;
}
@@ -4895,11 +4858,11 @@ void script_load_translation(const char *file, uint8 lang_id, uint32 *total) {
translations++;
}
}
-
+
*total += translations;
-
+
fclose(fp);
-
+
script_string_buf_destroy(&msgid);
script_string_buf_destroy(&msgstr);
@@ -4914,21 +4877,21 @@ void script_clear_translations(bool reload) {
if( script->string_list )
aFree(script->string_list);
-
+
script->string_list = NULL;
script->string_list_pos = 0;
script->string_list_size = 0;
-
+
if( script->translation_buf ) {
for(i = 0; i < script->translation_buf_size; i++) {
aFree(script->translation_buf[i]);
}
aFree(script->translation_buf);
}
-
+
script->translation_buf = NULL;
script->translation_buf_size = 0;
-
+
if( script->languages ) {
for(i = 0; i < script->max_lang_id; i++)
aFree(script->languages[i]);
@@ -4936,11 +4899,11 @@ void script_clear_translations(bool reload) {
}
script->languages = NULL;
script->max_lang_id = 0;
-
+
if( script->translation_db ) {
script->translation_db->clear(script->translation_db,script->translation_db_destroyer);
}
-
+
if( reload )
script->load_translations();
}
@@ -4950,18 +4913,17 @@ void script_clear_translations(bool reload) {
**/
int script_translation_db_destroyer(DBKey key, DBData *data, va_list ap) {
DBMap *string_db = DB->data2ptr(data);
-
+
if( db_size(string_db) ) {
- DBIterator *iter = db_iterator(string_db);
struct string_translation *st = NULL;
-
+ DBIterator *iter = db_iterator(string_db);
+
for( st = dbi_first(iter); dbi_exists(iter); st = dbi_next(iter) ) {
aFree(st);
}
-
dbi_destroy(iter);
}
-
+
db_destroy(string_db);
return 0;
}
@@ -4970,10 +4932,9 @@ int script_translation_db_destroyer(DBKey key, DBData *data, va_list ap) {
*
**/
void script_parser_clean_leftovers(void) {
-
if( script->buf )
aFree(script->buf);
-
+
script->buf = NULL;
script->size = 0;
@@ -4981,7 +4942,7 @@ void script_parser_clean_leftovers(void) {
script->translation_db->destroy(script->translation_db,script->translation_db_destroyer);
script->translation_db = NULL;
}
-
+
if( script->syntax.strings ) { /* used only when generating translation file */
db_destroy(script->syntax.strings);
script->syntax.strings = NULL;
@@ -4996,21 +4957,19 @@ void script_parser_clean_leftovers(void) {
* Performs cleanup after all parsing is processed
**/
int script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) {
-
script->parser_clean_leftovers();
script->parse_cleanup_timer_id = INVALID_TIMER;
-
+
return 0;
}
-
/*==========================================
* Initialization
*------------------------------------------*/
void do_init_script(bool minimal) {
script->parse_cleanup_timer_id = INVALID_TIMER;
-
+
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);
@@ -5030,7 +4989,6 @@ void do_init_script(bool minimal) {
return;
mapreg->init();
-
script->load_translations();
}
@@ -5064,9 +5022,9 @@ int script_reload(void) {
atcommand->binding_count = 0;
db_clear(script->st_db);
-
+
script->clear_translations(true);
-
+
if( script->parse_cleanup_timer_id != INVALID_TIMER ) {
timer->delete(script->parse_cleanup_timer_id,script->parse_cleanup_timer);
script->parse_cleanup_timer_id = INVALID_TIMER;
@@ -6585,15 +6543,15 @@ BUILDIN(deletearray)
st->state = END;
return false;// not a variable
}
-
+
script->array_ensure_zero(st,NULL,data->u.num,reference_getref(data));
-
+
if ( !(sa = idb_get(src->arrays, id)) ) { /* non-existent array, nothing to empty */
return true;// not a variable
}
end = script->array_highest_key(st,sd,name,reference_getref(data));
-
+
if( start >= end )
return true;// nothing to free
@@ -6601,7 +6559,7 @@ BUILDIN(deletearray)
value = (void *)"";
else
value = (void *)0;
-
+
if( script_hasdata(st,3) ) {
unsigned int count = script_getnum(st, 3);
if( count > end - start )
@@ -6627,14 +6585,14 @@ BUILDIN(deletearray)
list = script->array_cpy_list(sa);
size = sa->size;
qsort(list, size, sizeof(unsigned int), script_array_index_cmp);
-
+
ARR_FIND(0, size, i, list[i] >= start);
-
+
for( ; i < size && list[i] < start + count; i++ ) {
// Clear any entries between start and start+count, if they exist
script->set_reg(st, sd, reference_uid(id, list[i]), name, value, reference_getref(data));
}
-
+
for( ; i < size && list[i] < end; i++ ) {
// Move back count positions any entries between start+count to fill the gaps
void* v = script->get_val2(st, reference_uid(id, list[i]), reference_getref(data));
@@ -6648,7 +6606,7 @@ BUILDIN(deletearray)
unsigned int *list = NULL, size = 0;
list = script->array_cpy_list(sa);
size = sa->size;
-
+
for(i = 0; i < size; i++) {
if( list[i] >= start ) // Less expensive than sorting it, most likely
script->set_reg(st, sd, reference_uid(id, list[i]), name, value, reference_getref(data));
@@ -7424,17 +7382,15 @@ BUILDIN(makeitem)
return false;
}
-
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = nameid;
item_tmp.identify=1;
-
+
map->addflooritem(NULL, &item_tmp, amount, m, x, y, 0, 0, 0, 0);
return true;
}
-
/// Counts / deletes the current item given by idx.
/// Used by buildin_delitem_search
/// Relies on all input data being already fully valid.
@@ -7457,7 +7413,6 @@ void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, b
amount[0]-= delamount;
}
-
/// Searches for item(s) and checks, if there is enough of them.
/// Used by delitem and delitem2
/// Relies on all input data being already fully valid.
@@ -7565,7 +7520,6 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
}
}
-
/// Deletes items from the target/attached player.
/// Prioritizes ordinary items.
///
@@ -8485,7 +8439,7 @@ BUILDIN(successrefitem)
if (script_hasdata(st, 3))
up = script_getnum(st, 3);
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if (i >= 0) {
@@ -8620,7 +8574,7 @@ BUILDIN(delequip)
pc->delitem(sd, i, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_SCRIPT);
return true;
}
-
+
ShowError("script:delequip: no item found in position '%d' for player '%s' (AID:%d/CID:%d).\n", num, sd->status.name,sd->status.account_id, sd->status.char_id);
st->state = END;
clif->scriptclose(sd, st->oid);
@@ -9040,7 +8994,7 @@ BUILDIN(getgroupid)
/// end
BUILDIN(end) {
st->state = END;
-
+
/* are we stopping inside a function? */
if( st->stack->defsp >= 1 && st->stack->stack_data[st->stack->defsp-1].type == C_RETINFO ) {
int i;
@@ -11096,7 +11050,6 @@ BUILDIN(homunculus_checkcall) {
return true;
}
-
// [Zephyrus]
BUILDIN(homunculus_shuffle) {
TBL_PC *sd;
@@ -11446,7 +11399,7 @@ BUILDIN(getwaitingroomstate) {
}
switch(type) {
- case 0:
+ case 0:
for (i = 0; i < cd->users; i++) {
struct map_session_data *sd = cd->usersd[i];
mapreg->setreg(reference_uid(script->add_str("$@chatmembers"), i), sd->bl.id);
@@ -11581,7 +11534,6 @@ BUILDIN(isloggedin) {
return true;
}
-
/*==========================================
*
*------------------------------------------*/
@@ -11901,7 +11853,6 @@ BUILDIN(pvpon) {
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
-
if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
return true;
@@ -14001,7 +13952,6 @@ BUILDIN(getnpcclass)
return true;
}
-
/*==========================================
* getlook char info. getlook(arg)
*------------------------------------------*/
@@ -14106,13 +14056,13 @@ BUILDIN(getmapxy)
script_pushint(st,-1);
return false;
}
-
+
if( !is_string_variable(reference_getname(script_getdata(st, 2))) ) {
ShowWarning("script: buildin_getmapxy: %s is not a string variable\n",reference_getname(script_getdata(st, 2)));
script_pushint(st,-1);
return false;
}
-
+
if( is_string_variable(reference_getname(script_getdata(st, 3))) ) {
ShowWarning("script: buildin_getmapxy: %s is a string variable, should be int\n",reference_getname(script_getdata(st, 3)));
script_pushint(st,-1);
@@ -14204,7 +14154,7 @@ BUILDIN(getmapxy)
num=st->stack->stack_data[st->start+2].u.num;
name=script->get_str(script_getvarid(num));
prefix=*name;
-
+
if(not_server_variable(prefix))
sd=script->rid2sd(st);
else
@@ -14581,7 +14531,7 @@ BUILDIN(equip2)
script_pushint(st,0);
return true;
}
-
+
nameid = script_getnum(st,2);
if( (item_data = itemdb->exists(nameid)) == NULL )
{
@@ -14855,8 +14805,6 @@ BUILDIN(explode)
size_t len = strlen(str);
int i = 0, j = 0;
int start;
-
-
char *temp;
const char* name;
@@ -15427,7 +15375,6 @@ BUILDIN(countstr)
return true;
}
-
/// Changes the display name and/or display class of the npc.
/// Returns 0 is successful, 1 if the npc does not exist.
///
@@ -16177,7 +16124,6 @@ BUILDIN(checkvending) // check vending [Nab4]
return true;
}
-
// check chatting [Marka]
BUILDIN(checkchatting) {
TBL_PC *sd = NULL;
@@ -16319,7 +16265,6 @@ BUILDIN(pcfollow) {
int id, targetid;
TBL_PC *sd = NULL;
-
id = script_getnum(st,2);
targetid = script_getnum(st,3);
@@ -16339,7 +16284,6 @@ BUILDIN(pcstopfollow)
int id;
TBL_PC *sd = NULL;
-
id = script_getnum(st,2);
if(id)
@@ -16757,7 +16701,7 @@ BUILDIN(getvariableofnpc)
if( !nd->u.scr.script->local.vars )
nd->u.scr.script->local.vars = i64db_alloc(DB_OPT_RELEASE_DATA);
-
+
script->push_val(st->stack, C_NAME, reference_getuid(data), &nd->u.scr.script->local);
return true;
}
@@ -16794,7 +16738,7 @@ BUILDIN(warpportal) {
if( bl->type == BL_NPC )
unit->bl2ud2(bl); // ensure nd->ud is safe to edit
-
+
group = skill->unitsetting(bl, AL_WARP, 4, spx, spy, 0);
if( group == NULL )
return true;// failed
@@ -17750,7 +17694,7 @@ BUILDIN(has_instance) {
int16 m;
int instance_id = -1;
bool type = strcmp(script->getfuncname(st),"has_instance2") == 0 ? true : false;
-
+
str = script_getstr(st, 2);
if( (m = map->mapname2mapid(str)) < 0 ) {
@@ -17964,7 +17908,7 @@ BUILDIN(instance_check_guild)
c++;
}
}
-
+
if( c < amount )
script_pushint(st,0);
else
@@ -18063,7 +18007,6 @@ BUILDIN(areamobuseskill) {
return true;
}
-
BUILDIN(progressbar)
{
struct map_session_data * sd = script->rid2sd(st);
@@ -18125,7 +18068,6 @@ BUILDIN(pushpc)
return true;
}
-
/// Invokes buying store preparation window
/// buyingstore <slots>;
BUILDIN(buyingstore)
@@ -18140,7 +18082,6 @@ BUILDIN(buyingstore)
return true;
}
-
/// Invokes search store info window
/// searchstores <uses>,<effect>;
BUILDIN(searchstores)
@@ -18417,7 +18358,6 @@ BUILDIN(bindatcmd) {
if( script_hasdata(st,5) ) group_lv_char = script_getnum(st,5);
if( script_hasdata(st,6) ) log = script_getnum(st,6) ? true : false;
-
if( atcommand->binding_count == 0 ) {
CREATE(atcommand->binding,struct atcmd_binding_data*,1);
@@ -18692,11 +18632,11 @@ BUILDIN(npcskill) {
skill_level = script_getnum(st, 3);
stat_point = script_getnum(st, 4);
npc_level = script_getnum(st, 5);
-
+
if( !(sd = script->rid2sd(st)) )
return false;
-
- nd = (struct npc_data *)map->id2bl(sd->npc_id);
+
+ 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 );
@@ -18802,7 +18742,7 @@ BUILDIN(montransform) {
clif->ShowScript(&sd->bl, msg);
status_change_end(bl, SC_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous
sc_start2(NULL, bl, SC_MONSTER_TRANSFORM, 100, mob_id, type, tick);
-
+
if (script_hasdata(st, 4))
sc_start4(NULL, bl, type, 100, val1, val2, val3, val4, tick);
}
@@ -19316,7 +19256,7 @@ BUILDIN(checkbound)
return true;
} else
script_pushint(st,0);
-
+
return true;
}
@@ -19397,8 +19337,6 @@ BUILDIN(instance_set_respawn) {
script_pushint(st, 0);
}
}
-
-
return true;
}
/**
@@ -19700,7 +19638,6 @@ BUILDIN(channelmes)
return true;
}
-
/** By Cydh
Display script message
showscript "<message>"{,<GID>};
@@ -20457,7 +20394,6 @@ void script_label_add(int key, int pos) {
* Sets source-end constants for scripts to play with
**/
void script_hardcoded_constants(void) {
-
/* server defines */
script->set_constant("PACKETVER",PACKETVER,false);
script->set_constant("MAX_LEVEL",MAX_LEVEL,false);
@@ -20577,7 +20513,7 @@ void script_hardcoded_constants(void) {
**/
unsigned short script_mapindexname2id (struct script_state *st, const char* name) {
unsigned short index;
-
+
if( !(index=mapindex->name2id(name)) ) {
script->reportsrc(st);
return 0;
@@ -20585,7 +20521,6 @@ unsigned short script_mapindexname2id (struct script_state *st, const char* name
return index;
}
-
void script_defaults(void) {
// aegis->athena slot position conversion table
unsigned int equip[SCRIPT_EQUIP_TABLE_SIZE] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_GARMENT,EQP_SHADOW_ARMOR, EQP_SHADOW_WEAPON, EQP_SHADOW_SHIELD, EQP_SHADOW_SHOES, EQP_SHADOW_ACC_R, EQP_SHADOW_ACC_L};
@@ -20598,7 +20533,7 @@ void script_defaults(void) {
script->st_ers = NULL;
script->stack_ers = NULL;
script->array_ers = NULL;
-
+
script->hq = NULL;
script->hqi = NULL;
script->hqs = script->hqis = 0;
@@ -20822,7 +20757,7 @@ void script_defaults(void) {
script->global_casecheck.str_pos = 0;
memset(script->global_casecheck.str_hash, 0, sizeof(script->global_casecheck.str_hash));
// end ENABLE_CASE_CHECK
-
+
/**
* Array Handling
**/
diff --git a/src/map/skill.c b/src/map/skill.c
index 5b41c55c0..a9ebf6998 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -115,7 +115,7 @@ int skill_get_index( uint16 skill_id ) {
else
ShowWarning("skill_get_index: skill id '%d' is not being handled!\n",skill_id);
}
-
+
// validate result
if( !skill_id || skill_id >= MAX_SKILL_DB )
return 0;
@@ -481,14 +481,14 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
clif->skill_fail(sd, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0);
return 1;
}
-
+
/**
* It has been confirmed on a official server (thanks to Yommy) that item-cast skills bypass all the restrictions below
* Also, without this check, an exploit where an item casting + healing (or any other kind buff) isn't deleted after used on a restricted map
**/
if( sd->skillitem == skill_id )
return 0;
-
+
if( sd->sc.data[SC_ALL_RIDING] )
return 1;//You can't use skills while in the new mounts (The client doesn't let you, this is to make cheat-safe)
@@ -2105,7 +2105,6 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
return unit->blown(target, dx, dy, count, flag); // send over the proper flag
}
-
/*
Checks if 'bl' should reflect back a spell cast by 'src'.
type is the type of magic attack: 0: indirect (aoe), 1: direct (targeted)
@@ -2213,7 +2212,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
if(csc && csc->data[SC_GRAVITATION] && csc->data[SC_GRAVITATION]->val3 == BCT_SELF )
return 0;
}
-
+
dmg = battle->calc_attack(attack_type,src,bl,skill_id,skill_lv,flag&0xFFF);
//Skotlex: Adjusted to the new system
@@ -2232,7 +2231,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
}
}
- if( dmg.flag&BF_MAGIC
+ if( dmg.flag&BF_MAGIC
&& (skill_id != NPC_EARTHQUAKE || (battle_config.eq_single_target_reflectable && (flag & 0xFFF) == 1)) ) { /* Need more info cause NPC_EARTHQUAKE is ground type */
// Earthquake on multiple targets is not counted as a target skill. [Inkfish]
int reflecttype;
@@ -2800,7 +2799,6 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
battle->drain(sd, bl, dmg.damage, dmg.damage2, tstatus->race, tstatus->mode&MD_BOSS);
}
-
if( damage > 0 ) {
/**
* Post-damage effects
@@ -9013,8 +9011,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if ( sd ) {
int i, max;
sc_start(src, bl, SC_EXPLOSIONSPIRITS, 100, skill_lv, skill->get_time(skill_id, skill_lv));
- clif->skill_nodamage(src, bl, skill_id, skill_lv,
- sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
+ clif->skill_nodamage(src, bl, skill_id, skill_lv,
+ sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
max = pc->getmaxspiritball(sd, 0);
for ( i = 0; i < max; i++ )
pc->addspiritball(sd, skill->get_time(MO_CALLSPIRITS, skill_lv), max);
@@ -9044,7 +9042,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( !dstsd )
break;
if ( sd && (dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER ) {
- int i, max = pc->getmaxspiritball(dstsd, 5);
+ int i, max = pc->getmaxspiritball(dstsd, 5);
for ( i = 0; i < max; i++ ) {
pc->addspiritball(dstsd, skill->get_time(MO_CALLSPIRITS, 1), max);
}
@@ -12057,7 +12055,6 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
status->change_start(ss,bl,type,10000,sg->skill_lv,sg->group_id,0,0,skill->get_time2(sg->skill_id,sg->skill_lv),SCFLAG_NONE);
break;
-
case UNT_MAGENTATRAP:
case UNT_COBALTTRAP:
case UNT_MAIZETRAP:
@@ -13953,7 +13950,6 @@ int skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *sk
return -1;
}
-
int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv) {
struct skill_condition require;
struct status_data *st;
@@ -15313,7 +15309,6 @@ int skill_sit (struct map_session_data *sd, int type)
int range = 0, lv;
nullpo_ret(sd);
-
if((lv = pc->checkskill(sd,RG_GANGSTER)) > 0) {
flag|=1;
range = skill->get_splash(RG_GANGSTER, lv);
@@ -15409,7 +15404,6 @@ int skill_attack_area(struct block_list *bl, va_list ap) {
flag = va_arg(ap,int);
type = va_arg(ap,int);
-
if (skill->area_temp[1] == bl->id) //This is the target of the skill, do a full attack and skip target checks.
return skill->attack(atk_type,src,dsrc,bl,skill_id,skill_lv,tick,flag);
@@ -15417,7 +15411,6 @@ int skill_attack_area(struct block_list *bl, va_list ap) {
|| !status->check_skilluse(NULL, bl, skill_id, 2))
return 0;
-
switch (skill_id) {
case WZ_FROSTNOVA: //Skills that don't require the animation to be removed
case NPC_ACIDBREATH:
@@ -17232,7 +17225,6 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
if(make_per < 1) make_per = 1;
-
if(rnd()%10000 < make_per || qty > 1){ //Success, or crafting multiple items.
struct item tmp_item;
memset(&tmp_item,0,sizeof(tmp_item));
@@ -17566,7 +17558,6 @@ void skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) {
}
}
-
int skill_magicdecoy(struct map_session_data *sd, int nameid) {
int x, y, i, class_, skill_id;
struct mob_data *md;
@@ -17590,7 +17581,6 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) {
class_ = (nameid == ITEMID_BOODY_RED || nameid == ITEMID_CRYSTAL_BLUE) ? 2043 + nameid - ITEMID_BOODY_RED : (nameid == ITEMID_WIND_OF_VERDURE) ? 2046 : 2045;
-
md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_SMALL, AI_NONE);
if( md ) {
md->master_id = sd->bl.id;
@@ -17729,7 +17719,6 @@ int skill_elementalanalysis(struct map_session_data* sd, int n, uint16 skill_lv,
return 1;
}
-
memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = product;
tmp_item.amount = add_amount;
@@ -17978,7 +17967,6 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { /
uint16 idx = skill->get_index(skill_id);
nullpo_retr (-1, hd);
-
if (idx == 0)
return -1;
@@ -18913,7 +18901,6 @@ bool skill_parse_row_reproducedb(char* split[], int column, int current) {
return true;
}
-
bool skill_parse_row_abradb(char* split[], int columns, int current) {
// skill_id,DummyName,RequiredHocusPocusLevel,Rate
uint16 skill_id = atoi(split[0]);
diff --git a/src/map/status.c b/src/map/status.c
index 9a95b023c..d7da17d5a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1079,7 +1079,6 @@ void initDummyData(void)
status->dummy.mode = MD_CANMOVE;
}
-
//For copying a status_data structure from b to a, without overwriting current Hp and Sp
static inline void status_cpy(struct status_data* a, const struct status_data* b)
{
@@ -1952,7 +1951,6 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
mstatus->speed -= cap_value(diff, 0, mstatus->speed - 10);
}
-
if (flag&2 && battle_config.mob_size_influence) {
// change for sized monsters [Valaris]
if (md->special_state.size==SZ_MEDIUM) {
@@ -2455,7 +2453,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if( data && data->script )
script->run_use_script(sd, data, 0);
}
-
+
status->calc_pc_additional(sd, opt);
if( sd->pd ) { // Pet Bonus
@@ -2602,7 +2600,6 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if( (skill_lv = pc->checkskill(sd,WM_LESSON)) > 0 )
bstatus->max_sp += 30 * skill_lv;
-
// Apply relative modifiers from equipment
if(sd->sprate < 0)
sd->sprate = 0;
@@ -2781,7 +2778,6 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
#endif
bstatus->adelay = 2*bstatus->amotion;
-
// ----- DMOTION -----
//
i = 800-bstatus->agi*4;
@@ -5086,7 +5082,6 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i
#endif
}
-
defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) {
if(!sc || !sc->count)
@@ -5800,7 +5795,6 @@ unsigned char status_calc_element_lv(struct block_list *bl, struct status_change
return (unsigned char)cap_value(lv,1,4);
}
-
unsigned char status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element)
{
if(!sc || !sc->count)
@@ -9533,12 +9527,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
++(sc->count);
sce = sc->data[type] = ers_alloc(status->data_ers, struct status_change_entry);
}
-
+
sce->val1 = val1;
sce->val2 = val2;
sce->val3 = val3;
sce->val4 = val4;
-
+
if (tick >= 0) {
sce->timer = timer->add(timer->gettick() + tick, status->change_timer, bl->id, type);
sce->infinite_duration = false;
@@ -9729,7 +9723,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
return 0;
st = status->get_status_data(bl);
-
+
if( sd && sce->infinite_duration && !sd->state.loggingout )
chrif->del_scdata_single(sd->status.account_id,sd->status.char_id,type);
@@ -9911,7 +9905,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
sce->val2 = 0;
-
+
if( group )
skill->del_unitgroup(group,ALC_MARK);
}
@@ -10510,7 +10504,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
ShowError("status_change_timer: Mismatch for type %d: %d != %d (bl id %d)\n",type,tid,sce->timer, bl->id);
return 0;
}
-
+
sce->timer = INVALID_TIMER;
sd = BL_CAST(BL_PC, bl);
@@ -10948,15 +10942,14 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
int heal = st->max_hp * 3 / 100;
if (sc->count && sc->data[SC_AKAITSUKI] && heal)
heal = ~heal + 1;
-
+
map->freeblock_lock();
-
status->heal(bl, heal, 0, 2);
if( sc->data[type] ) {
sc_timer_next(5000 + tick, status->change_timer, bl->id, data);
}
map->freeblock_unlock();
-
+
return 0;
}
break;
@@ -11115,7 +11108,6 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
}
break;
-
case SC_SATURDAY_NIGHT_FEVER:
if( --(sce->val3) >= 0 ) {
if( !status->charge(bl, st->max_hp * 1 / 100, st->max_sp * 1 / 100) )
@@ -11656,7 +11648,7 @@ int status_change_clear_buffs (struct block_list* bl, int type) {
return 0;
map->freeblock_lock();
-
+
if (type&6) //Debuffs
for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
status_change_end(bl, (sc_type)i, INVALID_TIMER);
@@ -11703,9 +11695,9 @@ int status_change_clear_buffs (struct block_list* bl, int type) {
}
status_change_end(bl, (sc_type)i, INVALID_TIMER);
}
-
+
map->freeblock_unlock();
-
+
return 0;
}
@@ -12220,11 +12212,10 @@ void status_read_job_db(void) { /* [malufett/Hercules] */
int i = 0;
config_t job_db_conf;
config_setting_t *jdb = NULL;
- const char *config_filename =
#ifdef RENEWAL_ASPD
- "db/re/job_db.conf";
+ const char *config_filename = "db/re/job_db.conf";
#else
- "db/pre-re/job_db.conf";
+ const char *config_filename = "db/pre-re/job_db.conf";
#endif
if ( libconfig->read_file(&job_db_conf, config_filename) ) {
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index 345c1de9e..e5483da5b 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -152,7 +152,6 @@ HPExport const char *Hooked (bool *fr) {
return NULL;
}
-
HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) {
struct HookingPointData *hpd;
@@ -230,4 +229,3 @@ void HPM_HP_load(void) {
#include HPM_SOURCES_INCLUDE
}
-
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index ff2feefa0..79eda0e5e 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -139,10 +139,10 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
// bindonequip
StrBuf->Printf(&buf, "'%u',", it->flag.bindonequip?1:0);
-
+
// forceserial
StrBuf->Printf(&buf, "'%u',", it->flag.force_serial?1:0);
-
+
// buyingstore
StrBuf->Printf(&buf, "'%u',", it->flag.buyingstore?1:0);
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c
index 4f235907d..a11f8643b 100644
--- a/src/test/test_spinlock.c
+++ b/src/test/test_spinlock.c
@@ -18,7 +18,6 @@
#define PERINC 100000
#define LOOPS 47
-
static SPIN_LOCK lock;
static unsigned int val = 0;
static volatile int32 done_threads = 0;
@@ -41,7 +40,6 @@ static void *worker(void *p){
return NULL;
}//end: worker()
-
int do_init(int argc, char **argv){
rAthread *t[THRC];
int j, i;
@@ -88,27 +86,20 @@ int do_init(int argc, char **argv){
ShowStatus("Test passed.\n");
exit(0);
}
-
-
-return 0;
+ return 0;
}//end: do_init()
-
void do_abort(void) {
}//end: do_abort()
-
void set_server_type(void) {
SERVER_TYPE = SERVER_TYPE_UNKNOWN;
}//end: set_server_type()
-
int do_final(void) {
return EXIT_SUCCESS;
}//end: do_final()
-
int parse_console(const char* command){
return 0;
}//end: parse_console
-
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 05f62ca7a..72457b73a 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -256,7 +256,6 @@ void cmdline_args_init_local(void)
CMDLINEARG_DEF2(map-list, maplist, "Alternative map list file", CMDLINE_OPT_NORMAL|CMDLINE_OPT_PARAM);
CMDLINEARG_DEF2(map-cache, mapcache, "Alternative map cache file", CMDLINE_OPT_NORMAL|CMDLINE_OPT_PARAM);
CMDLINEARG_DEF2(rebuild, rebuild, "Forces a rebuild of the map cache, rather than only adding missing maps", CMDLINE_OPT_NORMAL);
-
}
int do_init(int argc, char** argv)