Skip to content

Commit

Permalink
Fix placement of not implemented functions for TCPP
Browse files Browse the repository at this point in the history
-As Foe found when converting to this system placing a function with a nullptr causes all the functions below it to not register properly and not work.
  • Loading branch information
Niam5 committed Nov 5, 2023
1 parent 058ffa1 commit 851a35d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 37 deletions.
6 changes: 4 additions & 2 deletions TrinityCore/CreatureMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,6 @@ namespace LuaCreature
{ "GetExtraFlags", &LuaCreature::GetExtraFlags },
#ifndef CATA
{ "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue },
#else
{ "GetShieldBlockValue", nullptr },
#endif
{ "GetDBTableGUIDLow", &LuaCreature::GetDBTableGUIDLow },
{ "GetCreatureFamily", &LuaCreature::GetCreatureFamily },
Expand Down Expand Up @@ -1355,6 +1353,10 @@ namespace LuaCreature
{ "MoveWaypoint", &LuaCreature::MoveWaypoint },
{ "UpdateEntry", &LuaCreature::UpdateEntry },

#ifdef CATA //Not implemented in TCPP
{ "GetShieldBlockValue", nullptr },
#endif

{ NULL, NULL }
};
};
Expand Down
9 changes: 5 additions & 4 deletions TrinityCore/GroupMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ namespace LuaGroup
{ "GetMembersCount", &LuaGroup::GetMembersCount },
#ifndef CATA
{ "GetMemberFlags", &LuaGroup::GetMemberFlags },
#else
{ "GetMemberFlags", nullptr },
#endif

// Setters
Expand All @@ -446,8 +444,6 @@ namespace LuaGroup
{ "SetTargetIcon", &LuaGroup::SetTargetIcon },
#ifndef CATA
{ "SetMemberFlag", &LuaGroup::SetMemberFlag },
#else
{ "SetMemberFlag", nullptr },
#endif

// Boolean
Expand All @@ -470,6 +466,11 @@ namespace LuaGroup
{ "ConvertToLFG", &LuaGroup::ConvertToLFG },
{ "ConvertToRaid", &LuaGroup::ConvertToRaid },

#ifdef CATA //Not implemented in TCPP
{ "GetMemberFlags", nullptr },
{ "SetMemberFlag", nullptr },
#endif

{ NULL, NULL }
};
};
Expand Down
6 changes: 4 additions & 2 deletions TrinityCore/GuildMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ namespace LuaGuild
{ "SetMemberRank", &LuaGuild::SetMemberRank },
#ifndef CATA
{ "SetLeader", &LuaGuild::SetLeader },
#else
{ "SetLeader", nullptr },
#endif

// Other
Expand All @@ -270,6 +268,10 @@ namespace LuaGuild
{ "AddMember", &LuaGuild::AddMember },
{ "DeleteMember", &LuaGuild::DeleteMember },

#ifdef CATA //Not implemented in TCPP
{ "SetLeader", nullptr },
#endif

{ NULL, NULL }
};
};
Expand Down
13 changes: 7 additions & 6 deletions TrinityCore/ItemMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,6 @@ namespace LuaItem
{ "GetRequiredLevel", &LuaItem::GetRequiredLevel },
#ifndef CATA
{ "GetStatsCount", &LuaItem::GetStatsCount },
#else
{ "GetStatsCount", nullptr },
#endif
{ "GetRandomProperty", &LuaItem::GetRandomProperty },
{ "GetRandomSuffix", &LuaItem::GetRandomSuffix },
Expand Down Expand Up @@ -867,10 +865,6 @@ namespace LuaItem
{ "IsWeaponVellum", &LuaItem::IsWeaponVellum },
{ "IsArmorVellum", &LuaItem::IsArmorVellum },
{ "IsRefundExpired", &LuaItem::IsRefundExpired },
#else
{ "IsWeaponVellum", nullptr },
{ "IsArmorVellum", nullptr },
{ "IsRefundExpired", nullptr },
#endif
{ "IsConjuredConsumable", &LuaItem::IsConjuredConsumable },
{ "SetEnchantment", &LuaItem::SetEnchantment },
Expand All @@ -879,6 +873,13 @@ namespace LuaItem
// Other
{ "SaveToDB", &LuaItem::SaveToDB },

#ifdef CATA //Not implemented in TCPP
{ "GetStatsCount", nullptr },
{ "IsWeaponVellum", nullptr },
{ "IsArmorVellum", nullptr },
{ "IsRefundExpired", nullptr },
#endif

{ NULL, NULL }
};
};
Expand Down
41 changes: 18 additions & 23 deletions TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3824,9 +3824,6 @@ namespace LuaPlayer
#ifndef CATA
{ "GetArenaPoints", &LuaPlayer::GetArenaPoints },
{ "GetHonorPoints", &LuaPlayer::GetHonorPoints },
#else
{ "GetArenaPoints", nullptr },
{ "GetHonorPoints", nullptr },
#endif
{ "GetLifetimeKills", &LuaPlayer::GetLifetimeKills },
{ "GetPlayerIP", &LuaPlayer::GetPlayerIP },
Expand All @@ -3843,8 +3840,6 @@ namespace LuaPlayer
{ "GetRestBonus", &LuaPlayer::GetRestBonus },
#ifndef CATA
{ "GetPhaseMaskForSpawn", &LuaPlayer::GetPhaseMaskForSpawn },
#else
{ "GetPhaseMaskForSpawn", nullptr },
#endif
{ "GetReqKillOrCastCurrentCount", &LuaPlayer::GetReqKillOrCastCurrentCount },
{ "GetQuestStatus", &LuaPlayer::GetQuestStatus },
Expand Down Expand Up @@ -3890,18 +3885,11 @@ namespace LuaPlayer
{ "GetMailCount", &LuaPlayer::GetMailCount },
{ "GetXP", &LuaPlayer::GetXP },
{ "GetXPForNextLevel", &LuaPlayer::GetXPForNextLevel },
#else
{ "GetShieldBlockValue", nullptr },
{ "GetMailCount", nullptr },
{ "GetXP", nullptr },
{ "GetXPForNextLevel", nullptr },
#endif

// Setters
#ifndef CATA
{ "AdvanceSkillsToMax", &LuaPlayer::AdvanceSkillsToMax },
#else
{ "AdvanceSkillsToMax", nullptr },
#endif
{ "AdvanceSkill", &LuaPlayer::AdvanceSkill },
{ "AdvanceAllSkills", &LuaPlayer::AdvanceAllSkills },
Expand All @@ -3913,9 +3901,6 @@ namespace LuaPlayer
#ifndef CATA
{ "SetArenaPoints", &LuaPlayer::SetArenaPoints },
{ "SetHonorPoints", &LuaPlayer::SetHonorPoints },
#else
{ "SetArenaPoints", nullptr },
{ "SetHonorPoints", nullptr },
#endif
{ "SetLifetimeKills", &LuaPlayer::SetLifetimeKills },
{ "SetGameMaster", &LuaPlayer::SetGameMaster },
Expand All @@ -3931,8 +3916,6 @@ namespace LuaPlayer
{ "SetGuildRank", &LuaPlayer::SetGuildRank },
#ifndef CATA
{ "SetMovement", &LuaPlayer::SetMovement },
#else
{ "SetMovement", nullptr },
#endif
{ "SetSkill", &LuaPlayer::SetSkill },
{ "SetFactionForRace", &LuaPlayer::SetFactionForRace },
Expand Down Expand Up @@ -4007,9 +3990,6 @@ namespace LuaPlayer
#ifndef CATA
{ "CanCompleteRepeatableQuest", &LuaPlayer::CanCompleteRepeatableQuest },
{ "CanRewardQuest", &LuaPlayer::CanRewardQuest },
#else
{ "CanCompleteRepeatableQuest", nullptr },
{ "CanRewardQuest", nullptr },
#endif

// Gossip
Expand Down Expand Up @@ -4074,9 +4054,6 @@ namespace LuaPlayer
#ifndef CATA
{ "ModifyHonorPoints", &LuaPlayer::ModifyHonorPoints },
{ "ModifyArenaPoints", &LuaPlayer::ModifyArenaPoints },
#else
{ "ModifyHonorPoints", nullptr },
{ "ModifyArenaPoints", nullptr },
#endif
{ "LeaveBattleground", &LuaPlayer::LeaveBattleground },
{ "BindToInstance", &LuaPlayer::BindToInstance },
Expand Down Expand Up @@ -4127,6 +4104,24 @@ namespace LuaPlayer
{ "ClearHonorInfo", nullptr }, // classic only
{ "GainSpellComboPoints", nullptr }, // not implemented

#ifdef CATA //Not implmented in TCPP
{ "GetArenaPoints", nullptr },
{ "GetHonorPoints", nullptr },
{ "GetPhaseMaskForSpawn", nullptr },
{ "GetShieldBlockValue", nullptr },
{ "GetMailCount", nullptr },
{ "GetXP", nullptr },
{ "GetXPForNextLevel", nullptr },
{ "AdvanceSkillsToMax", nullptr },
{ "SetArenaPoints", nullptr },
{ "SetHonorPoints", nullptr },
{ "SetMovement", nullptr },
{ "CanCompleteRepeatableQuest", nullptr },
{ "CanRewardQuest", nullptr },
{ "ModifyHonorPoints", nullptr },
{ "ModifyArenaPoints", nullptr },
#endif

{ NULL, NULL }
};
};
Expand Down

0 comments on commit 851a35d

Please sign in to comment.