Permalink
Browse files

Truncating history

  • Loading branch information...
0 parents commit a04de5b1940853ee34e0dedc2b00faaca0ae8935 @Foereaper Foereaper committed Jun 29, 2014
Showing with 14,508 additions and 0 deletions.
  1. +127 −0 AuraMethods.h
  2. +134 −0 CMakeLists.txt
  3. +58 −0 CorpseMethods.h
  4. +679 −0 CreatureMethods.h
  5. +207 −0 GameObjectMethods.h
  6. +1,167 −0 GlobalMethods.h
  7. +227 −0 GroupMethods.h
  8. +205 −0 GuildMethods.h
  9. +2,093 −0 HookMgr.cpp
  10. +467 −0 HookMgr.h
  11. +498 −0 ItemMethods.h
  12. +895 −0 LuaEngine.cpp
  13. +689 −0 LuaEngine.h
  14. +1,215 −0 LuaFunctions.cpp
  15. +114 −0 MapMethods.h
  16. +214 −0 ObjectMethods.h
  17. +2,328 −0 PlayerMethods.h
  18. +188 −0 QueryMethods.h
  19. +103 −0 QuestMethods.h
  20. +36 −0 README.md
  21. +131 −0 SpellMethods.h
  22. +1,710 −0 UnitMethods.h
  23. +80 −0 VehicleMethods.h
  24. +51 −0 WeatherMethods.h
  25. +432 −0 WorldObjectMethods.h
  26. +207 −0 WorldPacketMethods.h
  27. +33 −0 docs/INSTALL.md
  28. +220 −0 docs/LICENSE.md
