Skip to content

Commit

Permalink
CMaNGOS specific fixes
Browse files Browse the repository at this point in the history
Fix CMaNGOS specific functions per expansion
  • Loading branch information
Niam5 committed Jul 28, 2023
1 parent faa42cd commit 61e2e43
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 83 deletions.
26 changes: 13 additions & 13 deletions CMangos/CreatureMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,8 @@ namespace LuaCreature
{ "GetRespawnDelay", &LuaCreature::GetRespawnDelay },
{ "GetWanderRadius", &LuaCreature::GetWanderRadius },
{ "GetCurrentWaypointId", &LuaCreature::GetCurrentWaypointId },
{ "GetWaypointPath", &LuaCreature::GetWaypointPath },
{ "GetLootMode", &LuaCreature::GetLootMode },
{ "GetWaypointPath", nullptr }, // TC/Acore
{ "GetLootMode", nullptr }, // TC/Acore
{ "GetLootRecipient", &LuaCreature::GetLootRecipient },
{ "GetLootRecipientGroup", &LuaCreature::GetLootRecipientGroup },
{ "GetNPCFlags", &LuaCreature::GetNPCFlags },
Expand All @@ -1529,7 +1529,7 @@ namespace LuaCreature
{ "GetCreatureFamily", &LuaCreature::GetCreatureFamily },

