Skip to content

Commit

Permalink
Disable new methods on Cata for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Oct 14, 2023
1 parent 12797aa commit e8cb7dc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
12 changes: 12 additions & 0 deletions TrinityCore/GroupMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,14 @@ namespace LuaGroup
* @param ObjectGuid guid : guid of the player
* @return uint8 flags
*/
#ifndef CATA
int GetMemberFlags(lua_State* L, Group* group)
{
ObjectGuid guid = Eluna::CHECKVAL<ObjectGuid>(L, 2);
Eluna::Push(L, group->GetMemberFlags(guid));
return 1;
}
#endif

/**
* Sets the leader of this [Group]
Expand Down Expand Up @@ -411,6 +413,7 @@ namespace LuaGroup
* @param bool apply : add the `flag` if `true`, remove the `flag` otherwise
* @param [GroupMemberFlags] flag : the flag to set or unset
*/
#ifndef CATA
int SetMemberFlag(lua_State* L, Group* group)
{
ObjectGuid target = Eluna::CHECKVAL<ObjectGuid>(L, 2);
Expand All @@ -420,6 +423,7 @@ namespace LuaGroup
group->SetGroupMemberFlag(target, apply, flag);
return 0;
}
#endif

ElunaRegister<Group> GroupMethods[] =
{
Expand All @@ -430,13 +434,21 @@ namespace LuaGroup
{ "GetMemberGroup", &LuaGroup::GetMemberGroup },
{ "GetMemberGUID", &LuaGroup::GetMemberGUID },
{ "GetMembersCount", &LuaGroup::GetMembersCount },
#ifndef CATA
{ "GetMemberFlags", &LuaGroup::GetMemberFlags },
#else
{ "GetMemberFlags", nullptr },
#endif

// Setters
{ "SetLeader", &LuaGroup::SetLeader },
{ "SetMembersGroup", &LuaGroup::SetMembersGroup },
{ "SetTargetIcon", &LuaGroup::SetTargetIcon },
#ifndef CATA
{ "SetMemberFlag", &LuaGroup::SetMemberFlag },
#else
{ "SetMemberFlag", nullptr },
#endif

// Boolean
{ "IsLeader", &LuaGroup::IsLeader },
Expand Down
20 changes: 16 additions & 4 deletions TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ namespace LuaPlayer
return 1;
}

#ifndef CATA
/**
* Returns 'true' if the [Player] satisfies all requirements to complete the repeatable quest entry.
*
Expand Down Expand Up @@ -410,6 +411,7 @@ namespace LuaPlayer

return 1;
}
#endif

/**
* Returns 'true' if the [Player] is a part of the Horde faction, 'false' otherwise.
Expand Down Expand Up @@ -1546,6 +1548,7 @@ namespace LuaPlayer
return 1;
}

#ifndef CATA
/**
* Returns the amount of mails in the [Player]s mailbox
*
Expand Down Expand Up @@ -1578,7 +1581,8 @@ namespace LuaPlayer
Eluna::Push(L, player->GetXPForNextLevel());
return 1;
}

#endif

/**
* Locks the player controls and disallows all movement and casting.
*
Expand Down Expand Up @@ -3877,12 +3881,15 @@ namespace LuaPlayer
{ "GetQuestRewardStatus", &LuaPlayer::GetQuestRewardStatus },
#ifndef CATA
{ "GetShieldBlockValue", &LuaPlayer::GetShieldBlockValue },
#else
{ "GetShieldBlockValue", nullptr },
#endif
{ "GetMailCount", &LuaPlayer::GetMailCount },
{ "GetXP", &LuaPlayer::GetXP },
{ "GetXPForNextLevel", &LuaPlayer::GetXPForNextLevel },
#else
{ "GetShieldBlockValue", nullptr },
{ "GetMailCount", nullptr },
{ "GetXP", nullptr },
{ "GetXPForNextLevel", nullptr },
#endif

// Setters
#ifndef CATA
Expand Down Expand Up @@ -3991,8 +3998,13 @@ namespace LuaPlayer
{ "CanFly", &LuaPlayer::CanFly },
{ "IsMoving", &LuaPlayer::IsMoving },
{ "IsFlying", &LuaPlayer::IsFlying },
#ifndef CATA
{ "CanCompleteRepeatableQuest", &LuaPlayer::CanCompleteRepeatableQuest },
{ "CanRewardQuest", &LuaPlayer::CanRewardQuest },
#elif
{ "CanCompleteRepeatableQuest", nullptr },
{ "CanRewardQuest", nullptr },
#endif

// Gossip
{ "GossipMenuAddItem", &LuaPlayer::GossipMenuAddItem },
Expand Down

0 comments on commit e8cb7dc

Please sign in to comment.