mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Fix mangos three build errors - eluna version before fix is 6804f6e90f
This commit is contained in:
parent
6cefe29b85
commit
23dd2f483a
5 changed files with 30 additions and 13 deletions
|
|
@ -128,7 +128,7 @@ typedef ThreatContainer::StorageType ThreatList;
|
|||
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
|
||||
#endif
|
||||
|
||||
#if defined(WOTLK) && !defined(MANGOS)
|
||||
#if defined(CATA) || (defined(WOTLK) && !defined(MANGOS))
|
||||
#define UNIT_BYTE2_FLAG_SANCTUARY UNIT_BYTE2_FLAG_SUPPORTABLE
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,11 @@ namespace LuaGameObject
|
|||
*/
|
||||
int IsActive(lua_State* L, GameObject* go)
|
||||
{
|
||||
#if defined(MANGOS) && defined(CATA)
|
||||
Eluna::Push(L, go->IsActiveObject());
|
||||
#else
|
||||
Eluna::Push(L, go->isActiveObject());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1786,15 +1786,7 @@ namespace LuaGlobalFunctions
|
|||
uint32 incrtime = Eluna::CHECKVAL<uint32>(L, 4);
|
||||
uint32 extendedcost = Eluna::CHECKVAL<uint32>(L, 5);
|
||||
|
||||
#ifndef TRINITY
|
||||
if (!eObjectMgr->IsVendorItemValid(false, "npc_vendor", entry, item, maxcount, incrtime, extendedcost, 0))
|
||||
return 0;
|
||||
#ifndef CLASSIC
|
||||
eObjectMgr->AddVendorItem(entry, item, maxcount, incrtime, extendedcost);
|
||||
#else
|
||||
eObjectMgr->AddVendorItem(entry, item, maxcount, incrtime);
|
||||
#endif
|
||||
#else
|
||||
#ifdef TRINITY
|
||||
#ifdef CATA
|
||||
if (!eObjectMgr->IsVendorItemValid(entry, item, maxcount, incrtime, extendedcost, 1))
|
||||
return 0;
|
||||
|
|
@ -1804,6 +1796,20 @@ namespace LuaGlobalFunctions
|
|||
return 0;
|
||||
eObjectMgr->AddVendorItem(entry, item, maxcount, incrtime, extendedcost);
|
||||
#endif
|
||||
#else
|
||||
#ifdef CATA
|
||||
if (!eObjectMgr->IsVendorItemValid(false, "npc_vendor", entry, item, VENDOR_ITEM_TYPE_ITEM, maxcount, incrtime, extendedcost, 0))
|
||||
return 0;
|
||||
eObjectMgr->AddVendorItem(entry, item, VENDOR_ITEM_TYPE_ITEM, maxcount, incrtime, extendedcost);
|
||||
#else
|
||||
if (!eObjectMgr->IsVendorItemValid(false, "npc_vendor", entry, item, maxcount, incrtime, extendedcost, 0))
|
||||
return 0;
|
||||
#ifndef CLASSIC
|
||||
eObjectMgr->AddVendorItem(entry, item, maxcount, incrtime, extendedcost);
|
||||
#else
|
||||
eObjectMgr->AddVendorItem(entry, item, maxcount, incrtime);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2597,15 +2597,15 @@ namespace LuaPlayer
|
|||
{
|
||||
bool no_cost = Eluna::CHECKVAL<bool>(L, 2, true);
|
||||
|
||||
#ifdef TRINITY
|
||||
#ifdef CATA
|
||||
player->ResetTalents(no_cost);
|
||||
#else
|
||||
#ifdef TRINITY
|
||||
player->ResetTalents(no_cost);
|
||||
#endif
|
||||
#else
|
||||
player->resetTalents(no_cost);
|
||||
#endif
|
||||
#endif
|
||||
#if (!defined(TBC) && !defined(CLASSIC))
|
||||
player->SendTalentsInfoData(false);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2183,7 +2183,7 @@ namespace LuaUnit
|
|||
float maxHeight = Eluna::CHECKVAL<float>(L, 6);
|
||||
uint32 id = Eluna::CHECKVAL<uint32>(L, 7, 0);
|
||||
|
||||
#if (defined(CMANGOS) || defined(MANGOS)) && defined(WOTLK)
|
||||
#if (defined(CMANGOS) || defined(MANGOS)) && (defined(WOTLK) || defined(CATA))
|
||||
unit->GetMotionMaster()->MoveJump(x, y, z, zSpeed, maxHeight, id);
|
||||
#else
|
||||
Position pos(x, y, z);
|
||||
|
|
@ -2449,7 +2449,14 @@ namespace LuaUnit
|
|||
|
||||
for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
#if defined(MANGOS) && defined(CATA)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
uint8 eff = spellEffect->Effect;
|
||||
#else
|
||||
uint8 eff = spellInfo->Effect[i];
|
||||
#endif
|
||||
if (eff >= TOTAL_SPELL_EFFECTS)
|
||||
continue;
|
||||
if (IsAreaAuraEffect(eff) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue