mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
*Allow scripts to override SQL and DBC data.
--HG-- branch : trunk
This commit is contained in:
@@ -64,6 +64,8 @@ uint32 EAI_ErrorLevel;
|
||||
//*** End EventAI data ***
|
||||
|
||||
void FillSpellSummary();
|
||||
void LoadOverridenSQLData();
|
||||
void LoadOverridenDBCData();
|
||||
|
||||
// -- Scripts to be added --
|
||||
|
||||
@@ -1816,6 +1818,11 @@ void ScriptsInit()
|
||||
// -------------------
|
||||
|
||||
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
|
||||
|
||||
outstring_log(">> Load Overriden SQL Data.");
|
||||
LoadOverridenSQLData();
|
||||
outstring_log(">> Load Overriden DBC Data.");
|
||||
LoadOverridenDBCData();
|
||||
}
|
||||
|
||||
//*********************************
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "precompiled.h"
|
||||
#include "Item.h"
|
||||
#include "Spell.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
// Spell summary for ScriptedAI::SelectSpell
|
||||
struct TSpellSummary {
|
||||
@@ -828,3 +829,23 @@ void Scripted_NoMovementAI::AttackStart(Unit* who)
|
||||
DoStartNoMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
void LoadOverridenSQLData()
|
||||
{
|
||||
GameObjectInfo *goInfo;
|
||||
|
||||
// Sunwell Plateau : Kalecgos : Spectral Rift
|
||||
goInfo = const_cast<GameObjectInfo*>(GetGameObjectInfo(187055));
|
||||
if(goInfo && goInfo->type == GAMEOBJECT_TYPE_GOOBER)
|
||||
goInfo->goober.lockId = 1714; // need LOCKTYPE_QUICK_OPEN
|
||||
}
|
||||
|
||||
void LoadOverridenDBCData()
|
||||
{
|
||||
SpellEntry *spellInfo;
|
||||
|
||||
// Black Temple : Illidan : Parasitic Shadowfiend Passive
|
||||
spellInfo = const_cast<SpellEntry*>(GetSpellStore()->LookupEntry(41913));
|
||||
if(spellInfo)
|
||||
spellInfo->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends
|
||||
}
|
||||
|
||||
@@ -365,10 +365,6 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||
Reset();
|
||||
|
||||
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SHADOWFIEND_PASSIVE);
|
||||
if(TempSpell)
|
||||
TempSpell->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
@@ -24,7 +24,6 @@ EndScriptData */
|
||||
#include "precompiled.h"
|
||||
#include "def_magisters_terrace.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
#define SAY_AGGRO -1585023 //This yell should be done when the room is cleared. For now, set it as aggro yell.
|
||||
#define SAY_PHOENIX -1585024
|
||||
|
||||
@@ -7553,6 +7553,16 @@ ObjectMgr::ScriptNameMap & GetScriptNames()
|
||||
return objmgr.GetScriptNames();
|
||||
}
|
||||
|
||||
GameObjectInfo const *GetGameObjectInfo(uint32 id)
|
||||
{
|
||||
return objmgr.GetGameObjectInfo(id);
|
||||
}
|
||||
|
||||
CreatureInfo const *GetCreatureInfo(uint32 id)
|
||||
{
|
||||
return objmgr.GetCreatureTemplate(id);
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadTransportEvents()
|
||||
{
|
||||
|
||||
|
||||
@@ -944,5 +944,7 @@ TRINITY_DLL_SPEC bool LoadTrinityStrings(DatabaseType& db, char const* table,int
|
||||
TRINITY_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 trigger_id);
|
||||
TRINITY_DLL_SPEC uint32 GetScriptId(const char *name);
|
||||
TRINITY_DLL_SPEC ObjectMgr::ScriptNameMap& GetScriptNames();
|
||||
TRINITY_DLL_SPEC GameObjectInfo const *GetGameObjectInfo(uint32 id);
|
||||
TRINITY_DLL_SPEC CreatureInfo const *GetCreatureInfo(uint32 id);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user