EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Newer Stat Categories (SoF+) (https://www.eqemulator.org/forums/showthread.php?t=31167)

Kilralpine 04-27-2010 04:21 PM

Newer Stat Categories (SoF+)
 
I was just wondering, when will there be support for the newer stats available on the SoF client.... particullarly spell damage.

Secrets 04-27-2010 11:04 PM

Quote:

Originally Posted by Kilralpine (Post 187172)
I was just wondering, when will there be support for the newer stats available on the SoF client.... particullarly spell damage.

Whenever a developer gets around to it, or you could submit a patch yourself.

I also posted spell damage scaling examples around here somewhere, but it had a null pointer check missing. You could also try this, I wrote this for the EZ server because they wanted a way to scale melee damage, spell damage, etc, to a stackable % modifier.

Code:

Index: aggro.cpp
===================================================================
--- aggro.cpp        (revision 1424)
+++ aggro.cpp        (working copy)
@@ -1239,6 +1239,7 @@
                        case SE_HitChance:
                        case SE_DamageModifier:
                        case SE_MinDamageModifier:
+                        case SE_MinDamageModifierV2:
                        case SE_IncreaseBlockChance:
                        case SE_Accuracy:
                        case SE_DamageShield:
Index: attack.cpp
===================================================================
--- attack.cpp        (revision 1424)
+++ attack.cpp        (working copy)
@@ -3923,6 +3923,7 @@
        if(spellbonuses.DamageModifierSkill == skill || spellbonuses.DamageModifierSkill == 255){
                damage += ((damage * spellbonuses.DamageModifier)/100);
        }
+        damage += ((damage * spellbonuses.DamageModifierV2)/100);
 
        if(itembonuses.DamageModifierSkill == skill || itembonuses.DamageModifierSkill == 255){
                damage += ((damage * itembonuses.DamageModifier)/100);
Index: bonuses.cpp
===================================================================
--- bonuses.cpp        (revision 1424)
+++ bonuses.cpp        (working copy)
@@ -1088,6 +1088,32 @@
                                        newbon->MinDamageModifier = effect_value;
                                break;
                        }
+
+                        case SE_MinDamageModifierV2:
+                        {
+                                newbon->DamageModifierV2 += effect_value;
+                                break;
+                        }
+                        case SE_DamageModifierSpell:
+                        {
+                                newbon->DamageModifierSpell += effect_value;
+                                break;
+                        }
+                        case SE_DamageModifierDOT:
+                        {
+                                newbon->DamageModifierDOT += effect_value;
+                                break;
+                        }
+                        case SE_HealingModifierSpell:
+                        {
+                                newbon->HealingModifierSpell += effect_value;
+                                break;
+                        }
+                        case SE_HealingModifierDOT:
+                        {
+                                newbon->HealingModifierDOT += effect_value;
+                                break;
+                        }
                               
                        case SE_StunResist:
                        {
Index: effects.cpp
===================================================================
--- effects.cpp        (revision 1424)
+++ effects.cpp        (working copy)
@@ -64,6 +64,11 @@
                modifier += GetFocusEffect(focusImprovedDamage, spell_id);
        }
       
+        if(IsOverTimeSpell(spell_id))
+        modifier += spellbonuses.DamageModifierDOT;
+        else
+        modifier += spellbonuses.DamageModifierSpell;
+
        // Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40.
        if ( spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2 || spell_id == SPELL_IMP_HARM_TOUCH ) {
                if (this->GetLevel() > 40)
@@ -222,6 +227,10 @@
        sint32 modifier = 100;
 
        modifier += GetFocusEffect(focusImprovedHeal, spell_id);
+        if(IsOverTimeSpell(spell_id))
+        modifier += spellbonuses.HealingModifierDOT;
+        else
+        modifier += spellbonuses.HealingModifierSpell;
                                               
        if(spells[spell_id].buffduration < 1) {
                //non-dot
Index: mob.h
===================================================================
--- mob.h        (revision 1424)
+++ mob.h        (working copy)
@@ -234,6 +234,11 @@
        uint8  HitChanceSkill;
        sint16 DamageModifier;                //needs to be thought about more and implemented
        uint8  DamageModifierSkill;
+        sint16 DamageModifierV2;
+        sint16 DamageModifierSpell;
+        sint16 DamageModifierDOT;
+        sint16 HealingModifierSpell;
+        sint16 HealingModifierDOT;
        sint16 MinDamageModifier;  //i
        sint16 ProcChance;                        // ProcChance/10 == % increase i
        sint16 ExtraAttackChance;
Index: spdat.cpp
===================================================================
--- spdat.cpp        (revision 1424)
+++ spdat.cpp        (working copy)
@@ -162,7 +162,20 @@
        return false;
 }
 
+bool IsOverTimeSpell(int16 spellid) {
+        for (int o = 0; o < EFFECT_COUNT; o++)
+        {
+                int32 tid = spells[spellid].buffduration;
+                {
+                        if(tid > 0)
+                        return true;
+                }
+        }
+        return false;
+}
 
+
+
 bool IsFearSpell(int16 spell_id) {
        return IsEffectInSpell(spell_id, SE_Fear);
 }
Index: spdat.h
===================================================================
--- spdat.h        (revision 1424)
+++ spdat.h        (working copy)
@@ -32,7 +32,6 @@
 #define SPELL_IMP_HARM_TOUCH 2774
 #define SPELL_NPC_HARM_TOUCH 929
 
-
 //#define SPDAT_SIZE                1824000
 /*
    solar: look at your spells_en.txt and find the id of the last spell.
@@ -315,7 +314,7 @@
 #define SE_HitChance                                184
 #define SE_DamageModifier                        185
 #define SE_MinDamageModifier                186
-//#define SE_Unknown187                                187        //not used
+#define SE_MinDamageModifierV2                187        //not used
 #define SE_IncreaseBlockChance                188        //not implemented
 #define SE_CurrentEndurance                        189
 #define SE_EndurancePool                        190        //not implemented
@@ -338,10 +337,10 @@
 #define SE_FleshToBone                                207
 //#define SE_Unknown208                                208        //not used
 #define SE_FadingMemories2                        209
-#define SE_PetShield                                210        //per lucy, not implemented
-#define SE_AEMelee                                        211        //per lucy, not implemented
-#define SE_ProlongedDestruction                212        //per lucy, not implemented
-//#define SE_Unknown213                                213        //not used
+#define SE_DamageModifierSpell                210        //per lucy, not implemented
+#define SE_DamageModifierDOT                211        //per lucy, not implemented
+#define SE_HealingModifierSpell                212        //per lucy, not implemented
+#define SE_HealingModifierDOT                213        //not used
 #define SE_MaxHPChange                                214        //Grace of the Order, Plague of Hulcror, not implemented
 //#define SE_Unknown215                                215        //not used
 #define SE_Accuracy                                        216        //not implemented
@@ -676,6 +675,7 @@
 bool IsSummonSpell(int16 spellid);
 bool IsEvacSpell(int16 spellid);
 bool IsDamageSpell(int16 spellid);
+bool IsOverTimeSpell(int16 spellid);
 bool IsFearSpell(int16 spellid);
 bool BeneficialSpell(int16 spell_id);
 bool GroupOnlySpell(int16 spell_id);
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp        (revision 1424)
+++ spell_effects.cpp        (working copy)
@@ -2407,7 +2407,16 @@
                                break;
                        }
 
+                        case SE_MinDamageModifierV2:
+                        {
+#ifdef SPELL_EFFECT_SPAM
+                                snprintf(effect_desc, _EDLEN, "Damage Modifier v2: +%+i%%", effect_value);
+#endif
+                                // handled with bonuses
+                                break;
+                        }
 
+
                        case SE_StunResist:
                        {
 #ifdef SPELL_EFFECT_SPAM
@@ -3255,6 +3264,33 @@
 
                switch (spells[buffs[slot].spellid].effectid[i])
                {
+
+                        case SE_MinDamageModifierV2:
+                        {
+                        spellbonuses.DamageModifierV2 -= (spells[buffs[slot].spellid].base[i]);
+                        break;
+                        }
+                        case SE_DamageModifierSpell:
+                        {
+                        spellbonuses.DamageModifierSpell -= (spells[buffs[slot].spellid].base[i]);
+                        break;
+                        }
+                        case SE_DamageModifierDOT:
+                        {
+                        spellbonuses.DamageModifierDOT -= (spells[buffs[slot].spellid].base[i]);
+                        break;
+                        }
+                        case SE_HealingModifierSpell:
+                        {
+                        spellbonuses.HealingModifierSpell -= (spells[buffs[slot].spellid].base[i]);
+                        break;
+                        }
+                        case SE_HealingModifierDOT:
+                        {
+                        spellbonuses.HealingModifierDOT -= (spells[buffs[slot].spellid].base[i]);
+                        break;
+                        }
+
                        case SE_WeaponProc:
                        {
                                uint16 procid = GetProcID(buffs[slot].spellid, i);



All times are GMT -4. The time now is 06:18 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.