From 1d1a58cdcb88fb0ba294d3ba827a1da653598cbe Mon Sep 17 00:00:00 2001 From: aleos89 Date: Wed, 16 Apr 2014 11:06:09 -0400 Subject: [PATCH] Bug Fixes * Removed unused guild aura leftovers and fixed some other issues with setting the guild aura. (bugreport:8892) * Fixed Fire Expansion Acid to be a magic type attack. Thanks to exneval. * Cleaned up some remaining issues with Issen. (bugreport:8905) * 16th Night (Izayoi) should remove fixed cast time from all skills. * Circle of Nature is now part of Group B songs. * Updated Reading Spell Book spell memorization to official. * Updated homunculus skill cooldowns. * Added missing Holy element bonus for Hesperus Lit. * Fixed Coluseo Heal and Praefatio not giving a party bonus. (bugreport:8904) * Fixed the status icon for ALL_RIDING not being displayed at login. * Adjusted the notice display order when players login. (Hercules df1952d) * Self skills can now be used while storage is open. (Hercules 6f6a6b3) * Cleaned up SC_NOCHAT/Manner system. (Hercules 94ef1ee) --- conf/battle/guild.conf | 6 ++ db/pre-re/skill_cast_db.txt | 12 +-- db/pre-re/skill_db.txt | 2 +- db/pre-re/skill_require_db.txt | 1 - db/re/skill_cast_db.txt | 12 +-- db/re/skill_db.txt | 2 +- db/re/skill_require_db.txt | 1 - doc/script_commands.txt | 5 + src/common/mmo.h | 2 +- src/map/battle.c | 17 +-- src/map/battle.h | 1 + src/map/clif.c | 36 +++++-- src/map/guild.c | 46 ++++++-- src/map/pc.c | 16 ++- src/map/pc.h | 2 +- src/map/skill.c | 192 ++++++++++++++++----------------- src/map/skill.h | 3 - src/map/status.c | 34 +++--- src/map/status.h | 2 +- 19 files changed, 224 insertions(+), 168 deletions(-) diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf index 1713111d40..0374160560 100644 --- a/conf/battle/guild.conf +++ b/conf/battle/guild.conf @@ -51,3 +51,9 @@ require_glory_guild: no // If you want to change this value, clear the guild alliance table. // Default is 3 max_guild_alliance: 3 + +// When to re-display the guild notice +// Upon teleporting (regardless of changing maps): 2 (official) +// Upon changing maps: 1 +// Do not re-display: 0 (disabled) +guild_notice_changemap: 2 diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt index d5692c79ba..98dcc36941 100644 --- a/db/pre-re/skill_cast_db.txt +++ b/db/pre-re/skill_cast_db.txt @@ -1777,23 +1777,23 @@ //-- HLIF_AVOID 8002,0,35000,0,40000:35000:30000:25000:20000,0,0 //-- HLIF_CHANGE -8004,0,600000:900000:1200000,0,60000:180000:300000,0,0 +8004,0,0,0,60000:180000:300000,600000:900000:1200000,0 //-- HAMI_CASTLE -8005,0,0,0,0,60000:70000:80000:90000:129000,0 +8005,0,0,0,0,1000,0 //-- HAMI_DEFENCE -8006,0,0,0,40000:35000:30000:25000:20000,0,0 +8006,0,30000,0,40000:35000:30000:25000:20000,0,0 //-- HAMI_BLOODLUST 8008,0,0,0,60000:180000:300000,300000:600000:900000,0 //-- HFLI_MOON -8009,0,0,1000,0,0,0 +8009,0,0,2000,0,0,0 //-- HFLI_FLEET 8010,0,0,0,60000:55000:50000:45000:40000,60000:70000:80000:90000:120000,0 //-- HFLI_SPEED 8011,0,0,0,60000:55000:50000:45000:40000,60000:70000:80000:90000:120000,0 //-- HVAN_CAPRICE -8013,0,1000:1200:1400:1600:1800,0,0,0,0 +8013,0,2000:2200:2400:2600:2800,0,0,0,0 //-- HVAN_CHAOTIC -8014,0,1000,1000,0,0,0 +8014,0,3000,3000,0,0,0 //-- HVAN_EXPLOSION 8016,0,0,1000,0,0,0 //========================================== diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt index 616e7c44f9..e5a48a173a 100644 --- a/db/pre-re/skill_db.txt +++ b/db/pre-re/skill_db.txt @@ -1200,7 +1200,7 @@ 2486,9,6,2,0,0,0,5,1,yes,0,0,0,none,0,0x0, GN_FIRE_EXPANSION,Fire Expansion 2487,9,6,2,0,0,0,1,1,no,0,0,0,none,0,0x0, GN_FIRE_EXPANSION_SMOKE_POWDER,Fire Expansion Smoke Powder 2488,9,6,2,0,0,0,1,1,no,0,0,0,none,0,0x0, GN_FIRE_EXPANSION_TEAR_GAS,Fire Expansion Tear Gas -2489,11,8,1,-1,0x28,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,weapon,0,0x0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid +2489,11,8,1,-1,0x28,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,magic,0,0x0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid 2490,9,6,2,0,0x3,1,5,1,yes,0,0x80,2:3:4:5:6,none,0,0x0, GN_HELLS_PLANT,Hell's Plant 2491,0,6,1,0,0x90,0,5,1,no,0,0,0,misc,0,0x0, GN_HELLS_PLANT_ATK,Hell's Plant Attack 2492,0,6,4,0,0x3,5:6:6:7:7,5,1,yes,0,0,0,none,0,0x0, GN_MANDRAGORA,Howling of Mandragora diff --git a/db/pre-re/skill_require_db.txt b/db/pre-re/skill_require_db.txt index a7675dbc98..a8cafc7577 100644 --- a/db/pre-re/skill_require_db.txt +++ b/db/pre-re/skill_require_db.txt @@ -623,7 +623,6 @@ 2228,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,0,0 //WL_SUMMON_ATK_GROUND 2229,0,0,10:12:14:16:18,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,0,0 //WL_SUMMONSTONE 2230,0,0,3:20,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,0,0 //WL_RELEASE -2231,0,0,40,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,0,0 //WL_READING_SB //2232,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,0,0 //WL_FREEZE_SP (Passive Skill) //**** diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt index b1d641d66d..f2dfebe6d8 100644 --- a/db/re/skill_cast_db.txt +++ b/db/re/skill_cast_db.txt @@ -1765,23 +1765,23 @@ //-- HLIF_AVOID 8002,0,35000,0,40000:35000:30000:25000:20000,0,0,-1 //-- HLIF_CHANGE -8004,0,600000:900000:1200000,0,60000:120000:180000,0,0,-1 +8004,0,0,0,60000:180000:300000,600000:900000:1200000,0,-1 //-- HAMI_CASTLE -8005,0,0,0,0,60000:70000:80000:90000:129000,0,-1 +8005,0,0,0,0,1000,0,-1 //-- HAMI_DEFENCE -8006,0,0,0,40000:35000:30000:25000:20000,0,0,-1 +8006,0,30000,0,40000:35000:30000:25000:20000,0,0,-1 //-- HAMI_BLOODLUST 8008,0,0,0,60000:180000:300000,300000:600000:900000,0,-1 //-- HFLI_MOON -8009,0,0,1000,0,0,0,-1 +8009,0,0,2000,0,0,0,-1 //-- HFLI_FLEET 8010,0,0,0,60000:55000:50000:45000:40000,60000:70000:80000:90000:120000,0,-1 //-- HFLI_SPEED 8011,0,0,0,60000:55000:50000:45000:40000,60000:70000:80000:90000:120000,0,-1 //-- HVAN_CAPRICE -8013,0,1000:1200:1400:1600:1800,0,0,0,0,-1 +8013,0,2000:2200:2400:2600:2800,0,0,0,0,-1 //-- HVAN_CHAOTIC -8014,0,1000,1000,0,0,0,-1 +8014,0,3000,3000,0,0,0,-1 //-- HVAN_EXPLOSION 8016,0,0,1000,0,0,0,-1 //========================================== diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index a3c4d8a9dd..49d80a101e 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -1200,7 +1200,7 @@ 2486,9,6,2,0,0,0,5,1,yes,0,0,0,none,0,0x0, GN_FIRE_EXPANSION,Fire Expansion 2487,9,6,2,0,0,0,1,1,no,0,0,0,none,0,0x0, GN_FIRE_EXPANSION_SMOKE_POWDER,Fire Expansion Smoke Powder 2488,9,6,2,0,0,0,1,1,no,0,0,0,none,0,0x0, GN_FIRE_EXPANSION_TEAR_GAS,Fire Expansion Tear Gas -2489,11,8,1,-1,0x28,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,weapon,0,0x0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid +2489,11,8,1,-1,0x28,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,magic,0,0x0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid 2490,9,6,2,0,0x3,1,5,1,yes,0,0x80,2:3:4:5:6,none,0,0x0, GN_HELLS_PLANT,Hell's Plant 2491,0,6,1,0,0x90,0,5,1,no,0,0,0,misc,0,0x0, GN_HELLS_PLANT_ATK,Hell's Plant Attack 2492,0,6,4,0,0x3,5:6:6:7:7,5,1,yes,0,0,0,none,0,0x0, GN_MANDRAGORA,Howling of Mandragora diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt index d1a5f6b1dd..f1acbb65f0 100644 --- a/db/re/skill_require_db.txt +++ b/db/re/skill_require_db.txt @@ -623,7 +623,6 @@ 2228,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,0,0 //WL_SUMMON_ATK_GROUND 2229,0,0,10:12:14:16:18,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,0,0 //WL_SUMMONSTONE 2230,0,0,3:20,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,0,0 //WL_RELEASE -2231,0,0,40,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,0,0 //WL_READING_SB //2232,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,0,0 //WL_FREEZE_SP //**** diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 7e78b4242a..65e69d7109 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5131,6 +5131,11 @@ Examples: // This will end the Freezing status for the invoking character. sc_end SC_FREEZE; +Note: to use SC_NOCHAT you should alter Manner + set Manner, -5; // Will mute a user for 5 minutes + set Manner, 0; // Will unmute a user + set Manner, 5; // Will unmute a user and prevent the next use of 'Manner' + --------------------------------------- *getstatus({,}) diff --git a/src/common/mmo.h b/src/common/mmo.h index 3ee548144e..d6feeb6e17 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -341,7 +341,7 @@ struct mmo_charstatus { unsigned int status_point,skill_point; int hp,max_hp,sp,max_sp; unsigned int option; - short manner; + short manner; // Defines how many minutes a char will be muted, each negative point is equivalent to a minute. unsigned char karma; short hair,hair_color,clothes_color; int party_id,guild_id,pet_id,hom_id,mer_id,ele_id; diff --git a/src/map/battle.c b/src/map/battle.c index ef73d9e634..ac3683edf1 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2310,6 +2310,10 @@ static int battle_get_weapon_element(struct Damage wd, struct block_list *src, s if (!sd) element = ELE_NEUTRAL; //forced neutral for monsters break; + case LG_HESPERUSLIT: + if (sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 4) + element = ELE_HOLY; + break; case RL_H_MINE: if (sd && sd->skill_id_old == RL_FLICKER) //Force RL_H_MINE deals fire damage if activated by RL_FLICKER element = ELE_FIRE; @@ -2608,7 +2612,7 @@ struct Damage battle_calc_skill_base_damage(struct Damage wd, struct block_list } #else case NJ_ISSEN: - wd.damage = (40 * sstatus->str) + (8 / 100 * skill_lv * sstatus->hp); + wd.damage = (40 * sstatus->str) + (8 * skill_lv / 100 * sstatus->hp); wd.damage2 = 0; break; case LK_SPIRALPIERCE: @@ -3457,11 +3461,11 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s skillratio = 120 * skill_lv; if( sc && sc->data[SC_BANDING] ) skillratio += 200 * sc->data[SC_BANDING]->val2; + RE_LVL_DMOD(100); if( sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 5 ) skillratio = skillratio * 150 / 100; if( sc && sc->data[SC_INSPIRATION] ) skillratio += 600; - RE_LVL_DMOD(100); break; case SR_DRAGONCOMBO: skillratio += 40 * skill_lv; @@ -5995,6 +5999,10 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage = 0; else if(md.damage && tstatus->mode&MD_PLANT){ switch(skill_id){ + case NJ_ISSEN: // Final Strike will MISS on "plant"-type mobs [helvetica] + md.damage = 0; + md.dmg_lv = ATK_FLEE; + break; case HT_LANDMINE: case MA_LANDMINE: case HT_BLASTMINE: @@ -6002,10 +6010,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * case RA_CLUSTERBOMB: #ifdef RENEWAL break; - case NJ_ISSEN: // Final Strike will MISS on "plant"-type mobs [helvetica] - md.damage = 0; - md.dmg_lv=ATK_FLEE; - break; #endif default: md.damage = 1; @@ -7564,6 +7568,7 @@ static const struct _battle_data { { "taekwon_mission_mobname", &battle_config.taekwon_mission_mobname, 0, 0, 2, }, { "teleport_on_portal", &battle_config.teleport_on_portal, 0, 0, 1, }, { "cart_revo_knockback", &battle_config.cart_revo_knockback, 1, 0, 1, }, + { "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 57d6d143b8..5bcc8df298 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -538,6 +538,7 @@ extern struct Battle_Config int taekwon_mission_mobname; int teleport_on_portal; int cart_revo_knockback; + int guild_notice_changemap; } battle_config; void do_init_battle(void); diff --git a/src/map/clif.c b/src/map/clif.c index 5469f1c7f5..00dd67ef01 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7505,7 +7505,7 @@ void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) WFIFOL(fd,2)=g->guild_id; WFIFOL(fd,6)=g->emblem_id; WFIFOL(fd,10)=g->position[ps].mode; - WFIFOB(fd,14)=(bool)(sd->state.gmaster_flag==g); + WFIFOB(fd,14)=(bool)(sd->state.gmaster_flag==1); WFIFOL(fd,15)=0; // InterSID (unknown purpose) memcpy(WFIFOP(fd,19),g->name,NAME_LENGTH); WFIFOSET(fd,packet_len(0x16c)); @@ -9472,6 +9472,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { int i; + bool guild_notice = false; if(sd->bl.prev != NULL) return; @@ -9624,6 +9625,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->state.connect_new) { int lv; + guild_notice = true; sd->state.connect_new = 0; clif_skillinfoblock(sd); clif_hotkeys_send(sd); @@ -9640,6 +9642,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_status_load(&sd->bl, SI_RIDING, 1); else if (sd->sc.option&OPTION_WUGRIDER) clif_status_load(&sd->bl, SI_WUGRIDER, 1); + else if (sd->sc.data[SC_ALL_RIDING]) + clif_status_load(&sd->bl, SI_ALL_RIDING, 1); if(sd->status.manner < 0) sc_start(&sd->bl,&sd->bl,SC_NOCHAT,100,0,0); @@ -9700,6 +9704,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) //clif_vip_display_info(sd,ZC_PERSONAL_INFOMATION_CHN); } #endif + + if (sd->guild && battle_config.guild_notice_changemap == 1) + clif_guild_notice(sd, sd->guild); // Displays after VIP + if( (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100) && (map_flag_gvg(sd->state.pmap) || map_flag_gvg(sd->bl.m) || map[sd->state.pmap].flag.battleground || map[sd->bl.m].flag.battleground) ) status_calc_bl(&sd->bl, SCB_FLEE); //Refresh flee penalty @@ -9742,10 +9750,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) sd->state.changemap = false; // Instances do not need their own channels - if( Channel_Config.map_enable && Channel_Config.map_autojoin && !map[sd->bl.m].flag.chmautojoin && !map[sd->bl.m].instance_id ) { + if( Channel_Config.map_enable && Channel_Config.map_autojoin && !map[sd->bl.m].flag.chmautojoin && !map[sd->bl.m].instance_id ) channel_mjoin(sd); //join new map - } - } + } else if (sd->guild && (battle_config.guild_notice_changemap == 2 || guild_notice)) + clif_guild_notice(sd, sd->guild); // Displays at end + mail_clear(sd); @@ -9753,10 +9762,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) /* Guild Aura Init */ if( sd->state.gmaster_flag ) { - guild_guildaura_refresh(sd,GD_LEADERSHIP,guild_checkskill(sd->state.gmaster_flag,GD_LEADERSHIP)); - guild_guildaura_refresh(sd,GD_GLORYWOUNDS,guild_checkskill(sd->state.gmaster_flag,GD_GLORYWOUNDS)); - guild_guildaura_refresh(sd,GD_SOULCOLD,guild_checkskill(sd->state.gmaster_flag,GD_SOULCOLD)); - guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->state.gmaster_flag,GD_HAWKEYES)); + guild_guildaura_refresh(sd,GD_LEADERSHIP,guild_checkskill(sd->guild,GD_LEADERSHIP)); + guild_guildaura_refresh(sd,GD_GLORYWOUNDS,guild_checkskill(sd->guild,GD_GLORYWOUNDS)); + guild_guildaura_refresh(sd,GD_SOULCOLD,guild_checkskill(sd->guild,GD_SOULCOLD)); + guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->guild,GD_HAWKEYES)); } if( sd->state.vending ) { /* show we have a vending */ @@ -11275,8 +11284,15 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) #endif } - if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) ) + if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && + (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) && + sd->state.storage_flag && !(tmp&INF_SELF_SKILL) ) //SELF skills can be used with the storage open, issue: 8027 return; + + //Some self skills need to close the storage to work properly + if( skill_id == AL_TELEPORT && sd->state.storage_flag ) + storage_storageclose(sd); + if( pc_issit(sd) ) return; @@ -11324,7 +11340,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) if( skill_id >= GD_SKILLBASE ) { if( sd->state.gmaster_flag ) - skill_lv = guild_checkskill(sd->state.gmaster_flag, skill_id); + skill_lv = guild_checkskill(sd->guild, skill_id); else skill_lv = 0; } else { diff --git a/src/map/guild.c b/src/map/guild.c index 258c94299e..7fcfa1ea2d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -481,12 +481,12 @@ int guild_recv_info(struct guild *sg) { //Also set the guild master flag. sd->guild = g; - sd->state.gmaster_flag = g; + sd->state.gmaster_flag = 1; clif_charnameupdate(sd); // [LuzZza] clif_guild_masterormember(sd); } } else { - before=*g; + before=*g; } memcpy(g,sg,sizeof(struct guild)); @@ -664,7 +664,7 @@ void guild_member_joined(struct map_session_data *sd) { return; } if (strcmp(sd->status.name,g->master) == 0) { // set the Guild Master flag - sd->state.gmaster_flag = g; + sd->state.gmaster_flag = 1; // prevent Guild Skills from being used directly after relog if( battle_config.guild_skill_relog_delay ) guild_block_skill(sd, battle_config.guild_skill_relog_delay); @@ -830,7 +830,11 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c sd->guild_emblem_id = 0; clif_charnameupdate(sd); //Update display name [Skotlex] - //TODO: send emblem update to self and people around + status_change_end(&sd->bl,SC_LEADERSHIP,INVALID_TIMER); + status_change_end(&sd->bl,SC_GLORYWOUNDS,INVALID_TIMER); + status_change_end(&sd->bl,SC_SOULCOLD,INVALID_TIMER); + status_change_end(&sd->bl,SC_HAWKEYES,INVALID_TIMER); + //@TODO: Send emblem update to self and people around } return 0; } @@ -894,7 +898,6 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) { // clea 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); - clif_guild_notice(sd,g); sd->guild_emblem_id = g->emblem_id; } return 0; @@ -1290,9 +1293,8 @@ void guild_guildaura_refresh(struct map_session_data *sd, uint16 skill_id, uint1 status_change_end(&sd->bl,type,INVALID_TIMER); } group = skill_unitsetting(&sd->bl,skill_id,skill_lv,sd->bl.x,sd->bl.y,0); - if( group ) { + if( group ) sc_start4(NULL,&sd->bl,type,100,(battle_config.guild_aura&16)?0:skill_lv,0,0,group->group_id,600000);//duration doesn't matter these status never end with val4 - } return; } @@ -1658,8 +1660,13 @@ int guild_broken(int guild_id,int flag) { storage_guild_storage_quit(sd,1); sd->status.guild_id=0; sd->guild = NULL; + sd->state.gmaster_flag = 0; clif_guild_broken(g->member[i].sd,0); clif_charnameupdate(sd); // [LuzZza] + status_change_end(&sd->bl,SC_LEADERSHIP,INVALID_TIMER); + status_change_end(&sd->bl,SC_GLORYWOUNDS,INVALID_TIMER); + status_change_end(&sd->bl,SC_SOULCOLD,INVALID_TIMER); + status_change_end(&sd->bl,SC_HAWKEYES,INVALID_TIMER); } } @@ -1726,7 +1733,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) { if (g->member[0].sd && g->member[0].sd->fd) { clif_displaymessage(g->member[0].sd->fd, msg_txt(g->member[pos].sd,679)); //"You have become the Guild Master!" - g->member[0].sd->state.gmaster_flag = g; + g->member[0].sd->state.gmaster_flag = 1; //Block his skills to prevent abuse. if (battle_config.guild_skill_relog_delay) guild_block_skill(g->member[0].sd, battle_config.guild_skill_relog_delay); @@ -1748,6 +1755,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) { *---------------------------------------------------*/ int guild_break(struct map_session_data *sd,char *name) { struct guild *g; + struct unit_data *ud; int i; #ifdef BOUND_ITEMS int j; @@ -1773,6 +1781,28 @@ int guild_break(struct map_session_data *sd,char *name) { return 0; } + /* Regardless of char server allowing it, we clear the guild master's auras */ + if((ud = unit_bl2ud(&sd->bl))) { + int count = 0; + struct skill_unit_group *group[4]; + + for(i = 0; i < MAX_SKILLUNITGROUP && ud->skillunit[i]; i++) { + switch(ud->skillunit[i]->skill_id) { + case GD_LEADERSHIP: + case GD_GLORYWOUNDS: + case GD_SOULCOLD: + case GD_HAWKEYES: + if(count == 4) + ShowWarning("guild_break: '%s' got more than 4 guild aura instances! (%d)\n",sd->status.name,ud->skillunit[i]->skill_id); + else + group[count++] = ud->skillunit[i]; + break; + } + } + for(i = 0; i < count; i++) + skill_delunitgroup(group[i]); + } + #ifdef BOUND_ITEMS //Guild bound item check - Removes the bound flag j = pc_bound_chk(sd,2,idxlist); diff --git a/src/map/pc.c b/src/map/pc.c index f881b7d9d1..c2e630fc20 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7274,10 +7274,10 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) { pc_setinvincibletimer(sd, battle_config.pc_invincible_time); if( sd->state.gmaster_flag ) { - guild_guildaura_refresh(sd,GD_LEADERSHIP,guild_checkskill(sd->state.gmaster_flag,GD_LEADERSHIP)); - guild_guildaura_refresh(sd,GD_GLORYWOUNDS,guild_checkskill(sd->state.gmaster_flag,GD_GLORYWOUNDS)); - guild_guildaura_refresh(sd,GD_SOULCOLD,guild_checkskill(sd->state.gmaster_flag,GD_SOULCOLD)); - guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->state.gmaster_flag,GD_HAWKEYES)); + guild_guildaura_refresh(sd,GD_LEADERSHIP,guild_checkskill(sd->guild,GD_LEADERSHIP)); + guild_guildaura_refresh(sd,GD_GLORYWOUNDS,guild_checkskill(sd->guild,GD_GLORYWOUNDS)); + guild_guildaura_refresh(sd,GD_SOULCOLD,guild_checkskill(sd->guild,GD_SOULCOLD)); + guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->guild,GD_HAWKEYES)); } } // script @@ -7554,7 +7554,13 @@ bool pc_setparam(struct map_session_data *sd,int type,int val) break; case SP_MANNER: sd->status.manner = val; - break; + if( val < 0 ) + sc_start(NULL, &sd->bl, SC_NOCHAT, 100, 0, 0); + else { + status_change_end(&sd->bl, SC_NOCHAT, INVALID_TIMER); + clif_manner_message(sd, 5); + } + return true; // status_change_start/status_change_end already sends packets warning the client case SP_FAME: sd->status.fame = val; break; diff --git a/src/map/pc.h b/src/map/pc.h index 161d6988bf..99cc6e55ea 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -203,7 +203,7 @@ struct map_session_data { unsigned short autoloottype; unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish] - struct guild *gmaster_flag; + unsigned int gmaster_flag : 1; unsigned int prevend : 1;//used to flag wheather you've spent 40sp to open the vending or not. unsigned int warping : 1;//states whether you're in the middle of a warp processing unsigned int permanent_speed : 1; // When 1, speed cannot be changed through status_calc_pc(). diff --git a/src/map/skill.c b/src/map/skill.c index 5613195dc9..91cc8b2eb8 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1613,7 +1613,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint case SC_REFRESH: case SC_STONEHARDSKIN: case SC_VITALITYACTIVATION: case SC_FIGHTINGSPIRIT: case SC_ABUNDANCE: case SC__SHADOWFORM: case SC_LEADERSHIP: case SC_GLORYWOUNDS: case SC_SOULCOLD: - case SC_HAWKEYES: case SC_GUILDAURA: case SC_PUSH_CART: + case SC_HAWKEYES: case SC_PUSH_CART: case SC_RAISINGDRAGON: case SC_GT_ENERGYGAIN: case SC_GT_CHANGE: case SC_GT_REVITALIZE: case SC_REFLECTDAMAGE: case SC_INSPIRATION: case SC_EXEEDBREAK: case SC_FORCEOFVANGUARD: case SC_BANDING: @@ -3370,24 +3370,6 @@ static int skill_check_unit_range2 (struct block_list *bl, int x, int y, uint16 map_foreachinarea(npc_isnear_sub,bl->m,x - range,y - range,x + range,y + range,type,skill_id); } -int skill_guildaura_sub (struct map_session_data* sd, int id, int strvit, int agidex) -{ - if(id == sd->bl.id && battle_config.guild_aura&16) - return 0; // Do not affect guild leader - - if (sd->sc.data[SC_GUILDAURA]) { - struct status_change_entry *sce = sd->sc.data[SC_GUILDAURA]; - if( sce->val3 != strvit || sce->val4 != agidex ) { - sce->val3 = strvit; - sce->val4 = agidex; - status_calc_bl(&sd->bl, status_sc2scb_flag(SC_GUILDAURA)); - } - return 0; - } - sc_start4(&sd->bl,&sd->bl, SC_GUILDAURA,100, 1, id, strvit, agidex, 1000); - return 1; -} - /*========================================== * Checks that you have the requirements for casting a skill for homunculus/mercenary. * Flag: @@ -4185,49 +4167,48 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint #ifndef RENEWAL case NJ_ISSEN: - status_change_end(src, SC_NEN, INVALID_TIMER); - status_change_end(src, SC_HIDING, INVALID_TIMER); #endif - // fall through case MO_EXTREMITYFIST: { - short x, y, i = 2; // Move 2 cells for Issen(from target) - struct block_list *mbl = bl; - short dir = 0; + struct block_list *mbl = bl; // For NJ_ISSEN + short x, y, i = 2; // Move 2 cells (From target) + short dir = map_calc_dir(src,bl->x,bl->y); + if (skill_id == MO_EXTREMITYFIST) { + mbl = src; // For MO_EXTREMITYFIST + i = 3; // Move 3 cells (From caster) + } + if (dir > 0 && dir < 4) + x = -i; + else if (dir > 4) + x = i; + else + x = 0; + if (dir > 2 && dir < 6) + y = -i; + else if (dir == 7 || dir < 2) + y = i; + else + y = 0; + // Ashura Strike still has slide effect in GVG + if ((mbl == src || (!map_flag_gvg2(src->m) && !map[src->m].flag.battleground)) && + unit_movepos(src, mbl->x + x, mbl->y + y, 1, 1)) { + clif_slide(src, mbl->x + x, mbl->y + y); + clif_fixpos(src); + clif_spiritball(src); + } skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); - - if( skill_id == MO_EXTREMITYFIST ) - { - mbl = src; - i = 3; // for Asura(from caster) + if (skill_id == MO_EXTREMITYFIST) { status_set_sp(src, 0, 0); status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER); status_change_end(src, SC_BLADESTOP, INVALID_TIMER); #ifdef RENEWAL sc_start(src,src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv)); #endif - }else - status_set_hp(src, -#ifdef RENEWAL - max(status_get_max_hp(src)/100, 1) -#else - 1 -#endif - , 0); - - dir = map_calc_dir(src,bl->x,bl->y); - if( dir > 0 && dir < 4) x = -i; - else if( dir > 4 ) x = i; - else x = 0; - if( dir > 2 && dir < 6 ) y = -i; - else if( dir == 7 || dir < 2 ) y = i; - else y = 0; - if( (mbl == src || (!map_flag_gvg(src->m) && !map[src->m].flag.battleground) ) && // only NJ_ISSEN don't have slide effect in GVG - unit_movepos(src, mbl->x+x, mbl->y+y, 1, 1) ) { - clif_slide(src, src->x, src->y); - //uncomment this if you want to remove MO_EXTREMITYFIST glitchy walking effect. [malufett] - //clif_fixpos(src); + } else { + status_set_hp(src, 1, 0); + status_change_end(src, SC_NEN, INVALID_TIMER); + status_change_end(src, SC_HIDING, INVALID_TIMER); } } break; @@ -4621,34 +4602,36 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill_attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); break; #ifdef RENEWAL - case NJ_ISSEN: // teleport for Issen - { - short x, y, i = 2; // Move 2 cells for Issen(from target) - struct block_list *mbl = bl; - short dir = 0; + case NJ_ISSEN: { + short x, y; + short dir = map_calc_dir(src, bl->x, bl->y); - status_change_end(src, SC_NEN, INVALID_TIMER); - status_change_end(src, SC_HIDING, INVALID_TIMER); - - skill_attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); - - status_set_hp(src,max(status_get_max_hp(src)/100, 1),0); - - dir = map_calc_dir(src,bl->x,bl->y); - if( dir > 0 && dir < 4) x = -i; - else if( dir > 4 ) x = i; - else x = 0; - if( dir > 2 && dir < 6 ) y = -i; - else if( dir == 7 || dir < 2 ) y = i; - else y = 0; - if( (mbl == src || (!map_flag_gvg(src->m) && !map[src->m].flag.battleground) ) && // only NJ_ISSEN don't have slide effect in GVG - unit_movepos(src, mbl->x+x, mbl->y+y, 1, 1) ) { - clif_slide(src, src->x, src->y); - //uncomment this if you want to remove MO_EXTREMITYFIST glitchy walking effect. [malufett] - //clif_fixpos(src); - } + // Move 2 cells (From target) + if (dir > 0 && dir < 4) + x = -2; + else if (dir > 4) + x = 2; + else + x = 0; + if (dir > 2 && dir < 6) + y = -2; + else if (dir == 7 || dir < 2) + y = 2; + else + y = 0; + // Doesn't have slide effect in GVG + if (!map_flag_gvg2(src->m) && !map[src->m].flag.battleground && + unit_movepos(src, bl->x + x, bl->y + y, 1, 1)) { + clif_slide(src, bl->x + x, bl->y + y); + clif_fixpos(src); + clif_spiritball(src); } - break; + skill_attack(BF_MISC, src, src, bl, skill_id, skill_lv, tick, flag); + status_set_hp(src, max(status_get_max_hp(src) / 100, 1), 0); + status_change_end(src, SC_NEN, INVALID_TIMER); + status_change_end(src, SC_HIDING, INVALID_TIMER); + } + break; #endif /** * Rune Knight @@ -4871,7 +4854,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint { int i; // Priority is to release SpellBook - if( sc && sc->data[SC_READING_SB] ) + if( sc && sc->data[SC_FREEZE_SP] ) { // SpellBook uint16 skill_id, skill_lv, point, s = 0; int spell[SC_MAXSPELLBOOK-SC_SPELLBOOK1 + 1]; @@ -4892,10 +4875,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint }else //something went wrong :( break; - if( sc->data[SC_READING_SB]->val2 > point ) - sc->data[SC_READING_SB]->val2 -= point; + if( sc->data[SC_FREEZE_SP]->val2 > point ) + sc->data[SC_FREEZE_SP]->val2 -= point; else // Last spell to be released - status_change_end(src, SC_READING_SB, INVALID_TIMER); + status_change_end(src, SC_FREEZE_SP, INVALID_TIMER); if( bl->type != BL_SKILL ) /* skill types will crash the client */ clif_skill_nodamage(src, bl, skill_id, skill_lv, 1); @@ -7194,7 +7177,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SC_REFRESH: case SC_STONEHARDSKIN: case SC_VITALITYACTIVATION: case SC_FIGHTINGSPIRIT: case SC_ABUNDANCE: case SC__SHADOWFORM: case SC_LEADERSHIP: case SC_GLORYWOUNDS: case SC_SOULCOLD: - case SC_HAWKEYES: case SC_GUILDAURA: case SC_PUSH_CART: + case SC_HAWKEYES: case SC_PUSH_CART: case SC_RAISINGDRAGON: case SC_GT_ENERGYGAIN: case SC_GT_CHANGE: case SC_GT_REVITALIZE: case SC_REFLECTDAMAGE: case SC_INSPIRATION: case SC_EXEEDBREAK: case SC_FORCEOFVANGUARD: case SC_BANDING: @@ -8060,7 +8043,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui uint8 j = 0, calls = 0, called = 0; struct guild *g; // i don't know if it actually summons in a circle, but oh well. ;P - g = sd?sd->state.gmaster_flag:guild_search(status_get_guild_id(src)); + g = sd?sd->guild:guild_search(status_get_guild_id(src)); if (!g) break; @@ -8547,7 +8530,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case AB_PRAEFATIO: if( sd == NULL || sd->status.party_id == 0 || flag&1 ) - clif_skill_nodamage(bl, bl, skill_id, skill_lv, sc_start4(src,bl, type, 100, skill_lv, 0, 0, 1, skill_get_time(skill_id, skill_lv))); + clif_skill_nodamage(bl, bl, skill_id, skill_lv, sc_start4(src, bl, type, 100, skill_lv, 0, 0, ( sd->status.party_id ? party_foreachsamemap(party_sub_count, sd, 0) : 1 ), skill_get_time(skill_id, skill_lv))); else if( sd ) party_foreachsamemap(skill_area_sub, sd, skill_get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill_castend_nodamage_id); break; @@ -8555,10 +8538,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case AB_CHEAL: if( sd == NULL || sd->status.party_id == 0 || flag&1 ) { if( sd && tstatus && !battle_check_undead(tstatus->race, tstatus->def_ele) && !tsc->data[SC_BERSERK] ) { + int partycount = ( sd->status.party_id ? party_foreachsamemap(party_sub_count, sd, 0) : 0 ); + i = skill_calc_heal(src, bl, AL_HEAL, pc_checkskill(sd, AL_HEAL), true); + if( partycount > 1 ) + i += (i / 100) * (partycount * 10) / 4; if( (dstsd && pc_ismadogear(dstsd)) || status_isimmune(bl)) - i = 0; // Should heal by 0 or won't do anything?? in iRO it breaks the healing to members.. [malufett] + i = 0; // Should heal by 0 or won't do anything?? in iRO it breaks the healing to members.. [malufett] clif_skill_nodamage(bl, bl, skill_id, i, 1); if( tsc && tsc->data[SC_AKAITSUKI] && i ) @@ -8684,7 +8671,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SC_NEUTRALBARRIER_MASTER: case SC_NEUTRALBARRIER: case SC_STEALTHFIELD_MASTER: case SC_STEALTHFIELD: case SC_LEADERSHIP: case SC_GLORYWOUNDS: case SC_SOULCOLD: - case SC_HAWKEYES: case SC_GUILDAURA: case SC_PUSH_CART: + case SC_HAWKEYES: case SC_PUSH_CART: case SC_PARTYFLEE: case SC_GT_REVITALIZE: case SC_RAISINGDRAGON: case SC_GT_ENERGYGAIN: case SC_GT_CHANGE: case SC_ANGEL_PROTECT: case SC_MONSTER_TRANSFORM: @@ -8872,7 +8859,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } break; - case WL_READING_SB: + case WL_FREEZE_SP: if( sd ) { struct status_change *sc = status_get_sc(bl); @@ -8880,7 +8867,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( sc && !sc->data[i] ) break; if( i == SC_MAXSPELLBOOK ) { - clif_skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_READING, 0); + clif_skill_fail(sd, WL_FREEZE_SP, USESKILL_FAIL_SPELLBOOK_READING, 0); break; } @@ -14191,7 +14178,7 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i sd->spiritball_old = require.spiritball = sd->spiritball; break; case LG_RAYOFGENESIS: - if( sc && sc->data[SC_INSPIRATION] ) + if( sc && sc->data[SC_INSPIRATION] ) return true; // Don't check for partner. if( !(sc && sc->data[SC_BANDING]) ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL,0); @@ -14200,7 +14187,9 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i return false; // Just fails, no msg here. break; case LG_HESPERUSLIT: - if( !sc || !sc->data[SC_BANDING] ) { + if( sc && sc->data[SC_INSPIRATION] ) + return true; + if( sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 < 3 ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return false; } @@ -15265,14 +15254,14 @@ int skill_vfcastfix (struct block_list *bl, double time, uint16 skill_id, uint16 // Fixed cast non percentage bonuses if( sc->data[SC_MANDRAGORA] ) fixed += sc->data[SC_MANDRAGORA]->val1 * 1000 / 2; - if (sc->data[SC_IZAYOI] && (skill_id >= NJ_TOBIDOUGU && skill_id <= NJ_ISSEN)) - fixed = 0; if( sc->data[SC_GUST_OPTION] || sc->data[SC_BLAST_OPTION] || sc->data[SC_WILD_STORM_OPTION] ) fixed -= 1000; if (sc->data[SC_DANCEWITHWUG]) fixed -= fixed * sc->data[SC_DANCEWITHWUG]->val4 / 100; if( sc->data[SC_HEAT_BARREL] ) fixcast_r = max(fixcast_r, sc->data[SC_HEAT_BARREL]->val2); + if (sc->data[SC_IZAYOI]) + fixed = 0; } if( sd && !(skill_get_castnodex(skill_id, skill_lv)&4) ){ @@ -18221,7 +18210,7 @@ int skill_spellbook (struct map_session_data *sd, int nameid) { for(i=SC_SPELLBOOK1; i <= SC_MAXSPELLBOOK; i++) if( sc && !sc->data[i] ) break; if( i > SC_MAXSPELLBOOK ) { - clif_skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_READING, 0); + clif_skill_fail(sd, WL_FREEZE_SP, USESKILL_FAIL_SPELLBOOK_READING, 0); return 0; } @@ -18229,31 +18218,34 @@ int skill_spellbook (struct map_session_data *sd, int nameid) { if( i == MAX_SKILL_SPELLBOOK_DB ) return 0; if( !pc_checkskill(sd, (skill_id = skill_spellbook_db[i].skill_id)) ) { // User don't know the skill - sc_start(&sd->bl,&sd->bl, SC_SLEEP, 100, 1, skill_get_time(WL_READING_SB, pc_checkskill(sd,WL_READING_SB))); - clif_skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_DIFFICULT_SLEEP, 0); + sc_start(&sd->bl,&sd->bl, SC_SLEEP, 100, 1, skill_get_time(WL_FREEZE_SP, pc_checkskill(sd,WL_FREEZE_SP))); + clif_skill_fail(sd, WL_FREEZE_SP, USESKILL_FAIL_SPELLBOOK_DIFFICULT_SLEEP, 0); return 0; } max_preserve = 4 * pc_checkskill(sd, WL_FREEZE_SP) + status_get_int(&sd->bl) / 10 + sd->status.base_level / 10; point = skill_spellbook_db[i].point; - if( sc && sc->data[SC_READING_SB] ) { - if( (sc->data[SC_READING_SB]->val2 + point) > max_preserve ) { - clif_skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_PRESERVATION_POINT, 0); + if( sc && sc->data[SC_FREEZE_SP] ) { + if( (sc->data[SC_FREEZE_SP]->val2 + point) > max_preserve ) { + clif_skill_fail(sd, WL_FREEZE_SP, USESKILL_FAIL_SPELLBOOK_PRESERVATION_POINT, 0); return 0; } for(i = SC_MAXSPELLBOOK; i >= SC_SPELLBOOK1; i--){ // This is how official saves spellbook. [malufett] if( !sc->data[i] ){ - sc->data[SC_READING_SB]->val2 += point; // increase points + sc->data[SC_FREEZE_SP]->val2 += point; // increase points sc_start4(&sd->bl,&sd->bl, (sc_type)i, 100, skill_id, pc_checkskill(sd,skill_id), point, 0, INVALID_TIMER); break; } } } else { - sc_start2(&sd->bl,&sd->bl, SC_READING_SB, 100, 0, point, INVALID_TIMER); + sc_start2(&sd->bl,&sd->bl, SC_FREEZE_SP, 100, 0, point, INVALID_TIMER); sc_start4(&sd->bl,&sd->bl, SC_MAXSPELLBOOK, 100, skill_id, pc_checkskill(sd,skill_id), point, 0, INVALID_TIMER); } + // Reading Spell Book SP cost same as the sealed spell. + status_zap(&sd->bl, 0, skill_get_sp(skill_id, pc_checkskill(sd, skill_id))); + return 1; } diff --git a/src/map/skill.h b/src/map/skill.h index f3d1552ef7..909b88a59d 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -399,9 +399,6 @@ int skill_unit_move_unit_group( struct skill_unit_group *group, int16 m,int16 dx struct skill_unit_group *skill_check_dancing( struct block_list *src ); -// Guild skills [celest] -int skill_guildaura_sub (struct map_session_data* sd, int id, int strvit, int agidex); - // Chant canceled int skill_castcancel(struct block_list *bl,int type); diff --git a/src/map/status.c b/src/map/status.c index 9ed57e9e80..46e56c2f12 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -873,6 +873,7 @@ void initChangeTables(void) StatusIconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5; StatusIconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6; StatusIconChangeTable[SC_MAXSPELLBOOK] = SI_SPELLBOOK7; + StatusIconChangeTable[SC_FREEZE_SP] = SI_FREEZE_SP; StatusIconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER; StatusIconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER; @@ -898,7 +899,6 @@ void initChangeTables(void) StatusIconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER; - StatusIconChangeTable[SC_TEARGAS_SOB] = SI_BLANK; StatusIconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE; StatusIconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER; StatusIconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB; @@ -8051,13 +8051,15 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty case SC_LERADSDEW: case SC_MELODYOFSINK: case SC_BEYONDOFWARCRY: - case SC_UNLIMITEDHUMMINGVOICE: // Group B + case SC_UNLIMITEDHUMMINGVOICE: + case SC_SIRCLEOFNATURE: // Group B if (type != SC_VOICEOFSIREN) status_change_end(bl, SC_VOICEOFSIREN, INVALID_TIMER); if (type != SC_DEEPSLEEP) status_change_end(bl, SC_DEEPSLEEP, INVALID_TIMER); if (type != SC_LERADSDEW) status_change_end(bl, SC_LERADSDEW, INVALID_TIMER); if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER); if (type != SC_BEYONDOFWARCRY) status_change_end(bl, SC_BEYONDOFWARCRY, INVALID_TIMER); if (type != SC_UNLIMITEDHUMMINGVOICE) status_change_end(bl, SC_UNLIMITEDHUMMINGVOICE, INVALID_TIMER); + if (type != SC_SIRCLEOFNATURE) status_change_end(bl, SC_SIRCLEOFNATURE, INVALID_TIMER); if (type != SC_GLOOMYDAY) { status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER); status_change_end(bl, SC_GLOOMYDAY_SK, INVALID_TIMER); @@ -8290,16 +8292,12 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty val2 = val1*20; // SP gained break; case SC_KYRIE: - if( sd ) - val1 = min(val1,pc_checkskill(sd,PR_KYRIE)); // Use skill level to determine barrier health. - val2 = (int64)status->max_hp * (val1 * 2 + 10) / 100; // %Max HP to absorb - // val4 holds current amount of party members when casting Praefatio - // as Praefatio's barrier has more health and blocks more hits than Kyrie Elesion. - if( val4 < 1 ) // == PR_KYRIE + if( val4 ) { // Formulas for Praefatio + val2 = (status->max_hp * (val1 * 2 + 10) / 100) + val4 * 2; //%Max HP to absorb + val3 = 6 + val1; //Hits + } else { // Formulas for Kyrie Eleison + val2 = status->max_hp * (val1 * 2 + 10) / 100; val3 = (val1 / 2 + 5); - else { // == AB_PRAEFATIO - val2 += val4 * 2; // Increase barrier strength per party member. - val3 = 6 + val1; } break; case SC_MAGICPOWER: @@ -8456,7 +8454,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty unit_stop_attack(bl); break; case SC_NOCHAT: - // !FIXME: is this correct? a hardcoded interval of 60sec? what about configuration ?_? + // A hardcoded interval of 60 seconds is expected, as the time that SC_NOCHAT uses is defined by + // mmocharstatus.manner, each negative point results in 1 minute with this status activated. + // This is done this way because the message that the client displays is hardcoded, and only + // shows how many minutes are remaining. [Panikon] tick = 60000; val1 = battle_config.manner_system; // Mute filters. if (sd) { @@ -9153,9 +9154,9 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty val2 = 6 * val1; // AGI and DEX Reduction val3 = 10 * val1; // Movement Speed Reduction break; - case SC_READING_SB: - // val2 = sp reduction per second - tick_time = 5000; // [GodLesZ] tick time + case SC_FREEZE_SP: + // val2 = sp drain per 10 seconds + tick_time = 10000; // [GodLesZ] tick time break; case SC_SPHERE_1: case SC_SPHERE_2: @@ -11589,7 +11590,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) } break; - case SC_READING_SB: + case SC_FREEZE_SP: if( !status_charge(bl, 0, sce->val2) ) { int i; for(i = SC_SPELLBOOK1; i <= SC_MAXSPELLBOOK; i++) // Also remove stored spell as well. @@ -12054,7 +12055,6 @@ void status_change_clear_buffs (struct block_list* bl, int type) case SC_GLORYWOUNDS: case SC_SOULCOLD: case SC_HAWKEYES: - case SC_GUILDAURA: case SC_SAFETYWALL: case SC_PNEUMA: case SC_NOCHAT: diff --git a/src/map/status.h b/src/map/status.h index e01ffe7931..23fd92e093 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -392,7 +392,7 @@ typedef enum sc_type { SC_SPHERE_4,//340 SC_SPHERE_5, SC_READING_SB, - SC_FREEZINGSPELL, + SC_FREEZE_SP, /** * Ranger **/