Skip to content

Commit

Permalink
CMangos method header cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jul 30, 2023
1 parent 444fab1 commit f2507a0
Show file tree
Hide file tree
Showing 19 changed files with 95 additions and 82 deletions.
2 changes: 1 addition & 1 deletion CMangos/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 CMangos/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 CMangos/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 CMangos/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 }, // TC/Acore
{ "GetLootMode", nullptr }, // TC/Acore
{ "GetLootRecipient", &LuaCreature::GetLootRecipient },
{ "GetLootRecipientGroup", &LuaCreature::GetLootRecipientGroup },
{ "GetNPCFlags", &LuaCreature::GetNPCFlags },
Expand All @@ -1529,7 +1527,6 @@ namespace LuaCreature
{ "GetCreatureFamily", &LuaCreature::GetCreatureFamily },

// Setters
{ "SetRegeneratingHealth", nullptr }, // TC/Acore
{ "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 }, // TC/Acore
{ "SetNPCFlags", &LuaCreature::SetNPCFlags },
{ "SetReactState", nullptr }, // TC/Acore
{ "SetDeathState", &LuaCreature::SetDeathState },
{ "SetWalk", &LuaCreature::SetWalk },
{ "SetHomePosition", &LuaCreature::SetHomePosition },
{ "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots },

// Boolean
{ "IsRegeneratingHealth", &LuaCreature::IsRegeneratingHealth },
{ "IsDungeonBoss", nullptr }, // TC/Acore
{ "IsWorldBoss", &LuaCreature::IsWorldBoss },
{ "IsRacialLeader", &LuaCreature::IsRacialLeader },
{ "IsCivilian", &LuaCreature::IsCivilian },
{ "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", 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", nullptr }, // TC/Acore
{ "HasLootMode", nullptr }, // TC/Acore
{ "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 }, // TC/Acore
{ "ResetLootMode", nullptr }, // TC/Acore
{ "RemoveLootMode", nullptr }, // TC/Acore
{ "SaveToDB", &LuaCreature::SaveToDB },
{ "SelectVictim", &LuaCreature::SelectVictim },
{ "MoveWaypoint", &LuaCreature::MoveWaypoint },
{ "UpdateEntry", &LuaCreature::UpdateEntry },

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

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion CMangos/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 CMangos/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 CMangos/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 CMangos/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 @@ -460,9 +459,12 @@ namespace LuaGroup

// 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 CMangos/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 CMangos/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 },
#if defined(TBC) || defined(WOTLK)
Expand All @@ -836,6 +835,9 @@ namespace LuaItem
// Other
{ "SaveToDB", &LuaItem::SaveToDB },

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

{ NULL, NULL }
};
};
Expand Down
2 changes: 1 addition & 1 deletion CMangos/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 CMangos/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
Loading

0 comments on commit f2507a0

Please sign in to comment.