Permalink
Browse files

Fix cmangos wotlk build

  • Loading branch information...
1 parent b627028 commit 0e7834986126b73cbce9737709bc895afada2373 @Rochet2 Rochet2 committed Dec 16, 2016
Showing with 33 additions and 3 deletions.
  1. +4 −0 ElunaIncludes.h
  2. +4 −0 PlayerMethods.h
  3. +25 −3 UnitMethods.h
View
@@ -128,6 +128,10 @@ typedef ThreatContainer::StorageType ThreatList;
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
#endif
+#ifdef WOTLK
+#define UNIT_BYTE2_FLAG_SANCTUARY UNIT_BYTE2_FLAG_SUPPORTABLE
+#endif
+
typedef TemporarySummon TempSummon;
typedef SpellEntry SpellInfo;
enum SelectAggroTarget
View
@@ -3877,8 +3877,12 @@ namespace LuaPlayer
data << uint32(0); // unk
data << uint8(0); // count
data << uint32(0); // unk
+#ifdef CMANGOS
+ invited->GetSession()->SendPacket(data);
+#else
invited->GetSession()->SendPacket(&data);
#endif
+#endif
}
Eluna::Push(L, success);
View
@@ -2177,8 +2177,12 @@ namespace LuaUnit
float maxHeight = Eluna::CHECKVAL<float>(L, 6);
uint32 id = Eluna::CHECKVAL<uint32>(L, 7, 0);
+#if defined(CMANGOS) && defined(WOTLK)
+ unit->GetMotionMaster()->MoveJump(x, y, z, zSpeed, maxHeight, id);
+#else
Position pos(x, y, z);
unit->GetMotionMaster()->MoveJump(pos, zSpeed, maxHeight, id);
+#endif
return 0;
}
#endif
@@ -2286,7 +2290,11 @@ namespace LuaUnit
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2, NULL);
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
+#if defined(CMANGOS) && defined(WOTLK)
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#else
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
+#endif
if (!spellEntry)
return 0;
@@ -2419,7 +2427,11 @@ namespace LuaUnit
{
uint32 spellId = Eluna::CHECKVAL<uint32>(L, 2);
Unit* target = Eluna::CHECKOBJ<Unit>(L, 3);
+#if defined(CMANGOS) && defined(WOTLK)
+ SpellEntry const* spellInfo = GetSpellStore()->LookupEntry<SpellEntry>(spellId);
+#else
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
+#endif
if (!spellInfo)
return 1;
@@ -2657,8 +2669,13 @@ namespace LuaUnit
bool critical = Eluna::CHECKVAL<bool>(L, 5, false);
#ifndef TRINITY
- if (const SpellInfo* info = sSpellStore.LookupEntry(spell))
- unit->DealHeal(target, amount, info, critical);
+#if defined(CMANGOS) && defined(WOTLK)
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#else
+ SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
+#endif
+ if (spellEntry)
+ unit->DealHeal(target, amount, spellEntry, critical);
#else
if (const SpellInfo* info = sSpellMgr->GetSpellInfo(spell))
{
@@ -2725,7 +2742,12 @@ namespace LuaUnit
#ifdef TRINITY
unit->AddThreat(victim, threat, (SpellSchoolMask)schoolMask, spell ? sSpellMgr->GetSpellInfo(spell) : NULL);
#else
- unit->AddThreat(victim, threat, false, (SpellSchoolMask)schoolMask, spell ? sSpellStore.LookupEntry(spell) : NULL);
+#if defined(CMANGOS) && defined(WOTLK)
+ SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
+#else
+ SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell);
+#endif
+ unit->AddThreat(victim, threat, false, (SpellSchoolMask)schoolMask, spellEntry);
#endif
return 0;
}

0 comments on commit 0e78349

Please sign in to comment.