diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 132f3290b..ce0c5602f 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -1730,6 +1730,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) { sp[tempid].NimbusEffect = atoi(row[193]); sp[tempid].directional_start = (float)atoi(row[194]); sp[tempid].directional_end = (float)atoi(row[195]); + sp[tempid].not_extendable = atoi(row[197]) != 0; sp[tempid].suspendable = atoi(row[200]) != 0; sp[tempid].spellgroup=atoi(row[207]); sp[tempid].powerful_flag=atoi(row[209]); diff --git a/common/spdat.h b/common/spdat.h index 13fc4bff1..578fc569f 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -710,7 +710,9 @@ struct SPDat_Spell_Struct /* 193 */ int NimbusEffect; /* 194 */ float directional_start; /* 195 */ float directional_end; -/* 196 - 199 */ +/* 196 */ +/* 197 */ bool not_extendable; +/* 198- 199 */ /* 200 */ bool suspendable; // buff is suspended in suspended buff zones /* 201 - 202 */ /* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented) diff --git a/utils/sql/git/required/2014_01_29_Not_Extendable.sql b/utils/sql/git/required/2014_01_29_Not_Extendable.sql new file mode 100644 index 000000000..886db4b57 --- /dev/null +++ b/utils/sql/git/required/2014_01_29_Not_Extendable.sql @@ -0,0 +1 @@ +ALTER TABLE `spells_new` CHANGE `field197` `not_extendable` INT(11) NOT NULL DEFAULT '0'; diff --git a/zone/effects.cpp b/zone/effects.cpp index 87b8f3742..ba071ae49 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -400,14 +400,16 @@ int32 Client::GetActSpellCost(uint16 spell_id, int32 cost) int32 Client::GetActSpellDuration(uint16 spell_id, int32 duration) { + if (spells[spell_id].not_extendable) + return duration; + int increase = 100; increase += GetFocusEffect(focusSpellDuration, spell_id); int tic_inc = 0; tic_inc = GetFocusEffect(focusSpellDurByTic, spell_id); - if(IsBeneficialSpell(spell_id)) - { - switch(GetAA(aaSpellCastingReinforcement)) { + if (IsBeneficialSpell(spell_id)) { + switch (GetAA(aaSpellCastingReinforcement)) { case 1: increase += 5; break; @@ -422,16 +424,16 @@ int32 Client::GetActSpellDuration(uint16 spell_id, int32 duration) } } - if(IsMezSpell(spell_id)) { + if (IsMezSpell(spell_id)) tic_inc += GetAA(aaMesmerizationMastery); - } + // Only need this for clients, since the change was for bard songs, I assume we should keep non bard songs getting +1 // However if its bard or not and is mez, charm or fear, we need to add 1 so that client is in sync - if(!IsShortDurationBuff(spell_id) || - IsFearSpell(spell_id) || - IsCharmSpell(spell_id) || - IsMezSpell(spell_id) || - IsBlindSpell(spell_id)) + if (!IsShortDurationBuff(spell_id) || + IsFearSpell(spell_id) || + IsCharmSpell(spell_id) || + IsMezSpell(spell_id) || + IsBlindSpell(spell_id)) tic_inc += 1; return (((duration * increase) / 100) + tic_inc);