Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hooks/CreatureHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ bool Eluna::SpellHit(Creature* me, WorldObject* caster, SpellInfo const* spell)
START_HOOK_WITH_RETVAL(CREATURE_EVENT_ON_HIT_BY_SPELL, me, false);
HookPush(me);
HookPush(caster);
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_CLASSIC
#if defined(ELUNA_MANGOS) && (ELUNA_EXPANSION == EXP_CLASSIC || ELUNA_EXPANSION == EXP_TBC)
HookPush(spell->ID); // Pass spell object?
#else
HookPush(spell->Id); // Pass spell object?
Expand All @@ -299,7 +299,7 @@ bool Eluna::SpellHitTarget(Creature* me, WorldObject* target, SpellInfo const* s
START_HOOK_WITH_RETVAL(CREATURE_EVENT_ON_SPELL_HIT_TARGET, me, false);
HookPush(me);
HookPush(target);
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_CLASSIC
#if defined(ELUNA_MANGOS) && (ELUNA_EXPANSION == EXP_CLASSIC || ELUNA_EXPANSION == EXP_TBC)
HookPush(spell->ID); // Pass spell object?
#else
HookPush(spell->Id); // Pass spell object?
Expand Down
16 changes: 12 additions & 4 deletions methods/Mangos/GlobalMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ namespace LuaGlobalFunctions
if (!areaEntry)
return luaL_argerror(E->L, 1, "valid Area or Zone ID expected");

#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
E->Push(areaEntry->AreaName_lang[locale]);
#else
E->Push(areaEntry->area_name[locale]);
Expand Down Expand Up @@ -2087,7 +2087,7 @@ namespace LuaGlobalFunctions
TaxiPathNodeEntry entry;

// mandatory
#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
entry.ContinentID = E->CHECKVAL<uint32>(start);
entry.LocX = E->CHECKVAL<float>(start + 1);
entry.LocY = E->CHECKVAL<float>(start + 2);
Expand All @@ -2099,7 +2099,7 @@ namespace LuaGlobalFunctions
entry.z = E->CHECKVAL<float>(start + 3);
#endif
// optional
#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
entry.Flags = E->CHECKVAL<uint32>(start + 4, 0);
entry.Delay = E->CHECKVAL<uint32>(start + 5, 0);
#else
Expand Down Expand Up @@ -2137,11 +2137,15 @@ namespace LuaGlobalFunctions
TaxiPathNodeEntry& entry = *it;
TaxiNodesEntry* nodeEntry = new TaxiNodesEntry();

#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
entry.PathID = pathId;
entry.NodeIndex = nodeId;
nodeEntry->ID = index;
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC
nodeEntry->ContinentID = entry.ContinentID;
#else
nodeEntry->map_id = entry.ContinentID;
#endif
nodeEntry->x = entry.LocX;
nodeEntry->y = entry.LocY;
nodeEntry->z = entry.LocZ;
Expand All @@ -2168,7 +2172,11 @@ namespace LuaGlobalFunctions
pathEntry->from = startNode;
pathEntry->to = nodeId - 1;
pathEntry->price = price;
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC
pathEntry->Id = pathId;
#else
pathEntry->ID = pathId;
#endif
sTaxiPathStore.SetEntry(pathId, pathEntry);

E->Push(pathId);
Expand Down
8 changes: 8 additions & 0 deletions methods/Mangos/ItemMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,21 @@ namespace LuaItem
{
const ItemRandomSuffixEntry* itemRandEntry = sItemRandomSuffixStore.LookupEntry(-item->GetItemRandomPropertyId());
if (itemRandEntry)
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC
suffix = itemRandEntry->Name_lang;
#else
suffix = itemRandEntry->nameSuffix;
#endif
}
else
{
const ItemRandomPropertiesEntry* itemRandEntry = sItemRandomPropertiesStore.LookupEntry(item->GetItemRandomPropertyId());
if (itemRandEntry)
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC
suffix = itemRandEntry->Name_lang;
#else
suffix = itemRandEntry->nameSuffix;
#endif
}
if (suffix)
{
Expand Down
6 changes: 5 additions & 1 deletion methods/Mangos/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,11 @@ namespace LuaPlayer

WorldPacket data(MSG_AUCTION_HELLO, 12);
data << unit->GET_GUID();
#if defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC
data << uint32(ahEntry->ID);
#else
data << uint32(ahEntry->houseId);
#endif
data << uint8(1);

player->GetSession()->SendPacket(&data);
Expand Down Expand Up @@ -2978,7 +2982,7 @@ namespace LuaPlayer
{
if (SkillLineEntry const* entry = sSkillLineStore.LookupEntry(i))
{
#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
if (entry->CategoryID == SKILL_CATEGORY_LANGUAGES || entry->CategoryID == SKILL_CATEGORY_GENERIC)
continue;

Expand Down
2 changes: 1 addition & 1 deletion methods/Mangos/SpellMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace LuaSpell
*/
int GetEntry(Eluna* E, Spell* spell)
{
#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
E->Push(spell->m_spellInfo->ID);
#else
E->Push(spell->m_spellInfo->Id);
Expand Down
4 changes: 2 additions & 2 deletions methods/Mangos/UnitMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ namespace LuaUnit
if (!entry)
return 1;

#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
E->Push(entry->Name_lang[locale]);
#else
E->Push(entry->name[locale]);
Expand Down Expand Up @@ -987,7 +987,7 @@ namespace LuaUnit
if (!entry)
return 1;

#if ELUNA_EXPANSION == EXP_CLASSIC
#if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC)
E->Push(entry->Name_lang[locale]);
#else
E->Push(entry->name[locale]);
Expand Down
Loading