Permalink
Browse files

Fix cmangos classic build

1 parent fba5392 commit 57214b69c71d6a0d5ff2a353b4e3f8881317fe86 @Rochet2 Rochet2 committed Dec 16, 2016
Showing with 16 additions and 0 deletions.
  1. +16 −0 UnitMethods.h
View
@@ -2291,7 +2291,11 @@ namespace LuaUnit
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
#ifdef CMANGOS
+#ifdef CLASSIC
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry(spell);
+#else
SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#endif
#else
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
#endif
@@ -2428,7 +2432,11 @@ namespace LuaUnit
uint32 spellId = Eluna::CHECKVAL<uint32>(L, 2);
Unit* target = Eluna::CHECKOBJ<Unit>(L, 3);
#ifdef CMANGOS
+#ifdef CLASSIC
+ SpellEntry const* spellInfo = GetSpellStore()->LookupEntry(spellId);
+#else
SpellEntry const* spellInfo = GetSpellStore()->LookupEntry<SpellEntry>(spellId);
+#endif
#else
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
#endif
@@ -2670,7 +2678,11 @@ namespace LuaUnit
#ifndef TRINITY
#ifdef CMANGOS
+#ifdef CLASSIC
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry(spell);
+#else
SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#endif
#else
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
#endif
@@ -2743,7 +2755,11 @@ namespace LuaUnit
unit->AddThreat(victim, threat, (SpellSchoolMask)schoolMask, spell ? sSpellMgr->GetSpellInfo(spell) : NULL);
#else
#ifdef CMANGOS
+#ifdef CLASSIC
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry(spell);
+#else
SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#endif
#else
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
#endif

2 comments on commit 57214b6

@Salja
Contributor
Salja commented on 57214b6 Dec 29, 2016

note for me revert this when im home or rochet is faster =)

@Rochet2
Member
Rochet2 commented on 57214b6 Jan 2, 2017

@Salja reverted in 6ca6f90

Please sign in to comment.