Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo *GetSpellProto is now GetSpellInfo *SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].* *sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo() *SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff() *SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class. *GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections *code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "ZoneScript.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) : _me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry)
|
||||
{
|
||||
@@ -73,11 +75,11 @@ void Vehicle::Install()
|
||||
if (!creature->m_spells[i])
|
||||
continue;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(creature->m_spells[i]);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(creature->m_spells[i]);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
if (spellInfo->powerType == POWER_ENERGY)
|
||||
if (spellInfo->PowerType == POWER_ENERGY)
|
||||
{
|
||||
_me->setPowerType(POWER_ENERGY);
|
||||
_me->SetMaxPower(POWER_ENERGY, 100);
|
||||
|
||||
Reference in New Issue
Block a user