| 1 | /* |
|---|
| 2 | * ArcScript Scripts for Arcemu MMORPG Server |
|---|
| 3 | * Copyright (C) 2008-2009 Arcemu Team |
|---|
| 4 | * Copyright (C) 2007 Moon++ <http://www.moonplusplus.com/> |
|---|
| 5 | * |
|---|
| 6 | * This program is free software: you can redistribute it and/or modify |
|---|
| 7 | * it under the terms of the GNU General Public License as published by |
|---|
| 8 | * the Free Software Foundation, either version 3 of the License, or |
|---|
| 9 | * any later version. |
|---|
| 10 | * |
|---|
| 11 | * This program is distributed in the hope that it will be useful, |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | * GNU General Public License for more details. |
|---|
| 15 | * |
|---|
| 16 | * You should have received a copy of the GNU General Public License |
|---|
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 18 | */ |
|---|
| 19 | #ifndef LUA_FUNCTIONTABLES_H |
|---|
| 20 | #define LUA_FUNCTIONTABLES_H |
|---|
| 21 | /************************************************************************/ |
|---|
| 22 | /* SCRIPT FUNCTION TABLES */ |
|---|
| 23 | /************************************************************************/ |
|---|
| 24 | |
|---|
| 25 | RegType<Item> ItemMethods[] = { |
|---|
| 26 | // Item Gossip functions |
|---|
| 27 | { "GossipCreateMenu", &luaItem::GossipCreateMenu }, |
|---|
| 28 | { "GossipMenuAddItem", &luaItem::GossipMenuAddItem }, |
|---|
| 29 | { "GossipSendMenu", &luaItem::GossipSendMenu }, |
|---|
| 30 | { "GossipComplete", &luaItem::GossipComplete }, |
|---|
| 31 | { "GossipSendPOI", &luaItem::GossipSendPOI }, |
|---|
| 32 | { "PerformWorldDBQuery", &luaItem::PerformWorldDBQuery }, |
|---|
| 33 | { "PerformCharDBQuery", &luaItem::PerformCharDBQuery }, |
|---|
| 34 | { "GetOwner", &luaItem::GetOwner }, |
|---|
| 35 | { "AddEnchantment", &luaItem::AddEnchantment }, |
|---|
| 36 | { "RemoveEnchantment", &luaItem::RemoveEnchantment }, |
|---|
| 37 | //hypersniper added commands |
|---|
| 38 | { "GetEntryId", &luaItem::GetEntryId }, |
|---|
| 39 | { "GetName", &luaItem::GetName }, |
|---|
| 40 | { "GetSpellId", &luaItem::GetSpellId }, |
|---|
| 41 | { "GetSpellTrigger", &luaItem::GetSpellTrigger }, |
|---|
| 42 | { "GetGUID", &luaItem::GetGUID }, |
|---|
| 43 | { "AddLoot", &luaItem::AddLoot}, |
|---|
| 44 | //3004 ends here |
|---|
| 45 | { "SetByteValue", &luaItem::SetByteValue }, |
|---|
| 46 | { "GetByteValue", &luaItem::GetByteValue }, |
|---|
| 47 | { "GetItemLink", &luaItem::GetItemLink }, |
|---|
| 48 | { "GetItemLevel", &luaItem::GetItemLevel }, |
|---|
| 49 | { "GetRequiredLevel", &luaItem::GetRequiredLevel }, |
|---|
| 50 | { "GetBuyPrice", &luaItem::GetBuyPrice }, |
|---|
| 51 | { "GetSellPrice", &luaItem::GetSellPrice }, |
|---|
| 52 | { "RepairItem", &luaItem::RepairItem }, |
|---|
| 53 | { "GetMaxDurability", &luaItem::GetMaxDurability }, |
|---|
| 54 | { "GetDurability", &luaItem::GetDurability }, |
|---|
| 55 | { "HasEnchantment", &luaItem::HasEnchantment }, |
|---|
| 56 | { "ModifyEnchantmentTime", &luaItem::ModifyEnchantmentTime }, |
|---|
| 57 | { "SetStackCount", &luaItem::SetStackCount }, |
|---|
| 58 | { "HasFlag", &luaItem::HasFlag }, |
|---|
| 59 | { "IsSoulbound", &luaItem::IsSoulbound }, |
|---|
| 60 | { "IsAccountbound", &luaItem::IsAccountbound }, |
|---|
| 61 | { "IsContainer", &luaItem::IsContainer }, |
|---|
| 62 | { "GetContainerItemCount", &luaItem::GetContainerItemCount }, |
|---|
| 63 | { "GetEquippedSlot", &luaItem::GetEquippedSlot }, |
|---|
| 64 | { "GetObjectType", &luaItem::GetObjectType }, |
|---|
| 65 | { NULL, NULL }, |
|---|
| 66 | }; |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | RegType<Unit> UnitMethods[] = { |
|---|
| 72 | { "GossipCreateMenu", &luaUnit::GossipCreateMenu }, |
|---|
| 73 | { "GossipMenuAddItem", &luaUnit::GossipMenuAddItem }, |
|---|
| 74 | { "GossipSendMenu", &luaUnit::GossipSendMenu }, |
|---|
| 75 | { "GossipComplete", &luaUnit::GossipComplete }, |
|---|
| 76 | { "GossipSendPOI", &luaUnit::GossipSendPOI }, |
|---|
| 77 | { "GetName", &luaUnit::GetName }, |
|---|
| 78 | { "SendChatMessage", &luaUnit::SendChatMessage }, |
|---|
| 79 | { "MoveTo", &luaUnit::MoveTo }, |
|---|
| 80 | { "SetMovementType", &luaUnit::SetMovementType }, |
|---|
| 81 | { "CastSpell", &luaUnit::CastSpell }, |
|---|
| 82 | { "SpawnCreature", &luaUnit::SpawnCreature }, |
|---|
| 83 | { "SpawnGameObject", &luaUnit::SpawnGameObject }, |
|---|
| 84 | { "GetX", &luaUnit::GetX }, |
|---|
| 85 | { "GetY", &luaUnit::GetY }, |
|---|
| 86 | { "GetZ", &luaUnit::GetZ }, |
|---|
| 87 | { "GetO", &luaUnit::GetO }, |
|---|
| 88 | { "IsPlayer", &luaUnit::IsPlayer }, |
|---|
| 89 | { "IsCreature", &luaUnit::IsCreature }, |
|---|
| 90 | { "RegisterEvent", &luaUnit::RegisterEvent }, |
|---|
| 91 | { "RemoveEvents", &luaUnit::RemoveEvents }, |
|---|
| 92 | { "SendBroadcastMessage", &luaUnit::SendBroadcastMessage }, |
|---|
| 93 | { "SendAreaTriggerMessage", &luaUnit::SendAreaTriggerMessage }, |
|---|
| 94 | { "MarkQuestObjectiveAsComplete", &luaUnit::MarkQuestObjectiveAsComplete }, |
|---|
| 95 | { "LearnSpell", &luaUnit::LearnSpell }, |
|---|
| 96 | { "UnlearnSpell", &luaUnit::UnlearnSpell }, |
|---|
| 97 | { "HasFinishedQuest", &luaUnit::HasFinishedQuest }, |
|---|
| 98 | { "GetItemCount", &luaUnit::GetItemCount }, |
|---|
| 99 | { "IsInCombat", &luaUnit::IsInCombat }, |
|---|
| 100 | { "GetMainTank", &luaUnit::GetMainTank }, |
|---|
| 101 | { "GetAddTank", &luaUnit::GetAddTank }, |
|---|
| 102 | { "ClearThreatList", &luaUnit::ClearThreatList }, |
|---|
| 103 | { "GetTauntedBy", &luaUnit::GetTauntedBy }, |
|---|
| 104 | { "SetTauntedBy", &luaUnit::SetTauntedBy }, |
|---|
| 105 | { "SetSoulLinkedWith", &luaUnit::SetSoulLinkedWith }, |
|---|
| 106 | { "GetSoulLinkedWith", &luaUnit::GetSoulLinkedWith }, |
|---|
| 107 | { "ChangeTarget", &luaUnit::ChangeTarget }, |
|---|
| 108 | { "GetHealthPct", &luaUnit::GetHealthPct }, |
|---|
| 109 | { "SetHealthPct", &luaUnit::SetHealthPct }, |
|---|
| 110 | { "GetManaPct", &luaUnit::GetManaPct }, |
|---|
| 111 | { "Despawn", &luaUnit::Despawn }, |
|---|
| 112 | { "GetUnitBySqlId", &luaUnit::GetUnitBySqlId }, |
|---|
| 113 | { "PlaySoundToSet", &luaUnit::PlaySoundToSet }, |
|---|
| 114 | { "RemoveAura", &luaUnit::RemoveAura }, |
|---|
| 115 | { "StopMovement", &luaUnit::StopMovement }, |
|---|
| 116 | { "Emote", &luaUnit::Emote }, |
|---|
| 117 | { "GetInstanceID", &luaUnit::GetInstanceID }, |
|---|
| 118 | { "GetClosestPlayer", &luaUnit::GetClosestPlayer }, |
|---|
| 119 | { "GetRandomPlayer", &luaUnit::GetRandomPlayer }, |
|---|
| 120 | { "GetRandomFriend", &luaUnit::GetRandomFriend }, |
|---|
| 121 | { "GetRandomEnemy", &luaUnit::GetRandomEnemy }, |
|---|
| 122 | { "AddItem", &luaUnit::AddItem }, |
|---|
| 123 | { "RemoveItem", &luaUnit::RemoveItem }, |
|---|
| 124 | { "CreateCustomWaypointMap", &luaUnit::CreateCustomWaypointMap }, |
|---|
| 125 | { "CreateWaypoint", &luaUnit::CreateWaypoint }, |
|---|
| 126 | { "MoveToWaypoint", &luaUnit::MoveToWaypoint }, |
|---|
| 127 | { "DestroyCustomWaypointMap", &luaUnit::DestroyCustomWaypointMap }, |
|---|
| 128 | { "SetCombatCapable", &luaUnit::DisableCombat }, |
|---|
| 129 | { "SetCombatMeleeCapable", &luaUnit::DisableMelee }, |
|---|
| 130 | { "SetCombatRangedCapable", &luaUnit::DisableRanged }, |
|---|
| 131 | { "SetCombatSpellCapable", &luaUnit::DisableSpells }, |
|---|
| 132 | { "SetCombatTargetingCapable", &luaUnit::DisableTargeting }, |
|---|
| 133 | { "SetNPCFlags", &luaUnit::SetNPCFlags }, |
|---|
| 134 | { "SetModel", &luaUnit::SetModel }, |
|---|
| 135 | { "SetScale", &luaUnit::SetScale }, |
|---|
| 136 | { "SetFaction", &luaUnit::SetFaction }, |
|---|
| 137 | { "SetStandState",&luaUnit::SetStandState }, |
|---|
| 138 | { "Teleport" , &luaUnit::TeleportUnit }, |
|---|
| 139 | { "GetPlayerClass", &luaUnit::GetPlayerClass }, |
|---|
| 140 | { "ClearThreatList", &luaUnit::ClearHateList }, |
|---|
| 141 | { "WipeThreatList", &luaUnit::WipeHateList }, |
|---|
| 142 | { "WipeTargetList", &luaUnit::WipeTargetList }, |
|---|
| 143 | { "WipeCurrentTarget", &luaUnit::WipeCurrentTarget }, |
|---|
| 144 | { "GetHealth", &luaUnit::GetHealth }, |
|---|
| 145 | { "GetMaxHealth", &luaUnit::GetMaxHealth }, |
|---|
| 146 | { "SetHealth", &luaUnit::SetHealth }, |
|---|
| 147 | { "SetMaxHealth", &luaUnit::SetMaxHealth }, |
|---|
| 148 | { "HasAura", &luaUnit::HasAura }, |
|---|
| 149 | { "Land", &luaUnit::Land }, |
|---|
| 150 | { "SetFlying", &luaUnit::SetFlying }, |
|---|
| 151 | { "SetMana", &luaUnit::SetMana }, |
|---|
| 152 | { "SetMaxMana", &luaUnit::SetMaxMana }, |
|---|
| 153 | { "GetDistance", &luaUnit::GetDistance }, |
|---|
| 154 | { "GetGUID", &luaUnit::GetGUID }, |
|---|
| 155 | { "GetCreatureNearestCoords", &luaUnit::GetCreatureNearestCoords }, |
|---|
| 156 | { "CastSpellAoF", &luaUnit::CastSpellAoF }, |
|---|
| 157 | { "GetGameObjectNearestCoords", &luaUnit::GetGameObjectNearestCoords }, |
|---|
| 158 | { "SetInFront", &luaUnit::SetInFront }, |
|---|
| 159 | { "RemoveAllAuras", &luaUnit::RemoveAllAuras }, |
|---|
| 160 | { "ReturnToSpawnPoint", &luaUnit::ReturnToSpawnPoint }, |
|---|
| 161 | { "CancelSpell", &luaUnit::CancelSpell }, |
|---|
| 162 | { "IsAlive", &luaUnit::IsAlive }, |
|---|
| 163 | { "IsDead", &luaUnit::IsDead }, |
|---|
| 164 | { "IsInWorld", &luaUnit::IsInWorld }, |
|---|
| 165 | { "GetZoneId", &luaUnit::GetZoneId }, |
|---|
| 166 | { "GetMana", &luaUnit::GetMana }, |
|---|
| 167 | { "GetMaxMana", &luaUnit::GetMaxMana }, |
|---|
| 168 | { "Root", &luaUnit::Root }, |
|---|
| 169 | { "Unroot", &luaUnit::Unroot }, |
|---|
| 170 | { "IsCreatureMoving", &luaUnit::IsCreatureMoving }, |
|---|
| 171 | { "SetOutOfCombatRange", &luaUnit::SetOutOfCombatRange }, |
|---|
| 172 | { "ModifyRunSpeed", &luaUnit::ModifyRunSpeed }, |
|---|
| 173 | { "ModifyWalkSpeed", &luaUnit::ModifyWalkSpeed }, |
|---|
| 174 | { "ModifyFlySpeed" , &luaUnit::ModifyFlySpeed }, |
|---|
| 175 | { "GetCurrentSpell", &luaUnit::GetCurrentSpell }, |
|---|
| 176 | { "IsFlying", &luaUnit::IsFlying }, |
|---|
| 177 | { "SetRotation", &luaUnit::SetRotation }, |
|---|
| 178 | { "SetOrientation", &luaUnit::SetOrientation }, |
|---|
| 179 | { "GetSpawnX", &luaUnit::GetSpawnX }, |
|---|
| 180 | { "GetSpawnY", &luaUnit::GetSpawnY }, |
|---|
| 181 | { "GetSpawnZ", &luaUnit::GetSpawnZ }, |
|---|
| 182 | { "GetSpawnO", &luaUnit::GetSpawnO }, |
|---|
| 183 | { "GetInRangePlayersCount", &luaUnit::GetInRangePlayersCount }, |
|---|
| 184 | { "GetEntry", &luaUnit::GetEntry }, |
|---|
| 185 | { "SetMoveRunFlag", &luaUnit::SetMoveRunFlag }, |
|---|
| 186 | { "GetAIState", &luaUnit::GetAIState }, |
|---|
| 187 | { "ModUInt32Value", &luaUnit::ModUInt32Value }, |
|---|
| 188 | { "ModFloatValue", &luaUnit::ModFloatValue }, |
|---|
| 189 | { "SetUInt32Value", &luaUnit::SetUInt32Value }, |
|---|
| 190 | { "SetUInt64Value", &luaUnit::SetUInt64Value }, |
|---|
| 191 | { "SetFloatValue", &luaUnit::SetFloatValue }, |
|---|
| 192 | { "GetUInt32Value", &luaUnit::GetUInt32Value }, |
|---|
| 193 | { "GetUInt64Value", &luaUnit::GetUInt64Value }, |
|---|
| 194 | { "GetFloatValue", &luaUnit::GetFloatValue }, |
|---|
| 195 | { "SendPacket", &luaUnit::SendPacket }, |
|---|
| 196 | { "AdvanceQuestObjective", &luaUnit::AdvanceQuestObjective }, |
|---|
| 197 | { "Heal", &luaUnit::Heal }, |
|---|
| 198 | { "Energize", &luaUnit::Energize }, |
|---|
| 199 | { "SendChatMessageAlternateEntry", &luaUnit::SendChatMessageAlternateEntry }, |
|---|
| 200 | { "SendChatMessageToPlayer", &luaUnit::SendChatMessageToPlayer }, |
|---|
| 201 | { "SetPowerType", &luaUnit::SetPowerType }, |
|---|
| 202 | { "Strike", &luaUnit::Strike }, |
|---|
| 203 | { "SetAttackTimer", &luaUnit::SetAttackTimer }, |
|---|
| 204 | { "Kill", &luaUnit::Kill }, |
|---|
| 205 | { "DealDamage", &luaUnit::DealDamage }, |
|---|
| 206 | { "IsInFront", &luaUnit::IsInFront }, |
|---|
| 207 | { "IsInBack", &luaUnit::IsInBack }, |
|---|
| 208 | { "IsPacified", &luaUnit::IsPacified }, |
|---|
| 209 | { "IsStunned", &luaUnit::IsStunned }, |
|---|
| 210 | { "IsFeared", &luaUnit::IsFeared }, |
|---|
| 211 | { "CreateGuardian", &luaUnit::CreateGuardian }, |
|---|
| 212 | { "HandleEvent", &luaUnit::HandleEvent }, |
|---|
| 213 | { "HasInRangeObjects", &luaUnit::HasInRangeObjects }, |
|---|
| 214 | { "IsInWater", &luaUnit::IsInWater }, |
|---|
| 215 | { "IsInArc", &luaUnit::IsInArc }, |
|---|
| 216 | { "GetInRangeObjects", &luaUnit::GetInRangeGameObjects }, |
|---|
| 217 | { "GetInRangeObjectsCount", &luaUnit::GetInRangeObjectsCount }, |
|---|
| 218 | { "GetAITargetsCount", &luaUnit::GetAITargetsCount }, |
|---|
| 219 | { "SetUnitToFollow", &luaUnit::SetUnitToFollow }, |
|---|
| 220 | { "GetUnitToFollow", &luaUnit::GetUnitToFollow }, |
|---|
| 221 | { "DismissPet", &luaUnit::DismissPet }, |
|---|
| 222 | { "IsPet", &luaUnit::IsPet }, |
|---|
| 223 | { "SetNextTarget", &luaUnit::SetNextTarget }, |
|---|
| 224 | { "GetNextTarget", &luaUnit::GetNextTarget }, |
|---|
| 225 | { "SetPetOwner", &luaUnit::SetPetOwner }, |
|---|
| 226 | { "GetPetOwner", &luaUnit::GetPetOwner }, |
|---|
| 227 | { "CalcToDistance", &luaUnit::CalcToDistance }, |
|---|
| 228 | { "CalcAngle", &luaUnit::CalcAngle }, |
|---|
| 229 | { "CalcRadAngle", &luaUnit::CalcRadAngle }, |
|---|
| 230 | { "SetFacing", &luaUnit::SetFacing }, |
|---|
| 231 | { "SetDeathState", &luaUnit::SetDeathState }, |
|---|
| 232 | { "SetInvisible", &luaUnit::IsInvisible }, |
|---|
| 233 | { "SetInvincible", &luaUnit::IsInvincible }, |
|---|
| 234 | { "ResurrectPlayer", &luaUnit::ResurrectPlayer }, |
|---|
| 235 | { "KickPlayer", &luaUnit::KickPlayer }, |
|---|
| 236 | { "CanCallForHelp", &luaUnit::CanCallForHelp }, |
|---|
| 237 | { "CallForHelpHp", &luaUnit::CallForHelpHp }, |
|---|
| 238 | { "SetCreatureNameById", &luaUnit::SetCreatureName }, |
|---|
| 239 | { "GetAITargets", &luaUnit::GetAITargets }, |
|---|
| 240 | { "GetInRangePlayers", &luaUnit::GetInRangePlayers }, |
|---|
| 241 | { "GetUnitByGUID", &luaUnit::GetUnitByGUID }, |
|---|
| 242 | { "RemoveFromWorld", &luaUnit::RemoveFromWorld }, |
|---|
| 243 | { "GetFaction", &luaUnit::GetFaction }, |
|---|
| 244 | { "EnableMoveFly", &luaUnit::MoveFly }, |
|---|
| 245 | { "SpellNonMeleeDamageLog", &luaUnit::SpellNonMeleeDamageLog }, |
|---|
| 246 | { "DisableRespawn", &luaUnit::NoRespawn }, |
|---|
| 247 | { "ModThreat", &luaUnit::ModThreat }, |
|---|
| 248 | { "GetThreat", &luaUnit::GetThreatByPtr }, |
|---|
| 249 | { "GetInRangeFriends", &luaUnit::GetInRangeFriends }, |
|---|
| 250 | { "GetPowerType", &luaUnit::GetPowerType }, |
|---|
| 251 | { "GetMapId", &luaUnit::GetMapId }, |
|---|
| 252 | { "AttackReaction", &luaUnit::AttackReaction }, |
|---|
| 253 | { "EventCastSpell", &luaUnit::EventCastSpell }, |
|---|
| 254 | { "IsPlayerMoving", &luaUnit::IsPlayerMoving }, |
|---|
| 255 | { "IsPlayerAttacking", &luaUnit::IsPlayerAttacking }, |
|---|
| 256 | //{ "IsPlayerAtWar", &luaUnit::IsPlayerAtWar }, |
|---|
| 257 | { "RemoveThreat", &luaUnit::RemoveThreatByPtr }, |
|---|
| 258 | { "SetPlayerAtWar", &luaUnit::SetPlayerAtWar }, |
|---|
| 259 | { "GetFactionStanding", &luaUnit::GetFactionStanding }, |
|---|
| 260 | { "PlaySpellVisual", &luaUnit::PlaySpellVisual }, |
|---|
| 261 | { "GetPlayerLevel", &luaUnit::GetLevel }, |
|---|
| 262 | { "GetLevel", &luaUnit::GetLevel }, |
|---|
| 263 | { "SetPlayerLevel", &luaUnit::SetLevel }, |
|---|
| 264 | { "SetLevel", &luaUnit::SetLevel }, |
|---|
| 265 | { "SetStanding", &luaUnit::SetPlayerStanding }, |
|---|
| 266 | { "GetStanding", &luaUnit::GetStanding }, |
|---|
| 267 | { "HasItem", &luaUnit::HasItem }, |
|---|
| 268 | { "AdvanceSkill", &luaUnit::AdvanceSkill }, |
|---|
| 269 | { "AddSkill", &luaUnit::AddSkill }, |
|---|
| 270 | { "RemoveSkill", &luaUnit::RemoveSkill }, |
|---|
| 271 | { "EnableFlyCheat", &luaUnit::FlyCheat }, |
|---|
| 272 | { "AddAssistTarget", &luaUnit::AddAssistTargets }, |
|---|
| 273 | { "GetCurrentSpellId", &luaUnit::GetCurrentSpellId }, |
|---|
| 274 | { "GetPlayerRace", &luaUnit::GetPlayerRace }, |
|---|
| 275 | { "RemoveAurasByMechanic", &luaUnit::RemoveAurasByMechanic }, |
|---|
| 276 | { "RemoveAurasType", &luaUnit::RemoveAurasType }, |
|---|
| 277 | { "AddAura", &luaUnit::AddAura }, |
|---|
| 278 | { "SetAIState", &luaUnit::SetAIState }, |
|---|
| 279 | { "InterruptSpell", &luaUnit::InterruptSpell }, |
|---|
| 280 | { "RemoveStealth", &luaUnit::RemoveStealth }, |
|---|
| 281 | { "IsPoisoned", &luaUnit::IsPoisoned }, |
|---|
| 282 | { "SetStealthLevel", &luaUnit::SetStealth }, |
|---|
| 283 | { "GetStealthLevel", &luaUnit::GetStealthLevel }, |
|---|
| 284 | { "IsStealthed", &luaUnit::IsStealthed }, |
|---|
| 285 | { "RemoveFlag", &luaUnit::RemoveFlag }, |
|---|
| 286 | { "RegisterAIUpdateEvent", &luaUnit::RegisterAIUpdateEvent }, |
|---|
| 287 | { "ModifyAIUpdateEvent", &luaUnit::ModifyAIUpdateEvent }, |
|---|
| 288 | { "RemoveAIUpdateEvent", &luaUnit::RemoveAIUpdateEvent }, |
|---|
| 289 | { "DeleteWaypoint", &luaUnit::deleteWaypoint }, |
|---|
| 290 | { "DealGoldCost", &luaUnit::DealGoldCost }, |
|---|
| 291 | { "DealGoldMerit", &luaUnit::DealGoldMerit }, |
|---|
| 292 | { "CanUseCommand", &luaUnit::CanUseCommand }, |
|---|
| 293 | { "DeMorph", &luaUnit::DeMorph }, |
|---|
| 294 | { "Attack", &luaUnit::Attack }, |
|---|
| 295 | { "GetTarget", &luaUnit::GetTarget }, |
|---|
| 296 | { "GetSelection", &luaUnit::GetSelection }, |
|---|
| 297 | { "SetMount", &luaUnit::SetMount }, |
|---|
| 298 | { "StartQuest", &luaUnit::StartQuest }, |
|---|
| 299 | { "FinishQuest", &luaUnit::FinishQuest }, |
|---|
| 300 | { "RepairAllPlayerItems", &luaUnit::RepairAllPlayerItems }, |
|---|
| 301 | { "SetKnownTitle", &luaUnit::SetKnownTitle }, |
|---|
| 302 | { "LifeTimeKills", &luaUnit::LifeTimeKills }, |
|---|
| 303 | { "HasTitle", &luaUnit::HasTitle }, |
|---|
| 304 | { "GetMaxSkill", &luaUnit::GetMaxSkill }, |
|---|
| 305 | { "GetCurrentSkill", &luaUnit::GetCurrentSkill }, |
|---|
| 306 | { "HasSkill", &luaUnit::HasSkill }, |
|---|
| 307 | { "GetGuildName", &luaUnit::GetGuildName }, |
|---|
| 308 | { "ClearCooldownForSpell", &luaUnit::ClearCooldownForSpell }, |
|---|
| 309 | { "HasSpell", &luaUnit::HasSpell }, |
|---|
| 310 | { "ClearAllCooldowns", &luaUnit::ClearAllCooldowns }, |
|---|
| 311 | { "ResetAllTalents", &luaUnit::ResetAllTalents }, |
|---|
| 312 | { "GetAccountName", &luaUnit::GetAccountName }, |
|---|
| 313 | { "SavePlayer", &luaUnit::SavePlayer }, |
|---|
| 314 | { "HasQuest", &luaUnit::HasQuest }, |
|---|
| 315 | { "RemovePvPFlag", &luaUnit::RemovePvPFlag }, |
|---|
| 316 | { "RemoveNegativeAuras", &luaUnit::RemoveNegativeAuras }, |
|---|
| 317 | { "GossipMiscAction", &luaUnit::GossipMiscAction }, |
|---|
| 318 | { "EquipWeapons", &luaUnit::EquipWeapons }, |
|---|
| 319 | { "Dismount", &luaUnit::Dismount }, |
|---|
| 320 | { "AdvanceAllSkills", &luaUnit::AdvanceAllSkills }, |
|---|
| 321 | { "GetTeam", &luaUnit::GetTeam }, |
|---|
| 322 | { "Possess", &luaUnit::Possess }, |
|---|
| 323 | { "Unpossess", &luaUnit::Unpossess }, |
|---|
| 324 | { "StartTaxi", &luaUnit::StartTaxi }, |
|---|
| 325 | //Halestorm Added Commands |
|---|
| 326 | { "ChannelSpell", &luaUnit::ChannelSpell }, |
|---|
| 327 | { "StopChannel", &luaUnit::StopChannel }, |
|---|
| 328 | //{ "SetWorldState", &luaUnit::SetWorldState }, |
|---|
| 329 | { "EnableFlight", &luaUnit::EnableFlight }, |
|---|
| 330 | { "GetCoinage", &luaUnit::GetCoinage }, |
|---|
| 331 | { "FlagPvP", &luaUnit::FlagPvP }, |
|---|
| 332 | ////////////////////////////////////////////////////////////////////////// |
|---|
| 333 | // WORLD PVP NOT SUPPORTED |
|---|
| 334 | ////////////////////////////////////////////////////////////////////////// |
|---|
| 335 | //{ "FlagWorldPvP", &luaUnit::FlagWorldPvP }, |
|---|
| 336 | //{ "DisableWorldPvP", &luaUnit::DisableWorldPvP }, |
|---|
| 337 | { "GetDisplay", &luaUnit::GetDisplay }, |
|---|
| 338 | { "GetNativeDisplay", &luaUnit::GetNativeDisplay }, |
|---|
| 339 | { "IsMounted", &luaUnit::IsMounted }, |
|---|
| 340 | //hypersniper added commands |
|---|
| 341 | { "GetGameTime", &luaUnit::GetGameTime }, |
|---|
| 342 | { "PlaySoundToPlayer", &luaUnit::PlaySoundToPlayer }, |
|---|
| 343 | { "GetDuelState", &luaUnit::GetDuelState }, |
|---|
| 344 | { "SetPosition", &luaUnit::SetPosition}, |
|---|
| 345 | { "CastSpellOnTarget", &luaUnit::CastSpellOnTarget}, |
|---|
| 346 | { "GetLandHeight", &luaUnit::GetLandHeight}, |
|---|
| 347 | { "QuestAddStarter", &luaUnit::QuestAddStarter}, |
|---|
| 348 | { "QuestAddFinisher", &luaUnit::QuestAddFinisher}, |
|---|
| 349 | { "SetPlayerSpeed", &luaUnit::SetPlayerSpeed}, |
|---|
| 350 | { "GiveHonor", &luaUnit::GiveHonor}, |
|---|
| 351 | { "SetBindPoint", &luaUnit::SetBindPoint}, |
|---|
| 352 | { "SoftDisconnect", &luaUnit::SoftDisconnect}, |
|---|
| 353 | { "SetZoneWeather", &luaUnit::SetZoneWeather}, |
|---|
| 354 | { "SetPlayerWeather", &luaUnit::SetPlayerWeather}, |
|---|
| 355 | { "SendPacketToPlayer", &luaUnit::SendPacketToPlayer}, |
|---|
| 356 | { "SendPacketToZone", &luaUnit::SendPacketToZone}, |
|---|
| 357 | { "SendPacketToWorld", &luaUnit::SendPacketToWorld}, |
|---|
| 358 | { "SendPacketToInstance", &luaUnit::SendPacketToInstance}, |
|---|
| 359 | { "PlayerSendChatMessage", &luaUnit::PlayerSendChatMessage}, |
|---|
| 360 | { "GetDistanceYards", &luaUnit::GetDistanceYards}, |
|---|
| 361 | { "VendorAddItem", &luaUnit::VendorAddItem}, |
|---|
| 362 | { "VendorRemoveItem", &luaUnit::VendorRemoveItem}, |
|---|
| 363 | { "VendorRemoveAllItems", &luaUnit::VendorRemoveAllItems}, |
|---|
| 364 | { "CreatureHasQuest", &luaUnit::CreatureHasQuest}, |
|---|
| 365 | { "SendVendorWindow", &luaUnit::SendVendorWindow}, |
|---|
| 366 | { "SendTrainerWindow", &luaUnit::SendTrainerWindow}, |
|---|
| 367 | { "SendInnkeeperWindow", &luaUnit::SendInnkeeperWindow}, |
|---|
| 368 | { "SendBankWindow", &luaUnit::SendBankWindow}, |
|---|
| 369 | { "SendAuctionWindow", &luaUnit::SendAuctionWindow}, |
|---|
| 370 | { "SendBattlegroundWindow", &luaUnit::SendBattlegroundWindow}, |
|---|
| 371 | { "GetInventoryItem", &luaUnit::GetInventoryItem}, |
|---|
| 372 | { "GetInventoryItemById", &luaUnit::GetInventoryItemById}, |
|---|
| 373 | { "PhaseSet", &luaUnit::PhaseSet}, |
|---|
| 374 | { "PhaseAdd", &luaUnit::PhaseAdd}, |
|---|
| 375 | { "PhaseDelete", &luaUnit::PhaseDelete}, |
|---|
| 376 | { "GetPhase", &luaUnit::GetPhase}, |
|---|
| 377 | { "AggroWithInRangeFriends", &luaUnit::AggroWithInRangeFriends}, |
|---|
| 378 | { "GetPrimaryCombatTarget", &luaUnit::GetPrimaryCombatTarget}, |
|---|
| 379 | { "MoveRandomArea", &luaUnit::MoveRandomArea}, |
|---|
| 380 | { "SendLootWindow", &luaUnit::SendLootWindow}, |
|---|
| 381 | { "AddLoot", &luaUnit::AddLoot}, |
|---|
| 382 | { "SetPacified", &luaUnit::SetPacified}, |
|---|
| 383 | { "SpawnVehicle", &luaUnit::SpawnVehicle}, |
|---|
| 384 | { "SetVehicle", &luaUnit::SetVehicle}, |
|---|
| 385 | { "GetVehicle", &luaUnit::GetVehicle}, |
|---|
| 386 | { "RemoveFromVehicle", &luaUnit::RemoveFromVehicle}, |
|---|
| 387 | { "GetVehicleSeat", &luaUnit::GetVehicleSeat}, |
|---|
| 388 | { "IsVehicle", &luaUnit::IsVehicle}, |
|---|
| 389 | { "GetPassengerCount", &luaUnit::GetPassengerCount}, |
|---|
| 390 | { "MoveVehicle", &luaUnit::MoveVehicle}, |
|---|
| 391 | { "SetPlayerLock", &luaUnit::SetPlayerLock}, |
|---|
| 392 | //3004 ends here |
|---|
| 393 | { "GetGroupPlayers", &luaUnit::GetGroupPlayers}, |
|---|
| 394 | { "IsGm", &luaUnit::IsGm}, |
|---|
| 395 | { "GetDungeonDifficulty", &luaUnit::GetDungeonDifficulty}, |
|---|
| 396 | { "GetGroupLeader", &luaUnit::GetGroupLeader}, |
|---|
| 397 | { "SetGroupLeader", &luaUnit::SetGroupLeader}, |
|---|
| 398 | { "AddGroupMember", &luaUnit::AddGroupMember}, |
|---|
| 399 | { "SetDungeonDifficulty", &luaUnit::SetDungeonDifficulty}, |
|---|
| 400 | { "ExpandToRaid", &luaUnit::ExpandToRaid}, |
|---|
| 401 | { "SendPacketToGroup", &luaUnit::SendPacketToGroup}, |
|---|
| 402 | { "IsGroupFull", &luaUnit::IsGroupFull}, |
|---|
| 403 | //next 9 credit: Alvanaar |
|---|
| 404 | { "IsGroupedWith", &luaUnit::IsGroupedWith}, |
|---|
| 405 | { "GetTotalHonor", &luaUnit::GetTotalHonor}, |
|---|
| 406 | { "GetHonorToday", &luaUnit::GetHonorToday}, |
|---|
| 407 | { "GetHonorYesterday", &luaUnit::GetHonorYesterday}, |
|---|
| 408 | { "GetArenaPoints", &luaUnit::GetArenaPoints}, |
|---|
| 409 | { "AddArenaPoints", &luaUnit::AddArenaPoints}, |
|---|
| 410 | { "AddLifetimeKills", &luaUnit::AddLifetimeKills}, |
|---|
| 411 | { "GetGender", &luaUnit::GetGender}, //9 |
|---|
| 412 | { "SetGender", &luaUnit::SetGender}, |
|---|
| 413 | { "GetGroupType", &luaUnit::GetGroupType}, |
|---|
| 414 | //next 5: cred alvanaar |
|---|
| 415 | { "SendPacketToGuild", &luaUnit::SendPacketToGuild }, |
|---|
| 416 | { "GetGuildId", &luaUnit::GetGuildId }, |
|---|
| 417 | { "GetGuildRank", &luaUnit::GetGuildRank }, |
|---|
| 418 | { "SetGuildRank", &luaUnit::SetGuildRank }, |
|---|
| 419 | { "IsInGuild", &luaUnit::IsInGuild }, //5 |
|---|
| 420 | { "SendGuildInvite", &luaUnit::SendGuildInvite }, |
|---|
| 421 | { "DemoteGuildMember", &luaUnit::DemoteGuildMember }, |
|---|
| 422 | { "PromoteGuildMember", &luaUnit::PromoteGuildMember }, |
|---|
| 423 | { "SetGuildMotd", &luaUnit::SetGuildMotd }, |
|---|
| 424 | { "GetGuildMotd", &luaUnit::GetGuildMotd }, |
|---|
| 425 | { "SetGuildInformation", &luaUnit::SetGuildInformation }, |
|---|
| 426 | { "AddGuildMember", &luaUnit::AddGuildMember }, |
|---|
| 427 | { "RemoveGuildMember", &luaUnit::RemoveGuildMember }, |
|---|
| 428 | { "SetPublicNote", &luaUnit::SetPublicNote }, |
|---|
| 429 | { "SetOfficerNote", &luaUnit::SetOfficerNote }, |
|---|
| 430 | { "DisbandGuild", &luaUnit::DisbandGuild }, |
|---|
| 431 | { "ChangeGuildMaster", &luaUnit::ChangeGuildMaster }, |
|---|
| 432 | { "SendGuildChatMessage", &luaUnit::SendGuildChatMessage }, |
|---|
| 433 | { "SendGuildLog", &luaUnit::SendGuildLog }, |
|---|
| 434 | { "GuildBankDepositMoney", &luaUnit::GuildBankDepositMoney }, |
|---|
| 435 | { "GuildBankWithdrawMoney", &luaUnit::GuildBankWithdrawMoney }, |
|---|
| 436 | { "GetInstanceOwner", &luaUnit::GetInstanceOwner }, |
|---|
| 437 | { "GetGmRank", &luaUnit::GetGmRank }, |
|---|
| 438 | { "SetByteValue", &luaUnit::SetByteValue }, |
|---|
| 439 | { "GetByteValue", &luaUnit::GetByteValue }, |
|---|
| 440 | { "IsPvPFlagged", &luaUnit::IsPvPFlagged }, |
|---|
| 441 | { "IsFFAPvPFlagged", &luaUnit::IsFFAPvPFlagged }, |
|---|
| 442 | { "GetGuildLeader", &luaUnit::GetGuildLeader }, |
|---|
| 443 | { "GetGuildMemberCount", &luaUnit::GetGuildMemberCount }, |
|---|
| 444 | { "CanAttack", &luaUnit::CanAttack }, |
|---|
| 445 | { "GetInRangeUnits", &luaUnit::GetInRangeUnits }, |
|---|
| 446 | { "GetInRangeEnemies", &luaUnit::GetInRangeEnemies }, |
|---|
| 447 | { "IsFriendly", &luaUnit::IsFriendly }, |
|---|
| 448 | { "MovePlayerTo", &luaUnit::MovePlayerTo }, |
|---|
| 449 | // next 15 - Alvanaar |
|---|
| 450 | //{ "IsInChannel", &luaUnit::IsInChannel }, |
|---|
| 451 | //{ "JoinChannel", &luaUnit::JoinChannel }, |
|---|
| 452 | //{ "LeaveChannel", &luaUnit::LeaveChannel }, |
|---|
| 453 | //{ "SetChannelOwner", &luaUnit::SetChannelOwner }, |
|---|
| 454 | //{ "GetChannelOwner", &luaUnit::GetChannelOwner }, |
|---|
| 455 | //{ "SendPacketToChannel", &luaUnit::SendPacketToChannel }, |
|---|
| 456 | //{ "SetChannelName", &luaUnit::SetChannelName }, |
|---|
| 457 | //{ "SetChannelPassword", &luaUnit::SetChannelPassword }, |
|---|
| 458 | //{ "GetChannelPassword", &luaUnit::GetChannelPassword }, |
|---|
| 459 | //{ "GetChannelOwner", &luaUnit::GetChannelOwner }, |
|---|
| 460 | //{ "KickFromChannel", &luaUnit::KickFromChannel }, |
|---|
| 461 | //{ "BanFromChannel", &luaUnit::BanFromChannel }, |
|---|
| 462 | //{ "UnbanFromChannel", &luaUnit::UnbanFromChannel }, |
|---|
| 463 | //{ "GetChannelMemberCount", &luaUnit::GetChannelMemberCount }, |
|---|
| 464 | //{ "GetChannelMembers", &luaUnit::GetChannelMembers }, |
|---|
| 465 | { "GetPlayerMovementVector", &luaUnit::GetPlayerMovementVector}, |
|---|
| 466 | { "UnsetKnownTitle", &luaUnit::UnsetKnownTitle}, |
|---|
| 467 | { "IsInPhase", &luaUnit::IsInPhase}, |
|---|
| 468 | { "HasFlag", &luaUnit::HasFlag }, |
|---|
| 469 | { "Repop", &luaUnit::Repop }, |
|---|
| 470 | { "SetMovementFlags", &luaUnit::SetMovementFlags }, |
|---|
| 471 | { "GetSpawnId", &luaUnit::GetSpawnId }, |
|---|
| 472 | { "ResetTalents", &luaUnit::ResetTalents }, |
|---|
| 473 | { "SetTalentPoints", &luaUnit::SetTalentPoints }, |
|---|
| 474 | { "GetTalentPoints", &luaUnit::GetTalentPoints }, |
|---|
| 475 | { "EventChat", &luaUnit::EventChat }, |
|---|
| 476 | { "GetEquippedItemBySlot", &luaUnit::GetEquippedItemBySlot }, |
|---|
| 477 | { "GetGuildMembers", &luaUnit::GetGuildMembers }, |
|---|
| 478 | { "AddAchievement", &luaUnit::AddAchievement }, |
|---|
| 479 | { "RemoveAchievement", &luaUnit::RemoveAchievement }, |
|---|
| 480 | { "HasAchievement", &luaUnit::HasAchievement }, |
|---|
| 481 | { "RemoveArenaPoints", &luaUnit::RemoveArenaPoints}, |
|---|
| 482 | { "TakeHonor", &luaUnit::TakeHonor}, |
|---|
| 483 | { "SetPhase", &luaUnit::PhaseSet}, |
|---|
| 484 | { "DeletePhase", &luaUnit::PhaseDelete}, |
|---|
| 485 | { "AddToPhase", &luaUnit::PhaseAdd}, |
|---|
| 486 | { "GetAreaId", &luaUnit::GetAreaId}, |
|---|
| 487 | { "ResetPetTalents", &luaUnit::ResetPetTalents}, |
|---|
| 488 | { "IsDazed", &luaUnit::IsDazed }, |
|---|
| 489 | { "GetAura", &luaUnit::GetAura }, |
|---|
| 490 | { "IsRooted", &luaUnit::IsRooted }, |
|---|
| 491 | { "HasAuraWithMechanic", &luaUnit::HasAuraWithMechanic }, |
|---|
| 492 | { "HasNegativeAura", &luaUnit::HasNegativeAura }, |
|---|
| 493 | { "HasPositiveAura", &luaUnit::HasPositiveAura }, |
|---|
| 494 | { "SetActionBar", &luaUnit::SetActionBar }, |
|---|
| 495 | { "GetClosestEnemy", &luaUnit::GetClosestEnemy }, |
|---|
| 496 | { "GetClosestFriend", &luaUnit::GetClosestFriend }, |
|---|
| 497 | { "IsOnTaxi", &luaUnit::IsOnTaxi }, |
|---|
| 498 | { "GetTaxi", &luaUnit::GetTaxi }, |
|---|
| 499 | { "GetObjectType", &luaUnit::GetObjectType }, |
|---|
| 500 | { "CreateCustomWaypoint", &luaUnit::CreateCustomWaypoint }, |
|---|
| 501 | { "DeleteWaypoints", &luaUnit::DeleteAllWaypoints }, |
|---|
| 502 | { "GiveXp", &luaUnit::GiveXp }, |
|---|
| 503 | { "GetPower", &luaUnit::GetPower }, |
|---|
| 504 | { "GetPowerPct", &luaUnit::GetPowerPct }, |
|---|
| 505 | { "GetMaxPower", &luaUnit::GetMaxPower }, |
|---|
| 506 | { "SetPower", &luaUnit::SetPower }, |
|---|
| 507 | { "SetPowerPct", &luaUnit::SetPowerPct }, |
|---|
| 508 | { "SetMaxPower", &luaUnit::SetMaxPower }, |
|---|
| 509 | { "LearnSpells", &luaUnit::LearnSpells }, |
|---|
| 510 | { "GetCurrentWaypoint", &luaUnit::GetCurrentWaypoint }, |
|---|
| 511 | { "GetSelectedGO", &luaUnit::GetSelectedGO }, |
|---|
| 512 | { "FullCastSpell", &luaUnit::FullCastSpell }, |
|---|
| 513 | { "FullCastSpellOnTarget", &luaUnit::FullCastSpellOnTarget }, |
|---|
| 514 | { "DisableMelee", &luaUnit::DisableMelee }, |
|---|
| 515 | { "DisableRanged", &luaUnit::DisableRanged }, |
|---|
| 516 | { "DisableSpells", &luaUnit::DisableSpells }, |
|---|
| 517 | { "DisableCombat", &luaUnit::DisableCombat }, |
|---|
| 518 | { "DisableTargeting", &luaUnit::DisableTargeting }, |
|---|
| 519 | { "IsInGroup", &luaUnit::IsInGroup }, |
|---|
| 520 | { NULL, NULL }, |
|---|
| 521 | }; |
|---|
| 522 | |
|---|
| 523 | RegType<GameObject> GOMethods[] = { |
|---|
| 524 | { "GetGUID", &luaGameObject::GetGUID }, |
|---|
| 525 | { "GetName", &luaGameObject::GetName }, |
|---|
| 526 | { "Teleport" , &luaGameObject::Teleport }, |
|---|
| 527 | { "GetCreatureNearestCoords", &luaGameObject::GetCreatureNearestCoords }, |
|---|
| 528 | //{ "GetAreaID", &luaGameObject::GetAreaID }, |
|---|
| 529 | { "GetGameObjectNearestCoords", &luaGameObject::GetGameObjectNearestCoords }, |
|---|
| 530 | { "GetZoneId", &luaGameObject::GetZoneId }, |
|---|
| 531 | { "GetClosestPlayer", &luaGameObject::GetClosestPlayer }, |
|---|
| 532 | { "SpawnCreature", &luaGameObject::SpawnCreature }, |
|---|
| 533 | { "SpawnGameObject", &luaGameObject::SpawnGameObject }, |
|---|
| 534 | { "IsInWorld", &luaGameObject::IsInWorld }, |
|---|
| 535 | { "GetSpawnX", &luaGameObject::GetSpawnX }, |
|---|
| 536 | { "GetSpawnY", &luaGameObject::GetSpawnY }, |
|---|
| 537 | { "GetSpawnZ", &luaGameObject::GetSpawnZ }, |
|---|
| 538 | { "GetSpawnO", &luaGameObject::GetSpawnO }, |
|---|
| 539 | { "GetInRangePlayersCount", &luaGameObject::GetInRangePlayersCount }, |
|---|
| 540 | { "GetEntry", &luaGameObject::GetEntry }, |
|---|
| 541 | { "SetOrientation", &luaGameObject::SetOrientation }, |
|---|
| 542 | { "GetX", &luaGameObject::GetX }, |
|---|
| 543 | { "GetY", &luaGameObject::GetY }, |
|---|
| 544 | { "GetZ", &luaGameObject::GetZ }, |
|---|
| 545 | { "GetO", &luaGameObject::GetO }, |
|---|
| 546 | { "RemoveFromWorld", &luaGameObject::RemoveFromWorld }, |
|---|
| 547 | { "CalcRadAngle", &luaGameObject::CalcRadAngle }, |
|---|
| 548 | { "GetInstanceID", &luaGameObject::GetInstanceID }, |
|---|
| 549 | { "GetInRangePlayers", &luaGameObject::GetInRangePlayers }, |
|---|
| 550 | { "GetInRangeObjects", &luaGameObject::GetInRangeGameObjects }, |
|---|
| 551 | { "IsInBack", &luaGameObject::IsInBack }, |
|---|
| 552 | { "IsInFront", &luaGameObject::IsInFront }, |
|---|
| 553 | { "GetMapId", &luaGameObject::GetMapId }, |
|---|
| 554 | { "SetUInt32Value", &luaGameObject::SetUInt32Value }, |
|---|
| 555 | { "SetUInt64Value", &luaGameObject::SetUInt64Value }, |
|---|
| 556 | { "SetFloatValue", &luaGameObject::SetFloatValue }, |
|---|
| 557 | { "GetUInt32Value", &luaGameObject::GetUInt32Value }, |
|---|
| 558 | { "GetUInt64Value", &luaGameObject::GetUInt64Value }, |
|---|
| 559 | { "GetFloatValue", &luaGameObject::GetFloatValue }, |
|---|
| 560 | { "ModUInt32Value", &luaGameObject::ModUInt32Value }, |
|---|
| 561 | { "CastSpell", &luaGameObject::CastSpell }, |
|---|
| 562 | { "CastSpellOnTarget", &luaGameObject::CastSpellOnTarget }, |
|---|
| 563 | { "GossipObjectCreateMenu", &luaGameObject::GossipCreateMenu }, |
|---|
| 564 | { "GossipObjectMenuAddItem", &luaGameObject::GossipMenuAddItem }, |
|---|
| 565 | { "GossipObjectSendMenu", &luaGameObject::GossipSendMenu }, |
|---|
| 566 | { "GossipObjectComplete", &luaGameObject::GossipComplete }, |
|---|
| 567 | { "GossipObjectSendPOI", &luaGameObject::GossipSendPOI }, |
|---|
| 568 | { "RegisterAIUpdateEvent", &luaGameObject::RegisterAIUpdate }, |
|---|
| 569 | { "ModifyAIUpdateEvent", &luaGameObject::ModAIUpdate }, |
|---|
| 570 | { "RemoveAIUpdateEvent", &luaGameObject::RemoveAIUpdate }, |
|---|
| 571 | { "PerformWorldDBQuery", &luaGameObject::PerformWorldDBQuery }, |
|---|
| 572 | { "PerformCharDBQuery", &luaGameObject::PerformCharDBQuery }, |
|---|
| 573 | { "Activate", &luaGameObject::Activate }, |
|---|
| 574 | { "IsActive", &luaGameObject::IsActive }, |
|---|
| 575 | //All three of these do the same thing. |
|---|
| 576 | { "ObjectDespawn", &luaGameObject::DespawnObject }, //'cause it was announced on SVN like that |
|---|
| 577 | { "Despawn", &luaGameObject::DespawnObject }, |
|---|
| 578 | { "DespawnObject", &luaGameObject::DespawnObject }, |
|---|
| 579 | //hypersniper's |
|---|
| 580 | { "GetGameTime", &luaGameObject::GetGameTime }, |
|---|
| 581 | { "GetLandHeight", &luaGameObject::GetLandHeight}, |
|---|
| 582 | { "SetZoneWeather", &luaGameObject::SetZoneWeather}, |
|---|
| 583 | { "PhaseSet", &luaGameObject::PhaseSet}, |
|---|
| 584 | { "PhaseAdd", &luaGameObject::PhaseAdd}, |
|---|
| 585 | { "PhaseDelete", &luaGameObject::PhaseDelete}, |
|---|
| 586 | { "GetPhase", &luaGameObject::GetPhase}, |
|---|
| 587 | { "SendPacket", luaGameObject::SendPacket }, |
|---|
| 588 | { "SendPacketToZone", &luaGameObject::SendPacketToZone}, |
|---|
| 589 | { "SendPacketToWorld", &luaGameObject::SendPacketToWorld}, |
|---|
| 590 | { "SendPacketToInstance", &luaGameObject::SendPacketToInstance}, |
|---|
| 591 | { "AddLoot", &luaGameObject::AddLoot}, |
|---|
| 592 | //3004 ends here |
|---|
| 593 | { "Update", &luaGameObject::Update}, //sadikum |
|---|
| 594 | { "GetInstanceOwner", &luaGameObject::GetInstanceOwner }, |
|---|
| 595 | { "GetDungeonDifficulty", &luaGameObject::GetDungeonDifficulty }, |
|---|
| 596 | { "SetDungeonDifficulty", &luaGameObject::SetDungeonDifficulty }, |
|---|
| 597 | { "HasFlag", &luaGameObject::HasFlag }, |
|---|
| 598 | { "IsInPhase", &luaGameObject::IsInPhase}, |
|---|
| 599 | { "SetPhase", &luaGameObject::PhaseSet}, |
|---|
| 600 | { "DeletePhase", &luaGameObject::PhaseDelete}, |
|---|
| 601 | { "AddToPhase", &luaGameObject::PhaseAdd}, |
|---|
| 602 | { "GetAreaId", &luaGameObject::GetAreaId}, |
|---|
| 603 | { "SetPosition", &luaGameObject::SetPosition}, |
|---|
| 604 | { "GetObjectType", &luaGameObject::GetObjectType}, |
|---|
| 605 | { "PlaySoundToSet", &luaGameObject::PlaySoundToSet }, |
|---|
| 606 | { "GetDistance", &luaGameObject::GetDistance }, |
|---|
| 607 | { "GetDistanceYards", &luaGameObject::GetDistanceYards }, |
|---|
| 608 | { "GetSpawnId", &luaGameObject::GetSpawnId }, |
|---|
| 609 | { "ChangeScale", &luaGameObject::ChangeScale }, |
|---|
| 610 | { "GetByte", &luaGameObject::GetByte }, |
|---|
| 611 | { "GetByteValue", &luaGameObject::GetByte }, |
|---|
| 612 | { "SetByte", &luaGameObject::SetByte }, |
|---|
| 613 | { "SetByteValue", &luaGameObject::SetByte }, |
|---|
| 614 | { "FullCastSpell", &luaGameObject::FullCastSpell }, |
|---|
| 615 | { "FullCastSpellOnTarget", &luaGameObject::FullCastSpellOnTarget }, |
|---|
| 616 | { "CustomAnimate", &luaGameObject::CustomAnimate }, |
|---|
| 617 | { NULL, NULL }, |
|---|
| 618 | }; |
|---|
| 619 | |
|---|
| 620 | RegType<WorldPacket> LuaPacketMethods[] = { |
|---|
| 621 | {"CreatePacket", &luPacket::CreatePacket }, |
|---|
| 622 | { "GetOpcode", &luPacket::GetOpcode }, |
|---|
| 623 | { "GetSize", &luPacket::GetSize }, |
|---|
| 624 | //READ OPERATIONS |
|---|
| 625 | {"ReadByte", &luPacket::ReadByte }, |
|---|
| 626 | {"ReadUByte", &luPacket::ReadUByte }, |
|---|
| 627 | {"ReadShort", &luPacket::ReadShort }, |
|---|
| 628 | {"ReadUShort",&luPacket::ReadUShort }, |
|---|
| 629 | {"ReadLong", &luPacket::ReadLong }, |
|---|
| 630 | {"ReadULong", &luPacket::ReadULong }, |
|---|
| 631 | {"ReadFloat",&luPacket::ReadFloat }, |
|---|
| 632 | {"ReadDouble", &luPacket::ReadDouble }, |
|---|
| 633 | {"ReadGUID",&luPacket::ReadGUID }, |
|---|
| 634 | //WRITE OPERATIONS |
|---|
| 635 | {"WriteUByte", &luPacket::WriteUByte }, |
|---|
| 636 | {"WriteByte", &luPacket::WriteByte }, |
|---|
| 637 | {"WriteShort",&luPacket::WriteShort }, |
|---|
| 638 | {"WriteUShort",&luPacket::WriteUShort }, |
|---|
| 639 | {"WriteLong", &luPacket::WriteLong }, |
|---|
| 640 | {"WriteULong", &luPacket::WriteULong }, |
|---|
| 641 | {"WriteFloat", &luPacket::WriteFloat }, |
|---|
| 642 | {"WriteDouble", &luPacket::WriteDouble }, |
|---|
| 643 | {"WriteGUID", &luPacket::WriteGUID }, |
|---|
| 644 | {"GetObjectType", &luPacket::GetObjectType}, |
|---|
| 645 | {NULL, NULL}, |
|---|
| 646 | }; |
|---|
| 647 | |
|---|
| 648 | RegType<TaxiPath> LuaTaxiMethods[] = { |
|---|
| 649 | { "CreateTaxi", &LuaTaxi::CreateTaxi }, |
|---|
| 650 | { "GetNodeCount", &LuaTaxi::GetNodeCount }, |
|---|
| 651 | { "AddPathNode", &LuaTaxi::AddPathNode }, |
|---|
| 652 | //{ "GetNodeX", &LuaTaxi::GetNodeX }, |
|---|
| 653 | //{ "GetNodeY", &LuaTaxi::GetNodeY }, |
|---|
| 654 | //{ "GetNodeZ", &LuaTaxi::GetNodeZ }, |
|---|
| 655 | //{ "GetNodeMapId", &LuaTaxi::GetNodeMapId }, |
|---|
| 656 | { "GetId", &LuaTaxi::GetId }, |
|---|
| 657 | { "GetObjectType", &LuaTaxi::GetObjectType}, |
|---|
| 658 | {NULL, NULL}, |
|---|
| 659 | }; |
|---|
| 660 | |
|---|
| 661 | RegType<Spell> SpellMethods[] = { |
|---|
| 662 | { "GetCaster", &LuaSpell::GetCaster }, |
|---|
| 663 | { "GetEntry", &LuaSpell::GetEntry }, |
|---|
| 664 | { "IsDuelSpell", &LuaSpell::IsDuelSpell }, |
|---|
| 665 | { "GetSpellType", &LuaSpell::GetSpellType }, |
|---|
| 666 | { "GetSpellState", &LuaSpell::GetSpellState }, |
|---|
| 667 | { "Cancel", &LuaSpell::Cancel }, |
|---|
| 668 | { "Cast", &LuaSpell::Cast }, |
|---|
| 669 | { "CanCast", &LuaSpell::CanCast }, |
|---|
| 670 | { "Finish", &LuaSpell::Finish }, |
|---|
| 671 | { "GetTarget", &LuaSpell::GetTarget }, |
|---|
| 672 | { "IsStealthSpell", &LuaSpell::IsStealthSpell }, |
|---|
| 673 | { "IsInvisibilitySpell", &LuaSpell::IsInvisibilitySpell }, |
|---|
| 674 | { "GetPossibleEnemy", &LuaSpell::GetPossibleEnemy }, |
|---|
| 675 | { "GetPossibleFriend", &LuaSpell::GetPossibleFriend }, |
|---|
| 676 | { "HasPower", &LuaSpell::HasPower }, |
|---|
| 677 | { "IsAspect", &LuaSpell::IsAspect }, |
|---|
| 678 | { "IsSeal", &LuaSpell::IsSeal }, |
|---|
| 679 | { "GetObjectType", &LuaSpell::GetObjectType}, |
|---|
| 680 | { "SetVar", &LuaSpell::SetVar}, |
|---|
| 681 | { "GetVar", &LuaSpell::GetVar}, |
|---|
| 682 | { "ResetVar", &LuaSpell::ResetVar}, |
|---|
| 683 | { "ResetAllVars", &LuaSpell::ResetAllVars}, |
|---|
| 684 | {NULL, NULL}, |
|---|
| 685 | }; |
|---|
| 686 | RegType<QueryResult> QResultMethods[] = |
|---|
| 687 | { |
|---|
| 688 | {"GetColumn", &luaSql::GetColumn }, |
|---|
| 689 | {"NextRow", &luaSql::NextRow }, |
|---|
| 690 | {"GetColumnCount", &luaSql::GetColumnCount }, |
|---|
| 691 | {"GetRowCount", &luaSql::GetRowCount }, |
|---|
| 692 | { NULL, NULL}, |
|---|
| 693 | }; |
|---|
| 694 | RegType<Field> SQLFieldMethods[] = { |
|---|
| 695 | {"GetByte", &luaSql::GetByte }, |
|---|
| 696 | {"GetUByte", &luaSql::GetUByte }, |
|---|
| 697 | {"GetShort", &luaSql::GetShort }, |
|---|
| 698 | {"GetUShort", &luaSql::GetUShort}, |
|---|
| 699 | {"GetLong", &luaSql::GetLong }, |
|---|
| 700 | {"GetULong", &luaSql::GetULong }, |
|---|
| 701 | {"GetString",&luaSql::GetString }, |
|---|
| 702 | {"GetGUID", &luaSql::GetGUID }, |
|---|
| 703 | {NULL, NULL}, |
|---|
| 704 | }; |
|---|
| 705 | |
|---|
| 706 | template<typename T> RegType<T>* GetMethodTable() { return NULL; } |
|---|
| 707 | template<> RegType<Unit>* GetMethodTable<Unit>() { return UnitMethods; } |
|---|
| 708 | template<> RegType<Item>* GetMethodTable<Item>() { return ItemMethods; } |
|---|
| 709 | template<> RegType<GameObject>* GetMethodTable<GameObject>() { return GOMethods; } |
|---|
| 710 | template<> RegType<WorldPacket>* GetMethodTable<WorldPacket>() { return LuaPacketMethods; } |
|---|
| 711 | template<> RegType<TaxiPath>* GetMethodTable<TaxiPath>() { return LuaTaxiMethods; } |
|---|
| 712 | template<> RegType<Spell>* GetMethodTable<Spell>() { return SpellMethods; } |
|---|
| 713 | template<> RegType<QueryResult>* GetMethodTable<QueryResult>() { return QResultMethods; } |
|---|
| 714 | template<> RegType<Field> * GetMethodTable<Field>() { return SQLFieldMethods; } |
|---|
| 715 | |
|---|
| 716 | #endif |
|---|