diff --git a/ElunaIncludes.h b/ElunaIncludes.h index 99dabd1..7c2070f 100644 --- a/ElunaIncludes.h +++ b/ElunaIncludes.h @@ -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 diff --git a/PlayerMethods.h b/PlayerMethods.h index 622ceb1..7736f10 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -3877,7 +3877,11 @@ 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 } diff --git a/UnitMethods.h b/UnitMethods.h index 5b9feab..7e92971 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -2177,8 +2177,12 @@ namespace LuaUnit float maxHeight = Eluna::CHECKVAL(L, 6); uint32 id = Eluna::CHECKVAL(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(L, 2, NULL); uint32 spell = Eluna::CHECKVAL(L, 3); bool triggered = Eluna::CHECKVAL(L, 4, false); +#if defined(CMANGOS) && defined(WOTLK) + SpellEntry const* spellEntry = GetSpellStore()->LookupEntry(spell); +#else SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell); +#endif if (!spellEntry) return 0; @@ -2419,7 +2427,11 @@ namespace LuaUnit { uint32 spellId = Eluna::CHECKVAL(L, 2); Unit* target = Eluna::CHECKOBJ(L, 3); +#if defined(CMANGOS) && defined(WOTLK) + SpellEntry const* spellInfo = GetSpellStore()->LookupEntry(spellId); +#else SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId); +#endif if (!spellInfo) return 1; @@ -2657,8 +2669,13 @@ namespace LuaUnit bool critical = Eluna::CHECKVAL(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(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(spell); +#else + SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell); +#endif + unit->AddThreat(victim, threat, false, (SpellSchoolMask)schoolMask, spellEntry); #endif return 0; }