diff --git a/ElunaIncludes.h b/ElunaIncludes.h index 0bc26d0fc2..fec1f48d59 100644 --- a/ElunaIncludes.h +++ b/ElunaIncludes.h @@ -147,9 +147,6 @@ typedef Opcodes OpcodesList; #if defined ELUNA_MANGOS #define CORE_NAME "MaNGOS" #define CORE_VERSION PROJECT_REVISION_NR -#if ELUNA_EXPANSION >= EXP_CATA -#define NUM_MSG_TYPES NUM_OPCODE_HANDLERS -#endif #endif #if defined ELUNA_TRINITY @@ -186,7 +183,7 @@ typedef Opcodes OpcodesList; #endif -#if ELUNA_EXPANSION >= EXP_CATA || defined ELUNA_VMANGOS +#if defined ELUNA_VMANGOS #define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS #endif diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index 16c122d75f..394a8f735b 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -701,7 +701,6 @@ namespace LuaCreature return 1; } -#if defined(CLASSIC) || defined(TBC) || defined(WOTLK) /** * Returns the [Creature]'s shield block value. * @@ -709,10 +708,13 @@ namespace LuaCreature */ int GetShieldBlockValue(Eluna* E, Creature* creature) { +#if ELUNA_EXPANSION == EXP_CATA + E->Push(creature->GetShieldBlockDamageValue()); +#else E->Push(creature->GetShieldBlockValue()); +#endif return 1; } -#endif /** * Returns the guid of the [Creature] that is used as the ID in the database diff --git a/methods/Mangos/GlobalMethods.h b/methods/Mangos/GlobalMethods.h index 0817c2ed71..84c532bea7 100644 --- a/methods/Mangos/GlobalMethods.h +++ b/methods/Mangos/GlobalMethods.h @@ -1748,8 +1748,11 @@ namespace LuaGlobalFunctions auto const itemlist = items->m_items; for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr) +#if ELUNA_EXPANSION == EXP_CATA + eObjectMgr->RemoveVendorItem(entry, (*itr)->item, (*itr)->type); +#else eObjectMgr->RemoveVendorItem(entry, (*itr)->item); - +#endif return 0; } diff --git a/methods/Mangos/GuildMethods.h b/methods/Mangos/GuildMethods.h index 44e44b8925..b180a18b0b 100644 --- a/methods/Mangos/GuildMethods.h +++ b/methods/Mangos/GuildMethods.h @@ -115,7 +115,6 @@ namespace LuaGuild return 1; } -#if defined(CLASSIC) || defined(TBC) || defined(WOTLK) /** * Sets the leader of this [Guild] * @@ -128,7 +127,6 @@ namespace LuaGuild guild->SetLeader(player->GET_GUID()); return 0; } -#endif #ifndef CLASSIC /** diff --git a/methods/Mangos/PlayerMethods.h b/methods/Mangos/PlayerMethods.h index 871c851fa3..e39cb5ed30 100644 --- a/methods/Mangos/PlayerMethods.h +++ b/methods/Mangos/PlayerMethods.h @@ -724,7 +724,7 @@ namespace LuaPlayer return 1; } #endif -#if defined(CLASSIC) || defined(TBC) || defined (WOTLK) + /** * Returns the [Player]s current shield block value * @@ -732,10 +732,13 @@ namespace LuaPlayer */ int GetShieldBlockValue(Eluna* E, Player* player) { +#if ELUNA_EXPANSION == EXP_CATA + E->Push(player->GetShieldBlockDamageValue()); +#else E->Push(player->GetShieldBlockValue()); +#endif return 1; } -#endif /** * Returns the [Player]s cooldown delay by specified [Spell] ID diff --git a/methods/Mangos/UnitMethods.h b/methods/Mangos/UnitMethods.h index 5e2cb18a3c..e91cb427e9 100644 --- a/methods/Mangos/UnitMethods.h +++ b/methods/Mangos/UnitMethods.h @@ -1935,7 +1935,7 @@ namespace LuaUnit float maxHeight = E->CHECKVAL(6); uint32 id = E->CHECKVAL(7, 0); -#if WOTLK +#if ELUNA_EXPANSION >= EXP_WOTLK unit->GetMotionMaster()->MoveJump(x, y, z, zSpeed, maxHeight, id); #else Position pos(x, y, z); @@ -2178,7 +2178,12 @@ namespace LuaUnit for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i) { +#if ELUNA_EXPANSION == EXP_CATA + SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(i)); + uint8 eff = spellEffect->Effect; +#else uint8 eff = spellEntry->Effect[i]; +#endif if (eff >= TOTAL_SPELL_EFFECTS) continue;