// Setters
{ "SetRegeneratingHealth", &LuaCreature::SetRegeneratingHealth },
{ "SetRegeneratingHealth", nullptr }, // TC/Acore
{ "SetHover", &LuaCreature::SetHover },
{ "SetDisableGravity", &LuaCreature::SetDisableGravity },
{ "SetAggroEnabled", &LuaCreature::SetAggroEnabled },
Expand All @@ -1540,38 +1540,38 @@ namespace LuaCreature
{ "SetWanderRadius", &LuaCreature::SetWanderRadius },
{ "SetInCombatWithZone", &LuaCreature::SetInCombatWithZone },
{ "SetDisableReputationGain", &LuaCreature::SetDisableReputationGain },
{ "SetLootMode", &LuaCreature::SetLootMode },
{ "SetLootMode", nullptr }, // TC/Acore
{ "SetNPCFlags", &LuaCreature::SetNPCFlags },
{ "SetReactState", &LuaCreature::SetReactState },
{ "SetReactState", nullptr }, // TC/Acore
{ "SetDeathState", &LuaCreature::SetDeathState },
{ "SetWalk", &LuaCreature::SetWalk },
{ "SetHomePosition", &LuaCreature::SetHomePosition },
{ "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots },

// Boolean
{ "IsRegeneratingHealth", &LuaCreature::IsRegeneratingHealth },
{ "IsDungeonBoss", &LuaCreature::IsDungeonBoss },
{ "IsDungeonBoss", nullptr }, // TC/Acore
{ "IsWorldBoss", &LuaCreature::IsWorldBoss },
{ "IsRacialLeader", &LuaCreature::IsRacialLeader },
{ "IsCivilian", &LuaCreature::IsCivilian },
{ "IsTrigger", &LuaCreature::IsTrigger },
{ "IsTrigger", nullptr }, // TC/Acore
{ "IsGuard", &LuaCreature::IsGuard },
{ "IsElite", &LuaCreature::IsElite },
{ "IsInEvadeMode", &LuaCreature::IsInEvadeMode },
{ "HasCategoryCooldown", &LuaCreature::HasCategoryCooldown },
{ "CanWalk", &LuaCreature::CanWalk },
{ "CanSwim", &LuaCreature::CanSwim },
{ "CanAggro", &LuaCreature::CanAggro },
{ "CanStartAttack", &LuaCreature::CanStartAttack },
{ "CanStartAttack", nullptr }, // TC/Acore
{ "HasSearchedAssistance", &LuaCreature::HasSearchedAssistance },
{ "IsTappedBy", &LuaCreature::IsTappedBy },
{ "HasLootRecipient", &LuaCreature::HasLootRecipient },
{ "CanAssistTo", &LuaCreature::CanAssistTo },
{ "IsTargetableForAttack", &LuaCreature::IsTargetableForAttack },
{ "CanCompleteQuest", &LuaCreature::CanCompleteQuest },
{ "IsReputationGainDisabled", &LuaCreature::IsReputationGainDisabled },
{ "IsDamageEnoughForLootingAndReward", &LuaCreature::IsDamageEnoughForLootingAndReward },
{ "HasLootMode", &LuaCreature::HasLootMode },
{ "IsDamageEnoughForLootingAndReward", nullptr }, // TC/Acore
{ "HasLootMode", nullptr }, // TC/Acore
{ "HasSpell", &LuaCreature::HasSpell },
{ "HasQuest", &LuaCreature::HasQuest },
{ "HasSpellCooldown", &LuaCreature::HasSpellCooldown },
Expand All @@ -1585,9 +1585,9 @@ namespace LuaCreature
{ "DespawnOrUnsummon", &LuaCreature::DespawnOrUnsummon },
{ "Respawn", &LuaCreature::Respawn },
{ "AttackStart", &LuaCreature::AttackStart },
{ "AddLootMode", &LuaCreature::AddLootMode },
{ "ResetLootMode", &LuaCreature::ResetLootMode },
{ "RemoveLootMode", &LuaCreature::RemoveLootMode },
{ "AddLootMode", nullptr }, // TC/Acore
{ "ResetLootMode", nullptr }, // TC/Acore
{ "RemoveLootMode", nullptr }, // TC/Acore
{ "SaveToDB", &LuaCreature::SaveToDB },
{ "SelectVictim", &LuaCreature::SelectVictim },
{ "MoveWaypoint", &LuaCreature::MoveWaypoint },
Expand Down
2 changes: 1 addition & 1 deletion CMangos/GlobalMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef GLOBALMETHODS_H
#define GLOBALMETHODS_H

#include "BindingMap.h"
#include "LuaEngine/BindingMap.h"

#ifdef AZEROTHCORE

Expand Down
4 changes: 3 additions & 1 deletion CMangos/GroupMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,16 @@ namespace LuaGroup
{ "RemoveMember", &LuaGroup::RemoveMember },
{ "Disband", &LuaGroup::Disband },
{ "IsFull", &LuaGroup::IsFull },
{ "IsLFGGroup", &LuaGroup::IsLFGGroup },
{ "IsRaidGroup", &LuaGroup::IsRaidGroup },
{ "IsBGGroup", &LuaGroup::IsBGGroup },
{ "IsBFGroup", nullptr }, // not implemented
{ "IsMember", &LuaGroup::IsMember },
{ "IsAssistant", &LuaGroup::IsAssistant },
{ "SameSubGroup", &LuaGroup::SameSubGroup },
{ "HasFreeSlotSubGroup", &LuaGroup::HasFreeSlotSubGroup },
#if defined WOTLK
{ "IsLFGGroup", &LuaGroup::IsLFGGroup },
#endif

// Other
{ "SendPacket", &LuaGroup::SendPacket },
Expand Down
2 changes: 2 additions & 0 deletions CMangos/GuildMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ namespace LuaGuild
{ "GetMemberCount", &LuaGuild::GetMemberCount },

// Setters
#if defined(TBC) || defined(WOTLK)
{ "SetBankTabText", &LuaGuild::SetBankTabText },
#endif
{ "SetMemberRank", &LuaGuild::SetMemberRank },
{ "SetLeader", &LuaGuild::SetLeader },

Expand Down
20 changes: 14 additions & 6 deletions CMangos/ItemMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -791,11 +791,15 @@ namespace LuaItem
{ "GetAllowableRace", &LuaItem::GetAllowableRace },
{ "GetItemLevel", &LuaItem::GetItemLevel },
{ "GetRequiredLevel", &LuaItem::GetRequiredLevel },
{ "GetStatsCount", &LuaItem::GetStatsCount },
{ "GetRandomProperty", &LuaItem::GetRandomProperty },
{ "GetRandomSuffix", &LuaItem::GetRandomSuffix },
{ "GetItemSet", &LuaItem::GetItemSet },
{ "GetBagSize", &LuaItem::GetBagSize },
#if defined(TBC) || defined(WOTLK)
{ "GetRandomSuffix", &LuaItem::GetRandomSuffix },
#endif
#if defined(WOTLK)
{ "GetStatsCount", &LuaItem::GetStatsCount },
#endif

// Setters
{ "SetOwner", &LuaItem::SetOwner },
Expand All @@ -804,12 +808,10 @@ namespace LuaItem

// Boolean
{ "IsSoulBound", &LuaItem::IsSoulBound },
{ "IsBoundAccountWide", &LuaItem::IsBoundAccountWide },
{ "IsBoundByEnchant", &LuaItem::IsBoundByEnchant },
{ "IsNotBoundToPlayer", &LuaItem::IsNotBoundToPlayer },
{ "IsLocked", &LuaItem::IsLocked },
{ "IsBag", &LuaItem::IsBag },
{ "IsCurrencyToken", &LuaItem::IsCurrencyToken },
{ "IsNotEmptyBag", &LuaItem::IsNotEmptyBag },
{ "IsBroken", &LuaItem::IsBroken },
{ "CanBeTraded", &LuaItem::CanBeTraded },
Expand All @@ -818,12 +820,18 @@ namespace LuaItem
{ "IsEquipped", &LuaItem::IsEquipped },
{ "HasQuest", &LuaItem::HasQuest },
{ "IsPotion", &LuaItem::IsPotion },
{ "IsWeaponVellum", &LuaItem::IsWeaponVellum },
{ "IsArmorVellum", &LuaItem::IsArmorVellum },
{ "IsConjuredConsumable", &LuaItem::IsConjuredConsumable },
{ "IsRefundExpired", nullptr }, // not implemented
{ "SetEnchantment", &LuaItem::SetEnchantment },
{ "ClearEnchantment", &LuaItem::ClearEnchantment },
#if defined(TBC) || defined(WOTLK)
{ "IsCurrencyToken", &LuaItem::IsCurrencyToken },
#endif
#if defined(WOTLK)
{ "IsBoundAccountWide", &LuaItem::IsBoundAccountWide },
{ "IsWeaponVellum", &LuaItem::IsWeaponVellum },
{ "IsArmorVellum", &LuaItem::IsArmorVellum },
#endif

// Other
{ "SaveToDB", &LuaItem::SaveToDB },
Expand Down
8 changes: 5 additions & 3 deletions CMangos/MapMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef MAPMETHODS_H
#define MAPMETHODS_H

#include "ElunaInstanceAI.h"
#include "LuaEngine/ElunaInstanceAI.h"

/***
* A game map, e.g. Azeroth, Eastern Kingdoms, the Molten Core, etc.
Expand Down Expand Up @@ -388,12 +388,14 @@ namespace LuaMap
{ "SetWeather", &LuaMap::SetWeather },

// Boolean
{ "IsArena", &LuaMap::IsArena },
{ "IsBattleground", &LuaMap::IsBattleground },
{ "IsDungeon", &LuaMap::IsDungeon },
{ "IsEmpty", &LuaMap::IsEmpty },
{ "IsHeroic", &LuaMap::IsHeroic },
{ "IsRaid", &LuaMap::IsRaid },
#if defined(TBC) || defined(WOTLK)
{ "IsArena", &LuaMap::IsArena },
{ "IsHeroic", &LuaMap::IsHeroic },
#endif

// Other
{ "SaveInstanceData", &LuaMap::SaveInstanceData },
Expand Down
Loading

0 comments on commit 61e2e43

Please sign in to comment.