Skip to content

Commit 740aebf

Browse files
xfurrySchmoozerd
authored andcommitted
[c2820] Use the new ScriptEffect call in SD2. Requires CMangos [c12572]
(based on commit [2820] - 511fa72) Signed-off-by: Schmoozerd <[email protected]>
1 parent 9f44dc1 commit 740aebf

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

ScriptMgr.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,17 @@ bool EffectDummyItem(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, I
591591
return pTempScript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget);
592592
}
593593

594+
MANGOS_DLL_EXPORT
595+
bool EffectScriptEffectCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget)
596+
{
597+
Script* pTempScript = m_scripts[pTarget->GetScriptId()];
598+
599+
if (!pTempScript || !pTempScript->pEffectScriptEffectNPC)
600+
return false;
601+
602+
return pTempScript->pEffectScriptEffectNPC(pCaster, spellId, effIndex, pTarget);
603+
}
604+
594605
MANGOS_DLL_EXPORT
595606
bool AuraDummy(Aura const* pAura, bool bApply)
596607
{

ScriptMgr.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ struct Script
6868
pQuestAcceptNPC(NULL), pQuestAcceptGO(NULL), pQuestAcceptItem(NULL),
6969
pQuestRewardedNPC(NULL), pQuestRewardedGO(NULL),
7070
pGOUse(NULL), pItemUse(NULL), pAreaTrigger(NULL), pProcessEventId(NULL),
71-
pEffectDummyNPC(NULL), pEffectDummyGO(NULL), pEffectDummyItem(NULL), pEffectAuraDummy(NULL),
72-
GetAI(NULL), GetInstanceData(NULL)
71+
pEffectDummyNPC(NULL), pEffectDummyGO(NULL), pEffectDummyItem(NULL), pEffectScriptEffectNPC(NULL),
72+
pEffectAuraDummy(NULL), GetAI(NULL), GetInstanceData(NULL)
7373
{}
7474

7575
std::string Name;
@@ -94,6 +94,7 @@ struct Script
9494
bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*);
9595
bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*);
9696
bool (*pEffectDummyItem)(Unit*, uint32, SpellEffectIndex, Item*);
97+
bool (*pEffectScriptEffectNPC)(Unit*, uint32, SpellEffectIndex, Creature*);
9798
bool (*pEffectAuraDummy)(const Aura*, bool);
9899

99100
CreatureAI* (*GetAI)(Creature*);

sd2_revision_nr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "2819"
3+
#define SD2_REVISION_NR "2820"
44
#endif // __SD2_REVISION_NR_H__

sql/scriptdev2_script_full.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--
44

55
DELETE FROM sd2_db_version;
6-
INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS c12470+) ');
6+
INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS c12572+) ');
77

88
--
99
-- Below contains data for table `script_texts` mainly used in C++ parts.

sql/updates/r2820_scriptdev2.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS c12572+) ';

0 commit comments

Comments
 (0)