Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
- index 84ae300..0ec9529 100644
- --- a/src/server/game/DataStores/DBCStores.cpp
- +++ b/src/server/game/DataStores/DBCStores.cpp
- @@ -214,6 +214,7 @@ DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItems
- DBCStorage <SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsEntryfmt);
- DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsEntryfmt);
- DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt);
- +std::map<uint32, std::vector<SpellProcsPerMinuteModEntry const*>> sSpellProcsPerMinuteMods;
- DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsEntryfmt);
- DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsEntryfmt);
- @@ -1241,3 +1242,12 @@ uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId)
- {
- return PowersByClass[classId][powerType];
- }
- +
- +std::vector<SpellProcsPerMinuteModEntry const*> GetSpellProcsPerMinuteMods(uint32 spellprocsPerMinuteId)
- +{
- + auto itr = sSpellProcsPerMinuteMods.find(spellprocsPerMinuteId);
- + if (itr != sSpellProcsPerMinuteMods.end())
- + return itr->second;
- +
- + return std::vector<SpellProcsPerMinuteModEntry const*>();
- +}
- \ No newline at end of file
- diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
- index e5d467f..99eb611 100644
- --- a/src/server/game/DataStores/DBCStores.h
- +++ b/src/server/game/DataStores/DBCStores.h
- @@ -32,6 +32,7 @@ char const* GetPetName(uint32 petfamily, uint32 dbclang);
- SpellEffectEntry const* GetSpellEffectEntry(uint32 spellId, uint32 effect, uint32 difficulty);
- SpellEffectScalingEntry const* GetSpellEffectScalingEntry(uint32 effectId);
- SpellTotemsEntry const* GetSpellTotemEntry(uint32 spellId, uint8 totem);
- +std::vector<SpellProcsPerMinuteModEntry const*> GetSpellProcsPerMinuteMods(uint32 spellprocsPerMinuteId);
- int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
- AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
- @@ -205,6 +206,7 @@ extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
- extern DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
- extern DBCStorage <SpellEntry> sSpellStore;
- extern DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore;
- +extern DBCStorage <SpellProcsPerMinuteEntry> sSpellProcsPerMinuteStore;
- extern DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
- extern DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore;
- extern DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore;
- diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
- index aa35cc2..67a2627 100644
- --- a/src/server/game/DataStores/DBCStructure.h
- +++ b/src/server/game/DataStores/DBCStructure.h
- @@ -2474,6 +2474,24 @@ struct SpellAuraOptionsEntry
- uint32 spellProcsPerMinuteId; // 8
- };
- +// SpellProcsPerMinute.dbc
- +struct SpellProcsPerMinuteEntry
- +{
- + uint32 Id; // 0 m_ID
- + float ProcsPerMinute; // 1 m_procsPerMinute
- + uint32 Flags; // 2
- +};
- +
- +// SpellProcsPerMinute.dbc
- +struct SpellProcsPerMinuteModEntry
- +{
- + uint32 Id; // 0
- + uint32 Type; // 1
- + uint32 Param; // 2
- + float Coeff; // 3
- + uint32 SpellProcsPerMinuteID; // 4
- +};
- +
- // SpellAuraRestrictions.dbc/
- // @author Selenium: 5.4 valid
- struct SpellAuraRestrictionsEntry
- diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
- index 0326af5..fb85559 100644
- --- a/src/server/game/Spells/SpellInfo.cpp
- +++ b/src/server/game/Spells/SpellInfo.cpp
- @@ -936,10 +936,14 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, uint32 difficulty)
- // SpellAuraOptionsEntry
- SpellAuraOptionsEntry const* _options = GetSpellAuraOptions();
- + SpellProcsPerMinuteEntry const* _ppm = _options ? sSpellProcsPerMinuteStore.LookupEntry(_options->spellProcsPerMinuteId) : nullptr;
- ProcFlags = _options ? _options->procFlags : 0;
- ProcChance = _options ? _options->procChance : 0;
- ProcCharges = _options ? _options->procCharges : 0;
- StackAmount = _options ? _options->StackAmount : 0;
- + ProcsPerMinute = _ppm ? _ppm->ProcsPerMinute : 0.0f;
- + if (_options)
- + ProcPPMMods = GetSpellProcsPerMinuteMods(_options->spellProcsPerMinuteId);
- // SpellAuraRestrictionsEntry
- SpellAuraRestrictionsEntry const* _aura = GetSpellAuraRestrictions();
- diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
- index f58a3ea..dd9a2b1 100644
- --- a/src/server/game/Spells/SpellInfo.h
- +++ b/src/server/game/Spells/SpellInfo.h
- @@ -348,6 +348,8 @@ public:
- SpellRangeEntry const* RangeEntry;
- float Speed;
- uint32 StackAmount;
- + float ProcsPerMinute;
- + std::vector<SpellProcsPerMinuteModEntry const*> ProcPPMMods;
- uint32 Totem[2];
- int32 Reagent[MAX_SPELL_REAGENTS];
- uint32 ReagentCount[MAX_SPELL_REAGENTS];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement