Skip to content

Commit

Permalink
Mangos method header cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jul 30, 2023
1 parent f2507a0 commit e53e406
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 72 deletions.
2 changes: 1 addition & 1 deletion Mangos/AuraMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace LuaAura
return 0;
}

ElunaRegister<Aura> AuraMethodsOverride[] =
ElunaRegister<Aura> AuraMethods[] =
{
// Getters
{ "GetCaster", &LuaAura::GetCaster },
Expand Down
2 changes: 1 addition & 1 deletion Mangos/BattleGroundMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ namespace LuaBattleGround
return 1;
}

ElunaRegister<BattleGround> BattleGroundMethodsOverride[] =
ElunaRegister<BattleGround> BattleGroundMethods[] =
{
// Getters
{ "GetName", &LuaBattleGround::GetName },
Expand Down
2 changes: 1 addition & 1 deletion Mangos/CorpseMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace LuaCorpse
return 0;
}

ElunaRegister<Corpse> CorpseMethodsOverride[] =
ElunaRegister<Corpse> CorpseMethods[] =
{
// Getters
{ "GetOwnerGUID", &LuaCorpse::GetOwnerGUID },
Expand Down
30 changes: 16 additions & 14 deletions Mangos/CreatureMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ namespace LuaCreature
return 1;
}

ElunaRegister<Creature> CreatureMethodsOverride[] =
ElunaRegister<Creature> CreatureMethods[] =
{
// Getters
{ "GetAITarget", &LuaCreature::GetAITarget },
Expand All @@ -1518,8 +1518,6 @@ namespace LuaCreature
{ "GetRespawnDelay", &LuaCreature::GetRespawnDelay },
{ "GetWanderRadius", &LuaCreature::GetWanderRadius },
{ "GetCurrentWaypointId", &LuaCreature::GetCurrentWaypointId },
{ "GetWaypointPath", nullptr }, // not implemented
{ "GetLootMode", nullptr }, // not implemented
{ "GetLootRecipient", &LuaCreature::GetLootRecipient },
{ "GetLootRecipientGroup", &LuaCreature::GetLootRecipientGroup },
{ "GetNPCFlags", &LuaCreature::GetNPCFlags },
Expand All @@ -1529,7 +1527,6 @@ namespace LuaCreature
{ "GetCreatureFamily", &LuaCreature::GetCreatureFamily },

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

// Boolean
{ "IsRegeneratingHealth", &LuaCreature::IsRegeneratingHealth },
{ "IsDungeonBoss", nullptr }, // not implemented
{ "IsWorldBoss", &LuaCreature::IsWorldBoss },
{ "IsRacialLeader", &LuaCreature::IsRacialLeader },
{ "IsCivilian", &LuaCreature::IsCivilian },
{ "IsTrigger", nullptr }, // not implemented
{ "IsGuard", &LuaCreature::IsGuard },
{ "IsElite", &LuaCreature::IsElite },
{ "IsInEvadeMode", &LuaCreature::IsInEvadeMode },
{ "HasCategoryCooldown", &LuaCreature::HasCategoryCooldown },
{ "CanWalk", &LuaCreature::CanWalk },
{ "CanSwim", &LuaCreature::CanSwim },
{ "CanAggro", &LuaCreature::CanAggro },
{ "CanStartAttack", nullptr }, // not implemented
{ "HasSearchedAssistance", &LuaCreature::HasSearchedAssistance },
{ "IsTappedBy", &LuaCreature::IsTappedBy },
{ "HasLootRecipient", &LuaCreature::HasLootRecipient },
{ "CanAssistTo", &LuaCreature::CanAssistTo },
{ "IsTargetableForAttack", &LuaCreature::IsTargetableForAttack },
{ "CanCompleteQuest", &LuaCreature::CanCompleteQuest },
{ "IsReputationGainDisabled", &LuaCreature::IsReputationGainDisabled },
{ "IsDamageEnoughForLootingAndReward", nullptr }, // not implemented
{ "HasLootMode", nullptr }, // not implemented
{ "HasSpell", &LuaCreature::HasSpell },
{ "HasQuest", &LuaCreature::HasQuest },
{ "HasSpellCooldown", &LuaCreature::HasSpellCooldown },
Expand All @@ -1585,14 +1575,26 @@ namespace LuaCreature
{ "DespawnOrUnsummon", &LuaCreature::DespawnOrUnsummon },
{ "Respawn", &LuaCreature::Respawn },
{ "AttackStart", &LuaCreature::AttackStart },
{ "AddLootMode", nullptr }, // not implemented
{ "ResetLootMode", nullptr }, // not implemented
{ "RemoveLootMode", nullptr }, // not implemented
{ "SaveToDB", &LuaCreature::SaveToDB },
{ "SelectVictim", &LuaCreature::SelectVictim },
{ "MoveWaypoint", &LuaCreature::MoveWaypoint },
{ "UpdateEntry", &LuaCreature::UpdateEntry },

// Not implemented methods
{ "GetWaypointPath", nullptr }, // not implemented
{ "GetLootMode", nullptr }, // not implemented
{ "SetRegeneratingHealth", nullptr }, // not implemented
{ "SetLootMode", nullptr }, // not implemented
{ "SetReactState", nullptr }, // not implemented
{ "IsDungeonBoss", nullptr }, // not implemented
{ "IsTrigger", nullptr }, // not implemented
{ "CanStartAttack", nullptr }, // not implemented
{ "IsDamageEnoughForLootingAndReward", nullptr }, // not implemented
{ "HasLootMode", nullptr }, // not implemented
{ "AddLootMode", nullptr }, // not implemented
{ "ResetLootMode", nullptr }, // not implemented
{ "RemoveLootMode", nullptr }, // not implemented

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion Mangos/ElunaQueryMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ namespace LuaQuery
return 1;
}

ElunaRegister<ElunaQuery> QueryMethodsOverride[] =
ElunaRegister<ElunaQuery> QueryMethods[] =
{
// Getters
{ "GetColumnCount", &LuaQuery::GetColumnCount },
Expand Down
6 changes: 4 additions & 2 deletions Mangos/GameObjectMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ namespace LuaGameObject
return 0;
}

ElunaRegister<GameObject> GameObjectMethodsOverride[] =
ElunaRegister<GameObject> GameObjectMethods[] =
{
// Getters
{ "GetDisplayId", &LuaGameObject::GetDisplayId },
Expand All @@ -360,7 +360,6 @@ namespace LuaGameObject

// Boolean
{ "IsTransport", &LuaGameObject::IsTransport },
{ "IsDestructible", nullptr }, // Not implemented
{ "IsActive", &LuaGameObject::IsActive },
{ "HasQuest", &LuaGameObject::HasQuest },
{ "IsSpawned", &LuaGameObject::IsSpawned },
Expand All @@ -372,6 +371,9 @@ namespace LuaGameObject
{ "Respawn", &LuaGameObject::Respawn },
{ "SaveToDB", &LuaGameObject::SaveToDB },

// Not implemented methods
{ "IsDestructible", nullptr }, // Not implemented

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion Mangos/GlobalMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3270,7 +3270,7 @@ namespace LuaGlobalFunctions
return 0;
}

luaL_Reg GlobalMethodsOverride[] =
luaL_Reg GlobalMethods[] =
{
// Hooks
{ "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent },
Expand Down
8 changes: 5 additions & 3 deletions Mangos/GroupMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ namespace LuaGroup
return 0;
}*/

ElunaRegister<Group> GroupMethodsOverride[] =
ElunaRegister<Group> GroupMethods[] =
{
// Getters
{ "GetMembers", &LuaGroup::GetMembers },
Expand All @@ -449,7 +449,6 @@ namespace LuaGroup
{ "IsFull", &LuaGroup::IsFull },
{ "IsRaidGroup", &LuaGroup::IsRaidGroup },
{ "IsBGGroup", &LuaGroup::IsBGGroup },
{ "IsBFGroup", nullptr }, // not implemented
{ "IsMember", &LuaGroup::IsMember },
{ "IsAssistant", &LuaGroup::IsAssistant },
{ "SameSubGroup", &LuaGroup::SameSubGroup },
Expand All @@ -459,9 +458,12 @@ namespace LuaGroup
#endif
// Other
{ "SendPacket", &LuaGroup::SendPacket },
{ "ConvertToLFG", nullptr }, // not implemented
{ "ConvertToRaid", &LuaGroup::ConvertToRaid },

// Not implemented methods
{ "IsBFGroup", nullptr }, // not implemented
{ "ConvertToLFG", nullptr }, // not implemented

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion Mangos/GuildMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ namespace LuaGuild
return 0;
}

ElunaRegister<Guild> GuildMethodsOverride[] =
ElunaRegister<Guild> GuildMethods[] =
{
// Getters
{ "GetMembers", &LuaGuild::GetMembers },
Expand Down
6 changes: 4 additions & 2 deletions Mangos/ItemMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ namespace LuaItem
return 0;
}

ElunaRegister<Item> ItemMethodsOverride[] =
ElunaRegister<Item> ItemMethods[] =
{
// Getters
{ "GetOwnerGUID", &LuaItem::GetOwnerGUID },
Expand Down Expand Up @@ -821,7 +821,6 @@ namespace LuaItem
{ "HasQuest", &LuaItem::HasQuest },
{ "IsPotion", &LuaItem::IsPotion },
{ "IsConjuredConsumable", &LuaItem::IsConjuredConsumable },
{ "IsRefundExpired", nullptr }, // not implemented
{ "SetEnchantment", &LuaItem::SetEnchantment },
{ "ClearEnchantment", &LuaItem::ClearEnchantment },
#ifndef CLASSIC
Expand All @@ -838,6 +837,9 @@ namespace LuaItem
// Other
{ "SaveToDB", &LuaItem::SaveToDB },

// Not implemented methods
{ "IsRefundExpired", nullptr }, // not implemented

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion Mangos/MapMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ namespace LuaMap
return 1;
}

ElunaRegister<Map> MapMethodsOverride[] =
ElunaRegister<Map> MapMethods[] =
{
// Getters
{ "GetName", &LuaMap::GetName },
Expand Down
2 changes: 1 addition & 1 deletion Mangos/ObjectMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ namespace LuaObject
return 1;
}

ElunaRegister<Object> ObjectMethodsOverride[] =
ElunaRegister<Object> ObjectMethods[] =
{
// Getters
{ "GetEntry", &LuaObject::GetEntry },
Expand Down
48 changes: 25 additions & 23 deletions Mangos/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -4294,7 +4294,7 @@ namespace LuaPlayer
return 0;
}*/

ElunaRegister<Player> PlayerMethodsOverride[] =
ElunaRegister<Player> PlayerMethods[] =
{
// Getters
{ "GetSelection", &LuaPlayer::GetSelection },
Expand Down Expand Up @@ -4349,9 +4349,7 @@ namespace LuaPlayer
{ "GetNextRandomRaidMember", &LuaPlayer::GetNextRandomRaidMember },
{ "GetOriginalGroup", &LuaPlayer::GetOriginalGroup },
{ "GetOriginalSubGroup", &LuaPlayer::GetOriginalSubGroup },
{ "GetChampioningFaction", nullptr }, // not implemented
{ "GetLatency", &LuaPlayer::GetLatency },
{ "GetRecruiterId", nullptr }, // not implemented
{ "GetDbLocaleIndex", &LuaPlayer::GetDbLocaleIndex },
{ "GetDbcLocale", &LuaPlayer::GetDbcLocale },
{ "GetCorpse", &LuaPlayer::GetCorpse },
Expand Down Expand Up @@ -4394,15 +4392,13 @@ namespace LuaPlayer
{ "SetReputation", &LuaPlayer::SetReputation },
{ "SetFreeTalentPoints", &LuaPlayer::SetFreeTalentPoints },
{ "SetGuildRank", &LuaPlayer::SetGuildRank },
{ "SetMovement", nullptr }, // not implemented
{ "SetSkill", &LuaPlayer::SetSkill },
{ "SetFactionForRace", &LuaPlayer::SetFactionForRace },
{ "SetDrunkValue", &LuaPlayer::SetDrunkValue },
{ "SetAtLoginFlag", &LuaPlayer::SetAtLoginFlag },
{ "SetPlayerLock", &LuaPlayer::SetPlayerLock },
{ "SetGender", &LuaPlayer::SetGender },
{ "SetSheath", &LuaPlayer::SetSheath },
{ "SetFFA", nullptr }, // not implemented
#if defined(CLASSIC)
{ "SetHonorStoredKills", &LuaPlayer::SetHonorStoredKills },
{ "SetRankPoints", &LuaPlayer::SetRankPoints },
Expand Down Expand Up @@ -4440,21 +4436,14 @@ namespace LuaPlayer
{ "IsGMVisible", &LuaPlayer::IsGMVisible },
{ "HasQuest", &LuaPlayer::HasQuest },
{ "InBattlegroundQueue", &LuaPlayer::InBattlegroundQueue },
{ "IsImmuneToEnvironmentalDamage", nullptr }, // not implemented
{ "CanSpeak", &LuaPlayer::CanSpeak },
{ "HasAtLoginFlag", &LuaPlayer::HasAtLoginFlag },
{ "InRandomLfgDungeon", nullptr }, // not implemented
{ "HasPendingBind", nullptr }, // not implemented
{ "CanUninviteFromGroup", &LuaPlayer::CanUninviteFromGroup },
{ "IsRested", &LuaPlayer::IsRested },
{ "CanFlyInZone", nullptr }, // not implemented
{ "IsNeverVisible", nullptr }, // not implemented,
{ "IsVisibleForPlayer", &LuaPlayer::IsVisibleForPlayer },
{ "IsUsingLfg", nullptr }, // not implemented,
{ "HasQuestForItem", &LuaPlayer::HasQuestForItem },
{ "HasQuestForGO", &LuaPlayer::HasQuestForGO },
{ "CanShareQuest", &LuaPlayer::CanShareQuest },
{ "HasReceivedQuestReward", nullptr }, // not implemented,
{ "IsInSameGroupWith", &LuaPlayer::IsInSameGroupWith },
{ "IsInSameRaidWith", &LuaPlayer::IsInSameRaidWith },
{ "IsGroupVisibleFor", &LuaPlayer::IsGroupVisibleFor },
Expand All @@ -4463,8 +4452,6 @@ namespace LuaPlayer
{ "CanParry", &LuaPlayer::CanParry },
{ "CanBlock", &LuaPlayer::CanBlock },
{ "InBattleground", &LuaPlayer::InBattleground },
{ "IsOutdoorPvPActive", nullptr }, // not implemented,
{ "IsARecruiter", nullptr }, // not implemented,
{ "CanUseItem", &LuaPlayer::CanUseItem },
{ "HasSpell", &LuaPlayer::HasSpell },
{ "HasSpellCooldown", &LuaPlayer::HasSpellCooldown },
Expand Down Expand Up @@ -4508,8 +4495,6 @@ namespace LuaPlayer
{ "ResetTypeCooldowns", &LuaPlayer::ResetTypeCooldowns },
{ "ResetAllCooldowns", &LuaPlayer::ResetAllCooldowns },
{ "GiveXP", &LuaPlayer::GiveXP },
{ "RemovePet", nullptr }, // not implemented
{ "SummonPet", nullptr }, // not implemented
{ "Say", &LuaPlayer::Say },
{ "Yell", &LuaPlayer::Yell },
{ "TextEmote", &LuaPlayer::TextEmote },
Expand All @@ -4519,21 +4504,15 @@ namespace LuaPlayer
{ "FailQuest", &LuaPlayer::FailQuest },
{ "AddQuest", &LuaPlayer::AddQuest },
{ "RemoveQuest", &LuaPlayer::RemoveQuest },
{ "RemoveActiveQuest", nullptr }, // not implemented
{ "RemoveRewardedQuest", nullptr }, // not implemented
{ "AreaExploredOrEventHappens", &LuaPlayer::AreaExploredOrEventHappens },
{ "GroupEventHappens", &LuaPlayer::GroupEventHappens },
{ "KilledMonsterCredit", &LuaPlayer::KilledMonsterCredit },
{ "KilledPlayerCredit", nullptr }, // not implemented
{ "KillGOCredit", nullptr }, // not implemented
{ "TalkedToCreature", &LuaPlayer::TalkedToCreature },
{ "AddComboPoints", &LuaPlayer::AddComboPoints },
{ "GainSpellComboPoints", nullptr }, // not implemented
{ "ClearComboPoints", &LuaPlayer::ClearComboPoints },
{ "RemoveSpell", &LuaPlayer::RemoveSpell },
{ "ResetTalents", &LuaPlayer::ResetTalents },
{ "ResetTalentsCost", &LuaPlayer::ResetTalentsCost },
{ "AddTalent", nullptr }, // not implemented
{ "RemoveFromGroup", &LuaPlayer::RemoveFromGroup },
{ "KillPlayer", &LuaPlayer::KillPlayer },
{ "DurabilityLossAll", &LuaPlayer::DurabilityLossAll },
Expand All @@ -4544,7 +4523,6 @@ namespace LuaPlayer
{ "DurabilityRepairAll", &LuaPlayer::DurabilityRepairAll },
{ "DurabilityRepair", &LuaPlayer::DurabilityRepair },
{ "LeaveBattleground", &LuaPlayer::LeaveBattleground },
{ "BindToInstance", nullptr }, // not implemented
{ "UnbindInstance", &LuaPlayer::UnbindInstance },
{ "UnbindAllInstances", &LuaPlayer::UnbindAllInstances },
{ "RemoveFromBattlegroundRaid", &LuaPlayer::RemoveFromBattlegroundRaid },
Expand Down Expand Up @@ -4591,6 +4569,30 @@ namespace LuaPlayer
{ "ModifyArenaPoints", &LuaPlayer::ModifyArenaPoints },
#endif

// Not implemented methods
{ "GetChampioningFaction", nullptr }, // not implemented
{ "GetRecruiterId", nullptr }, // not implemented
{ "SetMovement", nullptr }, // not implemented
{ "SetFFA", nullptr }, // not implemented
{ "IsImmuneToEnvironmentalDamage", nullptr }, // not implemented
{ "InRandomLfgDungeon", nullptr }, // not implemented
{ "HasPendingBind", nullptr }, // not implemented
{ "CanFlyInZone", nullptr }, // not implemented
{ "IsNeverVisible", nullptr }, // not implemented,
{ "IsUsingLfg", nullptr }, // not implemented,
{ "HasReceivedQuestReward", nullptr }, // not implemented,
{ "IsOutdoorPvPActive", nullptr }, // not implemented,
{ "IsARecruiter", nullptr }, // not implemented,
{ "RemovePet", nullptr }, // not implemented
{ "SummonPet", nullptr }, // not implemented
{ "RemoveActiveQuest", nullptr }, // not implemented
{ "RemoveRewardedQuest", nullptr }, // not implemented
{ "KilledPlayerCredit", nullptr }, // not implemented
{ "KillGOCredit", nullptr }, // not implemented
{ "GainSpellComboPoints", nullptr }, // not implemented
{ "AddTalent", nullptr }, // not implemented
{ "BindToInstance", nullptr }, // not implemented

{ NULL, NULL }
};
};
Expand Down
Loading

0 comments on commit e53e406

Please sign in to comment.