@@ -0,0 +1,127 @@
+/*
+* Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/>
+* This program is free software licensed under GPL version 3
+* Please see the included DOCS/LICENSE.md for more information
+*/
+
+#ifndef AURAMETHODS_H
+#define AURAMETHODS_H
+
+namespace LuaAura
+{
+ int GetCaster(lua_State* L, Aura* aura)
+ {
+ sEluna->Push(L, aura->GetCaster());
+ return 1;
+ }
+
+ int GetCasterGUID(lua_State* L, Aura* aura)
+ {
+#ifdef MANGOS
+ sEluna->Push(L, aura->GetCasterGuid());
+#else
+ sEluna->Push(L, aura->GetCasterGUID());
+#endif
+ return 1;
+ }
+
+ int GetCasterLevel(lua_State* L, Aura* aura)
+ {
+ sEluna->Push(L, aura->GetCaster()->getLevel());
+ return 1;
+ }
+
+ int GetDuration(lua_State* L, Aura* aura)
+ {
+#ifdef MANGOS
+ sEluna->Push(L, aura->GetAuraDuration());
+#else
+ sEluna->Push(L, aura->GetDuration());
+#endif
+ return 1;
+ }
+
+ int GetCharges(lua_State* L, Aura* aura)
+ {
+ sEluna->Push(L, aura->GetStackAmount());
+ return 1;
+ }
+
+ int GetAuraId(lua_State* L, Aura* aura)
+ {
+ sEluna->Push(L, aura->GetId());
+ return 1;
+ }
+
+ int GetMaxDuration(lua_State* L, Aura* aura)
+ {
+#ifdef MANGOS
+ sEluna->Push(L, aura->GetAuraMaxDuration());
+#else
+ sEluna->Push(L, aura->GetMaxDuration());
+#endif
+ return 1;
+ }
+
+ int GetStackAmount(lua_State* L, Aura* aura)
+ {
+ sEluna->Push(L, aura->GetStackAmount());
+ return 1;
+ }
+
+ int GetOwner(lua_State* L, Aura* aura)
+ {
+#ifdef MANGOS
+ sEluna->Push(L, aura->GetTarget());
+#else
+ sEluna->Push(L, aura->GetOwner());
+#endif
+ return 1;
+ }
+
+ int SetDuration(lua_State* L, Aura* aura)
+ {
+ int duration = sEluna->CHECKVAL<int>(L, 2);
+#ifdef MANGOS
+ aura->GetHolder()->SetAuraDuration(duration);
+#else
+ aura->SetDuration(duration);
+#endif
+ return 0;
+ }
+
+ int SetMaxDuration(lua_State* L, Aura* aura)
+ {
+ int duration = sEluna->CHECKVAL<int>(L, 2);
+#ifdef MANGOS
+ aura->GetHolder()->SetAuraMaxDuration(duration);
+#else
+ aura->SetMaxDuration(duration);
+#endif
+ return 0;
+ }
+
+ int SetStackAmount(lua_State* L, Aura* aura)
+ {
+ int amount = sEluna->CHECKVAL<int>(L, 2);
+ int duration = sEluna->CHECKVAL<int>(L, 2);
+#ifdef MANGOS
+ aura->GetHolder()->SetStackAmount(amount);
+#else
+ aura->SetStackAmount(amount);
+#endif
+ return 0;
+ }
+
+ int Remove(lua_State* L, Aura* aura)
+ {
+ int duration = sEluna->CHECKVAL<int>(L, 2);
+#ifdef MANGOS
+ aura->GetHolder()->RemoveAura(aura->GetEffIndex());
+#else
+ aura->Remove();
+#endif
+ return 0;
+ }
+};
+#endif
@@ -0,0 +1,134 @@
+#
+# Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/>
+# This program is free software licensed under GPL version 3
+# Please see the included DOCS/LICENSE.md for more information
+#
+
+if ( USE_COREPCH )
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_SOURCE_DIR})
+endif ()
+
+file(GLOB sources_localdir *.cpp *.h)
+
+set(LuaEngine_STAT_SRCS
+ ${LuaEngine_STAT_SRCS}
+ ${sources_localdir}
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Recast
+ ${CMAKE_SOURCE_DIR}/dep/g3dlite/include
+ ${CMAKE_SOURCE_DIR}/dep/SFMT
+ ${CMAKE_SOURCE_DIR}/dep/mersennetwister
+ ${CMAKE_SOURCE_DIR}/dep/zlib
+ ${CMAKE_SOURCE_DIR}/dep/lualib
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Policies
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
+ ${CMAKE_SOURCE_DIR}/src/server/collision
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Management
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/game/Accounts
+ ${CMAKE_SOURCE_DIR}/src/server/game/Achievements
+ ${CMAKE_SOURCE_DIR}/src/server/game/Addons
+ ${CMAKE_SOURCE_DIR}/src/server/game/Handlers
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/CoreAI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/EventAI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/SmartScripts
+ ${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse
+ ${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds
+ ${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds/Zones
+ ${CMAKE_SOURCE_DIR}/src/server/game/Calendar
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat/Channels
+ ${CMAKE_SOURCE_DIR}/src/server/game/Conditions
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/game/Combat
+ ${CMAKE_SOURCE_DIR}/src/server/game/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/DungeonFinding
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/AreaTrigger
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Corpse
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/DynamicObject
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item/Container
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Pet
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Player
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Transport
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Vehicle
+ ${CMAKE_SOURCE_DIR}/src/server/game/Events
+ ${CMAKE_SOURCE_DIR}/src/server/game/Globals
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Groups
+ ${CMAKE_SOURCE_DIR}/src/server/game/Guilds
+ ${CMAKE_SOURCE_DIR}/src/server/game/Instances
+ ${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup
+ ${CMAKE_SOURCE_DIR}/src/server/game/Loot
+ ${CMAKE_SOURCE_DIR}/src/server/game/Mails
+ ${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
+ ${CMAKE_SOURCE_DIR}/src/server/game/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/MovementGenerators
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Spline
+ ${CMAKE_SOURCE_DIR}/src/server/game/Opcodes
+ ${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
+ ${CMAKE_SOURCE_DIR}/src/server/game/Pools
+ ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders
+ ${CMAKE_SOURCE_DIR}/src/server/game/Quests
+ ${CMAKE_SOURCE_DIR}/src/server/game/Reputation
+ ${CMAKE_SOURCE_DIR}/src/server/game/Scripting
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Skills
+ ${CMAKE_SOURCE_DIR}/src/server/game/Spells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
+ ${CMAKE_SOURCE_DIR}/src/server/game/Texts
+ ${CMAKE_SOURCE_DIR}/src/server/game/Tickets
+ ${CMAKE_SOURCE_DIR}/src/server/game/Tools
+ ${CMAKE_SOURCE_DIR}/src/server/game/Weather
+ ${CMAKE_SOURCE_DIR}/src/server/game/World
+ ${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
+)
+
+add_library(LuaEngine STATIC
+ ${LuaEngine_STAT_SRCS}
+ ${game_STAT_SRCS}
+ ${game_STAT_PCH_SRC}
+)
+
+target_link_libraries(LuaEngine
+ game
+)
+
+add_dependencies(LuaEngine game)
@@ -0,0 +1,58 @@
+/*
+* Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/>
+* This program is free software licensed under GPL version 3
+* Please see the included DOCS/LICENSE.md for more information
+*/
+
+#ifndef CORPSEMETHODS_H
+#define CORPSEMETHODS_H
+
+namespace LuaCorpse
+{
+ // GetOwnerGUID()
+ int GetOwnerGUID(lua_State* L, Corpse* corpse)
+ {
+#ifdef MANGOS
+ sEluna->Push(L, corpse->GetOwnerGuid());
+#else
+ sEluna->Push(L, corpse->GetOwnerGUID());
+#endif
+ return 1;
+ }
+
+ // GetGhostTime()
+ int GetGhostTime(lua_State* L, Corpse* corpse)
+ {
+ sEluna->Push(L, uint32(corpse->GetGhostTime()));
+ return 1;
+ }
+
+ // GetType()
+ int GetType(lua_State* L, Corpse* corpse)
+ {
+ sEluna->Push(L, corpse->GetType());
+ return 1;
+ }
+
+ // ResetGhostTime()
+ int ResetGhostTime(lua_State* L, Corpse* corpse)
+ {
+ corpse->ResetGhostTime();
+ return 0;
+ }
+
+ // SaveToDB()
+ int SaveToDB(lua_State* L, Corpse* corpse)
+ {
+ corpse->SaveToDB();
+ return 0;
+ }
+
+ // DeleteBonesFromWorld()
+ int DeleteBonesFromWorld(lua_State* L, Corpse* corpse)
+ {
+ corpse->DeleteBonesFromWorld();
+ return 0;
+ }
+};
+#endif
Oops, something went wrong.

0 comments on commit a04de5b

Please sign in to comment.